feat(sidebar): add Mod+B keybinding to toggle sidebar#153
Conversation
Ports upstream t3code pingdotgg#3497. ryco already has a collapsible main sidebar (shadcn SidebarProvider with offcanvas collapse + SidebarRail), so this adds the missing pieces: a keybinding, persistence, and a desktop reopen affordance when collapsed. - contracts: register sidebar.toggle command; shared: default it to Mod+B (when !terminalFocus, distinct from existing bindings). Flows through the server keybinding seed and the settings keybindings UI. - AppSidebarLayout hosts a global handler inside SidebarProvider so the toggle works on every route (chat, settings, no-active-thread), not just the chat view. It resolves the configured command and ignores the shortcut while typing (so Mod+B can still bold in the composer). - Persist collapsed state: read the sidebar_state cookie the provider already writes to seed defaultOpen on reload. - Expose data-state on the sidebar wrapper and reveal the existing header SidebarTriggers on desktop when collapsed, so there is a reopen control without the sidebar rail (which is offscreen when collapsed). - keybindingCategories: add a Sidebar category + 'Toggle sidebar' label. - Tests: resolve/label Mod+B -> sidebar.toggle (web), fixture updated. Adapted to ryco's keybinding registry and shadcn sidebar; did not port upstream's titlebar/traffic-light inset polish (ryco's layout differs).
|
Warning Review limit reached
More reviews will be available in 59 minutes and 38 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
sidebar.togglecommand mapped to Mod+B (⌘B on Mac, Ctrl+B on other platforms)sidebar_state) for retention across reloadsdata-stateattributeTesting
sidebar.togglewhen terminal not focused