[ADR-0006] Phase 2: Tree-Only Mode (Hide Timeline)#3562
[ADR-0006] Phase 2: Tree-Only Mode (Hide Timeline)#3562yurishkuro merged 6 commits intojaegertracing:mainfrom
Conversation
Signed-off-by: Yuri Shkuro <github@ysh.us>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3562 +/- ##
==========================================
+ Coverage 88.67% 88.68% +0.01%
==========================================
Files 300 300
Lines 9551 9560 +9
Branches 2520 2535 +15
==========================================
+ Hits 8469 8478 +9
+ Misses 1079 1078 -1
- Partials 3 4 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Implements “tree-only” mode for the Trace Timeline Viewer by using the existing traceTimeline.timelineVisible state to hide timeline-related UI (ticks, viewing layer, span bars) while keeping the span tree/name column usable.
Changes:
- Wire
timelineVisiblefromstate.traceTimelineintoTraceTimelineViewerand propagate it down astimelineBarsVisiblewhere needed. - Update header, span bar rows, and span detail rows to conditionally omit timeline/tick/resizer UI when timeline is hidden.
- Add/extend unit tests to validate tree-only rendering behavior for header, bar rows, and detail rows.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/index.tsx | Reads timelineVisible from Redux and passes it to the header row as timelineBarsVisible. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx | Passes timelineVisible through to row components as timelineBarsVisible. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.tsx | Hides viewing layer, ticks, and resizer when timelineBarsVisible is false; expands name column to full width. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.test.js | Adds tests covering tree-only mode rendering/omissions for the header row. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.tsx | Adjusts column widths based on timelineBarsVisible for detail rows. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.test.js | Adds a tree-only mode assertion for full-width detail content. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx | Conditionally removes the “span-view” (ticks + bar) cell when timelineBarsVisible is false; expands name column to full width. |
| packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.test.js | Adds tests ensuring the bar cell is omitted and the name column expands in tree-only mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.tsx
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetailRow.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/duck.ts
Outdated
Show resolved
Hide resolved
Closes out the ADR-0006 implementation (side panel span details + tree-only mode). Previous phases: [Phase 1 #3558](#3558), [Phase 2 #3562](#3562), [Phase 3 #3569](#3569), [Phase 4 #3576](#3576). ## What changed ### Analytics tracking (`duck.track.ts`) Three new Redux actions are now tracked: | Action | Category | Tracked value | |---|---|---| | `SET_DETAIL_PANEL_MODE` | `jaeger/ux/trace/timeline/panel-mode` | mode string (`'inline'` / `'sidepanel'`) | | `SET_TIMELINE_BARS_VISIBLE` | `jaeger/ux/trace/timeline/timeline-visible` | `'true'` / `'false'` | | `SET_SIDE_PANEL_WIDTH` | `jaeger/ux/trace/timeline/column` | width × 1000 (integer), same pattern as `SET_SPAN_NAME_COLUMN_WIDTH` | ### Test coverage (`index.test.js`) Added a `describe('layout combinations')` block that renders `TraceTimelineViewerImpl` for all four `{detailPanelMode, timelineBarsVisible}` combinations and asserts: - Side panel container is present/absent as expected - `VerticalResizer` is present only when `detailPanelMode='sidepanel'` **and** `timelineBarsVisible=true` - `VirtualizedTraceView` is always rendered ### ADR `docs/adr/0006-side-panel-span-details.md` status updated to **Implemented**; Phase 5 marked complete. ## Testing ```bash npm run prettier npm run lint npm test npm run build ``` All 2560 tests pass. ### Manual testing of all four layout combinations Enable the side panel feature flag in `default-config.ts` (`enableSidePanel: true`) or via query param, then verify each combination: | `detailPanelMode` | `timelineBarsVisible` | Expected | |---|---|---| | `inline` | `true` | Default behavior — inline expand, timeline bars visible | | `inline` | `false` | Tree-only — inline expand, no timeline bars | | `sidepanel` | `true` | Side panel on right, `VerticalResizer` divider visible | | `sidepanel` | `false` | Side panel fills remaining width, no resizer | To test in embedded mode, append `?uiEmbed=v0` (optionally with `uiTimelineCollapseTitle=1`, `uiTimelineHideMinimap=1`, `uiTimelineHideSummary=1`) to a trace URL and verify the side panel and settings gear work normally. ## AI Usage in this PR (choose one) See [AI Usage Policy](https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#ai-usage-policy). - [ ] **None**: No AI tools were used in creating this PR - [ ] **Light**: AI provided minor assistance (formatting, simple suggestions) - [ ] **Moderate**: AI helped with code generation or debugging specific parts - [x] **Heavy**: AI generated most or all of the code changes --------- Signed-off-by: Yuri Shkuro <github@ysh.us>
) ## Description of the changes - Enables displaying span details in a side panel as an option - Default view is still inline span details, can be changed via `traceTimeline.defaultDetailPanelMode="sidepanel"` config option. <img width="1920" height="964" alt="image" src="https://github.com/user-attachments/assets/c71a9f98-e30d-4030-8947-6dc8e5b6bd0c" /> Previous phases: [Phase 1 #3558](#3558), [Phase 2 #3562](#3562), [Phase 3 #3569](#3569), [Phase 4 #3576](#3576), [Phase 5 #3577](#3577). --------- Signed-off-by: Yuri Shkuro <github@ysh.us>
Problem
The trace timeline view always shows the timeline bar column (ticks, span bars, minimap
viewing layer, column resizer). Users working primarily with the span hierarchy — analyzing
service dependencies or call patterns — have no way to reclaim that horizontal space for
the service/operation name tree.
Changes
Tree-only mode
When the "Show Timeline" toggle in the trace view settings menu is turned off,
the timeline bar column is hidden entirely and the service/operation name column
expands to fill the available width:
SpanBarRow— newtimelineBarsVisibleprop; span-view cell (ticks +SpanBar)is omitted; name column expands to full width via
effectiveColumnDivision.SpanDetailRow— newtimelineBarsVisibleprop; left accent cell(
SpanTreeOffset+ expanded-accent switch) is omitted entirely when bars are hidden(avoids zero-width cell overflow); detail content cell expands to full width.
TimelineHeaderRow— newtimelineBarsVisibleprop; ticks,TimelineViewingLayer,and
VerticalResizerare omitted; title/collapser cell expands to full width.The Redux-stored
spanNameColumnWidthis left unchanged so the column ratio restorescorrectly when bars are re-shown.
Consistent naming throughout the component tree
The Redux state field was renamed
timelineVisible→timelineBarsVisible(
TTraceTimeline,duck.ts, all components and tests). The localStorage key'timelineVisible'is kept unchanged for backward compatibility with stored userpreferences; comments in
duck.tsdocument this intentional divergence.The Redux action and action creator were also renamed for consistency:
SET_TIMELINE_VISIBLE→SET_TIMELINE_BARS_VISIBLE,setTimelineVisible→setTimelineBarsVisible.Testing
describe('tree-only mode')blocks toSpanBarRow.test.js,SpanDetailRow.test.js, andTimelineHeaderRow.test.jscovering:width={1})timelineBarsVisibleprop.duck.test.jsupdated to use the renamed action creator(
actions.setTimelineBarsVisible).TracePage/index.test.jsupdated for the renamed state field and dispatch prop.AI Usage in this PR (choose one)
See AI Usage Policy.