Poster board initial PR test#5543
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70e43ec664
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }; | ||
|
|
||
| zoom100 = () => { | ||
| this.surfaceRig.zoomCentered(1 / this.rig.magnify, this.rootElement); |
There was a problem hiding this comment.
Stop pending zoom momentum before resetting
After a wheel/pinch zoom, handleWheel schedules momentum to start after a short timeout and any active RAF continues until explicitly stopped. The 100% control only calls zoomCentered(), which does not clear that pending/active zoom momentum, so clicking 100% immediately after a pinch can briefly show 100% and then drift away as the old momentum resumes. Clear the pending zoom momentum (or call stopAll() if pan momentum should also stop) before applying the reset.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
[Claude Code 🤖] Confirmed — zoomCentered()/zoomAtPoint() didn't clear the pending momentum-start timeout or live rAF loops, so stale pinch velocity could resume after the reset and drift the camera. Fixed at the rig level (any programmatic zoom now calls stopAll() first, covering +/− as well as 100%) in the catalog repo, where this card is being productionized: cardstack/boxel-catalog@a302baa, with a regression test (pinch → 100% → wait past the 45ms momentum delay → still 100%). This experiments-realm copy still has the issue; if it's kept, the same two-line fix applies.
Note: This work is currently progressing in catalog repo (cardstack/boxel-catalog#666), however I wanted to see if I would get a different result if the PR was opened in the monorepo.