Skip to content

Add a native plugin right-panel extension API - #1546

Open
brsbl wants to merge 15 commits into
mainfrom
bb/plugin-panel-browser-api
Open

Add a native plugin right-panel extension API#1546
brsbl wants to merge 15 commits into
mainfrom
bb/plugin-panel-browser-api

Conversation

@brsbl

@brsbl brsbl commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Decision

Use one structured, experimental right-panel API because the real plugin cases share host-owned chrome and lifecycle: custom navigation views, Browser tabs, and Terminal tabs beside a plugin nav page. Keep thread panels separate because their ownership and lifecycle are thread-scoped rather than nav-page-scoped.

API

  • navPanel.experimental_rightPanel registers plugin views, an optional pinned defaultViewId, and enabled host tools (browser, terminal)
  • custom views receive { subPath, params } and choose padded or flush layout
  • useBbNavigate().experimental_openRightPanel(...) opens a registered view, Browser URL, or Terminal target and returns false for invalid or unavailable requests
  • BB owns resize behavior, compact drawers, tabs, chrome, persistence, focus, and terminal cleanup

Implementation

  • host custom views and native Browser or Terminal tabs in one BB right-panel deck
  • preserve pane-scoped focus and maximize visibility, final-tab teardown, restored state, and compact/standalone surfaces
  • validate registration and runtime requests before access or mutation
  • cover view/tool registration, lifecycle, malformed JavaScript input, terminal retry/cleanup, navigation, and native Browser ordering
  • update SDK declarations, testing harness, starter declarations, authoring guidance, and API audit

Verification

  • focused app regressions: 118 tests
  • plugin SDK: 77 tests
  • templates: 23 tests
  • app, plugin SDK, and template typechecks
  • real standalone BB desktop verification of plugin/right-panel alignment and Browser side-by-side behavior

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

BB-Thread-ID: thr_ehwczw5k36

brsbl added 2 commits August 13, 2026 11:36
…er-api

# Conflicts:
#	apps/app/bundle-budget.json
#	packages/templates/src/generated/plugin-sdk-dts.generated.ts
@brsbl brsbl changed the title Let plugin panels open native Browser tabs Add a native plugin right-panel extension API Aug 13, 2026
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