Skip to content

fix(vx-docs): run the landing race on one clock - #5290

Merged
Exelord merged 1 commit into
mainfrom
claude/project-thread-8qsbtx
Nov 13, 2026
Merged

Exelord merged 1 commit into
mainfrom
claude/project-thread-8qsbtx

Conversation

@Exelord

@Exelord Exelord commented Nov 13, 2026

Copy link
Copy Markdown
Member

The landing race did not always play.

Cause

  • The runners moved through the Web Animations API while starting display: none.
  • One observer paused and resumed them from its first queued entry, which can be stale.
  • A second observer, with a different margin, decided whether the runners were shown.
  • At the band's edge the two disagreed: laps counted over static bars.

Fix

  • One frame clock moves the runners and counts the laps (race.ts, pure).
  • Whether it runs is read from where the band is now, on scroll, tab change and page restore.
  • The runners show from the class the clock itself sets.

Checks

  • tests/landing.test.ts: lap arithmetic, the on-screen rule, the frame cap, the lane data.
  • Chromium probe, 11 cases (fast scroll, anchor load, edge only, reload, back, tab hide, phone): all move; still when off screen.
  • Reduced motion keeps the static bars, as before.
  • Safari and Firefox are not installed here, so untested.

Generated by Claude Code

The race played through the Web Animations API on runners that start
display:none, paused and resumed by an observer that trusted its first
queued entry, while a second observer with a different margin showed
the runners. The two could disagree: at the band's edge the laps
counted over static bars, and a stale entry could leave it paused.

One frame clock now moves the runners and counts the laps, and reads
where the band is on scroll, tab change and page restore.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6xuYZX4pQtTvmpXneML5F
@Exelord
Exelord merged commit d15e4a4 into main Nov 13, 2026
5 of 6 checks passed
@Exelord
Exelord deleted the claude/project-thread-8qsbtx branch November 13, 2026 13:53
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