Repository navigation
1.45.2: an update no longer doubles the sessions running on a paired PC - #65
Merged
Merged
Conversation
After an update relaunch, every session on the other PC came back twice: the running one (adopted from that PC's announcement) and a new, empty one under the same name. Measured 7 -> 14 -> 29 sessions on SIHYEONG-4080 across two consecutive updates. autoRestoreAfterUpdate restored REMOTE tiles too, and removed them from the saved list first. While it walked them one by one, the other PC announced its running sessions and syncMachineSessions adopted each as a tile. When a remote entry's turn came, its conversation was already a live tile here, so resolveRestoreTarget read it as "open in another tile" and started a fresh conversation on that PC - once per saved remote entry, per update. - takeUpdateRestoreCandidates: an update relaunch restores this PC's own tiles only; a remote tile stays saved and comes back by adoption with its tile id, label and pin (the rule plain launches already followed). - restoreSession: when the entry's conversation is already a live tile here, the restore is done - nothing is started. Checked before the remote call and again after the awaits, where an adoption can land. Logged as "already open here as <id>; nothing started". - liveIds/reserved are computed right before resolveRestoreTarget, not at the top of the function. - Drop the now-unused cockpit.restore_machine_offline_n locale key. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY
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.
What
After Update all (or any update relaunch), every session on the paired PC came back twice: the running one and a new, empty one under the same name. Each update doubled them — measured on SIHYEONG-4080:
alive=7 → 14(1.45.0 update),alive=15 → 29(1.45.1 update).Why
autoRestoreAfterUpdaterestored remote tiles too and removed them from the saved list first. Meanwhile the other PC announced its running sessions andsyncMachineSessionsadopted each as a tile. When a remote entry's turn came, its conversation was already a live tile here, so thetheirscheck (!live.has(id)) failed andresolveRestoreTargetsawliveIds.has(entry.sessionId)→{ sessionId: null, fresh: true }= a new conversation on that PC, same label. Log evidence:Fix
takeUpdateRestoreCandidates(pending)→{ own, remote }: an update relaunch restores this PC's own tiles only. A remote tile stays saved and comes back by adoption when its PC announces it, keeping tile id, label and pin — the ruletakeLaunchRestoreCandidatesalready applied to plain launches.restoreSession:liveTileHolding(entry)before the remote call and again after the awaits; when found, the entry is consumed (pin carried over) and nothing starts. Loggedalready open here as <id>; nothing started.liveIds/reservedcomputed right beforeresolveRestoreTarget.cockpit.restore_machine_offline_nremoved (4 languages).Tests
takeUpdateRestoreCandidates: 2 new tests. Full suite 1530 passed, tsc clean, build OK.Notes
The duplicates already running on the other PC are not removed by this change — they are indistinguishable from a freshly opened session. Release notes tell the user to Ctrl/Shift-select and close them.
🤖 Generated with Claude Code
https://claude.ai/code/session_016NLGwiBY5uEivJqERQzcoY