Skip to content

fix(web): gaps render BLANK, not as straight connectors - #36

Merged
AgentSparko merged 1 commit into
mainfrom
fix/gap-renders-blank
Oct 29, 2026
Merged

AgentSparko merged 1 commit into
mainfrom
fix/gap-renders-blank

Conversation

@AgentSparko

Copy link
Copy Markdown
Owner

Follow-up to #28/#33. The data layer now emits nulls for unmeasurable stretches, but spark()/LineChart filtered nulls and drew kept samples as ONE polyline — bridging every gap with a straight connector (owner screenshot: 'perfectly straight line segments'). Both renderers now break the path per finite run; thinning skips stay connected; autoY guards null coercion; last-point dot uses last non-null. Tests: 4 new spark gap-break checks; node suites green; 333 pytest green.

The gap policy from #28/#33 turned unmeasurable rate stretches into nulls —
correct data, but the renderer lied: spark() and LineChart filtered the nulls
and drew the kept samples as ONE polyline, stitching long straight diagonals
across every invisible stretch (owner screenshot: prefill curve full of
'perfectly straight line segments'). Filtering + connecting = bridging terrain
that was never measured.

Both renderers now BREAK the path on nulls: one subpath per finite run, area
fill per run, last-point dot from the last NON-NULL sample. CAP thinning skips
indices too — those stays are finite and must not read as gaps (regression
test). autoY min/max loops skip nulls explicitly: 'null < mn' coerces to 0 and
would silently pin the floor.

No revert: the #28/#33 anti-dance data policy is exactly what the owner wants
('interrupted where it did not generate is the most realistic'). This is the
half both PRs left unshipped — the render layer honoring the gaps.
@AgentSparko
AgentSparko merged commit b22fd71 into main Oct 29, 2026
2 checks passed
@AgentSparko
AgentSparko deleted the fix/gap-renders-blank branch October 29, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant