Skip to content

feat(settings): option to skip automatic session reconnect at startup… - #127

Open
twkrol wants to merge 1 commit into
GOODBOY008:mainfrom
twkrol:feat/restore-sessions-on-startup-setting
Open

feat(settings): option to skip automatic session reconnect at startup…#127
twkrol wants to merge 1 commit into
GOODBOY008:mainfrom
twkrol:feat/restore-sessions-on-startup-setting

Conversation

@twkrol

@twkrol twkrol commented Sep 2, 2026

Copy link
Copy Markdown

… (#126)

Add a "Reconnect Sessions on Startup" switch (Settings > Connection, default on). When it is off, the tabs left open in the previous session are still restored to the layout, but App.tsx starts no backend connection for them: they stay pending and show an explicit Connect button (the tab context menu Reconnect works too). An info toast tells the user how many tabs were left disconnected. The active-connections list is kept so the tabs persist again for the next launch.

  • src/lib/startup-restore.ts: read the preference from the persisted app settings; only an explicit false disables the restore so existing installs keep the current behaviour.
  • App.tsx: early return in the restore effect; track deferred tab ids and drop them when the user reconnects a tab.
  • terminal-tab-portals.tsx: Connect action in the pending placeholder for deferred tabs; the pulsing "Waiting for connection..." stays for in-flight connects.
  • Settings modal + en/zh-CN strings (i18n parity checked).
  • Tests: helper unit tests and an App-level test covering default restore, skipped restore, and connect-on-demand.

Closes #126

…GOODBOY008#126)

Add a "Reconnect Sessions on Startup" switch (Settings > Connection,
default on). When it is off, the tabs left open in the previous session
are still restored to the layout, but App.tsx starts no backend
connection for them: they stay `pending` and show an explicit Connect
button (the tab context menu Reconnect works too). An info toast tells
the user how many tabs were left disconnected. The active-connections
list is kept so the tabs persist again for the next launch.

- src/lib/startup-restore.ts: read the preference from the persisted
  app settings; only an explicit `false` disables the restore so existing
  installs keep the current behaviour.
- App.tsx: early return in the restore effect; track deferred tab ids and
  drop them when the user reconnects a tab.
- terminal-tab-portals.tsx: Connect action in the pending placeholder for
  deferred tabs; the pulsing "Waiting for connection..." stays for
  in-flight connects.
- Settings modal + en/zh-CN strings (i18n parity checked).
- Tests: helper unit tests and an App-level test covering default
  restore, skipped restore, and connect-on-demand.

Closes GOODBOY008#126

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings option for automatic reconnect at start

1 participant