Implements the rendering layer for the Timeline display type
introduced in the schema PR.
New components:
- DashboardTimelineChart: recharts AreaChart with vertical marker
glyphs, hover tooltip, drag-to-select time range, and brush-zoom
- DBTimelineChart: dashboard tile wrapper with collapsible events
table, loading state, and error boundary
- Supporting modules: chartSpine, compileTimelineSeries,
formatTimelineResponse, severityColors, useBrushZoom, types
Dashboard wiring:
- DBDashboardPage renders <DBTimelineChart> for DisplayType.Timeline,
passing through onTimeRangeSelect and toolbar items
- tilePositioning: Timeline defaults to full-width, 6-row height
- ChartEditor: adds Timeline to SQL_PLACEHOLDERS and column
description docs; wires timelineSeries through form state
Unit tests cover compileTimelineSeries (10 cases), formatTimelineResponse
(9 cases), and DBTimelineChart render contract.
Co-Authored-By: Claude Opus <model> <noreply@anthropic.com>
What
Adds the frontend renderer for the Timeline dashboard tile introduced in #2190 (schema PR). That PR must merge first; this one is stacked on top of it.
The renderer visualises point-in-time event markers and version-change transitions in a Recharts
AreaChartwith customCustomizedoverlays. Users can brush to zoom the time range, click a marker to open the search page, and expand an events table below the chart.Files
New components
DBTimelineChart— top-level tile component that fetches data, formats the response, and composes the chart with a collapsible events table. Wired intoDBDashboardPagefor theDisplayType.Timelinebranch.DashboardTimelineChart/— presentational chart package:DashboardTimelineChart.tsx— Recharts wrapper with brush-zoom and marker click callbacksTimelineMarkers.tsx— SVG overlay rendering colored diamonds per lane at correct x-positionsTimelineTooltip.tsx— custom tooltip showing lane, time, and optional severity/valuechartSpine.ts— builds a time-bucketed spine array so Recharts has a stable x-axis even with no eventscompileTimelineSeries.ts— transforms raw SQL rows intoTimelineLane[]for botheventsandvalue_changemodesformatTimelineResponse.ts— normalises the generic chart API response into typed rowsseverityColors.ts— maps OTel severity strings to marker colorsuseBrushZoom.ts— manages drag-select state and firesonTimeRangeSelecton mouse-uptypes.ts— shared types (TimelineEvent,TimelineLane)Wiring
DBDashboardPage.tsx— renders<DBTimelineChart>when a tile'sdisplayTypeisTimelineChartEditor/constants.tsx,types.ts,utils.ts— register the Timeline display type in the editortilePositioning.ts— default tile size: full width, 6 rowsTests (345 lines, unit only)
compileTimelineSeries.test.ts— events mode, value_change mode, groupExpression partitioning, severity coloringformatTimelineResponse.test.ts— null handling, multi-series, empty resultDBTimelineChart.test.tsx— mount-without-throw and 0-event renderWhat's not in this PR
external-api/v2/