Skip to content

Ship bb's sidebar navigation as a bundled Navigation plugin - #4117

Merged
SawyerHood merged 1 commit into
bb/sidebar-nav-2-header-thr_sm4h7wnvutfrom
bb/sidebar-nav-3-plugin-thr_sm4h7wnvut
Sep 22, 2026
Merged

SawyerHood merged 1 commit into
bb/sidebar-nav-2-header-thr_sm4h7wnvutfrom
bb/sidebar-nav-3-plugin-thr_sm4h7wnvut

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

bb's navigation rows were host code beside the replacement slot. So bb's own navigation couldn't prove the public API was sufficient, and there were two implementations of the same rows.

What changed

Builds on the previous layer: "Add an experimental sidebar header slot".

  • Bundled plugin. New plugins/navigation (Navigation) ports bb's rows onto experimental_useSidebarNavigation:
    • New thread, Search, Plugins, Skills, and plugin panel rows in saved order
    • drag reorder of plugin rows
    • hover and context menus: Open in split, View details, Hide, Disable, Customize
    • the More menu for hidden rows
    • split mini-maps, panel accessories, shortcut labels, and its own divider
  • Uses only the public SDK. It depends only on @get-bb/plugin-sdk/app and bundled workspace UI packages, and ships a few sidebar UI helpers, as the thread-list plugin does.
  • Off by default. It's registered disabled, so bb's own navigation stays the default until the next layer.
  • API addition. isShortcutModifierHeld on the navigation state lets plugin rows reveal shortcuts when bb's rows do.
  • Registration. Builtin registry, bundled-plugins package, and the official catalog are updated. Plugin SDK 0.5.13.

How you verified

  • plugins/navigation/app.test.tsx covers:
    • saved order with hidden items in More
    • activation with modifier split
    • the Hide and Customize menu actions
    • the modifier-held shortcut label
    • reordering that keeps hidden items in place
    • New thread not marked as the current page
  • builtin-plugins.test.ts and the API map tests pass.
  • Checked live in a dev app: the bundled plugin's rows match bb's built-in rows (same order and 28 px row heights), and its divider replaces the host's.

🤖 Generated with Claude Code

AGENT GENERATED

Port bb's navigation rows onto the public navigation API as the bundled
navigation plugin: New thread, Search, Plugins, Skills, and plugin panel
rows in saved order, drag reorder of plugin rows, hover and context
menus (Open in split, View details, Hide, Disable, Customize), the More
menu for hidden rows, split mini-maps, panel accessories, shortcut
labels, and the divider below the rows. Everything goes through
experimental_useSidebarNavigation, so the plugin uses no host internals.

The plugin is registered disabled by default, so bb's own navigation
stays the default until the host switches over. Add
isShortcutModifierHeld to the navigation state so plugin rows can reveal
item shortcuts when bb's rows do. Plugin SDK 0.5.13.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@SawyerHood
SawyerHood added this pull request to stack #4120 September 22, 2026 23:00
@SawyerHood
SawyerHood marked this pull request as ready for review September 22, 2026 23:02
@SawyerHood
SawyerHood merged commit ff60d44 into main Sep 22, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the bb/sidebar-nav-3-plugin-thr_sm4h7wnvut branch September 22, 2026 23:23
SawyerHood added a commit that referenced this pull request Sep 25, 2026
## Human comments

## What was wrong

When the sidebar moved into the thread-list and navigation plugins
(#4036, #4041, #4117, #4140), the old app and client-core copies stayed
behind. Nothing in the shipped app renders or calls them, but their
tests kept them compiling and passing. The shipped plugin copies have
their own tests. A few other app tests could not fail: they restated
constants or asserted a flag inside a block that only runs when the flag
has that value. Others were near-duplicates of a stronger test.

## What changed

Found by a read-only test audit using the repo `test-audit` skill
(#4361).

- Deletes dead code that nothing in the shipped app calls, and the tests
that only exercised it:
- `ThreadArchiveQuickAction` and `ThreadActionsContextMenu` (the plugin
copies ship)
- `SidebarRenameProvider`, the app's sidebar row state classes, the
drop-animation constant and the sidebar lifecycle atom
- `useSystemProviderUsageLimits` and its query key (unused since #3449),
and `getAppCommandMetadata`
- client-core's environment grouping, sort policy and pinned-root
ordering. The only live callers read `effectivePinnedThreadIds` or pass
their own comparator.
- the unused `hasRunningPluginStatus` parameter, and the plugin copy of
`arrangeByStoredOrder`
- The theme-preview anatomy anchor now points at
`plugins/thread-list/app/rows/sidebarRowClasses.ts`, the file that
actually renders the rows.
- Folds duplicate suites into table tests at their owners: bundle
budget, command ordering, `isRowExpandable`, steer rendering and child
activity.
- Deletes tests that restate constants or cannot fail.
- Adds two tests after coverage verification:
  - an unpinned parent stays out of `effectivePinnedThreadIds`;
- the terminal enables xterm's proposed API, which the Unicode 11 addon
requires. This builds a real `Terminal`.

Production +59/−706, tests +476/−1618.

## How you verified

- `pnpm exec turbo run test lint typecheck` passes for `@bb/app`,
`@bb/client-core`, `@bb/thread-view`, `bb-plugin-thread-list` and
`bb-plugin-theme-preview`, plus typecheck of every client-core and
thread-view dependent.
- An independent verifier used before and after worktrees on 175d5ac
and 55 mutations. For each of the 75 removed or merged tests, it wrote
the bug that test catches as a production change and checked that the
old test fails and a remaining test also fails.
- Result: 64 OK, 10 with no unique failure mode, 1 lost. The lost
assertion is restored above.
- The live callers `RootComposeMobileRecents` and
`useSidebarThreadReveal` still fail on sort or pin mutations.
- Known gap, not caused by this change: the rename-cancel effect in
`useSidebarRename` was untested before and after.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant