Skip to content

Migrate official plugin sidebars to native right panels - #1520

Closed
brsbl wants to merge 19 commits into
get-bb:bb/plugin-panel-browser-apifrom
brsbl:bb/official-plugin-right-panel-migrations
Closed

brsbl wants to merge 19 commits into
get-bb:bb/plugin-panel-browser-apifrom
brsbl:bb/official-plugin-right-panel-migrations

Conversation

@brsbl

@brsbl brsbl commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

The official Tasks and Docs plugins now use BB's experimental right-panel extension model instead of maintaining separate sidebar chrome.

  • Migrates Tasks navigation, project/preset actions, loading states, and dialogs into a BB-owned flush right-panel view
  • Migrates Docs vault tree, search, drag/drop, file actions, and vault management into the same native panel
  • Shares Tasks refresh generation and busy state across the main page and right-panel view
  • Preserves responsive main-content behavior while BB owns panel resizing, compact drawers, tabs, and chrome
  • Adds migration and cross-surface lifecycle coverage

Validation:

  • Tasks: 35 files / 330 tests, typecheck, build
  • Docs: 3 files / 56 tests, typecheck, build

Stack:

BB-Thread-ID: thr_ehwczw5k36

AGENT GENERATED: by GPT-5.6-Sol

@bb-slop-cop

bb-slop-cop Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

I am the Slop Cop. I am reviewing this pull request for security, code quality, architecture, performance, and user workflow regressions.

});

it("opens registered custom views with persisted JSON params", () => {
const view = render(<HostFixture />);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — Remove the unused view variables on lines 705 and 735. The app typecheck fails with TS6133 at both lines.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed in 1ea8391. The unused bindings are gone; the final @bb/app typecheck and focused host suite pass.

useEffect(() => {
for (const terminalId of revokedTerminalIds) {
if (closedRevokedTerminalIdsRef.current.has(terminalId)) continue;
closedRevokedTerminalIdsRef.current.add(terminalId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — Record this terminal only after closeTerminal succeeds. A failed mutation leaves the ID in the set. State reconciliation then removes the tab and blocks all retries. The terminal process can continue without visible controls. Also close these terminals when the panel registration disappears.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0af5789 and retained through the latest parent head. Revoked terminals stay visible until close succeeds, failures clear the in-flight guard for retry, success closes the tab, and a previously observed registration disappearing triggers cleanup. Focused lifecycle regressions cover failure/retry, success, registration removal, and initial loading.

}
return true;
}
const target = normalizeTerminalTarget(request.target);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — Validate the complete request before this access. A plugin can call the runtime API from JavaScript without TypeScript. A missing target throws instead of returning false as documented.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0af5789 and retained through the latest parent head. The runtime now validates the complete discriminated request before target access; malformed JavaScript Terminal input returns false without throwing or mutating.

Comment thread plugins/docs/app.tsx
@@ -2197,27 +1892,27 @@ function NotesPanel({ subPath }: PluginNavPanelProps) {
return (
<div className="flex min-h-0 flex-1 flex-col">
<div className="flex min-h-0 flex-1">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — Make the navigation child fill this row. At a 1440-pixel viewport, the host content measured 468.6 pixels. The tree measured only 139.5 pixels and left 329 pixels blank. Add a full-width or flex rule to the navigation root.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 55cd5a2. The Docs Tree itself now owns w-full; its regression asserts the navigation parent, not a distant ancestor. Desktop QA measured 468.6px tree / 468.6px host at 1440px (0px gap), plus a full-width 720px compact drawer.

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

ELI5: This change puts the Docs and Tasks sidebars inside the standard BB right panel.
Plugin panels can also open Browser and Terminal tabs.

This review applies to 7ff65b2420e21630cf28a12d50fbbe469e47d3a1.
The pull request head changed during this review.

Findings

  1. P1 — The app typecheck fails. Two tests assign unused view variables at lines 705 and 735.
    Remove both assignments and require the app Turbo typecheck to pass.

  2. P1 — Terminal cleanup can leave processes open. The host records an ID before the asynchronous close succeeds.
    A failed close gets no retry. State reconciliation then removes the only visible control.
    Plugin registration removal can also skip cleanup.
    Record success after closure, retry failures, and test registration removal.

  3. P2 — A malformed Terminal request can throw. Runtime data reaches normalizeTerminalTarget without complete validation.
    Missing targets and non-string fields can throw, although the contract says invalid requests return false.

  4. P2 — The Docs Navigation view does not fill its panel. The tree lacks a width growth rule.
    In the browser, the tree measured 139.5 pixels inside a 468.6-pixel panel.

Performance and architecture

  • The main Docs view and the Navigation view each load the complete notebook.
  • Share or cache this data to avoid duplicate file reads on wide layouts.
  • The production and test registration validators duplicate logic, but they currently enforce the same rules.

Validation

  • git diff --check passed.
  • The app typecheck failed only on the two unused variables.
  • The 122 focused app tests passed.
  • The 77 SDK tests, 56 Docs tests, 330 Tasks tests, and 14 server tests passed.
  • Browser checks covered wide Docs, wide Tasks, and the compact Tasks drawer.
  • GPT-5.6 Sol performed the security, quality, and final reviews at high reasoning.
  • Opus 5 performed the UI and performance review at medium reasoning.
  • The final GPT-5.6 gate found that these fixes are necessary.

I found no direct data exposure issue.
The Terminal lifecycle and runtime request boundary still need fixes.

@brsbl

brsbl commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by upstream-origin #1553 with the exact reviewed head. This removes the remaining fork-origin layer while preserving the BB host stack and review history.

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