Feat/multiple accounts stack vs segmented options#869
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96ef6b48d8
ℹ️ 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 codexSwitcherCompatible = codexAccountDisplay == self.lastCodexAccountMenuDisplay && | ||
| ((codexAccountDisplay == nil && !hasCodexSwitcher) || (codexAccountDisplay != nil && hasCodexSwitcher)) | ||
| ((codexAccountDisplay?.showSwitcher == true && hasCodexSwitcher) || | ||
| (codexAccountDisplay?.showSwitcher != true && !hasCodexSwitcher)) |
There was a problem hiding this comment.
Prevent smart-update for stacked Codex layouts
This compatibility check now treats the "stacked" Codex layout as smart-update-safe when no Codex switcher view is present. In merged menus (mergeIcons on, multiple providers), that allows canSmartUpdate to run even though stacked account cards must be rebuilt with codexAccountDisplay; the smart-update path rebuilds content without that display context, so periodic menu refresh can collapse stacked Codex cards back to a single live card.
Useful? React with 👍 / 👎.
| self.settings.codexActiveSource = originalSource | ||
| } | ||
| } | ||
| defer { restoreOriginalSelection() } |
There was a problem hiding this comment.
Stop forcing stale Codex account selection after refresh
This deferred restore always writes the originally captured account/source back after an async multi-account refresh. Because the function awaits network fetches per account, user actions can interleave and change the active Codex account during the refresh; when the deferred restore runs, it overwrites that newer selection and can persist the wrong account/source unexpectedly.
Useful? React with 👍 / 👎.
No description provided.