Skip to content

fix: scroll sidebar to active item on navigation#112

Merged
rsbh merged 1 commit into
mainfrom
fix/sidebar-scroll-active-item
May 27, 2026
Merged

fix: scroll sidebar to active item on navigation#112
rsbh merged 1 commit into
mainfrom
fix/sidebar-scroll-active-item

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented May 27, 2026

Summary

  • Sidebar now scrolls active item into view when navigating via breadcrumbs or non-sidebar links
  • Replaced scroll position preservation with scroll-to-active behavior using getBoundingClientRect for reliable position calculation
  • Added data-active attribute to API sidebar items for consistent active item detection

Test plan

  • Navigate to a deeply nested page via breadcrumb — sidebar should scroll to show active item
  • Click sidebar items directly — sidebar should not jump if item is already visible
  • Navigate API pages — sidebar should scroll to active API endpoint
  • Verify mobile sidebar still closes on navigation

🤖 Generated with Claude Code

Replaced scroll position preservation with scroll-to-active-item behavior.
When navigating via breadcrumbs or other non-sidebar links, the sidebar
now scrolls the active item into view if it's outside the visible area.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview, Comment May 27, 2026 4:23am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@rsbh, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 10 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 026f78a3-25a1-474d-9217-9aae94f00a88

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9b4c2 and 5e94c7b.

📒 Files selected for processing (1)
  • packages/chronicle/src/themes/default/Layout.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sidebar-scroll-active-item

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rsbh rsbh merged commit 2155ae5 into main May 27, 2026
6 checks passed
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.

2 participants