Fix terminal-editor shift-drop on detached instances - #335945
Fix terminal-editor shift-drop on detached instances#335945Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
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 <223556219+Copilot@users.noreply.github.com>
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.
|
Thanks Dmitriy Vasyura (@dmitrivMS) for adding the expanded end-to-end regression tests and carrying the fix forward from #332908! Could you please include: |
Hmm... I didn't use your PR at all. I can add Co-authored-by: Vlad Gerasimov vlad@vlad.studio |
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
|
Hi Dmitriy Vasyura (@dmitrivMS) — no worries at all! Just to clarify, the production fix in Crediting Vlad as well for the earlier iteration in #318756 is great! Either way, really glad to see #311164 resolved. Thanks for shepherding it to completion! |
Fixes #311164
Co-authored-by: Vlad Gerasimov vlad@vlad.studio