Skip to content

馃悰 fix: harden Y-grid against non-advancing steps - #22

Open
itsdiay wants to merge 1 commit into
benjitaylor:mainfrom
itsdiay:fix/y-grid-hang-guards
Open

馃悰 fix: harden Y-grid against non-advancing steps#22
itsdiay wants to merge 1 commit into
benjitaylor:mainfrom
itsdiay:fix/y-grid-hang-guards

Conversation

@itsdiay

@itsdiay itsdiay commented Aug 7, 2026

Copy link
Copy Markdown

Summary

  • Guard pickInterval against non-positive / non-finite inputs, non-progressing divisor shrink, and runaway iterations
  • Guard drawGrid fine-label loop when fine is bad, first is non-finite, or val + fine does not advance (ULP)
  • Add unit tests that tiny ranges terminate quickly

Fixes #19
Related: #18

Test plan

  • npm test (includes new src/draw/__tests__/grid.test.ts)
  • Manually: micro-priced / near-flat series no longer freezes the tab while scrubbing

Made with Cursor

pickInterval and drawGrid could hang the main thread when the Y domain
was tiny or non-finite (denormal fine steps where val += fine never
advances). Add input/progress guards and iteration caps. Fixes benjitaylor#19.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

馃悰 Y-grid can infinite-loop and freeze the tab on tiny / denormal ranges

1 participant