Close a revealed page's open drawer when its back is cancelled
discardOutgoing skipped finished resting edges, so a persistAtRest drawer opened by a node revealed during a back operation stayed attached after that back was cancelled and the node returned to history. Found by the property tests (1000-seed run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Faarh2Ts6StJPcz2mRiHiR
This commit is contained in:
@@ -570,7 +570,7 @@ export class SceneGraph {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the live operations a node started, because the node is leaving
|
||||
* Resolve the operations a node started, because the node is leaving
|
||||
* the visible graph: nodes they created (push/replace targets, including
|
||||
* replacements whose history skips this node) are removed, and retained
|
||||
* entries they revealed (back targets) are restored as if that back
|
||||
@@ -590,7 +590,7 @@ export class SceneGraph {
|
||||
|
||||
private discardOutgoing(nodeKey: string, visited = new Set<string>()): void {
|
||||
for (const operation of [...(this.outgoing.get(nodeKey) ?? [])]) {
|
||||
if (operation.phase === "finished") continue;
|
||||
// Includes finished resting edges: an open drawer closes with its page.
|
||||
if (operation.history === "back") {
|
||||
this.cancel(operation.id);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user