fix(web): highlight only the active settings section - #10524
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR is a focused settings-sidebar bug fix that selects one active section and adjusts only the alignment of non-highlighted jumps, with targeted regression tests. It does not alter product defaults, static-analysis settings, schemas, or sensitive production areas. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe settings sidebar now tracks one active section based on visibility and recent clicks. Settings target scrolling uses viewport-start alignment when highlighting is disabled. Tests cover active-section fallback and both scroll modes. ChangesSettings navigation and scroll behavior
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to The settings sidebar now presents one active visible section and adjusts section-link scrolling while preserving centered search-result jumps. No current merge-blocking risk is identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Superseded by #10705 — settings section submenu/highlighting was removed. Closing in favor of that. |
Clicking a nested settings link could leave Behavior and other nearby sections highlighted. The sidebar treated every visible section as selected, and jumps centered the destination heading.
Select one visible section, preferring the clicked destination while it remains in view and falling back to the first visible section when scrolling away. Section links now align their headings at the top; search results retain centered jumps. The existing observer and route scoping stay in place, with
aria-currentidentifying the active section.Verified 13 focused tests, web typecheck, and scoped lint/formatting. The selection and alignment regressions fail against the original code. Lint retains the existing search-result effect warning.
Chromium checks covered all 15 links across General, Appearance, Connections, and Source Control; manual scrolling; sectioned/unsectioned route changes; centered search; and the sidebar at phone width. Normal and reduced motion both passed. Web and desktop share this sidebar; native Electron and React Native were not exercised. No server, provider, or connection contracts changed.
Interaction recordings: before · after.
Model: GPT-6. Harness: Codex in T3 Code.
Note
Fix
SettingsSidebarNavto highlight only the active settings sectionaria-currentand active text styling for only the selected section instead of adata-visibleattribute for every visible sectiongetActiveSettingsSectionIdnow returns a single section ID orundefinedinstead of a set of visible section IDs; callers that depended on the set API need updatingMacroscope summarized dc3f6a6.
Summary by CodeRabbit