Skip to content

fix(PageHeader): keep sticky header below drawer overlays#2394

Merged
kodiakhq[bot] merged 3 commits into
mainfrom
elizabet/page-header-z-index-below-drawers
Jun 1, 2026
Merged

fix(PageHeader): keep sticky header below drawer overlays#2394
kodiakhq[bot] merged 3 commits into
mainfrom
elizabet/page-header-z-index-below-drawers

Conversation

@elizabetdev

Copy link
Copy Markdown
Contributor

Summary

The sticky PageHeader (and its stickyRow) were pinned at z-index: 100, which floated them above app drawers. Drawers in this codebase don't use Mantine's default modal elevation (200) — they explicitly opt into a much lower stack via ZIndexContext (contextZIndex + 10, see DBRowSidePanel, NodeDetailsSidePanel, PodDetailsSidePanel, etc.), so a top-level drawer overlay ends up at --overlay-z-index: 10. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open.

This drops both .header and .stickyRow to z-index: 2 — 8 below the top-level drawer z-index — so:

  • Drawer overlays (and the drawer body itself) reliably cover the sticky page chrome.
  • The header still wins against normal scrolling page content, which uses auto/no z-index.
  • Nested drawers (which keep stacking via ZIndexContext) continue to layer above their parents unchanged.

Comments in the SCSS document the relationship so the next person tweaking these values has the context.

Test plan

  • Open a page that uses PageHeader (e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay.
  • Scroll a long page and confirm the sticky header still sits above normal content (charts, tables, lists).
  • Open a nested drawer (e.g. row side panel from within another side panel) and confirm stacking still works as before.

Made with Cursor

…r overlay behavior

Updated the z-index for the PageHeader and stickyRow components to 2, allowing top-level drawers to overlay correctly while maintaining the header's visibility during scrolling. This change ensures that the header floats above normal content but below the drawer overlays, improving the overall user experience.
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Jun 1, 2026 5:38pm
hyperdx-storybook Ready Ready Preview, Comment Jun 1, 2026 5:38pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8662351

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Jun 1, 2026
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 2
  • Production lines changed: 46
  • Branch: elizabet/page-header-z-index-below-drawers
  • Author: elizabetdev

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

All tests passed • 193 passed • 3 skipped • 1306s

Status Count
✅ Passed 193
❌ Failed 0
⚠️ Flaky 2
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Deep Review

Scope: packages/app/src/components/PageHeader.module.scss (.header and .stickyRow z-index: 100 → 2) + packages/app/src/components/FullscreenPanelModal.tsx (Mantine default 200 → contextZIndex + 10 with ZIndexContext.Provider propagation) + changeset.

Intent: Stop sticky page chrome from floating above the app's contextZIndex + 10 drawer overlays, and make FullscreenPanelModal play by the same ZIndexContext convention so child drawers (e.g. DBRowSidePanel opened by clicking a row in a fullscreen search tile) stack on top of the modal instead of being hidden behind it.

✅ No critical issues found.

The drawer math (contextZIndex + 10) was re-verified across every top-level consumer — DBRowSidePanel, NodeDetailsSidePanel, PodDetailsSidePanel, NamespaceDetailsSidePanel, ServiceDashboardDbQuerySidePanel, PatternSidePanel, SessionSidePanel — so a drawer opened from inside the fullscreen modal lands at modalZIndex + 10, correctly above the modal. The <ZIndexContext.Provider value={modalZIndex}> convention chosen here matches SessionSidePanel.tsx:101; DBDashboardPage's EditTileModal uses the slightly different value={modalZIndex + 10} form, but both compose correctly with consumers that re-add 10.

The "header still wins over normal scrolling content" claim holds at z-index: 2. Other small explicit z-indexes in page content (DBSearchHeatmapChart.tsx:176, TableSearchInput.tsx:196, internal TimelineChart values 1–3) all live in inner positioned/isolated stacking contexts and do not compete with the sticky header. .notSticky correctly retains z-index: auto. Mantine portals that take their default zIndex (notifications at 999999, popovers at 300, spotlights at 200001) remain comfortably above both the new modal value (10) and the new header value (2).

This revision directly addresses @brandon-pereira's flagged side-panel-under-fullscreen-tile bug; nothing remains unresolved from prior feedback.


Reviewers (7): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races, previous-comments.

@brandon-pereira

Copy link
Copy Markdown
Member

@elizabetdev this works good, thanks. One side note: If you have a search tile, click "Full screen" then click a row, the sidebar opens under the tile.. probably not related though.

Link

brandon-pereira
brandon-pereira previously approved these changes Jun 1, 2026
…creen tile above the modal

Use the existing `ZIndexContext` pattern (`contextZIndex + 10`) for the
modal itself and expose that value via `ZIndexContext.Provider`, so a
DBRowSidePanel drawer opened by clicking a row inside the fullscreen
search tile lands at `z-index: 20` (above the modal at `10`) instead of
`z-index: 10` (hidden behind Mantine's default modal z-index of 200).

Co-authored-by: Cursor <cursoragent@cursor.com>
@elizabetdev

Copy link
Copy Markdown
Contributor Author

@brandon-pereira it was another z-index issue. It was fixed by 8662351.

@brandon-pereira brandon-pereira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thank you 🥳

@kodiakhq kodiakhq Bot merged commit 9d71399 into main Jun 1, 2026
20 checks passed
@kodiakhq kodiakhq Bot deleted the elizabet/page-header-z-index-below-drawers branch June 1, 2026 17:44
brandon-pereira pushed a commit that referenced this pull request Jun 2, 2026
## Summary

The sticky `PageHeader` (and its `stickyRow`) were pinned at `z-index: 100`, which floated them above app drawers. Drawers in this codebase don't use Mantine's default `modal` elevation (200) — they explicitly opt into a much lower stack via `ZIndexContext` (`contextZIndex + 10`, see `DBRowSidePanel`, `NodeDetailsSidePanel`, `PodDetailsSidePanel`, etc.), so a top-level drawer overlay ends up at `--overlay-z-index: 10`. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open.

This drops both `.header` and `.stickyRow` to `z-index: 2` — 8 below the top-level drawer z-index — so:

- Drawer overlays (and the drawer body itself) reliably cover the sticky page chrome.
- The header still wins against normal scrolling page content, which uses `auto`/no z-index.
- Nested drawers (which keep stacking via `ZIndexContext`) continue to layer above their parents unchanged.

Comments in the SCSS document the relationship so the next person tweaking these values has the context.

## Test plan

- [ ] Open a page that uses `PageHeader` (e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay.
- [ ] Scroll a long page and confirm the sticky header still sits above normal content (charts, tables, lists).
- [ ] Open a nested drawer (e.g. row side panel from within another side panel) and confirm stacking still works as before.


Made with [Cursor](https://cursor.com)
jordan-simonovski pushed a commit that referenced this pull request Jun 3, 2026
## Summary

The sticky `PageHeader` (and its `stickyRow`) were pinned at `z-index: 100`, which floated them above app drawers. Drawers in this codebase don't use Mantine's default `modal` elevation (200) — they explicitly opt into a much lower stack via `ZIndexContext` (`contextZIndex + 10`, see `DBRowSidePanel`, `NodeDetailsSidePanel`, `PodDetailsSidePanel`, etc.), so a top-level drawer overlay ends up at `--overlay-z-index: 10`. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open.

This drops both `.header` and `.stickyRow` to `z-index: 2` — 8 below the top-level drawer z-index — so:

- Drawer overlays (and the drawer body itself) reliably cover the sticky page chrome.
- The header still wins against normal scrolling page content, which uses `auto`/no z-index.
- Nested drawers (which keep stacking via `ZIndexContext`) continue to layer above their parents unchanged.

Comments in the SCSS document the relationship so the next person tweaking these values has the context.

## Test plan

- [ ] Open a page that uses `PageHeader` (e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay.
- [ ] Scroll a long page and confirm the sticky header still sits above normal content (charts, tables, lists).
- [ ] Open a nested drawer (e.g. row side panel from within another side panel) and confirm stacking still works as before.


Made with [Cursor](https://cursor.com)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants