fix(ui): restore z-20 on main panel header to prevent popover clipping#799
Conversation
Commit 4d01c32 ("fix: remove main header z-index") removed z-20 from the main panel header container, which caused absolute-positioned popovers inside the header (notably the Context Details dropdown) to render behind the main content area instead of above it. The Context Details popover in MainPanelHeader.tsx uses `absolute top-full right-0 ... z-50` to drop below the CONTEXT button. Its local z-50 only ranks it within the header's stacking context. With z-20 gone, the header no longer establishes a stacking context elevated above the sibling main content area, so when the popover extends below the header's 64px height it is covered by the chat/AI log view. Symptom: clicking CONTEXT shows only the top strip of 'Context Details' at the bottom edge of the header; the rest of the popover is hidden behind the chat area. Restoring z-20 re-establishes the stacking context and lets the popover escape downward cleanly. No other elements depended on the header being z-auto, and this matches the state that shipped before April 9, 2026.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryRestores Confidence Score: 5/5Safe to merge — single-line regression fix with a clear root cause, verified fix rationale, and no new code paths introduced. The change is exactly one class token restored to a single element, matches a well-documented regression, and all remaining findings are non-blocking style notes. No logic, data, or security concerns. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["MainPanel (layout root)"]
A --> B["header-container\n(relative z-20) ← restored"]
A --> C["Main content area\n(chat / AI log view)"]
B --> D["Git tooltip\n(absolute top-full z-50)"]
B --> E["Context Details popover\n(absolute top-full z-50)"]
style B fill:#22c55e,color:#fff
style D fill:#3b82f6,color:#fff
style E fill:#3b82f6,color:#fff
style C fill:#6b7280,color:#fff
Reviews (1): Last reviewed commit: "fix(ui): restore z-20 on main panel head..." | Re-trigger Greptile |
Summary
z-20on the main panel header container that was removed in commit4d01c32e(fix: remove main header z-index, Apr 9 2026)src/renderer/components/MainPanel/MainPanelHeader.tsxRegression details
The Context Details popover inside the header is declared as:
Its local
z-50only ranks it among siblings inside the header's stacking context. Before4d01c32e, the header container itself carriedz-20, which established a stacking context elevated above the sibling main content area. After that commit, the header no longer creates a stacking context, so when the popover drops below the header's 64 px height (top-full), it is rendered underneath the positioned chat / AI log view.Symptom: clicking the CONTEXT button shows only the very top of the "Context Details" panel at the edge of the header; the rest of the popover is hidden behind the chat area.
Restoring
z-20on the header re-elevates the header's stacking context so its absolute descendants render above the sibling main content area, matching the pre-April-9 behavior. The tooltip's ownz-50remains, so nothing else regresses.Test plan
Alternative considered
A more robust long-term fix would be to render the popover via a React portal so it escapes all parent stacking contexts. That is a larger change and out of scope for this regression fix, but is the recommended direction if similar issues surface for other in-header popovers.
Summary by CodeRabbit