Repository navigation
Add a navigation rail experiment with Home and Settings tabs - #4964
Merged
SawyerHood merged 1 commit intoOct 5, 2026
Merged
SawyerHood merged 1 commit into
SawyerHood merged 1 commit into
Conversation
The navigationRail experiment keeps a vertical rail of destinations on the left edge of the sidebar on wide viewports. The rail stays mounted while the sidebar beside it swaps between the thread list, Plugins, Skills, and Settings. Home returns to the last thread, Settings sits at the bottom, and New thread moves into the sidebar header. The host draws the rail from the existing sidebar navigation model, so saved order, visibility, accessories, split drags, and the customize editor carry over. While the experiment is on, the sidebar navigation and header plugin slots are not mounted on wide viewports; their saved providers apply again when it is turned off. Compact viewports keep the drawer. Co-Authored-By: Claude Code <[email protected]>
SawyerHood
deleted the
bb/mock-left-nav-experiment-with-home-tab-and-thr_8ga9782vvn
branch
October 5, 2026 23:34
This was referenced Oct 5, 2026
SawyerHood
added a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong Builds on #4964 (merged), which added the `navigationRail` experiment. With the rail on, Customize opened the editor in the thread sidebar, a column away from the icons it edits. When the sidebar was showing Settings, Plugins, or Skills, it also had to jump to Home first so the editor had somewhere to render. ## What changed - **Popover editor** (`AppNavRail.tsx`): Customize opens the existing reorder-and-visibility editor in a popover anchored to the rail's More button, on any screen. The rail updates beside it as items are reordered, shown, or hidden. Done, Escape, or clicking outside closes it and returns focus to More. - **Pinned position**: the popover anchors to where More was when it opened and stays there until it closes. More moves as items are shown or hidden, so anchoring to the button itself slid the editor under the pointer on every toggle. - **Entry points**: the More menu and each rail icon's context menu say "Customize rail" and "Hide from rail". Host `openCustomize()` calls open the same popover. - **No Home jump**: opening Customize no longer navigates. - **Thread sidebar** (`AppSidebar.tsx`): the navigation region is not mounted in rail mode, so the `providerSuppressed` path that #4964 added to `SidebarNavigationRegion` is removed. - **Editor** (`SidebarNavigationCustomize.tsx`): takes a `surface` prop so the popover uses the compact frame and the "Customize rail" title. No plugin API change. `docs/api_to_audit.md` is updated to say the editor opens in a popover. ## How you verified - `AppNavRail.test.tsx`: the popover keeps its position when More moves (fails if the anchor follows the button); opening Customize from Settings keeps the route, renders the editor outside the rail, toggling items updates the rail, Done closes it and focuses More; a host `openCustomize()` call opens the same popover. - `pnpm exec turbo run typecheck lint --filter=@bb/app` passes. - `pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar src/components/layout src/components/settings src/components/tools` passes (53 files). - Source dev app in headless Chrome: opened Customize from Settings mode, showed Search threads, saw it appear in the rail, closed with Escape, focus returned to More. Toggled three items while measuring: More moved from 240px to 126px and the popover stayed at 240px. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Code <[email protected]>
SawyerHood
added a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong Stacked on #4968, which builds on the merged #4964. In rail mode the Settings, Plugins, and Skills sidebars showed their name in the sidebar header, directly beside the page header showing the same name. The rail already highlights the active tab, so the sidebar title was a third signal for the same thing. ## What changed - **Section sidebars** (`SectionSidebar.tsx`): in rail mode the header row keeps only the back and forward buttons. The `navRailTitle` prop becomes a `navRailHosted` flag. - **Unchanged**: New thread stays in the thread sidebar's header, and the layout with the experiment off is untouched. ## How you verified - `ResourceSidebars.test.tsx`: the rail-hosted sidebar renders neither the back row nor its own title. - `pnpm exec turbo run typecheck lint --filter=@bb/app` passes. - `pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar src/components/layout src/components/settings src/components/tools` passes (53 files). - Source dev app in headless Chrome: the Plugins and Settings sidebars show no title in rail mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Code <[email protected]>
SawyerHood
added a commit
that referenced
this pull request
Oct 6, 2026
## Human comments ## What was wrong With the `navigationRail` experiment on, the rail mounted each plugin panel's `experimental_sidebarAccessory` on top of the panel's icon, clipped to 2rem (#4964). Accessories are sized for the trailing column of a sidebar row (4rem by 1.25rem), so a count or short status overlapped the icon and was cut off. ## What changed - **Rail** (`AppNavRail.tsx`): the rail is icon-only. It no longer mounts panel sidebar accessories, so an accessory's queries and subscriptions do not run there either. - **Sidebar rows**: unchanged. With the experiment off, and on compact viewports, accessories behave as before. - **Docs**: `docs/api_to_audit.md`, the plugin-authoring `frontend-core-slots.md` reference, and `bb-guide-plugins.md` now say the rail does not mount accessories. No plugin API change. With the rail on, an accessory's value is not shown anywhere on wide viewports, because the rail replaces the rows that carry it. ## How you verified - `AppNavRail.test.tsx`: new case registers a panel with an accessory and asserts the rail neither mounts it nor shows its text. It fails before the change (the accessory mounted once) and passes after. - `pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar/AppNavRail.test.tsx src/components/layout/AppLayoutSidebar.test.tsx` passes (16 tests). - `pnpm exec turbo run typecheck lint --filter=@bb/app` passes. - `pnpm exec turbo run test --filter=@bb/server -- test/services/plugins/plugin-authoring-docs.test.ts` passes. - Not checked visually in the running app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Code <[email protected]>
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.
Human comments
What was wrong
Sidebar navigation lives inside the thread sidebar. Opening Settings, Plugins, or Skills replaces that whole sidebar, so the navigation disappears and a "Back to app" row is the only way out. A plugin cannot fix this: the
experimental_sidebarNavigationslot is mounted inside the thread sidebar, so a rail-style navigation plugin unmounts on those screens and has to position itself by measuring the DOM.What changed
Adds a default-off
navigationRailexperiment (Settings → Experiments, orbb settings experiment navigationRail true). On wide viewports it draws a host-owned vertical rail on the left edge of the sidebar that stays mounted on every screen.apps/app/src/components/sidebar/AppNavRail.tsx): Home, the user's visible destinations (Plugins, Skills, plugin panels), More, and Settings pinned at the bottom. It reads the existing sidebar navigation model, so saved order, visibility, accessories, split drags, context menus, and the customize editor carry over.AppLayoutSidebar.tsx,AppSidebar.tsx): in rail mode the thread sidebar stays mounted and hides its body while the Settings, Plugins, or Skills body renders beside the rail, the same pattern the compact drawer already uses.SectionSidebar.tsx): the "Back to app" row is dropped and the header shows the section title.Hometo the core icon set.Not changed: compact viewports keep the drawer, collapsing the sidebar hides the rail with it, and the layout with the experiment off is untouched.
No new plugin API and no SDK source change. The
experimental_sidebarNavigationandexperimental_sidebarHeaderslots keep their contracts; they are not mounted on wide viewports while the experiment is on.docs/api_to_audit.mdrecords that. No server/daemon wire change.Docs:
docs/configuration.md, the bb guide customization template, the bb-cliapp-settingsreference, and the verify-bb settings recipe.How you verified
AppNavRail.test.tsx(rail contents, highlight per route, Home returning to the last thread, hidden items under More, Customize from Settings), plus rail-mode cases inAppLayoutSidebar.test.tsx,SidebarNavigationRegion.test.tsx,ResourceSidebars.test.tsx,SidebarNavigationSetting.test.tsx, andSettingsView.experiments.test.tsx.pnpm exec turbo run typecheck lint --filter=@bb/app --filter=@bb/server --filter=@bb/domain --filter=@bb/shared-ui --filter=@bb/desktoppasses.pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar src/components/layout src/components/settings src/components/tools src/views/SettingsView src/components/ui/icon.test.tsxpasses (59 files), andtest/system/experiments.test.tspasses in@bb/server.🤖 Generated with Claude Code