Skip to content

Session replay event display#1807

Draft
MikeShi42 wants to merge 3 commits intomainfrom
cursor/HDX-3481-session-replay-event-display-2685
Draft

Session replay event display#1807
MikeShi42 wants to merge 3 commits intomainfrom
cursor/HDX-3481-session-replay-event-display-2685

Conversation

@MikeShi42
Copy link
Contributor

Fixes two bugs in session replay event inspection by making the event detail panel a nested panel, preventing URL query parameter conflicts.

The DBRowSidePanel for event details was missing isNestedPanel={true}, causing it to share the sidePanelTab URL query parameter with the parent panel. This led to the event panel opening on the wrong tab (Bug 1) and becoming unclosable after tab switching because the parent panel would unmount the sub-panel, leaving its subDrawerOpen state stuck (Bug 2). Setting isNestedPanel={true} isolates the nested panel's tab state, resolving both issues. A cleanup effect was also added to ensure subDrawerOpen is reset on unmount.


Linear Issue: HDX-3481

Open in Web Open in Cursor 

…se bugs

Bug 1: Clicking an event in the session replay event list opened the sub-panel
on the Session Replay tab (instead of the default tab) because both panels
shared the same 'sidePanelTab' URL query parameter. Setting isNestedPanel=true
makes the sub-panel use local state for its tab, defaulting to the appropriate
tab for the source kind.

Bug 2: Switching tabs in the sub-panel (e.g., to Overview) modified the shared
sidePanelTab query param, causing the parent panel to switch away from Session
Replay. This unmounted SessionSubpanel, leaving the subDrawerOpen state stuck
at true, which disabled both ESC and overlay-click closing. With
isNestedPanel=true, the sub-panel no longer affects the parent's tab state.

Also adds a cleanup effect to reset setDrawerOpen(false) on unmount as a safety
measure.

Co-authored-by: Mike Shi <mike@hyperdx.io>
@cursor
Copy link

cursor bot commented Feb 25, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

⚠️ No Changeset found

Latest commit: 786bff6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Mar 6, 2026 6:13pm
hyperdx-v2-oss-app Ready Ready Preview, Comment Mar 6, 2026 6:13pm

Request Review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

E2E Test Results

All tests passed • 88 passed • 3 skipped • 896s

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

Tests ran across 4 shards in parallel.

View full report →

…ub-panel

The isNestedPanel flag bundles two behaviors: (1) using local tab state and
(2) disabling the overlay. For the session replay sub-panel, we need local
tab state (to avoid conflicts with the parent's sidePanelTab query param)
but ALSO need the overlay for proper close behavior.

Without the overlay:
- Users can't click outside the sub-panel to close it
- Mantine's modal stacking doesn't properly track the sub-panel, causing
  ESC to close all drawers instead of just the topmost one

The new withOverlay prop overrides the default (!isNestedPanel) behavior,
allowing isNestedPanel=true with withOverlay=true.

Co-authored-by: Mike Shi <mike@hyperdx.io>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Code Review

No critical issues found.

The fix is minimal, targeted, and correctly addresses both described bugs:

  • isNestedPanel={true} properly isolates the nested panel's tab state to useState instead of URL query params (line 165-174 of DBRowSidePanel.tsx), preventing the sidePanelTab conflict with the parent panel.
  • withOverlay ?? !isNestedPanel maintains backward compatibility for all existing callers while allowing the new explicit withOverlay={true} override from SessionSubpanel.
  • Cleanup useEffect correctly resets the parent's subDrawerOpen state on unmount, preventing the stuck-unclosable state. The [setDrawerOpen] dependency is stable (it's a useState setter passed as a prop), so this is correct.

One minor observation: withOverlay is a new prop added to DBRowSidePanel solely for this one call site. If this pattern recurs, it may be worth documenting when to use it, but it's not a blocking concern.


Open in Web View Automation 

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.

2 participants