fix(app): fix session replay sub-event modal stacking and tab conflict#2068
fix(app): fix session replay sub-event modal stacking and tab conflict#2068kodiakhq[bot] merged 8 commits intomainfrom
Conversation
When clicking a log/error event inside the session replay event list, the
detail panel was opening behind the session replay drawer (z-index issue)
and, when opened from the search page's Session Replay tab, was re-opening
the session replay instead of showing event details (URL param conflict).
Root causes:
- SessionSubpanel rendered DBRowSidePanel via <Portal> without wrapping it
in ZIndexContext.Provider, so the sub-panel did not inherit the correct
z-index value from the parent session replay drawer.
- DBRowSidePanel was not passed isNestedPanel=true, causing it to read the
sidePanelTab URL param (set to 'replay' by the outer panel) and open to
the Session Replay tab again instead of event details.
- withOverlay={!isNestedPanel} removed the overlay on nested panels, making
it impossible to close by clicking outside.
Fixes:
- Wrap Portal-rendered DBRowSidePanel with ZIndexContext.Provider to ensure
correct z-index propagation through the Portal boundary.
- Pass isNestedPanel=true so the inner panel uses local state for tab
selection (ignoring the URL param) and renders with an overlay.
- Remove withOverlay={!isNestedPanel} so all drawer instances always render
with an overlay (click-outside-to-close works).
Also adds:
- data-testid on SessionEventList rows and SessionSidePanel for testability.
- data-testid on the Session Replay tab content wrapper in DBRowSidePanel.
- E2E test that reproduces the exact URL conflict regression by injecting
sidePanelTab=replay into the URL before opening a session event, then
asserting the detail panel does not open to the replay tab.
- Seed data: session traces now include routeChange and console.error events
so the session event list is populated in E2E tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 6c709ec The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
E2E Test Results✅ All tests passed • 131 passed • 3 skipped • 1067s
Tests ran across 4 shards in parallel. |
| setRowId(undefined); | ||
| }} | ||
| /> | ||
| <ZIndexContext.Provider value={contextZIndex}> |
There was a problem hiding this comment.
This was the actual file to fix the issue - the rest is adding/improving e2e tests
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
|
@teeohhem not sure you agree, but maybe this should be tier 2. It is a very small change but the surrounding test improvements increased the tier if I had to guess. |
PR ReviewFix is logically sound. The z-index propagation is correct:
✅ No critical bugs or security issues. The core fix is correct. |
|
Is it expected that clicking outside of the panel does not close the panel? This seems like a regression compared to the play environment. Screen.Recording.2026-04-08.at.8.14.23.AM.movAlso, would it be possible to use show correct breadcrumbs when navigating from Search Page Session Panel --> New Side Drawer? That might be beyond the scope here, perhaps another ticket for that would be good. Screen.Recording.2026-04-08.at.8.20.49.AM.mov |
|
As part of the new Trace Viewers prototype, we want to improve how drawers work. The idea is to replace stacked/layered drawers with a single right-hand Mantine drawer, where all navigation happens in place. With each new navigation step, a new item is added to the breadcrumb. Linear ticket: https://linear.app/clickhouse/issue/HDX-3942/single-drawer-navigation-with-breadcrumb-stack Prototype: #1970 sessions.mp4@karl-power will be working on this, and since you, @brandon-pereira, have been doing more work on drawers, maybe you both could coordinate on how to achieve the “single-drawer navigation with breadcrumb stack.” |
Good call @elizabetdev. Given this is a customer reported issue - I believe we should expedite shipping this feature, I will leave the breadcrumbs out of scope and work with @karl-power on the future UI state. |
Good catch - fixed that. Also improved the e2e test to catch regressions in the future |
#2068) ## Summary Clicking a log/error event in the session replay event list either reopened the session replay instead of showing event details, or rendered the detail panel behind the replay drawer. Fixed this by ensuring that isSubPanel is correctly set and using the ZIndexProvider to correctly stack the contexts. ## Steps to Reproduce From the Sessions page: 1. Go to /sessions, select a session source, open a session card 2. In the session replay drawer, wait for the event list to load 3. Click any event row (e.g. a console.error) 4. Bug A: The detail panel opens behind the session replay drawer (overlay darkens but panel is inaccessible), or ESC/close doesn't work correctly From the Search page (URL conflict): 1. Go to /search, open any trace row to open the detail side panel 2. Click the Session Replay tab — this sets sidePanelTab=replay in the URL 3. In the session event list, click any event row 4. Bug B: The inner detail panel opens to the Session Replay tab again instead of event details (e.g. Overview/Trace)
Summary
Clicking a log/error event in the session replay event list either reopened the session replay instead of showing event details, or rendered the detail panel behind the replay drawer.
Fixed this by ensuring that isSubPanel is correctly set and using the ZIndexProvider to correctly stack the contexts.
Steps to Reproduce
From the Sessions page:
ESC/close doesn't work correctly
From the Search page (URL conflict):