fix(junction): isolate lifecycle previews and drafts

This commit is contained in:
que01 committed 2026-09-08 15:28:06 +08:00
1 parent 89f4ce79b0
commit a5f64a2349
4 files changed
+75 -1

No files matched your search

@@ -125,6 +125,13 @@ a swapped object would leave the requester arbitrating for a session nobody read
request layer only sends and cancels. The discard rule is worth unit-testing and
must not depend on network timing.
Selection changes are a second freshness boundary. `PreviewRequester.invalidate()`
must cancel the active request and advance its generation; `dispatch()` checks
that captured generation before giving a response to `EditSession`. Abort alone
is insufficient because a transport may resolve after receiving its abort signal.
When changing junction/segment scope, clear scoped preview geometry before the
new manifest arrives, so an A-scope result cannot render while B is selected.
Undo of a **saved** gesture appends an inverse operation; persisted history is
never rewritten. Undo of an unsaved one just moves the cursor.