Repository navigation
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".
| } else { | ||
| void sessionRestore.initializeSecondaryWindow(); |
There was a problem hiding this comment.
Synchronize restore toggles from secondary windows
When Shell Settings is opened in a clone or AI-handoff window, this initializes a separate webview-local store and leaves the restore switch editable. Toggling it writes the shared database, but the primary window's _enabled value is never updated; for example, enabling restoration from the secondary window leaves the primary window unable to persist its current tabs, so the next startup restores nothing despite the option being enabled. Either synchronize this preference between windows or prevent secondary windows from changing it.
Useful? React with 👍 / 👎.
| // 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 a second manually opened local tab
When a saved snapshot requires profile loading, resource panes have already been released, so the user can open a local terminal while these awaits are pending. This branch then returns false because tabs changed, which initializePrimarySessionWindow interprets as “no local terminal was restored” and follows with the open_local_on_startup action; if that preference is enabled, the manually opened local terminal is duplicated. The takeover result needs to suppress auto-open when a local tab already exists, or otherwise distinguish user takeover from an empty restore.
Useful? React with 👍 / 👎.
| const data = JSON.parse(raw); | ||
| if (data?.version !== 1 || !Array.isArray(data.terminals)) return null; |
There was a problem hiding this comment.
Preserve snapshots with unsupported versions
If a user starts this build against a data directory previously used by a newer release whose snapshot version is not 1, this returns null while leaving _enabled true. restore() then marks the store ready, causing AppShell's persistence effect to immediately replace the unsupported snapshot with a version-1 empty/current snapshot. That destroys the newer release's saved session data on downgrade; an unknown version should disable persistence for the run or otherwise be preserved until it can be migrated.
Useful? React with 👍 / 👎.
No description provided.