Repository navigation
fix(connections): reopen every strip entry, leaving canceled and disconnected ones not connected - #3701
Merged
Conversation
…onnected ones not connected
datlechin
enabled auto-merge (squash)
October 20, 2026 14:59
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.
Summary
LastSession.jsonholds the session with a reconnect flag per connection.LastOpenConnections.jsonkeeps its[UUID]format with only the connections that reconnect, so 0.82 still reads it and never dials a canceled one. When the two disagree, the newer file wins.applicationWillTerminate, and with no coordinator alive nothing flagged termination, so those closes saved an empty list: a session holding only failed or not-connected connections lost them at quit.open_connection_windoworopen_table_tabfor a connection already on the strip but failed or not connected now dials it, under the same rules as a new window: never one the user canceled or disconnected. It used to queue the open and time out..claude/rules/connection-window.md: the Reopen Last Session line now states this behavior.data-sync-storage.mdlists the two files.RecoveryConnectionListTestschanges on purpose: "A cancelled connection attempt is not restored" is now "A canceled connect comes back without dialing".Test plan
LastOpenConnectionsStorageTests(new): a relaunch with four connections, one canceled and one disconnected, comes back in order with only the connected ones dialing; the legacy file holds only reconnecting ids; a legacy-only file reopens everything; an older build's newer list wins; a save cut short keeps the newer session; saves after the quit save change nothing.RecoveryConnectionListTests: canceled, disconnected and never-dialed connections come back with reconnect off; a failed one still reconnects; a closing window is left out; order follows when each connection opened.MainSplitViewControllerPaneSynchronizationTests: a workspace reopened without its connect stays idle on the not-connected pane when its window activates; a connect request reaches it but leaves a canceled one alone.NSRunningApplication.terminate(): a session of three SQLite connections, the middle one saved as not reconnecting, reopened in order with coordinators for the other two only and the saved connection selected, and the same session was written back at quit. A session of two not-connected entries survived a quit that closed its window with no coordinator alive.windowWillCloseafterapplicationWillTerminate, so the quit save never sees a closing window.Docs: TableProApp/docs#64
Fixes #3658