Move TimeRange types to lib/timeRange to break import cycle

CollapsibleSection.tsx and LogTimeline.tsx imported from each other
(TimeRange/TimeRangePresetId one way, sectionHeaderClassName the
other). Move the range types/helpers into a dependency-free
webapp/src/lib/timeRange.ts and repoint all importers there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeyhRfMYjMditek6geDRoQ
This commit is contained in:
Hugh Kaznowski
2026-09-07 10:35:05 +01:00
co-authored by Claude Sonnet 5
parent a47f771087
commit 4cc9205abf
7 changed files with 31 additions and 34 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ import {
YAxis,
} from 'recharts'
import type { ChartType, PromqlSeries } from '../lib/api'
import type { TimeRange } from './LogTimeline'
import type { TimeRange } from '../lib/timeRange'
/// Renders a label combination as a series key/legend string, e.g. `{"path":"/a"}` -> `path=/a`; no labels renders as `value`.
export function seriesLabel(labels: Record<string, string>): string {