Skip to content

fix(scratchnode): sync the landing counter numbers during count-up#475

Merged
HomenShum merged 2 commits into
mainfrom
fix/scratchnode-counter-sync-anim
Jun 2, 2026
Merged

fix(scratchnode): sync the landing counter numbers during count-up#475
HomenShum merged 2 commits into
mainfrom
fix/scratchnode-counter-sync-anim

Conversation

@HomenShum

Copy link
Copy Markdown
Owner

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 ≤ roomsCreated always. 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. Since roomsCreated ≥ liveNow and Math.round is 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 asserts live ≤ total at every frame — fails on the old code, passes on the fix. 14/14 honesty suite green.

Follow-up to #473.

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview, Comment Jun 2, 2026 9:05pm

Request Review

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

✅ Dogfood Visual QA Gate: PASSED

Check Status
Screenshots 23 captured (pass)
Walkthrough 9 chapters (pass)
Key Frames 9 extracted (pass)
Scribe Steps 8 how-to steps (pass)
Build success
Artifacts

Download the dogfood-evidence-1ad1a7b artifact from the Actions tab for full screenshots, frames, and walkthrough video.


Generated by Dogfood QA Gate

@HomenShum
HomenShum merged commit 7d3b008 into main Jun 2, 2026
17 checks passed
@HomenShum
HomenShum deleted the fix/scratchnode-counter-sync-anim branch June 2, 2026 21:12
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact (pr-demo-475) at https://github.com/HomenShum/nodebench-ai/actions/runs/26848375893

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.

2 participants