Repository navigation
Keep plugin terminal tabs out of thread sync - #1806
Conversation
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain-English summary: This change separates plugin terminal tabs from saved terminal tabs that follow a thread between views.
I am the SlopCop. I am reviewing this pull request under the review rule.
I will check security, code quality, performance, duplication, architecture, and the user flow.
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain-English summary: This change stops a plugin page from treating a terminal target thread as the owner of plugin tabs.
Plugin terminal tabs now stay local. Normal thread pages still sync their tabs with the server.
Verdict
I found no blocking defects. The security, code quality, and performance reviews found no actionable issue.
The required syncThreadId value cleanly separates the terminal execution target from the tab persistence owner. The three call sites make that choice explicit.
Architecture scan
This change adds no duplicate implementation. It uses the existing fixed-panel state and thread-tab sync APIs.
A later refactor could replace the state ID and sync ID pair with a typed persistence scope. This would make local and thread-synced state harder to mix.
Thread detail also reads the same panel state through several hook paths. A shared surface controller could reduce repeated subscriptions and reconciliation effects.
The server contract has one stale comment. It says nav-panel terminal targets enter thread-tab storage, but this change keeps those tabs local.
Verification
- Three parallel bb agents reviewed security, code quality, architecture, duplication, and performance.
- Six focused test files passed with 35 tests.
- The uncached
@bb/appTurbo type check passed. git diff --checkpassed.- Every GitHub check passed, including both package smoke jobs.
- I started the exact pull request SHA and installed the Tasks plugin in isolated development data.
- I restored a real thread terminal inside the plugin page. The terminal rendered and stayed usable.
- The page made no thread-tab request. The server tab revision stayed at zero with an empty tab list.
Summary
Why
A restored plugin-page terminal can legitimately target a thread, but that does not make the thread the owner of the plugin page tab state. Deriving both concepts from the terminal target could replace plugin tabs with thread tabs and later persist plugin tabs into the thread.
Verification
pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/plugin/PluginPanelRightPanelHost.test.tsx src/components/plugin/file-opener-tabs.test.tspnpm exec turbo run typecheck --filter=@bb/apppnpm exec turbo run lint --filter=@bb/app --force(0 errors; 147 existing warnings)git diff --check origin/main...HEADFollow-up to #1793.