Repository navigation
fix(wework): isolate attachments between split panes - #2733
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe workbench now scopes composer attachments by task pane, including upload state, errors, removal, reset, and send flows. Split-pane tests verify isolation. Runtime transcript synchronization no longer reactivates settled tasks from stale running snapshots. ChangesScoped composer attachments
Runtime lifecycle settlement
Estimated code review effort: 3 (Moderate) | ~30 minutes Merge Risk: 🔵 Low · up to The change isolates attachment state between split panes, with unit and desktop validation reported as passing. A bounded lifecycle edge case involving late runtime snapshots and newer active turns still needs explicit owner confirmation or follow-up before merge. Sequence Diagram(s)sequenceDiagram
participant Composer
participant useWorkbenchPaneSession
participant WorkbenchProvider
participant useWorkbenchAttachments
Composer->>useWorkbenchPaneSession: Select or remove attachment for active scope
useWorkbenchPaneSession->>WorkbenchProvider: Invoke scoped attachment handler
WorkbenchProvider->>useWorkbenchAttachments: Update target scope state
useWorkbenchAttachments-->>Composer: Return scoped attachments and upload state
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What changed
running: trueruntime transcript snapshots after the current turn has already settledRoot cause
Text input already used the runtime task scope, but split-pane composers read attachments from the provider's currently selected global project-chat scope. Every pane therefore rendered and mutated the same attachment collection.
The first merge-queue run also exposed an independent runtime lifecycle race in the existing temporary-chat E2E: a transcript poll started while a turn was running could return
running: trueafter the completion event had already settled the turn. That stale snapshot restarted the executor state, leaving the thinking indicator busy indefinitely. The lifecycle store now rejects that stale transition.Impact
Pasting, removing, restoring, or sending attachments in one split pane no longer changes attachment badges or upload state in another pane. Completed temporary-chat turns also remain settled when an older transcript poll returns late.
Validation
DesktopWorkbenchLayout.test.tsx: 189 tests passedsplit-workbench: passed, including the new pasted-attachment isolation assertiontemporary-chat: passed in 1m 41s with no assertion errorsai:verifywas attempted twice; its isolated launcher/control process terminated during startup without a product stack trace. The equivalent packaged Tauri desktop E2E completed successfully.Summary by CodeRabbit
Bug Fixes
Tests