Repository navigation
Fix terminal-editor shift-drop on detached instances - #335945
Conversation
Dispose the drag-and-drop observer when a terminal detaches and prevent deferred initialization from targeting a stale container. Add regression coverage for both initialized and pending observers during terminal editor tab reuse. Fixes #311164 Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The lifecycle fix is narrowly scoped and both relevant race conditions have regression coverage.
Review tier: Balanced
Findings: None
What changed in this PR
Fixes terminal editor drag-and-drop observers persisting after tab reuse.
Changes:
- Dispose drag-and-drop observers when detaching terminals.
- Guard deferred initialization against stale containers.
- Add regression tests for initialized and pending observers.
| File | Description |
|---|---|
terminalInstance.ts |
Corrects drag-and-drop observer lifecycle. |
terminalInstance.test.ts |
Covers detach and deferred-initialization scenarios. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Hmm... I didn't use your PR at all. I can add Co-authored-by: Vlad Gerasimov [email protected] |
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Dispose the drag-and-drop observer when a terminal detaches and prevent deferred initialization from targeting a stale container. Add regression coverage for both initialized and pending observers during terminal editor tab reuse. Fixes microsoft#311164 Co-authored-by: Copilot <[email protected]> Co-authored-by: Vlad Gerasimov [email protected] (cherry picked from commit 9e9bd55)
Fixes #311164
Co-authored-by: Vlad Gerasimov [email protected]