Skip to content

Give plugin pages the shared right panel - #1546

Merged
ymichael merged 31 commits into
mainfrom
bb/plugin-panel-browser-api
Aug 18, 2026
Merged

ymichael merged 31 commits into
mainfrom
bb/plugin-panel-browser-api

Conversation

@brsbl

@brsbl brsbl commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Decision

Every plugin nav page should get the same host-owned right panel as first-party pages. A plugin registers its existing navPanel; BB wraps that page automatically. Plugins do not opt into Browser or Terminal support and do not rebuild panel chrome, tabs, persistence, or resize behavior.

This is the shared-layout foundation. It intentionally adds no new public plugin registration or navigation API for plugin-defined right-panel views.

Behavior

  • plugin pages always expose the native New tab, Browser, and Terminal flows when those capabilities are available
  • Terminal creation uses a compact inline host selector and binds the session to that explicit host
  • standalone and split plugin pages use the same panel shell, controls, sizing, background, and transitions as New thread and thread pages
  • Browser, New tab, panel shell, and Terminal content are lazy-loaded so plugin pages do not pull the full panel implementation into the initial app bundle
  • panel state is scoped by plugin, nav-panel path, and pane
  • hydration preserves a valid active tab, falls back to the first surviving tab when necessary, and closes an open panel with zero tabs
  • closing the final content tab activates a remaining fixed tab; the panel closes only when no tabs remain
  • closing the panel does not synthesize a New tab, while explicitly reopening an empty panel does

Implementation

  • wrap loaded plugin nav pages in PluginPanelRightPanelHost
  • compose the existing SecondaryPanelLayout, ThreadSecondaryPanel, NewTabPage, Browser deck, Terminal panel, and shared tab-state reducers
  • support both standalone plugin routes and plugin pages inside split workspaces
  • share panel toggle sizing and chrome tokens with first-party page headers
  • guard incomplete one-panel resize layouts and clean up stale or invalid persisted panel state
  • remove the earlier plugin-configured right-panel view/tool API from this branch

Verification

  • @bb/app typecheck
  • focused panel regressions: 37 tests
  • full app suite: 357 files, 2,830 tests
  • app lint: 0 errors
  • production app build
  • boot bundle budget
  • local desktop QA across New thread, thread, standalone plugin, and split plugin pages

This upstream-origin PR supersedes fork-origin #1497 without folding any plugin implementation into BB.

BB-Thread-ID: thr_ehwczw5k36

AGENT GENERATED: by GPT-5

@brsbl brsbl changed the title Let plugin panels open native Browser tabs Add a native plugin right-panel extension API Aug 13, 2026
@brsbl
brsbl force-pushed the bb/plugin-panel-browser-api branch from 2060529 to 4486ad0 Compare August 15, 2026 04:18
@ymichael
ymichael force-pushed the bb/plugin-panel-browser-api branch from ea89b3c to 6321646 Compare August 18, 2026 00:48
@ymichael ymichael changed the title Add a native plugin right-panel extension API Give plugin pages the shared right panel Aug 18, 2026
@ymichael
ymichael merged commit e8764f7 into main Aug 18, 2026
10 checks passed
@ymichael
ymichael deleted the bb/plugin-panel-browser-api branch August 18, 2026 16:24
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