Skip to content

fix(web): stop resting canvas chart loops - #313

Merged
xingkaixin merged 2 commits into
mainfrom
feat/cs-191-resting-canvas-loops
Aug 11, 2026
Merged

fix(web): stop resting canvas chart loops#313
xingkaixin merged 2 commits into
mainfrom
feat/cs-191-resting-canvas-loops

Conversation

@xingkaixin

Copy link
Copy Markdown
Owner

Summary

  • add a shared demand-driven canvas frame loop with active, idle, and stopped states
  • suspend chart work outside the viewport or while the page is hidden
  • stop settled bar, donut, and tile charts while preserving data, hover, resize, and theme wakeups
  • cache resolved palettes and keep tile pointer work local to each chart host

Performance

  • settled charts now keep zero animation frames pending instead of recursively scheduling forever
  • hover drift and glow decay run at 20 fps; morph and growth remain full-rate while active
  • computed styles are resolved once per chart input or theme change rather than once per frame

Test plan

  • pnpm lint
  • pnpm format:check
  • pnpm test
  • pnpm build

Issue: CS-191

@xingkaixin
xingkaixin merged commit 89db66b into main Aug 11, 2026
20 checks passed
@xingkaixin
xingkaixin deleted the feat/cs-191-resting-canvas-loops branch August 11, 2026 15:47
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