Repository navigation
Commit e6a1551
committed
fix(editor): release abandoned diff streams and owned placeholders (split 5/6 of #1066, unit U6a)
Diff-view half of #1932 replayed onto main tip 53cb5b5: discardUnapprovedStream
and discardOwnedPlaceholder cover streams that were abandoned, changed out from
under a retained session, or left by an unconfirmed save; isEditingDifferentPath
guards a second path while a session is retained, and placeholderPath stays owned
until the rollback removes it. The tool-side half moves to its own unit; plan and
measured widths in #1937 (comment).
The spec keeps its dirty-flag assignments legal after upstream rewrote the doubles
with the typed test-utils helpers: one locally widened ActiveDiffEditor type on the
shared builder instead of eight assertions, because vscode types TextDocument.isDirty
as read-only.
Review pass on the CodeRabbit change-request filed at this head: a refused buffer restore
now stops the rollback outright the same way an unconfirmed save of the restored buffer
does, so the tabs stay open, nothing is unlinked and the placeholder keeps its owner -- the
spec for that path now requires that no unlink happens instead of asserting one. The
commit-point test seeds placeholderPath so its release assertion can fail, and
isEditingDifferentPath / editingRelPath are pinned directly (retained path accepted, another
path rejected, no normalisation) because every other call site stands in for that predicate
with a double. Threads: #1932 (comment)
and #2434 (comment).1 parent 53cb5b5 commit e6a1551
2 files changed
Lines changed: 1762 additions & 59 deletions
0 commit comments