Skip to content

Keep plugin terminal tabs out of thread sync - #1806

Merged
ymichael merged 1 commit into
mainfrom
bb/address-post-merge-review-feedback-thr_gi6fer42mc
Aug 18, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/address-post-merge-review-feedback-thr_gi6fer42mc

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Summary

  • separate terminal execution targets from thread-tab sync ownership
  • keep plugin-page and root-compose terminal tabs local while thread views continue syncing to their thread
  • add restored thread-target coverage that verifies plugin pages make no thread-tab reads or writes
  • tighten the file-opener fixture and make its projectless case truly projectless

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.ts
  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run lint --filter=@bb/app --force (0 errors; 147 existing warnings)
  • git diff --check origin/main...HEAD

Follow-up to #1793.

AGENT GENERATED: by GPT-5

@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

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.

@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

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/app Turbo type check passed.
  • git diff --check passed.
  • 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.

@ymichael
ymichael merged commit 8719f34 into main Aug 18, 2026
10 checks passed
@ymichael
ymichael deleted the bb/address-post-merge-review-feedback-thr_gi6fer42mc branch August 18, 2026 18:55
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