Repository navigation
Description
Summary
A plugin registers the same panel through threadPanelAction and experimental_newThreadPanelAction, plus a command (app.commands.register) with a default shortcut that calls openPanel. In an open thread, the shortcut opens the panel. On the New thread screen it does nothing, even though that screen's side panel offers the same plugin tab in its launcher. Expected: the command opens the plugin's New thread panel tab, the same tab you get from the launcher.
Versions and environment
- bb 0.45.0 (
bb-appnpm package, server and host on Linux 6.8 x86_64) @get-bb/plugin-sdk0.6.15- Local plugin installed with
bb plugin install <path>; no agent or provider involved - Also present on
mainat17b19716c5a00bf29a6b51798ddb07b72acaf259(checked by reading the code, not run; see Evidence)
Steps to reproduce
-
Scaffold a plugin (
bb plugin new repro) and replaceapp.tsxwith:import { definePluginApp } from "@get-bb/plugin-sdk/app"; const Panel = () => <div>repro panel</div>; export default definePluginApp((app) => { app.slots.threadPanelAction({ id: "repro", title: "Repro", component: Panel }); app.slots.experimental_newThreadPanelAction({ id: "repro", title: "Repro", component: Panel }); app.commands.register({ id: "open-repro", title: "Repro: open panel", defaultShortcut: { key: "g", mod: true, shift: true }, run: ({ openPanel }) => { console.log("openPanel returned", openPanel({ actionId: "repro" })); }, }); });
-
bb plugin build && bb plugin install . -
Open any existing thread and press Mod+Shift+G. The "Repro" tab opens in the side panel.
-
Click New thread, pick a project, and press Mod+Shift+G (or run "Repro: open panel" from the command palette).
-
On the same screen, open the side panel launcher and pick "Repro". The tab opens, so the screen does have a side panel and the plugin's action is registered.
Unverified repro: I haven't run the minimal plugin above. What I observed live was step 3 vs step 4 with the real plugin (Git History, a fork of yusuf8834/bb-git-history), which guards its command with isAvailable: ({ threadId }) => threadId !== null. That guard is there because of the code path below. Steps 4–5 for the minimal plugin are what that code path predicts.
Expected vs actual
Expected (step 4): the plugin's experimental_newThreadPanelAction tab "Repro" opens
in the New thread side panel, as it does from the launcher in step 5.
Actual (step 4): nothing opens. openPanel returns false. Per the code path below,
the console shows:
[plugin:repro] commandPaletteAction "open-repro" openPanel declined: no thread side panel on this surface
The console line is quoted from the code that runs when openPanel declines, not captured from a live run.
Evidence
Code on main at 17b19716c5a00bf29a6b51798ddb07b72acaf259:
- A command's
openPaneldeclines when no opener is published: palette-plugin-actions.ts#L35-L44 - The palette takes the opener from
getActiveThreadPanelOpener(): CommandPalette.tsx#L111 and #L133 - That registry only receives entries through
usePublishThreadPanelOpener: plugin-thread-panel-navigation.tsx#L38-L64 ThreadDetailViewis the only caller: ThreadDetailView.tsx#L2264RootComposeViewalready has anopenPluginPanelfor its side panel and passes it to the launcher entries, but never publishes an opener: RootComposeView.tsx#L915-L943, PluginPanelActions.tsx#L165-L189- The SDK docs describe the current limit ("Only the main thread view has one"), which predates
experimental_newThreadPanelAction: app-contract.ts#L1792-L1802
Possible fix (a suggestion, not tested): RootComposeView calls usePublishThreadPanelOpener with a handler that resolves actionId against the plugin's experimental_newThreadPanelAction registrations and opens the tab through its existing openPluginPanel, the same way runPluginNewThreadPanelAction does. Plugins that register both slots under the same id would then work unchanged on both screens. The openPanel doc comment would need updating.
What you ruled out
- Not a duplicate: searched open and closed issues for
openPanel new thread,newThreadPanelAction,experimental_newThreadPanelAction,openPanel declined,PluginCommandContext,command openPanel,thread-panel-opener, and New thread / root compose plugin panel and shortcut queries. Nothing related (Allow disabling managed worktree environments #2285 only mentions the slot in passing). - Not something the plugin's
isAvailableguard could fix: withthreadId === nullthe palette builds the context withopenThreadPanel: getActiveThreadPanelOpener(), and the only screen that publishes an opener isThreadDetailView(from the code; dropping the guard was not tried live). - Same code on
mainat17b1971as in 0.45.0.
Suggested priority and effort
Low to medium. It affects every plugin that registers both panel slots, such as repo explorers and Git history. The workaround is to click through the panel launcher. No data loss. Effort probably low, since the opener registry and openPluginPanel already exist.
Checks
- Partly reproduced on the latest release (0.45.0) with the real plugin (see "Unverified repro"); on
mainI checked the code, not a live run. - I searched open and closed issues for the same problem.
- An agent wrote this; investigation thread: bb
thr_ksjawiiuxf(local).
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 5, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotplugins,confirmed-repro.Route focused compose commands to registered plugin panels (get-bb#4954)
Make plugin surfaces prove they use core's path and delete plugin-onl…