Skip to content

Agent setup panel no longer renders behind the new tab menu - #36839

Merged
brennanb2025 merged 4 commits into
mainfrom
brennanb2025/agent-setup-panel-z-order
Nov 1, 2026
Merged

brennanb2025 merged 4 commits into
mainfrom
brennanb2025/agent-setup-panel-z-order

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

Problem

In the new tab menu, clicking the arrow next to an agent (for example Claude) opens a panel to pick its model, effort and args. That panel looked like it was tucked behind the menu: the menu's drop shadow fell across the panel's left edge, so the panel read as the lower layer even though it is the thing the user just opened. Reported in Slack with a screenshot.

Why: the panel uses the app's base popover layer (z-index 60), while dropdown menus sit one layer higher (z-index 70). The panel was literally rendered underneath the menu it opens from, and only looked mostly visible because it is positioned beside it.

Change

The setup panel now uses the menu layer (z-index 70). With equal z-index, the browser stacks by open order, so the panel lands above the menu that opened it, and the panel's own permission dropdown (also z-index 70, opened later) still lands above the panel. This is the same way a nested submenu already stacks over its parent menu. Tooltips stay above everything at z-index 90.

The only place this panel opens is the new tab menu's agent rows, which are all z-index 70 menus.

Review path: light

  1. Small: 1 production line in 1 file (AgentLaunchSetupButton.tsx).
  2. Outside the risky areas: styling only (a z-index class); no saved data, ordering, wire format, process, auth or default change.
  3. Not a repeat: git log --since=30.days on the file shows only the feature that added it (Choose an agent setup from the new tab menu #34728); no earlier fix for this symptom, no revert.
  4. Local effect: one component's rendering.

Plan: put the menu-launched popover on the menu layer instead of adding a special shadow or offset, so stacking follows open order like submenus.

The setup panel opened from an agent row's arrow used the base popover
layer (z-60), below the menu it opens from (z-70), so the menu's drop
shadow fell across the panel and it looked tucked behind the menu.
Sharing the menu layer stacks it by open order, like a submenu, and
keeps the panel's own permission dropdown above it.
@brennanb2025
brennanb2025 marked this pull request as ready for review November 1, 2026 01:27
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9995c8a6-8d19-44e0-8ee2-dd226a481dbe
Commits

Reviewing files that changed from the base of the PR and between 5826991 and 7919910.

Files selected for processing: 2
  • src/renderer/src/components/agent/AgentLaunchPickerMenu.test.tsx
  • src/renderer/src/components/agent/AgentLaunchSetupButton.tsx

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc59af5f-4fec-4225-a59b-7f1c1d84c7b4
Commits

Reviewing files that changed from the base of the PR and between 7e220ef and 5826991.

Files selected for processing: 1
  • src/renderer/src/components/agent/AgentLaunchPickerMenu.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Walkthrough

The popover content now uses the z-[70] class. Its existing width, size, and flex classes remain unchanged. A comment describes the stacking behavior. A test compares the setup dialog’s z-index utility with the menu’s and checks that it is not z-[60].

Merge Risk: Minimal · previous review 58269

The change is limited to the setup panel’s stacking layer, with no actionable merge-blocking risk identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description follows the repository template in structure. It has Problem, Change, and Review path sections, and a Local effect note. It omits or leaves blank several template sections: ELI5, the L… Add the following template items: (1) an ELI5 summary in plain language; (2) a linked issue in the Fixes # field, or an explicit note if this is a maintainer PR; (3) a BEFORE and AFTER visual proof for this UI change, such as a screenshot o…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title states the main change: the agent setup panel no longer renders behind the new tab menu. The raw summary and objectives confirm the change raises the setup panel's z-index from 60 to 70 (men…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: the agent setup panel no longer renders behind the new tab menu. The raw summary and objectives confirm the change raises the setup panel's z-index from 60 to 70 (menu layer) in AgentLaunchSetupButton.tsx, with a matching test. The title is specific and accurate, and it is 59 characters.

Full details: Description check

Explanation

The description follows the repository template in structure. It has Problem, Change, and Review path sections, and a Local effect note. It omits or leaves blank several template sections: ELI5, the Linked Issue (Fixes # is empty, and the template requires an actual issue for outside contributors), Visual Proof (required for UI changes, and no BEFORE/AFTER attachment is shown), Testing steps and platform checkboxes, the Review and Agent skill upstream boundary checks, and the Checklist. The core problem and fix are explained clearly, so the description is mostly complete in substance but is missing required template items.

Resolution

Add the following template items: (1) an ELI5 summary in plain language; (2) a linked issue in the Fixes # field, or an explicit note if this is a maintainer PR; (3) a BEFORE and AFTER visual proof for this UI change, such as a screenshot or video that can be switched, or N/A with reason (the Slack screenshot is referenced but not attached); (4) Testing steps a reviewer can follow, with the platforms actually tested (the PR objectives mention a Windows QA check, so record that here) and the manual testing and automated tests checkboxes marked; (5) the Agent skill upstream boundary checkbox; (6) the Checklist items confirmed. Also consider removing the LoC table and review-path details if they are not part of the template.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • 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.

Share

@brennanb2025

brennanb2025 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Review loop status: light path, done

The problem. In the new tab menu, the arrow next to an agent (for example Claude) opens a panel for its model, effort and args. That panel was drawn underneath the menu that opened it: the panel used the base popover layer (z-index 60) while menus sit at 70, so the menu's drop shadow fell across the panel's left edge and the panel looked like the lower layer. In a narrow window, where the panel opens below the agent row and overlaps the menu, the menu rows were drawn over the panel.

The change. The panel now sits on the menu layer (z-index 70). At equal z-index the later-opened layer paints on top, so the panel lands above the menu that opened it, and the panel's own permission dropdown (also 70, opened later) still lands above the panel. Tooltips stay above everything (90). This is the same way a submenu already stacks over its parent menu.

Review. One fresh adversarial reviewer confirmed the light-path classification in code (1 production line, styling only, no repeat in 30 days, local effect) and found nothing. It checked: both places the panel mounts are inside the z-70 new tab menu; the class replaces the base z-60 through the class merge; the positioning wrapper copies the panel's z-index; everything inside the panel that portals (permission dropdowns at 70, tooltips at 90) still opens above it, and nothing inside it sits at 50 or 60; dialogs (50) were already below both layers, so their order is unchanged. No review findings, nothing deferred. One test-only commit since: 5826991 adds a renderer test (AgentLaunchPickerMenu.test.tsx) that opens the setup panel inside the new tab menu and checks it sits on the menu's layer, not the base popover layer; it fails without the fix (expected 'z-[60]' to be 'z-[70]') and the reviewer agreed with it. It changes no shipped file, so the QA below (run on 7e220ef) still covers this head.

Reference comparison: not required. This is renderer styling in the agent picker; it changes no agent mechanism, value source or check on a user's action.

Verified. CI was green on 7e220ef. On 5826991 the only failure was lint in src/main/runtime/construction/runtime-identity-state.ts (file over the size cap), which main itself broke; after #36852 fixed it on main, main was merged once more (7919910) and CI is green on that head. QA screenshot run on Windows (1920x1152, dark theme, fresh throwaway home, no agent started), branch head 7e220ef beside main 344bf52, driven through the app's debugging port. Results: (1) wide window: the panel's computed layer is 70 on the branch and 60 on main; on main a pixel diff shows the menu's shadow across the panel's left edge (about 4,100 pixels), on the branch it is gone. (2) The panel's permission dropdown opens above the panel on both builds, and Escape closes only the dropdown. (3) Hovering another agent row keeps the panel open and on top (on main it stays under the menu). (4) Narrow window (600x800, sidebar collapsed), where the panel opens below the agent row and overlaps the menu: on main the menu rows draw over the panel; on the branch the panel covers them (hit test at the overlap lands in the panel). No other difference between the builds. Not run: typing in the panel's model search (unaffected by a z-index change; the panel's controls are covered by existing renderer tests).

For Brennan's review

Branch Main
Narrow window, panel below the agent row branch-narrow-panel main-narrow-panel
Wide window, panel beside the menu branch-menu-panel main-menu-panel

Branch, permission dropdown open above the panel:

branch-permission-dropdown

Head 7e220ef includes one merge of main (2 unrelated commits: an orcad sidecar cleanup and an orchestration guide edit). Since the QA'd head: 5826991 (test only) and 7919910 (merge of main bringing in #36852's lint fix and other unrelated main commits; no conflicts, no change to this PR's files).

@brennanb2025
brennanb2025 merged commit a85452b into main Nov 1, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant