Skip to content

New Trace Viewer Prototype#1970

Draft
elizabetdev wants to merge 39 commits intomainfrom
feat/side-panels-redesign
Draft

New Trace Viewer Prototype#1970
elizabetdev wants to merge 39 commits intomainfrom
feat/side-panels-redesign

Conversation

@elizabetdev
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev commented Mar 23, 2026

Prototype — not meant to be merged as-is

This PR bundles the trace viewer and side-panel redesign. Below, workstreams are ordered roughly by product impact; each block is a natural candidate for a separate Linear issue (or sub-issues) if you split the branch.


1. Side panel shell — drawer & navigation

  • Single drawer model — One right-hand Mantine drawer with in-panel navigation instead of stacked drawers; session panel aligned with log/trace structure.
  • Responsive sizing — Resizable width (drag handle), optional full-width toggle in the breadcrumb row.
  • Scroll & chrome — Background page can scroll while the drawer is open (lockScroll={false}); drawer uses themed --shadow-drawer.
  • Breadcrumbs — Unified SidePanelBreadcrumbs: source-kind icons (log / trace / session), truncation + tooltips, clickable trail for parentBreadcrumbs, sourceStack, and navStack.
  • Header behavior — Redesigned header (timestamp, service, duration metadata layout); Copy Trace ID; hide View Trace / Trace ID when a log has no trace context.
  • Navigation fixes — Close on session drawer closes the whole panel (not only “back”); restore correct tab when navigating back from trace; reset tab when opening a different event.

2. Trace waterfall

  • Service-based colors — Distinct colors per service; green reserved for correlated log rows; vertical color bar beside span label.
  • Errors & status — Red bars for error spans; dedicated error/warning icons instead of recoloring the whole bar.
  • Bar & label layout — No text inside bars; duration as muted text outside; span description on row hover (side with more space); child count after the color bar; muted operation name vs service name.
  • Depth controls — Expand/collapse depth (+1 / −1 / all / all collapsed) when there are collapsible nodes.
  • Axis & grid — Capped tick count to avoid overlap; grid lines behind bars (TimelineXAxis layering).
  • Horizontal scroll — Waterfall scrolls horizontally when the panel is narrow.

3. Trace minimap

  • Full-width minimap with time ticks and service-colored span bars.
  • Brush-to-zoom (selection outside viewport), drag-to-pan inside viewport, drag handles to resize range.
  • Viewport chrome (handles, dimmed overlays) only when zoomed; minimap reset where applicable.
  • Spacing between minimap and filter row.

4. Span details & trace summary

  • Split layout — Integrated span detail split view in the trace panel; span details open by default on first span highlight.
  • Span panel actions — Row-side-panel actions (Add to Filters, Search, column +/-) wired through context; icon-only buttons with tooltips (JSON viewer and span panel).
  • Trace summary — Summary panel with bottleneck-style signals and error-oriented analysis (iterating in later commits).
  • Keyboard shortcuts — Footer shortcuts bar replaced by a header-triggered modal (includes arrow-key navigation hint flow).

5. Trace panel layout & correlated logs

  • Trace ID duplication removed from body (ID remains in side panel header where appropriate).
  • Correlated Logs source selector moved into the waterfall controls bar; compact selector + full-width tabs where implemented.

6. Design tokens

  • --color-viz-range-* (handle, grip, border, overlay, brush, brush-border) in HyperDX and ClickStack themes (dark + light).
  • --shadow-drawer for drawer elevation.

7. Tests & housekeeping

  • E2E: log side panel tab navigation updated when trace tab behavior changed.
  • Misc: import order / formatting in trace panel files; type narrowing fixes in data/infra panels touched alongside this work.

Dependency note (for Linear)

Workstream 1 (drawer + breadcrumbs + header) is the foundation for 2–5 (everything renders inside that shell). 6 can ship incrementally with whichever UI consumes the tokens. 7 should follow the behavior it asserts.

Add getInitialDrawerWidthPercent() for responsive drawer width,
expose setSize from useResizable hook, and add resizeHandleInline
CSS class for horizontal split views.

Made-with: Cursor
Apply explicit source.kind checks before accessing properties that
only exist on specific source types (Log, Trace), fixing TypeScript
errors with the TSource union type.

Made-with: Cursor
Replace the standalone span detail drawer with an inline resizable
split view showing Overview, Parsed, and Infrastructure tabs for
selected spans. Remove built-in resize from waterfall chart and use
flex layout for parent-controlled sizing.

Made-with: Cursor
Replace hand-rolled breadcrumbs and separate title with a unified
SidePanelBreadcrumbs component using Mantine Breadcrumbs. Shows
source-type icons (log/trace), truncates long labels with tooltips,
and merges cross-panel and in-panel navigation into one trail. Add
View Trace button, Copy Trace ID action, and fresh RowSidePanelContext
for nested panels to fix "Error loading row data" in context navigation.

Made-with: Cursor
Clean up consumer files that referenced the old breadcrumb system.
These props are replaced by the new SidePanelBreadcrumbs component
and navStack-based navigation in DBRowSidePanel.

Made-with: Cursor
Add Cmd/Ctrl + scroll to zoom shortcut to the keyboard
shortcuts display in LogSidePanelElements.

Made-with: Cursor
Implemented a new Copy Trace ID button in the DBRowSidePanel for easier access to trace identifiers. Removed the zoom keyboard shortcut hint from LogSidePanelElements as part of the cleanup.

Made-with: Cursor
Instead of opening a second Drawer on top when clicking "View Trace",
replace content in-place using a sourceStack. Breadcrumbs track the
full navigation path (log → trace → surrounding context) and the back
button pops the stack. Also removes box-shadow from panel borders,
keeping only a 1px left border.

Made-with: Cursor
Move the ⌘/Ctrl + scroll zoom hint from the trace waterfall chart
into the shared keyboard shortcuts bar. Use smaller Kbd elements
for a more compact appearance.

Made-with: Cursor
Set a minWidth of 740px on the TimelineChart so the waterfall
becomes horizontally scrollable instead of squished in narrow panels.

Made-with: Cursor
Refactors SessionSidePanel to reuse the same drawer chrome as
logs/traces (consistent sizing, resize drag bar, breadcrumbs, header
actions). Adds sourceStack-based in-drawer event navigation so clicking
a session event replaces content in-place with parentBreadcrumbs
preserving the session context in the breadcrumb trail.

Made-with: Cursor
Track previous sourceStack length to reset the tab to the root source's
default (e.g. Overview for logs) when popping back, instead of keeping
the stale trace tab state.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

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

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Apr 8, 2026 2:31pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 23, 2026

⚠️ No Changeset found

Latest commit: 34636c1

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

Knip - Unused Code Analysis

🔴 4 issues found

Unused exports (3)

  • packages/app/src/utils.ts:getChartColorErrorHighlight
  • packages/app/src/utils.ts:getChartColorWarningHighlight
  • packages/app/src/components/ContextSidePanel.tsx:useNestedPanelState

Unused exported types (1)

  • packages/app/src/components/DBRowSidePanel.tsx:DBRowSidePanelInnerProps

Knip finds unused files, dependencies, and exports in your codebase.
Run yarn knip locally to see full details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

E2E Test Results

2 tests failed • 129 passed • 3 skipped • 1065s

Status Count
✅ Passed 129
❌ Failed 2
⚠️ Flaky 1
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

Coerce empty/falsy trace IDs to undefined so logs without actual trace
data don't show the View Trace button or Copy Trace ID action.

Made-with: Cursor
The Trace tab is no longer shown for log sources — trace functionality
is accessed via the View Trace button instead.

Made-with: Cursor
…ing back

Separate onClose (closes drawer) from onNavigateToParent (back to
session view) so the X button always dismisses the drawer while the
back button navigates to the parent session.

Made-with: Cursor
Always reset to the first tab (Overview for logs, Trace for traces)
when pushing to navStack, preventing the confusing state where
navigating from Surrounding Context opens a new event also on
Surrounding Context.

Made-with: Cursor
@alex-fedotyev
Copy link
Copy Markdown
Contributor

@elizabetdev - awesome redesign!
Sharing early feedback below:

  1. What do you think about idea to have large default size of the drawer for traces? Like 50-60% of the screen with larger potion of that for waterfall and the rest for the span details? And keep smaller default width for logs drawer, as it doesn't contain waterfall and needs less space.

  2. I feel that the border for the main drawer needs to be more visible, right now it is blending in being similar to the vertical lines in the waterfall itself.

image
  1. It used to be possible to filter by the various span values from overview and columnar views, but now it is only allowing to 'Copy'. Is that a bug a a choice in design?
image

Add lockScroll={false} to both log/trace and session drawers so the
logs table behind the panel remains vertically scrollable.

Made-with: Cursor
…sign

Made-with: Cursor

# Conflicts:
#	packages/app/src/components/DBTraceWaterfallChart.tsx
#	packages/app/src/components/TimelineChart/TimelineChart.tsx
…h controls

- Color-code span bars by service name using the chart palette
- Add vertical color bar indicator next to each span label
- Show error/warning icons instead of overriding bar color
- Add expand/collapse depth controls (±1 level, expand/collapse all)
- Make chevron icons more visible

Made-with: Cursor
…der icon

Move keyboard shortcuts from a dismissable footer bar to a modal
accessible via a keyboard icon button next to the share icon.

Made-with: Cursor
Full-width minimap with time ticks, service-colored span bars, and three
interaction modes: brush to zoom, drag to pan, and edge resize. Styles
extracted to SCSS module with reusable --color-viz-range-* design tokens
for both HyperDX and ClickStack themes (dark + light).

Made-with: Cursor
- Fix overlapping X-axis tick labels by capping max ticks in
  calculateInterval
- Render grid lines behind bars and text by splitting TimelineXAxis
  into separate grid and header layers
- Remove text from inside bars; show body text outside on row hover
  (Jaeger-style), positioned by available space
- Use muted color for duration labels
- Reduce minimap tick density for cleaner display

Made-with: Cursor
Child count (e.g. (38)) now appears after the color bar instead of
between chevron and bar. Service name uses default color, operation
name uses dimmed color, pipe separator removed.

Made-with: Cursor
…race panel header

Remove duplicate trace ID display from trace panel (already in side
panel header). Move Correlated Logs source selector into waterfall
controls bar via headerExtra prop. Simplify trace panel layout.

Made-with: Cursor
…store span panel actions

- Replace text+icon action buttons with icon-only buttons using DBRowTableIconButton
- Add Tooltip on hover for all actions (Add to Filters, Search, Column, Copy)
- Fix span detail panel missing actions by forwarding parent RowSidePanelContext
- Use subtler row hover highlight matching the log table style

Made-with: Cursor
Dark themes use a stronger shadow (25% opacity), light themes use a
subtler one (4% opacity). Applied to both log/trace and session drawers.

Made-with: Cursor
…mpact log source selector

- Add AI-style trace summary with streaming text animation (sparkle button)
- Add double-click and reset button to minimap for clearing zoom
- Make span detail tab bar full width with absolute-positioned close button
- Add style prop to TabBar component
- Compact log source selector with short label
- Add blink keyframe animation to globals

Made-with: Cursor
Replace descriptive-only summary with actionable insights: error root
cause identification with exception messages, bottleneck detection for
slow spans, and service hotspot analysis.

Made-with: Cursor
…usability

- Adjust right panel size in DBTracePanel from 40 to 35.
- Set minimum width of right panel to 300 for better layout.
- Replace SearchInputV2 with SearchWhereInput in DBTraceWaterfallChart for enhanced filtering capabilities.
- Update filter submission logic to correctly handle trace and log filters.
- Modify drawer width constants for better responsiveness on larger screens.

Made-with: Cursor
Resolved conflicts by keeping side-panel redesign (navigation stacks,
breadcrumbs, trace split view) and adopting main's useSource Metric
filter in DBInfraPanel.

Made-with: Cursor
…e variable naming

- Removed ESLint disable comments related to react-hooks in multiple files to clean up the code.
- Renamed `_subDrawerOpen` to `subDrawerOpen` for consistency in the SessionSidePanel component.
- Updated the SidePanelHeaderActions component to accept additional props for better functionality.
- Enhanced the SidePanelBreadcrumbs component by adding a back button and removing unused props.
- Improved the DBTracePanel component by utilizing a ref for trace ID management.

These changes aim to enhance code readability and maintainability.
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