fix(agent-manager): apply reasoning-variant and mode picks in worktree dialog - #11924
Merged
Conversation
…e dialog
The reasoning-variant and mode pickers in the New Worktree dialog portaled
their popover content to <body>, where the dialog's full-screen modal overlay
(z-index 50, pointer-events auto) intercepted pointer events before the
option onClick fired. Selecting a variant dismissed the popover via the
overlay without applying the choice, so the trigger label reverted to the
previous value.
The model picker already avoided this with portal={false} (09f0156).
Forward the same portal prop through ThinkingSelectorBase and
ModeSwitcherBase and pass portal={false} from NewWorktreeDialog so all
three pickers render inline within the dialog content, above the overlay.
Reproduced live in the isolated VS Code self-test: before the fix a real
pointer click on a variant option timed out with 'dialog-overlay ...
intercepts pointer events' and the label stayed unchanged; after the fix
the popover nests inside [dialog] and clicking a variant applies in both
directions with no console errors.
marius-kilocode
enabled auto-merge
July 3, 2026 15:46
chrarnoldus
approved these changes
Jul 3, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The fix forwards a
Files Reviewed (4 files)
Reviewed by claude-sonnet-5-20260630 · Input: 12 · Output: 4.7K · Cached: 218.4K Review guidance: REVIEW.md from base branch |
NJ-2020
pushed a commit
to NJ-2020/kilocode
that referenced
this pull request
Jul 4, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…g-selector fix(agent-manager): apply reasoning-variant and mode picks in worktree dialog
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Selecting a reasoning variant (or mode) in the New Worktree dialog did nothing — the trigger label reverted to the previous value and the chosen variant never reached the created sessions.
Root cause
The New Worktree dialog renders a full-screen modal overlay (
data-component="dialog-overlay", z-index 50,pointer-events: auto) behind its content. The reasoning-variant (ThinkingSelector) and mode (ModeSwitcher) pickers portaled their popover content to<body>, placing it outside the dialog content and therefore under the overlay. A real pointer click on an option hit the overlay first, which:onClickso the selection did not apply. JS
.click()(which bypasses hit-testing) worked, which is why the bug was easy to miss on inspection.The model picker was unaffected because it already rendered inline via
portal={false}(added in 09f0156 for the same class of click interception). The sidebar prompt was unaffected because it has no modal overlay.Fix
Forward a
portalprop throughThinkingSelectorBaseandModeSwitcherBase(mirroringModelSelectorBase) and passportal={false}fromNewWorktreeDialogso all three pickers render their popovers inline within the dialog content, above the overlay.Validation
Reproduced live in the isolated VS Code self-test harness before and after the fix:
dialog-overlay ... intercepts pointer events; the trigger label stayed unchanged.[dialog]and clicking a variant applies in both directions (Instant <-> Thinking) with no console errors.Automated checks: extension
bun run lint,bun run typecheck,bun run knipclean; worktree dialog unit tests pass (11/11).