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:
Claude
2026-10-16 04:10:53 +00:00
parent b6f782d8af
commit 1924d4b52b
+2 -2
View File
@@ -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 * the visible graph: nodes they created (push/replace targets, including
* replacements whose history skips this node) are removed, and retained * replacements whose history skips this node) are removed, and retained
* entries they revealed (back targets) are restored as if that back * 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 { private discardOutgoing(nodeKey: string, visited = new Set<string>()): void {
for (const operation of [...(this.outgoing.get(nodeKey) ?? [])]) { 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") { if (operation.history === "back") {
this.cancel(operation.id); this.cancel(operation.id);
} else { } else {