Skip to content

Make the section links actually arrive, not just navigate - #632

Merged
gHashTag merged 1 commit into
mainfrom
fix/scroll-polling
Aug 8, 2026
Merged

Make the section links actually arrive, not just navigate#632
gHashTag merged 1 commit into
mainfrom
fix/scroll-polling

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

The previous commit got the header off a routed page and onto the homepage — but the reader still landed at the top, not at the section they clicked. Two causes, found by instrumenting rather than guessing again:

  • The polling used requestAnimationFrame, throttled to zero frames in a hidden or backgrounded tab. A correctness path must not be built on the animation clock; it uses a timer now.
  • scrollIntoView({behavior: 'smooth'}) is itself animation-driven and silently does nothing under the same conditions. Measured: the element sat at top: 4041 for three seconds while scrollY stayed at 7, and behavior: 'auto' moved it instantly.

Behaviour is now chosen rather than assumed — instant when the document is hidden or the reader asked for reduced motion, smooth otherwise. Arriving instantly beats not arriving.

Verified all eight header links from a routed page and from the homepage, plus the footer, and confirmed #/quantum and the external docs link are unaffected.

🤖 Generated with Claude Code

The previous commit got the header off a routed page and onto the homepage, but
the reader still landed at the top rather than at the section they clicked. Two
causes, found by instrumenting rather than guessing again:

- The polling used requestAnimationFrame, which is throttled to zero frames in a
  hidden or backgrounded tab. A correctness path must not be built on the
  animation clock; it now uses a timer.
- scrollIntoView({behavior: 'smooth'}) is itself animation-driven and silently
  does nothing under the same conditions — measured: the element sat at
  top: 4041 for three seconds while scrollY stayed at 7, and behavior: 'auto'
  moved it instantly.

Behaviour is now chosen rather than assumed: instant when the document is hidden
or the reader has asked for reduced motion, smooth otherwise. Arriving instantly
beats not arriving.

Verified all eight header links from a routed page and from the homepage, plus
the footer, and checked that #/quantum and the external docs link are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit 2ab2a0e into main Aug 8, 2026
13 of 24 checks passed
@gHashTag
gHashTag deleted the fix/scroll-polling branch August 8, 2026 12:14
github-actions Bot added a commit that referenced this pull request Aug 8, 2026
Make the section links actually arrive, not just navigate (#632)

The previous commit got the header off a routed page and onto the homepage, but
the reader still landed at the top rather than at the section they clicked. Two
causes, found by instrumenting rather than guessing again:

- The polling used requestAnimationFrame, which is throttled to zero frames in a
  hidden or backgrounded tab. A correctness path must not be built on the
  animation clock; it now uses a timer.
- scrollIntoView({behavior: 'smooth'}) is itself animation-driven and silently
  does nothing under the same conditions — measured: the element sat at
  top: 4041 for three seconds while scrollY stayed at 7, and behavior: 'auto'
  moved it instantly.

Behaviour is now chosen rather than assumed: instant when the document is hidden
or the reader has asked for reduced motion, smooth otherwise. Arriving instantly
beats not arriving.

Verified all eight header links from a routed page and from the homepage, plus
the footer, and checked that #/quantum and the external docs link are unaffected.

Co-authored-by: Dmitrii Vasilev <admin@t27.ai>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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