feat(web): highlight active metabar heading#837
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview A new The web Reviewed by Cursor Bugbot for commit 14e26cf. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14e26cf. Configure here.
| ) { | ||
| nextActiveHeadingId = id; | ||
| } | ||
| } |
There was a problem hiding this comment.
Last section not highlighted
Medium Severity
Scroll tracking only promotes a heading when its getBoundingClientRect().top is at or above SCROLL_OFFSET. On the last section, that heading often sits lower on the screen while earlier headings are still above the threshold, so the table of contents keeps the previous link active instead of the section in view.
Reviewed by Cursor Bugbot for commit 14e26cf. Configure here.


The right-side table of contents now tracks the currently viewed heading after scroll or hash navigation. Active links receive
aria-current="location"and a more visible style so the current section is easier to spot.The web generator test now covers that the client bundle hydrates the active-heading behavior for right-side table of contents links.
Validation:
node --check src/generators/web/__tests__/generate.test.mjsandgit diff --check.Refs: #529