You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(bots): show the agent switch confirm above the open agent picker - #48673
When you pick a different AI agent for a bot, Orca asks "Switch this bot to the new agent?" before doing it. That question was showing up behind the agent list, which stays open after you click the new agent's tab. You couldn't read it, and clicking what looked like a row in the list could actually press the hidden "Switch" or "Cancel" button. Now the question shows on top of the list, so you can see it and answer it.
What Changed
Before: In Settings › Bots › a bot › Agent and model, clicking another agent's tab in the picker opened the "Switch to ?" confirm at the default dialog layer (z-50), under the still-open dropdown (z-[70]). The menu covered the dialog. Because Radix makes the menu click-through while a modal dialog is open, a click on a visible model row went to the hidden confirm button under it.
After: That confirm renders at z-[80], above the picker. The picker is dimmed under the dialog's overlay, and Cancel and "Switch to " are visible and clickable. After confirming, the picker stays open on the new agent's pane so you can pick its model and effort next.
How:
ConfirmationDialogOptions gets an opt-in aboveMenus flag. When it is set, the shared ConfirmationDialogProvider gives the dialog content and overlay z-[80]. This is the tier the resource-manager confirms (useDaemonActions, resource-usage-kill-dialog) already use over the popovers that open them.
useConfirmBotAgentSwitch sets aboveMenus: true.
All other confirms stay at z-50, so their layering with toasts doesn't change.
Why
The bot agent picker uses selectAgentOnTab: a tab click commits the agent while the dropdown stays open, and then the switch is confirmed. Closing the picker before asking would also fix the layering. But it would mean making the picker's open state controlled, which is more code, and it would break the intended flow of staying on the new agent's pane. Raising only this confirm is the smallest fix and follows the existing above-menu convention.
The real AgentLaunchPicker with selectAgentOnTab, inside ConfirmationDialogProvider, with onPick calling the real useConfirmBotAgentSwitch. Headless component fixture after clicking the Codex tab:
Before (main)
After (this PR)
Testing
Reproduced with a temporary headless component fixture (pnpm fixtures:shot, headless Chromium, dark theme; not committed). It renders the real picker and confirm, wired like BotAgentSettings.setAgentSetup.
main: dialog and overlay at z-index 50, menu at 70. The menu covers the confirm's buttons, and elementFromPoint over a menu row returns the hidden "Switch" button, so clicking there switched the agent with no visible prompt.
This PR: dialog and overlay at 80. Title, Cancel and Confirm are on top. Confirming settles true, the picker stays open, and the Codex tab stays selected.
Same on main and this PR: the first Escape closes only the confirm (it settles false) and the picker stays open. A plain confirm() without aboveMenus stays at 50.
No committed test. This is CSS stacking, which jsdom can't hit-test, and asserting a class name would be a test anti-pattern.
Unit tests that render the confirmation dialog pass (google-account-picker, TabGroupStripActions, worktree-card-agent-row-menu: 24 tests).
oxlint, oxfmt --check, anti-slop, code-quality, ast-grep and the changed-code quality gate are clean on the 3 changed files.
Platform: macOS (headless Chromium). The change is CSS only and doesn't depend on the platform.
Perf: renderer only. It adds two ternaries to the ConfirmationDialogProvider render, which runs only when the confirm queue changes. No hot path, I/O, polling or subprocess work.
Trade-off: while this confirm is open, toasts (z-60) sit behind its z-80 overlay, the same as the existing resource-manager confirms. The prompt is short-lived.
No actionable comments were generated in the recent review.
Walkthrough
The confirmation options now include an optional aboveMenus flag. When enabled, the confirmation dialog applies z-[80] to its content and overlay. The bot agent-switch confirmation enables this option.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 668fd
The bot agent-switch confirmation now appears above the still-open agent picker, so its buttons can be clicked. Other confirmations are unchanged. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
Issue #48672 requires the bot agent switch confirm to open above the agent picker so its text is readable and its buttons are clickable. The diff at head 668fde4 meets this. In src/renderer/src/compon…
Out of Scope Changes check
All four changed hunks serve the issue #48672 fix. The bot switch confirm option is set in bot-home-chat-confirm.tsx. The new ConfirmationDialogOptions.aboveMenus field in confirmation-dialog-context.…
Title check
The title names the bot agent switch confirmation and the agent picker layering fix, which matches the code change: an aboveMenus option that raises the confirm to z-80. It is specific and conventiona…
Description check
The description follows the template and covers ELI5, What Changed (before and after), Why (alternatives considered), Linked Issue (Fixes #48672), Visual Proof (before/after images), Testing, Performa…
Full details: Linked Issues check
Explanation
Issue #48672 requires the bot agent switch confirm to open above the agent picker so its text is readable and its buttons are clickable. The diff at head 668fde4 meets this. In src/renderer/src/components/bots/bot-home-chat-confirm.tsx, useConfirmBotAgentSwitch sets aboveMenus: true. In confirmation-dialog.tsx, that flag adds className and overlayClassName 'z-[80]' to DialogContent and its DialogOverlay. In src/renderer/src/components/ui/dialog.tsx, DialogContent passes className through cn() after its base z-50 class, and DialogOverlay merges overlayClassName the same way. Tailwind class merging should let z-[80] replace z-50. The picker menu is z-[70], so the dialog now sits above it. The issue does not request automated tests. The PR adds no committed test and cites the repo's UI-layering test exclusion. The author reports a local hit-test and click check. That check is not committed and was not re-run in this review.
Full details: Out of Scope Changes check
Explanation
All four changed hunks serve the issue #48672 fix. The bot switch confirm option is set in bot-home-chat-confirm.tsx. The new ConfirmationDialogOptions.aboveMenus field in confirmation-dialog-context.ts is the option type for that flag. The rendering change in confirmation-dialog.tsx applies the z-[80] class only when aboveMenus is set. Other confirmations do not set the flag and keep the default z-50. No unrelated files or behavior changes appear in the diff between the merge base 315dacd and head 668fde4.
Full details: Title check
Explanation
The title names the bot agent switch confirmation and the agent picker layering fix, which matches the code change: an aboveMenus option that raises the confirm to z-80. It is specific and conventional, with a fix() prefix and a scope. It is slightly long at 68 characters, but it stays on the main change.
Full details: Description check
Explanation
The description follows the template and covers ELI5, What Changed (before and after), Why (alternatives considered), Linked Issue (Fixes #48672), Visual Proof (before/after images), Testing, Performance, and Risk. Its content is specific and substantive. The Risk section has no Level value, and the template's Risk section asks for a level and a rollback path. The Review, Agent skill upstream boundary, Notes, Checklist, and AI Disclosure sections are not filled in. The Risk section also lacks a rollback note. These gaps are non-critical, so the check passes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The bot agent picker commits a tab click while its dropdown stays open,
then asks to confirm the switch. The confirm used the default z-50
dialog layer while the dropdown sits at z-[70], so the dialog was hidden
behind the picker and clicks on visible menu rows pressed its hidden
buttons. Add an opt-in aboveMenus option to the shared confirmation
dialog that lifts it to z-[80], matching the existing confirms shown
over popovers, and set it for the bot agent switch confirm.
Fixesstablyai#48672
nwparker
changed the title
fix(bots): show the agent switch confirm above the agent picker
fix(bots): show the agent switch confirm above the open agent picker
Nov 25, 2026
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
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.
ELI5
When you pick a different AI agent for a bot, Orca asks "Switch this bot to the new agent?" before doing it. That question was showing up behind the agent list, which stays open after you click the new agent's tab. You couldn't read it, and clicking what looked like a row in the list could actually press the hidden "Switch" or "Cancel" button. Now the question shows on top of the list, so you can see it and answer it.
What Changed
Before: In Settings › Bots › a bot › Agent and model, clicking another agent's tab in the picker opened the "Switch to ?" confirm at the default dialog layer (
z-50), under the still-open dropdown (z-[70]). The menu covered the dialog. Because Radix makes the menu click-through while a modal dialog is open, a click on a visible model row went to the hidden confirm button under it.After: That confirm renders at
z-[80], above the picker. The picker is dimmed under the dialog's overlay, and Cancel and "Switch to " are visible and clickable. After confirming, the picker stays open on the new agent's pane so you can pick its model and effort next.How:
ConfirmationDialogOptionsgets an opt-inaboveMenusflag. When it is set, the sharedConfirmationDialogProvidergives the dialog content and overlayz-[80]. This is the tier the resource-manager confirms (useDaemonActions,resource-usage-kill-dialog) already use over the popovers that open them.useConfirmBotAgentSwitchsetsaboveMenus: true.z-50, so their layering with toasts doesn't change.Why
The bot agent picker uses
selectAgentOnTab: a tab click commits the agent while the dropdown stays open, and then the switch is confirmed. Closing the picker before asking would also fix the layering. But it would mean making the picker's open state controlled, which is more code, and it would break the intended flow of staying on the new agent's pane. Raising only this confirm is the smallest fix and follows the existing above-menu convention.Linked Issue
Fixes #48672
Visual Proof
The real
AgentLaunchPickerwithselectAgentOnTab, insideConfirmationDialogProvider, withonPickcalling the realuseConfirmBotAgentSwitch. Headless component fixture after clicking the Codex tab:Testing
pnpm fixtures:shot, headless Chromium, dark theme; not committed). It renders the real picker and confirm, wired likeBotAgentSettings.setAgentSetup.elementFromPointover a menu row returns the hidden "Switch" button, so clicking there switched the agent with no visible prompt.confirm()withoutaboveMenusstays at 50.google-account-picker,TabGroupStripActions,worktree-card-agent-row-menu: 24 tests).oxfmt --check, anti-slop, code-quality, ast-grep and the changed-code quality gate are clean on the 3 changed files.ConfirmationDialogProviderrender, which runs only when the confirm queue changes. No hot path, I/O, polling or subprocess work.Trade-off: while this confirm is open, toasts (z-60) sit behind its z-80 overlay, the same as the existing resource-manager confirms. The prompt is short-lived.