Skip to content

perf(web): cap receipt simulation work#129

Merged
xingkaixin merged 1 commit into
mainfrom
feat/cs-47-receipt-frame-budget
Jul 11, 2026
Merged

perf(web): cap receipt simulation work#129
xingkaixin merged 1 commit into
mainfrom
feat/cs-47-receipt-frame-budget

Conversation

@xingkaixin

Copy link
Copy Markdown
Owner

Summary

  • cap InteractiveReceipt physics and canvas work at 60 simulation frames per second
  • stop idle simulation after 36 simulated frames instead of 90
  • render a single static frame and disable drag hit testing for reduced motion
  • extract and test the frame scheduling and settle policy

Impact

The receipt keeps its existing 18 by 42 mesh, constraint parameters, visual density, and pointer physics. On 120 Hz displays, simulation work is capped to half the prior rate. Idle simulation work is reduced by 60 percent, while reduced-motion users avoid continuous paper movement entirely.

Validation

  • pnpm format
  • pnpm lint
  • pnpm format:check
  • pnpm build
  • pnpm test (665 tests)
  • pnpm test:e2e (7 tests, including reduced motion)

Closes CS-47

@xingkaixin xingkaixin marked this pull request as ready for review July 11, 2026 13:20
@xingkaixin xingkaixin merged commit 9bd44c2 into main Jul 11, 2026
7 checks passed
@xingkaixin xingkaixin deleted the feat/cs-47-receipt-frame-budget branch July 11, 2026 13:20
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