Repository navigation
Highlight the section you're reading in "On this page" as you scroll - #23
Merged
Merged
Conversation
The lesson, docs, and legal page tables of contents now mark the section the reader is on and follow along while scrolling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 7a3a3b39-612e-473c-8268-5c4456aee6f5) |
This branch had an error being deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The "On this page" list beside a lesson never showed where you were. Every entry looked the same however far you scrolled.
Now the section you're reading is highlighted, and the highlight moves as you scroll. It uses the same tint as the selected lesson in the left sidebar. A section becomes current once its heading passes just under the sticky header. At the bottom of the page the last section on screen is picked, so short closing sections like "Check yourself" still light up. The legal pages (terms, privacy, security) have the same list, so they get this too. Their headings also no longer hide under the header when you click a link there.
Proof: headless Chromium against
next dev, scrolling to each heading and reading the highlighted link. On/lessons/languages-and-translatorsthe highlight moved in order through all 6 entries (High-level… → Assembly language → Compilers… → IDEs → Key terms → Check yourself) and stayed on "Check yourself" at the bottom. On/privacy, the middle of the page highlighted "6. Cookies…" and the bottom highlighted "13. Changes". Web typecheck, eslint and vitest all pass (236 passed, 1 skipped).Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved
Generated by
claude-opus-5-5using theClaude Code (T3 Code)harness.🤖 Generated with Claude Code
Note
Low Risk
Client-only UX on public docs/legal pages; no auth, data, or API changes.
Overview
On this page sidebars now track scroll position: the entry for the section you're reading is highlighted and updates as you scroll, using the same
--selectedstyling as the active lesson in the course nav.A shared client
TableOfContentscomponent replaces the static anchor lists on lesson/docs articles (ContentArticle) and legal pages (LegalPage). It picks the current section when its top crosses a fixed line under the sticky header, throttles updates withrequestAnimationFrame, and at the bottom of the page selects the last visible section so short blocks like Check yourself still get highlighted. Links setaria-current="location"when active.Legal pages also get
scroll-mt-24on section anchors so in-page jumps don't hide headings under the sticky header (lesson sections already had this viaDocSectionView).Reviewed by Cursor Bugbot for commit 274255b. Bugbot is set up for automated code reviews on this repo. Configure here.