You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep the Aliki TOC highlight in sync with the scroll position - #1849
The highlighted item in the right-hand "On This Page" TOC now follows the reader through long method lists. It also follows them after long jumps and after links to a method.
Before, the active item only changed when an IntersectionObserver reported a heading crossing the viewport. Long method lists have no TOC headings for thousands of pixels. So the highlight stayed on an old heading after a long scroll, and nothing was highlighted after opening a method from search or a #method-i-sub link. Now the current heading is computed on scroll. If no heading is in the upper part of the viewport, the last heading above the viewport becomes the current one.
#1842 fixes the TOC nesting of method group headings separately.
The TOC highlight only changed when a heading crossed the viewport, so
it went stale after long jumps and stayed empty when landing on a
method link. Compute the current heading on scroll instead, falling
back to the last heading above the viewport.
Constants, Attributes and method group headings in the untitled section
are now listed at the same TOC level as the class comment's sections,
instead of nesting under its last heading.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gxq9jGyjWoANhMZXRtssiu
#1842 fixes the method group nesting by emitting h2 headings in
the default section, so the TOC needs no special case for them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gxq9jGyjWoANhMZXRtssiu
st0012
changed the title
Fix Aliki TOC highlighting and method group nesting
Keep the Aliki TOC highlight in sync with the scroll position
Oct 13, 2026
A taller viewport can bring the next heading into the upper part of the
page without a scroll event.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gxq9jGyjWoANhMZXRtssiu
These listeners miss layout changes that happen without scrolling or resizing the window. Collapsing a method's Source panel changes its height and can move the next section heading into the upper 65% of the viewport, but the previous section stays highlighted until another scroll or resize. The removed IntersectionObserver detected that heading entering the activation area. Observe the main content's size as well and reuse scheduleUpdate so source-panel transitions also refresh the highlight.
🧠 Review effort: Balanced
This branch has not been deployed
No deployments
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
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.
Requested by Stan · project thread
The highlighted item in the right-hand "On This Page" TOC now follows the reader through long method lists. It also follows them after long jumps and after links to a method.
Before, the active item only changed when an IntersectionObserver reported a heading crossing the viewport. Long method lists have no TOC headings for thousands of pixels. So the highlight stayed on an old heading after a long scroll, and nothing was highlighted after opening a method from search or a
#method-i-sublink. Now the current heading is computed on scroll. If no heading is in the upper part of the viewport, the last heading above the viewport becomes the current one.#1842 fixes the TOC nesting of method group headings separately.