Repository navigation
fix(undo-close): a restored parent's live children follow it to its new id - #1374
Merged
Juliusolsson05 merged 1 commit intoSep 27, 2026
Merged
Conversation
This was referenced Sep 27, 2026
Owner
Author
|
Review disposition (head Noted, handled elsewhere
🤖 Generated with Claude Code |
Juliusolsson05
added a commit
that referenced
this pull request
Sep 27, 2026
…e the parent can never come back #1387 review a: - (major) keeping the pointer only helps if restoring the parent relinks it: #1374 is merged in (Depends on #1374) and an end-to-end test closes P, reloads its live child, undoes P and asserts the child names P' (red without #1374's remap). - (minor) a kept pointer lingered as a ghost when P's entry left the stack without a restore. dropPointersTo drops pointers to exactly those ids (never unrelated or cross-window ones) when an entry is consumed as stale/failed, expires or is evicted; the stack notifies on a microtask because prune can run inside a setState updater. Each path is pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Juliusolsson05
changed the base branch from
main
to
integration/batch-2026-09-27-p
September 27, 2026 20:35
Juliusolsson05
merged commit Sep 27, 2026
ee8366c
into
integration/batch-2026-09-27-p
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1373.
Plan:
docs/plans/2026-09-27-undo-close-live-children.md(first commit).Problem
Undo Close restores a closed pane under a fresh session id. Its LIVE children (orchestration children and linked panes that stayed open) kept
orchestrationParentId/orchestrationRootId/linkedParentIdpointing at the dead id. Restore remapped pointers only on the rows it restored, and on the undo stack. The renderer's orchestration visibility gate compares ids for equality, so the restored parent could not list, read or prompt its own surviving children. They also rendered as top-level rows. Replace and Reload Agents already remap every session.Found by review c of #1369, which carries main's tombstones of CLOSED children on Undo Close. This PR is the live half; the two PRs share no code, only the file.
What merges
remapMetaLineage.remapSessionsRelationships: it drops a pointer whose target is not in the record. A child of a different pane that is still closed (still on the undo stack) would then lose its link, and undoing that pane later could not relink it.remapMetaLineagekeeps unmapped ids, and returns the same object when nothing changed, so untouched rows keep their identity.Tests
undoCloseLiveChildren.renderer.test.tsx:d0205863(main merged),npx tsc -bis clean and the workspace actions suites andlib/undoClose.test.tspass: 37 files, 260 tests.Merge order
Merge after #1369. Its Undo Close carry rewrites main's child→parent status hints, which completes this PR's one review residual (a stale hint for up to 250 ms).
Related
🤖 Generated with Claude Code