fix(scratchnode): sync the landing counter numbers during count-up#475
Merged
Conversation
Tier-B live check caught the counter flashing "6 live · 4 total" on first load — impossible in steady state. The total animated up from 0 over 750ms while liveNow was set instantly, so mid-animation the animating total was briefly LESS than the instant live count, reading as a broken/fake number. Replace animateTo() with animatePair(): ease BOTH numbers from the same prior values with identical easing, so total >= live at every frame (Math.round is monotonic and roomsCreated >= liveNow always). Guarded by a new e2e case that samples both numbers 14x across the animation and asserts live <= total at every frame (fails on the old code, passes on the fix). 14/14 honesty suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
HomenShum
enabled auto-merge (squash)
June 2, 2026 20:47
✅ Dogfood Visual QA Gate: PASSED
ArtifactsDownload the Generated by Dogfood QA Gate |
|
Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The live room counter momentarily flashed "6 live · 4 total" on first load — caught by a Tier-B live-DOM check against production right after the counter shipped.
Root cause (analyst, not bandaid)
Live rooms are a subset of total rooms, so
liveNow ≤ roomsCreatedalways. But the total animated up from 0 over 750ms while liveNow was set instantly — so during the count-up the animating total was briefly less than the instant live count. Settled state was correct; the ~0.75s transient read as a broken/fake number on the one stat that has to be trustworthy.Fix
animateTo()→animatePair(): ease both numbers from the same prior values with identical easing. SinceroomsCreated ≥ liveNowandMath.roundis monotonic, the displayed total ≥ displayed live at every frame.Test
New e2e case (
live ≤ total during the count-up) injects{ roomsCreated: 8, liveNow: 6 }, samples both numbers 14× across the animation, and assertslive ≤ totalat every frame — fails on the old code, passes on the fix. 14/14 honesty suite green.Follow-up to #473.
🤖 Generated with Claude Code