Repository navigation
feat(sessions): restore saved terminal tabs on startup - #286
shihuili1218 wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27157abbf0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let resourcePanesAllowed = $state(bypassStartupReconcile); | ||
| let navigationLoad = 0; | ||
| $effect(() => { | ||
| if (bypassStartupReconcile || !sessionRestore.ready() || !sessionRestore.enabled()) return; |
There was a problem hiding this comment.
Synchronize the restore preference across windows
When the user toggles this setting from a clone or AI-handoff window, that window renders the same Settings UI and writes the shared database key, but this guard prevents it from ever persisting a snapshot while the primary window's per-webview _enabled value remains unchanged. Enabling restore there therefore saves no sessions, while disabling it can be undone when the primary window next changes tabs and writes another snapshot; propagate preference changes to the primary window or make the control unavailable in secondary windows.
AGENTS.md reference: AGENTS.md:L211-L216
Useful? React with 👍 / 👎.
| types.has("serial") && !app.isMobile ? invoke<app.SerialProfile[]>("list_serial_profiles") : [], | ||
| ]); | ||
| // Do not take over tabs the user opened while the backend was loading. | ||
| if (signal?.aborted || app.tabs().length !== 1) return false; |
There was a problem hiding this comment.
Avoid auto-opening after a manual local tab wins restore
When restore is enabled together with open_local_on_startup, a user can open a local terminal while the profile-list requests are pending; this guard then aborts restoration and returns false, so initializePrimarySessionWindow interprets the result as having no local terminal and opens a second one. The new restore wait makes this race materially wider than the original single settings read; return that a local tab is already present, or recheck the tab state before applying auto-open.
Useful? React with 👍 / 👎.
No description provided.