@pipelex/mthds-ui 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/{chunk-RU3CIXFC.js → chunk-6S5TQPTO.js} +121 -23
- package/dist/chunk-6S5TQPTO.js.map +1 -0
- package/dist/standalone/graph-standalone.html +84 -84
- package/dist/standalone/graph-viewer.css +1 -1
- package/dist/standalone/graph-viewer.js +83 -83
- package/dist/timeline/index.d.ts +105 -7
- package/dist/timeline/index.js +7 -1
- package/dist/timeline/react/RunTimeline.css +93 -0
- package/dist/timeline/react/index.d.ts +12 -3
- package/dist/timeline/react/index.js +178 -38
- package/dist/timeline/react/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-RU3CIXFC.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/timeline/react/index.ts","../../../src/timeline/react/RunTimeline.tsx","../../../src/timeline/react/readingClock.ts","../../../src/timeline/react/streamExpansion.ts","../../../src/timeline/react/styles/simple/SimpleProgressView.tsx","../../../src/timeline/react/styles/simple/simpleProgressStrings.ts","../../../src/timeline/react/TimelineStyleMenu.tsx"],"sourcesContent":["\"use client\";\n\n// The timeline's stylesheets are imported here and nowhere else: the entry's\n// specifier is the one tsup's `external` pattern matches and the one that\n// resolves from `dist/timeline/react/index.js` (see CLAUDE.md, \"CSS Packaging\").\nimport \"./RunTimeline.css\";\nimport \"./styles/simple/SimpleProgress.css\";\n// The style menu's list is the graph viewer's, shared: this specifier resolves\n// from `dist/timeline/react/` to the graph entry's copy of the stylesheet.\nimport \"../../graph/react/viewer/StyleMenu.css\";\n\nexport { RunTimeline } from \"./RunTimeline\";\nexport type { RunTimelineProps } from \"./RunTimeline\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport { getPaletteForTheme } from \"@graph/graphConfig\";\nimport { GRAPH_THEME_MODE, type GraphTheme, type GraphThemeMode } from \"@graph/types\";\nimport { useSystemTheme } from \"@graph/react/viewer/useSystemTheme\";\nimport {\n INVOCATION_STATUS,\n PROGRESS_MODE,\n isRunEnded,\n type ProgressInvocation,\n type ProgressSnapshot,\n type ProgressTimestamp,\n type RunProgressStatus,\n} from \"@timeline/progressSnapshot\";\nimport { progressStreamKey } from \"@timeline/snapshotFreshness\";\nimport {\n TIMELINE_STYLE,\n resolveTimelineStyle,\n resolveTimelineStyleMenu,\n type TimelineStyleId,\n} from \"@timeline/styles/timelineStyles\";\nimport type { TimelinePipeRegistry } from \"@timeline/styles/registryJoin\";\nimport { buildTimelineRows, type TimelineBatch, type TimelineRow } from \"@timeline/timelineRows\";\nimport {\n barFollowsClock,\n formatClockTime,\n formatDuration,\n invocationBar,\n invocationTimes,\n snapshotTimes,\n timelineTicks,\n timelineWindowAt,\n type InvocationTimes,\n type SnapshotTimes,\n type TimelineBar,\n type TimelineWindow,\n} from \"@timeline/timelineTime\";\nimport { useHeldSnapshot, useReadingClock } from \"@timeline/react/readingClock\";\nimport { useStreamExpansion } from \"@timeline/react/streamExpansion\";\nimport { SimpleProgressView } from \"@timeline/react/styles/simple/SimpleProgressView\";\nimport { TimelineStyleMenu } from \"@timeline/react/TimelineStyleMenu\";\n\nexport interface RunTimelineProps {\n /**\n * The run's progress snapshot, as the hosted progress contract defines it:\n * the component's only source of what ran. Hand it every snapshot you read;\n * the timeline keeps the fresher of the one it holds and the one it is given,\n * so an older read arriving late never rolls it back, and a snapshot showing\n * the run still going never replaces one showing it ended.\n */\n snapshot: ProgressSnapshot;\n /**\n * `dark`, `light`, or `system` to follow the environment, as `GraphViewer`'s\n * theme mode. Defaults to `system`.\n */\n theme?: GraphThemeMode;\n /** The environment's theme when the host detects it itself, as on `GraphViewer`. */\n systemTheme?: GraphTheme;\n /**\n * Sparse overrides of the palette, merged per key over the resolved theme's,\n * as `GraphViewer`'s `config.paletteColors`: `{ \"--color-success\": \"#16a34a\" }`.\n * The palette is set inline on the timeline's container, so this is how a host\n * changes a colour: a `--color-*` or `--surface-*` declared on the container's\n * class in a stylesheet loses to the inline value.\n */\n paletteColors?: Record<string, string>;\n /**\n * Pins the reading clock: the moment running bars grow to, as a timestamp or\n * epoch milliseconds. A host that keeps its own trusted clock, or a replay,\n * sets it; the timeline then never ticks on its own.\n */\n now?: ProgressTimestamp | number;\n /**\n * While the run goes on and `now` is unset, keep running bars growing between\n * snapshots: the timeline advances its reading clock from the snapshot's\n * `assembled_at` by the time elapsed on this page since the snapshot arrived,\n * so it never trusts the page's clock to agree with the server's. `false`\n * draws each snapshot as of its `assembled_at`. Defaults to `true`.\n */\n live?: boolean;\n /**\n * The style the timeline draws in: `detailed`, the default, every invocation\n * as a bar on a shared time axis; or `simple`, the run as a checklist of its\n * steps in the method's own words, a batch as one line with its counts.\n * Reactive, like `theme`: passing it drives the active style, and clearing it\n * back to `undefined` hands control to the default. The header's style menu,\n * when shown, changes it too. An id this version does not know is treated as\n * unset. This library persists nothing: the host keeps the choice, reported\n * by `onTimelineStyleChange`.\n */\n timelineStyle?: TimelineStyleId;\n /**\n * Called whenever the style changes — from the menu, or from a prop update —\n * so the host can persist it. Not called on mount.\n */\n onTimelineStyleChange?: (style: TimelineStyleId) => void;\n /**\n * Show a style menu at the end of the header. Opt-in: `true` offers every\n * registered style in registry order, a list offers those styles in that\n * order, and the default offers no menu, for a host that fixes the style for\n * its audience. A menu needs two styles to choose between.\n */\n styleMenu?: boolean | readonly TimelineStyleId[];\n /**\n * The registry of the method's pipes, keyed by `pipe_ref`, as a `GraphSpec`'s\n * `pipe_registry`: the simple style titles its lines from the pipes'\n * descriptions, names a batch's item, and lists the steps the run has not\n * reached. Without it each line is titled by its humanized pipe code. The\n * detailed style does not read it.\n */\n pipeRegistry?: TimelinePipeRegistry;\n /**\n * The `pipe_ref` of the pipe the run starts from. A snapshot taken before\n * anything started names no pipe, so with it and `pipeRegistry` the simple\n * style lists the run's steps from the start.\n */\n entryPipeRef?: string;\n /** A batch holding more items than this starts collapsed. Defaults to `DEFAULT_WIDE_BATCH_THRESHOLD`. */\n wideBatchThreshold?: number;\n /**\n * In the simple style, a parallel with more branches than this folds its\n * finished branches into one line. Defaults to `DEFAULT_WIDE_PARALLEL_THRESHOLD`.\n */\n wideParallelThreshold?: number;\n /** Appended to the container's class list. */\n className?: string;\n}\n\n/**\n * How often the reading clock ticks under each style: as often as what it draws\n * moves. The detailed style's bars grow continuously; nothing the simple style\n * draws does, so once a second is enough for its durations.\n */\nconst CLOCK_TICK_MS: Record<TimelineStyleId, number> = {\n [TIMELINE_STYLE.DETAILED]: 250,\n [TIMELINE_STYLE.SIMPLE]: 1_000,\n};\n/** Past this point on the axis a tick's label ends at its tick rather than centring on it. */\nconst TICK_RIGHT_ALIGN_PERCENT = 92;\n/** The room one tick's label takes on the axis, which sets how many ticks fit. */\nconst TICK_SPACING_PX = 64;\nconst DEFAULT_MAX_TICKS = 6;\n\n/**\n * How many tick intervals the axis has room for, from its measured width. Until\n * it is measured, and where nothing measures it, the default holds.\n */\nfunction useTickBudget(): [React.RefCallback<HTMLElement>, number] {\n const [budget, setBudget] = React.useState(DEFAULT_MAX_TICKS);\n const observer = React.useRef<ResizeObserver | null>(null);\n const ref = React.useCallback((element: HTMLElement | null) => {\n observer.current?.disconnect();\n observer.current = null;\n if (!element || typeof ResizeObserver === \"undefined\") return;\n observer.current = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width > 0) setBudget(Math.max(1, Math.floor(width / TICK_SPACING_PX)));\n });\n observer.current.observe(element);\n }, []);\n return [ref, budget];\n}\n\nconst RUN_STATUS_WORD: Record<RunProgressStatus, string> = {\n pending: \"Pending\",\n running: \"Running\",\n succeeded: \"Succeeded\",\n failed: \"Failed\",\n canceled: \"Canceled\",\n};\n\n/**\n * A status word, or the raw value for a word this version does not know: a\n * reader keeps drawing what a later contract adds rather than failing on it.\n * An invocation's status needs no table: its words are drawn as they are.\n */\nfunction wordFor<K extends string>(table: Record<K, string>, value: string): string {\n return Object.prototype.hasOwnProperty.call(table, value) ? table[value as K] : value;\n}\n\nfunction batchCountsText(batch: TimelineBatch): string | null {\n const counts = batch.counts;\n if (!counts) return null;\n let text = `${counts.done} of ${counts.total} done`;\n if (counts.running > 0) text += ` · ${counts.running} running`;\n if (counts.failed > 0) text += ` · ${counts.failed} failed`;\n return text;\n}\n\nfunction rowDetailText(row: TimelineRow, bar: TimelineBar | null): string {\n const batchText = row.batch ? batchCountsText(row.batch) : null;\n if (batchText) return batchText;\n const status = row.invocation.status;\n if (status === INVOCATION_STATUS.SCHEDULED) return \"scheduled\";\n if (status === INVOCATION_STATUS.SKIPPED) return \"skipped\";\n if (status === INVOCATION_STATUS.CANCELED) return \"canceled\";\n return bar ? formatDuration(bar.endMs - bar.startMs) : \"\";\n}\n\nfunction isRetried(invocation: ProgressInvocation): boolean {\n return invocation.attempts !== undefined && invocation.attempts > 1;\n}\n\n/** The row's tooltip: everything the snapshot says of the invocation, in words. */\nfunction rowTitle(row: TimelineRow, times: InvocationTimes, bar: TimelineBar | null): string {\n const invocation = row.invocation;\n const lines = [`${invocation.pipe_ref} · ${invocation.pipe_type}`];\n let state: string = invocation.status;\n if (times.startedMs !== null) state += `, started ${formatClockTime(times.startedMs)}`;\n if (times.endedMs !== null) state += `, ended ${formatClockTime(times.endedMs)}`;\n if (bar) state += ` (${formatDuration(bar.endMs - bar.startMs)})`;\n lines.push(state.charAt(0).toUpperCase() + state.slice(1));\n if (row.outcome) {\n // Only a condition that resolved took an outcome. A branch read off its path,\n // as every branch of a dry run is, is only the branch for that outcome.\n const outcome =\n row.outcome.key === null ? \"the default outcome\" : `the outcome ${row.outcome.key}`;\n lines.push(row.outcome.fromResolution ? `Took ${outcome}` : `The branch for ${outcome}`);\n }\n if (invocation.condition) {\n const selected = invocation.condition.selected_outcome;\n lines.push(selected === null ? \"Chose its default outcome\" : `Chose the outcome ${selected}`);\n }\n const counts = row.batch?.counts;\n if (counts) {\n lines.push(\n `${counts.total} items: ${counts.done} done, ${counts.running} running, ${counts.failed} failed`,\n );\n }\n if (invocation.skip_reason) lines.push(`Skipped: ${invocation.skip_reason}`);\n if (isRetried(invocation)) lines.push(`Tried ${invocation.attempts} times`);\n if (invocation.last_failure) {\n const at = times.failedMs;\n const { title, detail } = invocation.last_failure.problem;\n lines.push(`Last failure${at === null ? \"\" : ` at ${formatClockTime(at)}`}: ${title}`);\n lines.push(detail);\n }\n if (invocation.degradation) lines.push(`Not progressing: ${invocation.degradation.message}`);\n return lines.join(\"\\n\");\n}\n\ninterface BatchStripProps {\n batch: TimelineBatch;\n}\n\n/** The thin strip of a batch's item states, inside its bar, one cell per run of equal states. */\nfunction BatchStrip({ batch }: BatchStripProps) {\n if (batch.strip.length === 0) return null;\n return (\n <span className=\"mthds-run-timeline-strip\" aria-hidden=\"true\">\n {batch.strip.map((cell) => (\n <span\n key={cell.firstItem}\n className={`mthds-run-timeline-strip-cell mthds-run-timeline-strip-cell--${cell.status}`}\n style={{ flexGrow: cell.count }}\n />\n ))}\n </span>\n );\n}\n\n/**\n * The axis's span in milliseconds, which the timeline sets on its body: a bar's\n * place is an offset in milliseconds from the axis's start, and CSS turns it\n * into a share of the track against this span. Set by the component, not a\n * layout hook for a host.\n */\nconst AXIS_SPAN_VAR = \"--mthds-run-timeline-axis-span\";\n\n/** A number as CSS reads it: rounded to the microsecond, so never in exponent notation. */\nfunction cssNumber(value: number): string {\n return String(Math.round(value * 1000) / 1000);\n}\n\n/** A stretch of the axis, in milliseconds, as a share of the track's width. */\nfunction axisShare(ms: number): string {\n return `calc(${cssNumber(ms)} * 100% / var(${AXIS_SPAN_VAR}))`;\n}\n\ninterface FailureTickProps {\n /** When the last failure happened, when that is known. */\n atMs: number | null;\n /** The bar as drawn. */\n startMs: number;\n endMs: number;\n}\n\n/** Where the invocation's last failure happened, marked on its bar. */\nfunction FailureTick({ atMs, startMs, endMs }: FailureTickProps) {\n if (atMs === null || atMs < startMs || atMs > endMs) return null;\n const span = endMs - startMs;\n const percent = span > 0 ? ((atMs - startMs) / span) * 100 : 0;\n return (\n <span\n className=\"mthds-run-timeline-failure-tick\"\n style={{ left: `${percent}%` }}\n aria-hidden=\"true\"\n />\n );\n}\n\ninterface TimelineRowViewProps {\n row: TimelineRow;\n /** The invocation's moments, parsed once per snapshot. */\n times: InvocationTimes;\n /**\n * The axis the row's bar is measured against, `null` while nothing has\n * started. A row whose bar follows the clock (`barFollowsClock`) is handed the\n * live axis and the reading clock. Every other row is handed the snapshot's\n * recorded span, which starts where the live axis starts and holds still while\n * the clock ticks, and no clock, so its props, and with them its render, stay\n * as they are until the next snapshot. Either way the bar's place is an offset\n * from the axis's start, which CSS turns into a share of the track.\n */\n axis: TimelineWindow | null;\n nowMs: number | null;\n onToggleBatch: (path: string, expanded: boolean) => void;\n}\n\nconst TimelineRowView = React.memo(function TimelineRowView({\n row,\n times,\n axis,\n nowMs,\n onToggleBatch,\n}: TimelineRowViewProps) {\n const invocation = row.invocation;\n const status = invocation.status;\n const bar = axis ? invocationBar(invocation, axis, nowMs, times) : null;\n // The bar as drawn, kept inside the axis it is measured against.\n const drawnStartMs = bar && axis ? Math.max(bar.startMs, axis.startMs) : 0;\n const drawnEndMs =\n bar && axis ? Math.max(drawnStartMs, Math.min(bar.endMs, axis.endMs)) : drawnStartMs;\n const retried = isRetried(invocation);\n const retrying = retried && status === INVOCATION_STATUS.RUNNING;\n const batch = row.batch;\n\n const rowClasses = [\n \"mthds-run-timeline-row\",\n `mthds-run-timeline-row--${status}`,\n retrying && \"mthds-run-timeline-row--retrying\",\n retried &&\n (status === INVOCATION_STATUS.SUCCEEDED || status === INVOCATION_STATUS.SKIPPED) &&\n \"mthds-run-timeline-row--recovered\",\n invocation.degradation && \"mthds-run-timeline-row--degraded\",\n row.keptVisible && \"mthds-run-timeline-row--kept\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n const barClasses = [\n \"mthds-run-timeline-bar\",\n batch && \"mthds-run-timeline-bar--batch\",\n bar?.growing && \"mthds-run-timeline-bar--growing\",\n bar?.openEnded && \"mthds-run-timeline-bar--open-ended\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n let toggleLabel = \"\";\n if (batch) {\n toggleLabel = batch.expanded\n ? `Collapse the ${batch.total} items of ${invocation.pipe_code}`\n : `Expand the ${batch.total} items of ${invocation.pipe_code}`;\n }\n\n return (\n <li\n className={rowClasses}\n data-path={row.path}\n data-status={status}\n title={rowTitle(row, times, bar)}\n >\n <div\n className=\"mthds-run-timeline-name\"\n style={{ paddingLeft: `calc(${row.depth} * var(--mthds-run-timeline-indent))` }}\n >\n {batch ? (\n <button\n type=\"button\"\n className=\"mthds-run-timeline-toggle\"\n aria-expanded={batch.expanded}\n aria-label={toggleLabel}\n onClick={() => onToggleBatch(row.path, !batch.expanded)}\n >\n <span aria-hidden=\"true\">{batch.expanded ? \"▾\" : \"▸\"}</span>\n </button>\n ) : (\n <span className=\"mthds-run-timeline-toggle-spacer\" aria-hidden=\"true\" />\n )}\n <span className=\"mthds-run-timeline-dot\" aria-hidden=\"true\" />\n <span className=\"mthds-run-timeline-code\">{invocation.pipe_code}</span>\n {row.placeLabel && <span className=\"mthds-run-timeline-place\">{row.placeLabel}</span>}\n <span className=\"mthds-run-timeline-sr\">{`, ${status}`}</span>\n </div>\n <div className=\"mthds-run-timeline-track\">\n {bar && axis && (\n <span\n className={barClasses}\n style={{\n left: axisShare(drawnStartMs - axis.startMs),\n width: axisShare(drawnEndMs - drawnStartMs),\n }}\n >\n {batch && <BatchStrip batch={batch} />}\n <FailureTick atMs={times.failedMs} startMs={drawnStartMs} endMs={drawnEndMs} />\n </span>\n )}\n </div>\n <div className=\"mthds-run-timeline-meta\">\n {retried && (\n <span className=\"mthds-run-timeline-badge mthds-run-timeline-badge--retry\">\n <span aria-hidden=\"true\">↻ </span>\n {retrying ? `attempt ${invocation.attempts}` : `${invocation.attempts} attempts`}\n </span>\n )}\n {invocation.degradation && (\n <span className=\"mthds-run-timeline-badge mthds-run-timeline-badge--stuck\">stuck</span>\n )}\n {batch && !batch.expanded && batch.hiddenItemCount > 0 && (\n <span className=\"mthds-run-timeline-sr\">{`, ${batch.hiddenItemCount} items hidden`}</span>\n )}\n <span className=\"mthds-run-timeline-detail\">{rowDetailText(row, bar)}</span>\n </div>\n </li>\n );\n});\n\n/**\n * A run's progress as a timeline, drawn from its progress snapshot alone: one\n * row per invocation, nested under its controller by its path and labelled with\n * its pipe code, and a bar on a shared time axis from the invocation's start to\n * its end, which grows while it runs.\n *\n * Nothing is drawn in advance: a row appears when the run reaches its\n * invocation, so there is no method graph behind it and no batch width is ever\n * guessed. A batch is one collapsible row carrying its counts and a strip of its\n * items' states; a wide one starts collapsed and keeps its failed items in view.\n * A condition's branch carries the outcome it took. A retried invocation shows\n * its attempts and where its last failure happened, and the invocation where\n * the run is stuck says so.\n *\n * Rows are keyed by path, so repainting with a newer snapshot keeps each drawn\n * row in place and what the reader expanded expanded. While the clock ticks,\n * only the axis and the rows whose bars follow the clock are drawn again.\n */\nexport function RunTimeline({\n snapshot,\n theme = GRAPH_THEME_MODE.SYSTEM,\n systemTheme,\n paletteColors,\n now,\n live = true,\n timelineStyle,\n onTimelineStyleChange,\n styleMenu,\n pipeRegistry,\n entryPipeRef,\n wideBatchThreshold,\n wideParallelThreshold,\n className,\n}: RunTimelineProps) {\n const held = useHeldSnapshot(snapshot);\n const streamKey = progressStreamKey(held);\n\n // A fixed theme is handed to the hook as if injected, so it registers no\n // `prefers-color-scheme` listener whose answer would be thrown away.\n const environmentTheme = useSystemTheme(theme === GRAPH_THEME_MODE.SYSTEM ? systemTheme : theme);\n const resolvedTheme: GraphTheme = theme === GRAPH_THEME_MODE.SYSTEM ? environmentTheme : theme;\n // The theme's palette is the base; the host's `paletteColors` win per key, as on `GraphViewer`.\n const paletteStyle = React.useMemo(\n () => ({ ...getPaletteForTheme(resolvedTheme), ...paletteColors }) as React.CSSProperties,\n [resolvedTheme, paletteColors],\n );\n const containerClassName = [\n \"mthds-run-timeline\",\n `mthds-run-timeline--${resolvedTheme}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n // The style follows the graph viewer's controlled and reactive contract: the\n // prop's resolution is adopted whenever it changes, and the menu changes the\n // style in between. Derived during render, so a new prop never draws a frame\n // in the old style.\n const externalStyle = resolveTimelineStyle(timelineStyle);\n const [styleState, setStyleState] = React.useState({\n external: externalStyle,\n active: externalStyle,\n });\n if (styleState.external !== externalStyle) {\n setStyleState({ external: externalStyle, active: externalStyle });\n }\n const activeStyle = styleState.external === externalStyle ? styleState.active : externalStyle;\n const onTimelineStyleChangeRef = React.useRef(onTimelineStyleChange);\n onTimelineStyleChangeRef.current = onTimelineStyleChange;\n const reportedStyleRef = React.useRef(activeStyle);\n React.useEffect(() => {\n if (reportedStyleRef.current !== activeStyle) {\n reportedStyleRef.current = activeStyle;\n onTimelineStyleChangeRef.current?.(activeStyle);\n }\n }, [activeStyle]);\n const styleMenuOptions = React.useMemo(() => resolveTimelineStyleMenu(styleMenu), [styleMenu]);\n // A choice redraws the view the menu sits in, so the button the reader chose\n // from is gone: focus goes to the new one, once it is drawn.\n const menuSlotRef = React.useRef<HTMLDivElement | null>(null);\n const refocusMenuRef = React.useRef(false);\n const chooseStyle = React.useCallback((style: TimelineStyleId) => {\n refocusMenuRef.current = true;\n setStyleState((state) => ({ ...state, active: style }));\n }, []);\n React.useEffect(() => {\n if (!refocusMenuRef.current) return;\n refocusMenuRef.current = false;\n menuSlotRef.current?.querySelector(\"button\")?.focus();\n }, [styleState]);\n const headerEnd =\n styleMenuOptions.length > 0 ? (\n <TimelineStyleMenu\n value={activeStyle}\n options={styleMenuOptions}\n onChange={chooseStyle}\n slotRef={menuSlotRef}\n />\n ) : null;\n\n // What every style shares lives above the switch between them, so changing\n // style never moves the clock back or forgets what the reader opened: the\n // snapshot's moments, one reading clock ticking as often as the active\n // style's drawing moves, and each style's expansion.\n const times = React.useMemo(() => snapshotTimes(held), [held]);\n const followsClock = React.useMemo(\n () =>\n held.invocations.some((invocation) =>\n barFollowsClock(invocation, times.invocations.get(invocation.path)),\n ),\n [held, times],\n );\n const clock = useReadingClock(held, streamKey, {\n now,\n live,\n followsClock,\n tickMs: CLOCK_TICK_MS[activeStyle],\n });\n const detailedExpansion = useStreamExpansion(streamKey);\n const simpleExpansion = useStreamExpansion(streamKey);\n\n // Keyed by style, so a new style fails to compile until it has a view.\n const views: Record<TimelineStyleId, () => React.ReactElement> = {\n [TIMELINE_STYLE.SIMPLE]: () => (\n <SimpleProgressView\n held={held}\n stream={streamKey}\n times={times}\n nowMs={clock.nowMs}\n ticking={clock.ticking}\n expanded={simpleExpansion.expanded}\n onToggle={simpleExpansion.toggle}\n pipeRegistry={pipeRegistry}\n entryPipeRef={entryPipeRef}\n wideParallelThreshold={wideParallelThreshold}\n containerClassName={containerClassName}\n containerStyle={paletteStyle}\n headerEnd={headerEnd}\n />\n ),\n [TIMELINE_STYLE.DETAILED]: () => (\n <DetailedTimeline\n held={held}\n times={times}\n nowMs={clock.nowMs}\n ticking={clock.ticking}\n expandedBatches={detailedExpansion.expanded}\n onToggleBatch={detailedExpansion.toggle}\n wideBatchThreshold={wideBatchThreshold}\n containerClassName={containerClassName}\n containerStyle={paletteStyle}\n headerEnd={headerEnd}\n />\n ),\n };\n return views[activeStyle]();\n}\n\n/** What `RunTimeline` hands the detailed style: the snapshot it holds, the reading clock and the reader's expansion, which every style shares, and its own props. */\ninterface DetailedTimelineProps {\n held: ProgressSnapshot;\n times: SnapshotTimes;\n /** The reading clock, and whether it ticks on its own. */\n nowMs: number | null;\n ticking: boolean;\n /** The batches the reader opened or closed, by path. */\n expandedBatches: Readonly<Record<string, boolean>>;\n onToggleBatch: (path: string, expanded: boolean) => void;\n wideBatchThreshold: number | undefined;\n containerClassName: string;\n containerStyle: React.CSSProperties;\n /** What `RunTimeline` puts at the end of the header: the style menu, when shown. */\n headerEnd: React.ReactNode;\n}\n\n/** The detailed style: every invocation as a row with its bar on the shared axis. */\nfunction DetailedTimeline({\n held,\n times,\n nowMs,\n ticking,\n expandedBatches,\n onToggleBatch: toggleBatch,\n wideBatchThreshold,\n containerClassName,\n containerStyle,\n headerEnd,\n}: DetailedTimelineProps) {\n const rows = React.useMemo(\n () => buildTimelineRows(held, { expandedBatches, wideBatchThreshold }),\n [held, expandedBatches, wideBatchThreshold],\n );\n const drawnRows = React.useMemo(\n () =>\n rows.map((row) => {\n const rowTimes = times.invocations.get(row.path) ?? invocationTimes(row.invocation);\n return { row, times: rowTimes, followsClock: barFollowsClock(row.invocation, rowTimes) };\n }),\n [rows, times],\n );\n const axis = timelineWindowAt(times, nowMs);\n const [axisTrackRef, tickBudget] = useTickBudget();\n const ticks = axis ? timelineTicks(axis, tickBudget) : [];\n const bodyStyle = axis\n ? ({ [AXIS_SPAN_VAR]: cssNumber(axis.endMs - axis.startMs) } as React.CSSProperties)\n : undefined;\n\n const containerClasses = [containerClassName, ticking && \"mthds-run-timeline--self-clocked\"]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <section\n className={containerClasses}\n style={containerStyle}\n aria-label=\"Run progress\"\n data-run-status={held.status}\n data-version={held.version}\n >\n <header className=\"mthds-run-timeline-header\">\n <span\n className={`mthds-run-timeline-status mthds-run-timeline-status--${held.status}`}\n data-testid=\"run-timeline-status\"\n >\n {wordFor(RUN_STATUS_WORD, held.status)}\n </span>\n {held.mode === PROGRESS_MODE.DRY && (\n <span className=\"mthds-run-timeline-mode\">Dry run</span>\n )}\n <p className=\"mthds-run-timeline-summary\" aria-live=\"polite\">\n {held.summary}\n </p>\n {headerEnd}\n </header>\n {held.degradation && (\n <p className=\"mthds-run-timeline-degradation\" role=\"status\">\n {held.degradation.message}\n </p>\n )}\n {rows.length === 0 ? (\n // A run that ended with nothing to draw, failed or canceled before its\n // first invocation started, is waiting for nothing.\n <p className=\"mthds-run-timeline-empty\">\n {isRunEnded(held.status) ? \"No progress was recorded.\" : \"Nothing has started yet.\"}\n </p>\n ) : (\n <div className=\"mthds-run-timeline-body\" style={bodyStyle}>\n {axis && (\n <div className=\"mthds-run-timeline-axis\" aria-hidden=\"true\">\n <span className=\"mthds-run-timeline-axis-spacer\" />\n <span className=\"mthds-run-timeline-axis-track\" ref={axisTrackRef}>\n {ticks.map((tick) => (\n <span\n key={tick.offsetMs}\n className={[\n \"mthds-run-timeline-tick\",\n tick.percent === 0 && \"mthds-run-timeline-tick--first\",\n tick.percent > TICK_RIGHT_ALIGN_PERCENT && \"mthds-run-timeline-tick--last\",\n ]\n .filter(Boolean)\n .join(\" \")}\n style={{ left: `${tick.percent}%` }}\n >\n {tick.label}\n </span>\n ))}\n </span>\n <span className=\"mthds-run-timeline-axis-spacer\" />\n </div>\n )}\n <ol className=\"mthds-run-timeline-rows\">\n {drawnRows.map(({ row, times: rowTimes, followsClock }) => (\n <TimelineRowView\n key={row.path}\n row={row}\n times={rowTimes}\n axis={followsClock ? axis : times.recorded}\n nowMs={followsClock ? nowMs : null}\n onToggleBatch={toggleBatch}\n />\n ))}\n </ol>\n </div>\n )}\n </section>\n );\n}\n","\"use client\";\n\n/**\n * The snapshot a timeline draws and the clock it reads it against, shared by\n * every timeline style: the fresher of the snapshots it was handed, and a\n * reading clock that starts from the snapshot's `assembled_at` and never steps\n * back within one stream of progress. A style decides only how often its clock\n * ticks and whether anything it draws follows it.\n */\nimport * as React from \"react\";\nimport {\n isRunEnded,\n type ProgressSnapshot,\n type ProgressTimestamp,\n} from \"@timeline/progressSnapshot\";\nimport { fresherSnapshot } from \"@timeline/snapshotFreshness\";\nimport { readingClockMs } from \"@timeline/timelineTime\";\n\n/**\n * The snapshot to draw: of the one held and the one just passed, the fresher by\n * the contract's rule. React's derived-state pattern rather than an effect, so\n * the render that receives a stale snapshot never paints it, not even once.\n */\nexport function useHeldSnapshot(snapshot: ProgressSnapshot): ProgressSnapshot {\n const [state, setState] = React.useState({ given: snapshot, held: snapshot });\n if (state.given !== snapshot) {\n const held = fresherSnapshot(state.held, snapshot);\n setState({ given: snapshot, held });\n return held;\n }\n return state.held;\n}\n\n/** What the clock last showed, for which stream and which reading, and whether it ticked on its own. */\ninterface SelfClock {\n stream: string;\n base: number | null;\n ticking: boolean;\n ms: number | null;\n}\n\nexport interface ReadingClockOptions {\n /** The moment the host pinned, as on `RunTimelineProps.now`. */\n now: ProgressTimestamp | number | undefined;\n /** Whether the clock may tick on its own while the run goes on. */\n live: boolean;\n /** Whether anything drawn follows the clock: with nothing, a tick would redraw nothing that moves. */\n followsClock: boolean;\n /** How often the clock ticks, in milliseconds. */\n tickMs: number;\n}\n\n/**\n * The reading clock, in epoch milliseconds. Pinned by `now` when the host sets\n * it; otherwise the snapshot's `assembled_at`, advanced while the run goes on by\n * the time this page has measured since. It ticks every `tickMs` only while a\n * drawn element follows it (`followsClock`).\n *\n * The self-ticking clock never goes back within one stream of progress. A\n * snapshot that took long to arrive can carry an `assembled_at` older than the\n * moment the clock already shows; the clock then carries on from what it\n * showed, the later of the two readings, rather than jumping back, so nothing\n * that grows with it shrinks and grows again. That floor comes only from a\n * clock that was itself ticking in the same stream: a moment the host pinned\n * with `now`, or a clock standing still, is not one this clock reached on its\n * own, so a clock that starts ticking starts from its snapshot's reading. A\n * snapshot of another stream starts the clock afresh from its own reading.\n */\nexport function useReadingClock(\n held: ProgressSnapshot,\n stream: string,\n { now, live, followsClock, tickMs }: ReadingClockOptions,\n): { nowMs: number | null; ticking: boolean } {\n const base = React.useMemo(() => readingClockMs(held, now), [held, now]);\n const ticking =\n live && now === undefined && base !== null && !isRunEnded(held.status) && followsClock;\n const [clock, setClock] = React.useState<SelfClock>({\n stream,\n base,\n ticking,\n ms: base,\n });\n let shown = clock;\n if (clock.stream !== stream || clock.base !== base || clock.ticking !== ticking) {\n // React's derived-state pattern, as in `useHeldSnapshot`: the render that\n // receives the new reading already shows the clock it starts from.\n const floor = ticking && clock.ticking && clock.stream === stream ? clock.ms : null;\n const ms = base !== null && floor !== null ? Math.max(base, floor) : base;\n shown = { stream, base, ticking, ms };\n setClock(shown);\n }\n React.useEffect(() => {\n if (!ticking) return undefined;\n let previous = performance.now();\n const timer = window.setInterval(() => {\n const current = performance.now();\n const step = current - previous;\n previous = current;\n setClock((state) =>\n state.stream === stream && state.base === base && state.ticking && state.ms !== null\n ? { ...state, ms: state.ms + step }\n : state,\n );\n }, tickMs);\n return () => window.clearInterval(timer);\n }, [ticking, stream, base, tickMs]);\n return { nowMs: ticking ? shown.ms : base, ticking };\n}\n","\"use client\";\n\n/**\n * What the reader opened or closed in a timeline, by key, for one stream of\n * progress: a snapshot of another stream starts afresh. `RunTimeline` holds one\n * per style, above the switch between them, so changing style and back keeps\n * what the reader opened.\n */\nimport * as React from \"react\";\n\n/** Nothing opened or closed: every line or row takes its default. */\nexport const EMPTY_EXPANSION: Readonly<Record<string, boolean>> = Object.freeze({});\n\nexport interface StreamExpansion {\n /** What the reader opened (`true`) or closed (`false`), by key, in the current stream. */\n expanded: Readonly<Record<string, boolean>>;\n /** Records a choice; stable within a stream, so a memoized line it is handed to keeps still. */\n toggle: (key: string, expanded: boolean) => void;\n}\n\nexport function useStreamExpansion(stream: string): StreamExpansion {\n const [state, setState] = React.useState<{\n stream: string;\n expanded: Readonly<Record<string, boolean>>;\n }>({ stream, expanded: EMPTY_EXPANSION });\n const toggle = React.useCallback(\n (key: string, expanded: boolean) => {\n setState((previous) => ({\n stream,\n expanded: {\n ...(previous.stream === stream ? previous.expanded : EMPTY_EXPANSION),\n [key]: expanded,\n },\n }));\n },\n [stream],\n );\n return { expanded: state.stream === stream ? state.expanded : EMPTY_EXPANSION, toggle };\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { Problem } from \"mthds/errors\";\nimport {\n PROGRESS_MODE,\n RUN_PROGRESS_STATUS,\n timestampMs,\n type ProgressDegradation,\n type ProgressSnapshot,\n} from \"@timeline/progressSnapshot\";\nimport {\n SIMPLE_LINE_KIND,\n SIMPLE_LINE_STATE,\n SIMPLE_RUN_NOTE_REASON,\n buildSimpleProgress,\n simpleProgressChanges,\n type SimpleLineState,\n type SimpleProgress,\n type SimpleProgressLine,\n type SimpleRunNote,\n} from \"@timeline/styles/simpleProgress\";\nimport type { TimelinePipeRegistry } from \"@timeline/styles/registryJoin\";\nimport { invocationTimes, type SnapshotTimes } from \"@timeline/timelineTime\";\nimport {\n DEFAULT_SIMPLE_PROGRESS_STRINGS,\n type SimpleProgressStrings,\n} from \"./simpleProgressStrings\";\n\n/**\n * What `RunTimeline` hands the simple style: the snapshot it holds and its\n * stream, the reading clock and the reader's expansion, which every style\n * shares, and its own props.\n */\nexport interface SimpleProgressViewProps {\n held: ProgressSnapshot;\n stream: string;\n /** Every timestamp of the snapshot, parsed once. */\n times: SnapshotTimes;\n /** The reading clock, and whether it ticks on its own. */\n nowMs: number | null;\n ticking: boolean;\n /** The lines the reader opened or closed, by key. */\n expanded: Readonly<Record<string, boolean>>;\n onToggle: (key: string, expanded: boolean) => void;\n pipeRegistry?: TimelinePipeRegistry;\n entryPipeRef?: string;\n wideParallelThreshold?: number;\n /** The container's classes and palette, which `RunTimeline` resolves for every style. */\n containerClassName: string;\n containerStyle: React.CSSProperties;\n /** What `RunTimeline` puts at the end of the header: the style menu, when shown. */\n headerEnd?: React.ReactNode;\n strings?: SimpleProgressStrings;\n}\n\n/** A state's mark: drawn, never a glyph, so it reads the same in every font. */\nfunction StateMark({ state }: { state: SimpleLineState }) {\n let shape: React.ReactNode = null;\n switch (state) {\n case SIMPLE_LINE_STATE.DONE:\n shape = <path d=\"M3.5 6.2 5.3 8l3.4-3.8\" fill=\"none\" strokeWidth=\"1.6\" />;\n break;\n case SIMPLE_LINE_STATE.FAILED:\n shape = <path d=\"M4 4l4 4M8 4l-4 4\" fill=\"none\" strokeWidth=\"1.6\" />;\n break;\n case SIMPLE_LINE_STATE.SKIPPED:\n shape = <path d=\"M3.8 6h4.4\" fill=\"none\" strokeWidth=\"1.4\" />;\n break;\n case SIMPLE_LINE_STATE.STOPPED:\n shape = <rect x=\"4\" y=\"4\" width=\"4\" height=\"4\" rx=\"0.5\" />;\n break;\n case SIMPLE_LINE_STATE.NOT_RUN:\n shape = <path d=\"M3.8 6h4.4\" fill=\"none\" strokeWidth=\"1.2\" />;\n break;\n default:\n shape = null;\n }\n return (\n <svg\n className={`mthds-simple-progress-mark mthds-simple-progress-mark--${state}`}\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle className=\"mthds-simple-progress-mark-ring\" cx=\"6\" cy=\"6\" r=\"5.2\" />\n {state === SIMPLE_LINE_STATE.RUNNING && (\n <path className=\"mthds-simple-progress-mark-arc\" d=\"M6 0.8a5.2 5.2 0 0 1 5.2 5.2\" />\n )}\n {shape}\n </svg>\n );\n}\n\n/** The platform's own words, behind a disclosure. */\nfunction Details({ label, children }: { label: string; children: React.ReactNode }) {\n return (\n <details className=\"mthds-simple-progress-details\">\n <summary>{label}</summary>\n <div className=\"mthds-simple-progress-details-body\">{children}</div>\n </details>\n );\n}\n\nfunction ProblemDetails({\n problem,\n strings,\n}: {\n problem: Problem;\n strings: SimpleProgressStrings;\n}) {\n const nextStep = problem.next_step?.detail;\n return (\n <Details label={strings.details}>\n <p>{problem.detail}</p>\n {nextStep && <p>{nextStep}</p>}\n </Details>\n );\n}\n\nfunction untilOf(degradation: ProgressDegradation, strings: SimpleProgressStrings): string | null {\n const ms = timestampMs(degradation.ends_at);\n return ms === null ? null : strings.clockTime(ms);\n}\n\ninterface NoteProps {\n tone: \"warning\" | \"error\" | \"muted\";\n children: React.ReactNode;\n}\n\nfunction Note({ tone, children }: NoteProps) {\n return (\n <div className={`mthds-simple-progress-note mthds-simple-progress-note--${tone}`}>\n {children}\n </div>\n );\n}\n\n/**\n * A line's health, worded: trying again, stuck, or the problem it failed with.\n * A line that counts items, a for-each line or a branch step, says how many of\n * its items are in trouble, `item` being what one is called.\n */\nfunction HealthNotes({\n line,\n item,\n strings,\n}: {\n line: SimpleProgressLine;\n item: string | null;\n strings: SimpleProgressStrings;\n}) {\n const health = line.health;\n if (!health) return null;\n const notes: React.ReactNode[] = [];\n if (health.problem) {\n notes.push(\n <Note key=\"problem\" tone=\"error\">\n <p>{health.problem.title}</p>\n <ProblemDetails problem={health.problem} strings={strings} />\n </Note>,\n );\n }\n if (health.retryingItems > 0) {\n notes.push(\n <Note key=\"retrying\" tone=\"warning\">\n <p>{strings.tryingAgainItems(health.retryingItems, item)}</p>\n </Note>,\n );\n } else if (health.retryAttempt !== null) {\n notes.push(\n <Note key=\"retrying\" tone=\"warning\">\n <p>{strings.tryingAgain(health.retryAttempt)}</p>\n </Note>,\n );\n }\n if (health.degradation) {\n const until = untilOf(health.degradation, strings);\n notes.push(\n <Note key=\"stuck\" tone=\"warning\">\n <p>\n {health.stuckItems > 0\n ? strings.havingTroubleItems(health.stuckItems, item, until)\n : strings.havingTrouble(until)}\n </p>\n <Details label={strings.details}>\n <p>{health.degradation.message}</p>\n </Details>\n </Note>,\n );\n }\n return notes.length > 0 ? <div className=\"mthds-simple-progress-notes\">{notes}</div> : null;\n}\n\n/** A batch's determinate bar and its counts in words. */\nfunction BatchCounts({\n line,\n strings,\n}: {\n line: SimpleProgressLine;\n strings: SimpleProgressStrings;\n}) {\n const counts = line.counts;\n if (!counts || counts.total <= 0) return null;\n const share = (count: number) => `${(Math.min(count, counts.total) / counts.total) * 100}%`;\n // The contract counts a skipped item as done; the reader counts it apart, so\n // that what is done, failed, skipped and going on adds up to the total.\n const skipped = Math.min(line.skippedItems, counts.done);\n const finished = counts.done - skipped;\n const text = strings.batchCounts(finished, counts.total, counts.running, counts.failed, skipped);\n const segments = [\n [\"done\", finished],\n [\"skipped\", skipped],\n [\"failed\", counts.failed],\n [\"running\", counts.running],\n ] as const;\n return (\n <div className=\"mthds-simple-progress-batch\">\n <div\n className=\"mthds-simple-progress-bar\"\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={counts.total}\n aria-valuenow={finished}\n aria-valuetext={text}\n >\n {segments.map(([name, count]) =>\n count > 0 ? (\n <span\n key={name}\n className={`mthds-simple-progress-bar-${name}`}\n style={{ width: share(count) }}\n />\n ) : null,\n )}\n </div>\n <span className=\"mthds-simple-progress-counts\" aria-hidden=\"true\">\n {text}\n </span>\n </div>\n );\n}\n\nconst TALLY_ORDER = [\n SIMPLE_LINE_STATE.DONE,\n SIMPLE_LINE_STATE.RUNNING,\n SIMPLE_LINE_STATE.FAILED,\n SIMPLE_LINE_STATE.SKIPPED,\n SIMPLE_LINE_STATE.STOPPED,\n] as const;\n\n/** A branch step's items at each state: a mark and a count each. */\nfunction Tally({ line, strings }: { line: SimpleProgressLine; strings: SimpleProgressStrings }) {\n const tally = line.tally;\n if (!tally) return null;\n return (\n <span className=\"mthds-simple-progress-tally\">\n {TALLY_ORDER.filter((state) => tally[state] > 0).map((state) => (\n <span key={state} className=\"mthds-simple-progress-tally-entry\" aria-hidden=\"true\">\n <StateMark state={state} />\n {tally[state]}\n </span>\n ))}\n <span className=\"mthds-run-timeline-sr\">{`, ${strings.tally(tally)}`}</span>\n </span>\n );\n}\n\n/** A line's duration once ended, its elapsed time while it runs, or its state where it has neither. */\nfunction timeText(\n line: SimpleProgressLine,\n nowMs: number | null,\n strings: SimpleProgressStrings,\n): string | null {\n if (\n line.state === SIMPLE_LINE_STATE.SKIPPED ||\n line.state === SIMPLE_LINE_STATE.STOPPED ||\n line.state === SIMPLE_LINE_STATE.NOT_RUN\n ) {\n return strings.state[line.state];\n }\n const invocation = line.invocation;\n if (!invocation || line.kind === SIMPLE_LINE_KIND.NOW) return null;\n const times = invocationTimes(invocation);\n if (times.startedMs === null) return null;\n if (times.endedMs !== null) return strings.duration(times.endedMs - times.startedMs);\n if (line.state === SIMPLE_LINE_STATE.RUNNING && nowMs !== null) {\n return strings.elapsed(nowMs - times.startedMs);\n }\n return null;\n}\n\ninterface LineViewProps {\n line: SimpleProgressLine;\n /** What one of the items is called, on a line that counts them: its own on a for-each line, its batch's on a branch step. */\n item: string | null;\n /**\n * The reading clock, handed only to a line that runs or holds a drawn line\n * that runs, so the others stay as they are while it ticks.\n */\n nowMs: number | null;\n onToggle: (key: string, expanded: boolean) => void;\n strings: SimpleProgressStrings;\n}\n\n/** Whether a line runs, or holds a drawn line that runs: what decides that it is handed the clock. */\nfunction followsClock(line: SimpleProgressLine): boolean {\n return line.state === SIMPLE_LINE_STATE.RUNNING || line.children.some(followsClock);\n}\n\n/** What one of a child's items is called: its own on a for-each line, else its parent's on a for-each line's branch step. */\nfunction itemOfChild(parent: SimpleProgressLine, child: SimpleProgressLine): string | null {\n if (child.kind === SIMPLE_LINE_KIND.FOR_EACH) return child.forEachItem;\n return parent.kind === SIMPLE_LINE_KIND.FOR_EACH ? parent.forEachItem : null;\n}\n\nconst LineView = React.memo(function LineView({\n line,\n item,\n nowMs,\n onToggle,\n strings,\n}: LineViewProps) {\n const time = timeText(line, line.state === SIMPLE_LINE_STATE.RUNNING ? nowMs : null, strings);\n const classes = [\n \"mthds-simple-progress-line\",\n `mthds-simple-progress-line--${line.state}`,\n `mthds-simple-progress-line--${line.kind}`,\n ].join(\" \");\n const title =\n line.kind === SIMPLE_LINE_KIND.FINISHED\n ? strings.finishedBranches(line.foldedCount ?? 0)\n : line.title;\n return (\n <li className={classes} data-key={line.key} data-state={line.state}>\n <div className=\"mthds-simple-progress-row\">\n <StateMark state={line.state} />\n <span className=\"mthds-simple-progress-title\">\n {line.kind === SIMPLE_LINE_KIND.NOW && (\n <span className=\"mthds-simple-progress-now\">{strings.now} </span>\n )}\n <span className=\"mthds-simple-progress-name\">{title}</span>\n {line.kind === SIMPLE_LINE_KIND.FOR_EACH && (\n <span className=\"mthds-simple-progress-tag\">{` · ${strings.forEach(line.forEachItem)}`}</span>\n )}\n {line.kind === SIMPLE_LINE_KIND.TOGETHER && (\n <span className=\"mthds-simple-progress-tag\">{` · ${strings.together}`}</span>\n )}\n {line.outcome && (\n <span className=\"mthds-simple-progress-outcome\">\n {line.outcome.resolved\n ? strings.outcomeTaken(line.outcome.key)\n : strings.branchFor(line.outcome.key)}\n </span>\n )}\n <span className=\"mthds-run-timeline-sr\">{`, ${strings.state[line.state]}`}</span>\n </span>\n <Tally line={line} strings={strings} />\n {time !== null && <span className=\"mthds-simple-progress-time\">{time}</span>}\n {line.expandable ? (\n <button\n type=\"button\"\n className=\"mthds-run-timeline-toggle mthds-simple-progress-toggle\"\n aria-expanded={line.expanded}\n aria-label={line.expanded ? strings.collapse(title) : strings.expand(title)}\n onClick={() => onToggle(line.key, !line.expanded)}\n >\n <svg\n className=\"mthds-simple-progress-chevron\"\n viewBox=\"0 0 12 12\"\n width=\"12\"\n height=\"12\"\n aria-hidden=\"true\"\n >\n <path d=\"M4.5 2.5 8 6l-3.5 3.5\" />\n </svg>\n </button>\n ) : (\n <span className=\"mthds-simple-progress-toggle-spacer\" aria-hidden=\"true\" />\n )}\n </div>\n <BatchCounts line={line} strings={strings} />\n <HealthNotes line={line} item={item} strings={strings} />\n {line.expanded && line.children.length > 0 && (\n <ol className=\"mthds-simple-progress-lines mthds-simple-progress-lines--nested\">\n {line.children.map((child) => (\n <LineView\n key={child.key}\n line={child}\n item={itemOfChild(line, child)}\n nowMs={followsClock(child) ? nowMs : null}\n onToggle={onToggle}\n strings={strings}\n />\n ))}\n </ol>\n )}\n </li>\n );\n});\n\n/** The run's elapsed time: from its first start to the reading clock while it goes on, to its last recorded moment once ended. */\nfunction runElapsedMs(\n progress: SimpleProgress,\n times: SnapshotTimes,\n nowMs: number | null,\n): number | null {\n const recorded = times.recorded;\n if (!recorded) return null;\n if (progress.status === RUN_PROGRESS_STATUS.RUNNING && nowMs !== null) {\n return Math.max(0, Math.max(nowMs, recorded.endMs) - recorded.startMs);\n }\n return recorded.endMs - recorded.startMs;\n}\n\nfunction findLine(lines: SimpleProgressLine[], key: string): SimpleProgressLine | null {\n for (const line of lines) {\n if (line.key === key) return line;\n }\n return null;\n}\n\nfunction headlineOf(\n progress: SimpleProgress,\n elapsedMs: number | null,\n strings: SimpleProgressStrings,\n): string {\n let elapsed: string | null = null;\n if (elapsedMs !== null) {\n elapsed =\n progress.status === RUN_PROGRESS_STATUS.RUNNING\n ? strings.elapsed(elapsedMs)\n : strings.duration(elapsedMs);\n }\n const nothing = progress.lines.length === 0;\n switch (progress.status) {\n case RUN_PROGRESS_STATUS.PENDING:\n return strings.waiting;\n case RUN_PROGRESS_STATUS.SUCCEEDED:\n return strings.done(elapsed);\n case RUN_PROGRESS_STATUS.FAILED: {\n if (nothing && elapsedMs === null) return strings.nothingRecorded;\n const key = progress.failure?.lineKey ?? null;\n const where = key === null ? null : (findLine(progress.lines, key)?.title ?? null);\n return strings.failed(where, elapsed);\n }\n case RUN_PROGRESS_STATUS.CANCELED:\n if (nothing && elapsedMs === null) return strings.nothingRecorded;\n return strings.canceled(elapsed);\n case RUN_PROGRESS_STATUS.RUNNING:\n return strings.working(elapsed);\n default: {\n // A run status a later contract adds: drawn as it is.\n const status: string = progress.status;\n return elapsed === null ? status : `${status} · ${elapsed}`;\n }\n }\n}\n\nfunction RunNoteView({ note, strings }: { note: SimpleRunNote; strings: SimpleProgressStrings }) {\n const degradation = note.degradation;\n if (note.reason === SIMPLE_RUN_NOTE_REASON.UNREACHABLE) {\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{strings.unreachable}</p>\n </Note>\n );\n }\n if (note.reason === SIMPLE_RUN_NOTE_REASON.STUCK) {\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{strings.runStuck(untilOf(degradation, strings))}</p>\n <Details label={strings.details}>\n <p>{degradation.message}</p>\n </Details>\n </Note>\n );\n }\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{degradation.message}</p>\n </Note>\n );\n}\n\n/** What the live region last said, and the reading it said it of. */\ninterface Announcement {\n stream: string;\n progress: SimpleProgress;\n message: string;\n}\n\n/**\n * What the live region says: the top-level lines that ended or started since\n * the previous reading, then the run's end in the headline's words, rather\n * than every snapshot. A reading that changed none of those keeps the last\n * message, so nothing is said again; another stream starts silent.\n */\nfunction useAnnouncement(\n progress: SimpleProgress,\n stream: string,\n headline: string,\n strings: SimpleProgressStrings,\n): string {\n const [state, setState] = React.useState<Announcement>({ stream, progress, message: \"\" });\n if (state.progress === progress) return state.message;\n let message = \"\";\n if (state.stream === stream) {\n const change = simpleProgressChanges(state.progress, progress);\n const parts = [\n ...change.done.map(strings.announceDone),\n ...change.failed.map(strings.announceFailed),\n ...(change.runEnded\n ? [strings.announceEnd(headline)]\n : change.started.map(strings.announceNow)),\n ];\n message = parts.length > 0 ? parts.join(\" \") : state.message;\n }\n setState({ stream, progress, message });\n return message;\n}\n\n/**\n * The simple timeline style: the run as a checklist of its steps in the\n * method's own words, a batch as one line with a bar and its counts, only the\n * work going on unfolded, and the time a quiet duration on each line.\n */\nexport function SimpleProgressView({\n held,\n stream,\n times,\n nowMs,\n ticking,\n expanded,\n onToggle: toggle,\n pipeRegistry,\n entryPipeRef,\n wideParallelThreshold,\n containerClassName,\n containerStyle,\n headerEnd,\n strings = DEFAULT_SIMPLE_PROGRESS_STRINGS,\n}: SimpleProgressViewProps) {\n const progress = React.useMemo(\n () =>\n buildSimpleProgress(held, {\n pipeRegistry,\n entryPipeRef,\n expanded,\n wideParallelThreshold,\n }),\n [held, pipeRegistry, entryPipeRef, expanded, wideParallelThreshold],\n );\n const headline = headlineOf(progress, runElapsedMs(progress, times, nowMs), strings);\n const failure = progress.failure;\n const announcement = useAnnouncement(progress, stream, headline, strings);\n\n const classes = [\n containerClassName,\n \"mthds-simple-progress\",\n ticking && \"mthds-run-timeline--self-clocked\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <section\n className={classes}\n style={containerStyle}\n aria-label=\"Run progress\"\n data-run-status={held.status}\n data-version={held.version}\n >\n <header className=\"mthds-run-timeline-header\">\n <p\n className={`mthds-simple-progress-headline mthds-simple-progress-headline--${held.status}`}\n data-testid=\"run-timeline-status\"\n >\n {headline}\n </p>\n {held.mode === PROGRESS_MODE.DRY && (\n <span className=\"mthds-run-timeline-mode\">{strings.dryRun}</span>\n )}\n {headerEnd}\n </header>\n <p className=\"mthds-run-timeline-sr\" aria-live=\"polite\">\n {announcement}\n </p>\n {progress.retryAttempt !== null && (\n <Note tone=\"warning\">\n <p>{strings.runTryingAgain(progress.retryAttempt)}</p>\n </Note>\n )}\n {progress.runNote && <RunNoteView note={progress.runNote} strings={strings} />}\n {failure?.problem && !failure.shownOnLine && (\n <Note tone=\"error\">\n <p>{failure.problem.title}</p>\n <ProblemDetails problem={failure.problem} strings={strings} />\n </Note>\n )}\n {progress.lines.length > 0 && (\n <ol className=\"mthds-simple-progress-lines\" aria-label={strings.checklistLabel}>\n {progress.lines.map((line) => (\n <LineView\n key={line.key}\n line={line}\n item={line.forEachItem}\n nowMs={followsClock(line) ? nowMs : null}\n onToggle={toggle}\n strings={strings}\n />\n ))}\n </ol>\n )}\n </section>\n );\n}\n","/**\n * Every phrase the simple timeline style shows, in one table. The projection\n * (`buildSimpleProgress`) is language-free; this table words it. English only\n * for now, and shaped so a host can pass its own table later: every phrase is a\n * string or a function of the values it carries, and none is assembled from\n * fragments elsewhere, since another language orders its words differently.\n */\nimport type { SimpleItemTally, SimpleLineState } from \"@timeline/styles/simpleProgress\";\nimport { outcomeLabel } from \"@graph/styles/humanize\";\nimport { formatDuration } from \"@timeline/timelineTime\";\n\nexport interface SimpleProgressStrings {\n /** The headline before anything started. */\n waiting: string;\n /** The headline while the run goes on, with its elapsed time, when known. */\n working: (elapsed: string | null) => string;\n done: (elapsed: string | null) => string;\n /** The headline of a failed run, with the title of the top-level line it failed in, when one holds the failure. */\n failed: (where: string | null, elapsed: string | null) => string;\n canceled: (elapsed: string | null) => string;\n /** The headline of a run that ended before anything started. */\n nothingRecorded: string;\n /** The badge beside the headline on a dry run. */\n dryRun: string;\n /** The checklist's accessible name. */\n checklistLabel: string;\n\n /** A parallel's mark after its title. */\n together: string;\n /** A batch's mark after its title: \"for each filing\", \"for each item\". */\n forEach: (item: string | null) => string;\n /** After a decision's title, the outcome it took: the default outcome's key is `null`. */\n outcomeTaken: (key: string | null) => string;\n /** On a branch of a condition that resolved none, as a dry run's, the outcome it stands for. */\n branchFor: (key: string | null) => string;\n /** A wide parallel's finished branches folded into one line. */\n finishedBranches: (count: number) => string;\n /** The deepest work going on past the indentation cap, before its title. */\n now: string;\n\n /** A batch's counts: \"1 of 3 done · 2 in progress · 1 failed · 1 skipped\". */\n batchCounts: (\n done: number,\n total: number,\n running: number,\n failed: number,\n skipped: number,\n ) => string;\n /** A branch step's items at each state, for a screen reader. */\n tally: (tally: SimpleItemTally) => string;\n\n /** What a line's state reads as, for a screen reader, and beside a line skipped, stopped or never run. */\n state: Record<SimpleLineState, string>;\n\n /** A running line's attempt, past the first. */\n tryingAgain: (attempt: number) => string;\n /** A line's items being tried again, on a line that counts items. */\n tryingAgainItems: (count: number, item: string | null) => string;\n /** Where the run is stuck, with the moment the run fails if it is still stuck then, when known (already worded as a clock time). */\n havingTrouble: (until: string | null) => string;\n /** A line's items where the run is stuck, on a line that counts items. */\n havingTroubleItems: (count: number, item: string | null, until: string | null) => string;\n /** The run's own note when its status could not be read. */\n unreachable: string;\n /** The run's own note when its entry sequence, which no line stands for, is being tried again. */\n runTryingAgain: (attempt: number) => string;\n /** The run's own note when it is stuck at no line drawn. */\n runStuck: (until: string | null) => string;\n /** The disclosure that holds the platform's own words. */\n details: string;\n\n /** What the live region says of a top-level line that ended or started, and of the run's end, given its headline. */\n announceDone: (title: string) => string;\n announceFailed: (title: string) => string;\n announceNow: (title: string) => string;\n announceEnd: (headline: string) => string;\n\n /** A toggle's accessible name. */\n expand: (title: string) => string;\n collapse: (title: string) => string;\n\n /** How long a line or the run took, once it ended. */\n duration: (ms: number) => string;\n /**\n * How long a line or the run has been going, while it runs: in whole seconds,\n * since the clock moves once a second.\n */\n elapsed: (ms: number) => string;\n /** A moment as a clock time in the reader's zone, for \"until 09:45\". */\n clockTime: (ms: number) => string;\n}\n\nfunction plural(count: number, one: string, many: string): string {\n return count === 1 ? one : many;\n}\n\nfunction withElapsed(phrase: string, elapsed: string | null): string {\n return elapsed === null ? phrase : `${phrase} · ${elapsed}`;\n}\n\n/** A count of items in words: \"1 filing\", \"3 items\". */\nfunction itemCount(count: number, item: string | null): string {\n const noun = item ?? \"item\";\n return `${count} ${plural(count, noun, `${noun}s`)}`;\n}\n\n/** The simple style's English phrases. */\nexport const DEFAULT_SIMPLE_PROGRESS_STRINGS: SimpleProgressStrings = {\n waiting: \"Waiting to start\",\n working: (elapsed) => withElapsed(\"Working on it\", elapsed),\n done: (elapsed) => withElapsed(\"Done\", elapsed),\n failed: (where, elapsed) =>\n withElapsed(where === null ? \"Failed\" : `Failed in ${where}`, elapsed),\n canceled: (elapsed) => withElapsed(\"Canceled\", elapsed),\n nothingRecorded: \"No progress was recorded\",\n dryRun: \"Dry run\",\n checklistLabel: \"Steps of the run\",\n\n together: \"at the same time\",\n forEach: (item) => `for each ${item ?? \"item\"}`,\n outcomeTaken: (key) => `→ ${key === null ? \"Default\" : outcomeLabel(key)}`,\n branchFor: (key) => (key === null ? \"otherwise\" : `if ${outcomeLabel(key)}`),\n finishedBranches: (count) => `${count} done`,\n now: \"Now:\",\n\n batchCounts: (done, total, running, failed, skipped) => {\n let text = `${done} of ${total} done`;\n if (running > 0) text += ` · ${running} in progress`;\n if (failed > 0) text += ` · ${failed} failed`;\n if (skipped > 0) text += ` · ${skipped} skipped`;\n return text;\n },\n tally: (tally) => {\n const parts: string[] = [];\n if (tally.done > 0) parts.push(`${tally.done} done`);\n if (tally.running > 0) parts.push(`${tally.running} in progress`);\n if (tally.failed > 0) parts.push(`${tally.failed} failed`);\n if (tally.skipped > 0) parts.push(`${tally.skipped} skipped`);\n if (tally.stopped > 0) parts.push(`${tally.stopped} stopped`);\n return parts.length > 0 ? parts.join(\", \") : \"not started\";\n },\n\n state: {\n upcoming: \"Not started\",\n running: \"In progress\",\n done: \"Done\",\n failed: \"Failed\",\n skipped: \"Skipped\",\n stopped: \"Stopped\",\n notRun: \"Not run\",\n },\n\n tryingAgain: (attempt) => `Trying again (attempt ${attempt})`,\n tryingAgainItems: (count, item) => `Trying again for ${itemCount(count, item)}`,\n havingTrouble: (until) =>\n until === null\n ? \"Having trouble here. Still trying.\"\n : `Having trouble here. Still trying; the run fails if this lasts past ${until}.`,\n havingTroubleItems: (count, item, until) =>\n until === null\n ? `Having trouble with ${itemCount(count, item)}. Still trying.`\n : `Having trouble with ${itemCount(count, item)}. Still trying; the run fails if this lasts past ${until}.`,\n unreachable: \"Progress may be out of date: the run can't be reached right now.\",\n runTryingAgain: (attempt) => `The run is trying again (attempt ${attempt}).`,\n runStuck: (until) =>\n until === null\n ? \"The run is having trouble. Still trying.\"\n : `The run is having trouble. Still trying; it fails if this lasts past ${until}.`,\n details: \"Details\",\n\n announceDone: (title) => `Done: ${title}.`,\n announceFailed: (title) => `Failed: ${title}.`,\n announceNow: (title) => `Now: ${title}.`,\n announceEnd: (headline) => `${headline}.`,\n\n expand: (title) => `Show the steps of ${title}`,\n collapse: (title) => `Hide the steps of ${title}`,\n\n duration: (ms) => (ms < 1_000 ? \"<1s\" : formatDuration(ms)),\n elapsed: (ms) => (ms < 1_000 ? \"<1s\" : formatDuration(Math.floor(ms / 1_000) * 1_000)),\n clockTime: (ms) =>\n new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n }).format(ms),\n};\n","import * as React from \"react\";\nimport { StyleMenu, type StyleMenuEntry } from \"@graph/react/viewer/StyleMenu\";\nimport {\n TIMELINE_STYLE,\n TIMELINE_STYLES,\n type TimelineStyleId,\n} from \"@timeline/styles/timelineStyles\";\n\nconst ICON_PROPS = {\n viewBox: \"0 0 24 24\",\n width: 14,\n height: 14,\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n};\n\n/**\n * The timeline's styles as the style menu shows them: the registry's name and\n * description with an icon each. Keyed by `TimelineStyleId`, so a new style\n * does not compile without one.\n */\nexport const TIMELINE_STYLE_MENU_ENTRIES: Record<TimelineStyleId, StyleMenuEntry> = {\n // Bars of different lengths on a shared axis.\n [TIMELINE_STYLE.DETAILED]: {\n ...TIMELINE_STYLES[TIMELINE_STYLE.DETAILED],\n icon: (\n <svg {...ICON_PROPS}>\n <line x1=\"3\" y1=\"3\" x2=\"3\" y2=\"21\" />\n <line x1=\"7\" y1=\"6\" x2=\"15\" y2=\"6\" />\n <line x1=\"10\" y1=\"12\" x2=\"20\" y2=\"12\" />\n <line x1=\"7\" y1=\"18\" x2=\"13\" y2=\"18\" />\n </svg>\n ),\n },\n // A checklist: a check, then lines of words.\n [TIMELINE_STYLE.SIMPLE]: {\n ...TIMELINE_STYLES[TIMELINE_STYLE.SIMPLE],\n icon: (\n <svg {...ICON_PROPS}>\n <polyline points=\"3 6 5 8 8 4\" />\n <line x1=\"12\" y1=\"6\" x2=\"21\" y2=\"6\" />\n <circle cx=\"5.5\" cy=\"12\" r=\"2\" />\n <line x1=\"12\" y1=\"12\" x2=\"21\" y2=\"12\" />\n <circle cx=\"5.5\" cy=\"18\" r=\"2\" />\n <line x1=\"12\" y1=\"18\" x2=\"21\" y2=\"18\" />\n </svg>\n ),\n },\n};\n\n/** Accessible label of the menu button: the current style, and what the button does. */\nexport function timelineStyleMenuLabel(style: TimelineStyleId): string {\n return `Timeline style: ${TIMELINE_STYLES[style].name} — choose how the run is drawn`;\n}\n\nexport interface TimelineStyleMenuProps {\n value: TimelineStyleId;\n /** The styles offered, in order: two at least. */\n options: readonly TimelineStyleId[];\n onChange: (style: TimelineStyleId) => void;\n /** The element the menu sits in, for `RunTimeline` to find its button again after a choice redraws it. */\n slotRef?: React.Ref<HTMLDivElement>;\n}\n\n/** The style menu at the end of the timeline's header: the graph viewer's menu, over the timeline's styles. */\nexport function TimelineStyleMenu({ value, options, onChange, slotRef }: TimelineStyleMenuProps) {\n return (\n <div className=\"mthds-run-timeline-header-end\" ref={slotRef}>\n <StyleMenu\n value={value}\n options={options}\n onChange={onChange}\n placement=\"down-end\"\n entries={TIMELINE_STYLE_MENU_ENTRIES}\n menuLabel=\"Timeline style\"\n buttonLabel={timelineStyleMenuLabel}\n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AO,OAAO,EACd,KAAK,GAAG;AAAA,gBACX,OAAO,EAAE,MAAM,GAAG,KAAK,OAAO,IAAI;AAAA,gBAEjC,eAAK;AAAA;AAAA,cAVD,KAAK;AAAA,YAWZ,CACD,GACH;AAAA,YACA,gBAAAA,KAAC,UAAK,WAAU,kCAAiC;AAAA,aACnD;AAAA,UAEF,gBAAAA,KAAC,QAAG,WAAU,2BACX,oBAAU,IAAI,CAAC,EAAE,KAAK,OAAO,UAAU,cAAAI,cAAa,MACnD,gBAAAJ;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,OAAO;AAAA,cACP,MAAMI,gBAAe,OAAO,MAAM;AAAA,cAClC,OAAOA,gBAAe,QAAQ;AAAA,cAC9B,eAAe;AAAA;AAAA,YALV,IAAI;AAAA,UAMX,CACD,GACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["React","followsClock","React","React","LineView","jsx","jsxs","jsx","jsxs","_a","TimelineRowView","followsClock"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/timeline/react/index.ts","../../../src/timeline/react/RunTimeline.tsx","../../../src/timeline/react/readingClock.ts","../../../src/timeline/react/streamRecord.ts","../../../src/timeline/react/styles/simple/SimpleProgressView.tsx","../../../src/timeline/react/styles/simple/simpleProgressStrings.ts","../../../src/timeline/react/TimelineStyleMenu.tsx"],"sourcesContent":["\"use client\";\n\n// The timeline's stylesheets are imported here and nowhere else: the entry's\n// specifier is the one tsup's `external` pattern matches and the one that\n// resolves from `dist/timeline/react/index.js` (see CLAUDE.md, \"CSS Packaging\").\nimport \"./RunTimeline.css\";\nimport \"./styles/simple/SimpleProgress.css\";\n// The style menu's list is the graph viewer's, shared: this specifier resolves\n// from `dist/timeline/react/` to the graph entry's copy of the stylesheet.\nimport \"../../graph/react/viewer/StyleMenu.css\";\n\nexport { RunTimeline } from \"./RunTimeline\";\nexport type { RunTimelineProps } from \"./RunTimeline\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport { getPaletteForTheme } from \"@graph/graphConfig\";\nimport { GRAPH_THEME_MODE, type GraphTheme, type GraphThemeMode } from \"@graph/types\";\nimport { useSystemTheme } from \"@graph/react/viewer/useSystemTheme\";\nimport {\n INVOCATION_STATUS,\n PROGRESS_MODE,\n isRunEnded,\n type ProgressInvocation,\n type ProgressSnapshot,\n type ProgressTimestamp,\n type RunProgressStatus,\n} from \"@timeline/progressSnapshot\";\nimport { progressStreamKey } from \"@timeline/snapshotFreshness\";\nimport {\n TIMELINE_STYLE,\n resolveTimelineStyle,\n resolveTimelineStyleMenu,\n type TimelineStyleId,\n} from \"@timeline/styles/timelineStyles\";\nimport type { TimelinePipeRegistry } from \"@timeline/styles/registryJoin\";\nimport {\n KEPT_VISIBLE_REASON,\n TIMELINE_ENTRY_KIND,\n buildTimelineRows,\n type KeptVisibleReason,\n type TimelineBatch,\n type TimelineItemPager,\n type TimelineRow,\n} from \"@timeline/timelineRows\";\nimport {\n barFollowsClock,\n formatClockTime,\n formatDuration,\n invocationBar,\n invocationTimes,\n snapshotTimes,\n timelineTicks,\n timelineWindowAt,\n type InvocationTimes,\n type SnapshotTimes,\n type TimelineBar,\n type TimelineWindow,\n} from \"@timeline/timelineTime\";\nimport { useHeldSnapshot, useReadingClock } from \"@timeline/react/readingClock\";\nimport { useStreamRecord } from \"@timeline/react/streamRecord\";\nimport { SimpleProgressView } from \"@timeline/react/styles/simple/SimpleProgressView\";\nimport { TimelineStyleMenu } from \"@timeline/react/TimelineStyleMenu\";\n\nexport interface RunTimelineProps {\n /**\n * The run's progress snapshot, as the hosted progress contract defines it:\n * the component's only source of what ran. Hand it every snapshot you read;\n * the timeline keeps the fresher of the one it holds and the one it is given,\n * so an older read arriving late never rolls it back, and a snapshot showing\n * the run still going never replaces one showing it ended.\n */\n snapshot: ProgressSnapshot;\n /**\n * `dark`, `light`, or `system` to follow the environment, as `GraphViewer`'s\n * theme mode. Defaults to `system`.\n */\n theme?: GraphThemeMode;\n /** The environment's theme when the host detects it itself, as on `GraphViewer`. */\n systemTheme?: GraphTheme;\n /**\n * Sparse overrides of the palette, merged per key over the resolved theme's,\n * as `GraphViewer`'s `config.paletteColors`: `{ \"--color-success\": \"#16a34a\" }`.\n * The palette is set inline on the timeline's container, so this is how a host\n * changes a colour: a `--color-*` or `--surface-*` declared on the container's\n * class in a stylesheet loses to the inline value.\n */\n paletteColors?: Record<string, string>;\n /**\n * Pins the reading clock: the moment running bars grow to, as a timestamp or\n * epoch milliseconds. A host that keeps its own trusted clock, or a replay,\n * sets it; the timeline then never ticks on its own.\n */\n now?: ProgressTimestamp | number;\n /**\n * While the run goes on and `now` is unset, keep running bars growing between\n * snapshots: the timeline advances its reading clock from the snapshot's\n * `assembled_at` by the time elapsed on this page since the snapshot arrived,\n * so it never trusts the page's clock to agree with the server's. `false`\n * draws each snapshot as of its `assembled_at`. Defaults to `true`.\n */\n live?: boolean;\n /**\n * The style the timeline draws in: `detailed`, the default, every invocation\n * as a bar on a shared time axis; or `simple`, the run as a checklist of its\n * steps in the method's own words, a batch as one line with its counts.\n * Reactive, like `theme`: passing it drives the active style, and clearing it\n * back to `undefined` hands control to the default. The header's style menu,\n * when shown, changes it too. An id this version does not know is treated as\n * unset. This library persists nothing: the host keeps the choice, reported\n * by `onTimelineStyleChange`.\n */\n timelineStyle?: TimelineStyleId;\n /**\n * Called whenever the style changes — from the menu, or from a prop update —\n * so the host can persist it. Not called on mount.\n */\n onTimelineStyleChange?: (style: TimelineStyleId) => void;\n /**\n * Show a style menu at the end of the header. Opt-in: `true` offers every\n * registered style in registry order, a list offers those styles in that\n * order, and the default offers no menu, for a host that fixes the style for\n * its audience. A menu needs two styles to choose between.\n */\n styleMenu?: boolean | readonly TimelineStyleId[];\n /**\n * The registry of the method's pipes, keyed by `pipe_ref`, as a `GraphSpec`'s\n * `pipe_registry`: the simple style titles its lines from the pipes'\n * descriptions, names a batch's item, and lists the steps the run has not\n * reached. Without it each line is titled by its humanized pipe code. The\n * detailed style does not read it.\n */\n pipeRegistry?: TimelinePipeRegistry;\n /**\n * The `pipe_ref` of the pipe the run starts from. A snapshot taken before\n * anything started names no pipe, so with it and `pipeRegistry` the simple\n * style lists the run's steps from the start.\n */\n entryPipeRef?: string;\n /** A batch holding more items than this starts collapsed. Defaults to `DEFAULT_WIDE_BATCH_THRESHOLD`. */\n wideBatchThreshold?: number;\n /**\n * How many items one page of a batch holds in the detailed style: an expanded\n * batch with more items draws them a page at a time, and a collapsed one keeps\n * at most this many of its items in trouble in view. Defaults to\n * `DEFAULT_BATCH_PAGE_SIZE`.\n */\n batchPageSize?: number;\n /**\n * In the simple style, a parallel with more branches than this folds its\n * finished branches into one line. Defaults to `DEFAULT_WIDE_PARALLEL_THRESHOLD`.\n */\n wideParallelThreshold?: number;\n /** Appended to the container's class list. */\n className?: string;\n}\n\n/**\n * How often the reading clock ticks under each style: as often as what it draws\n * moves. The detailed style's bars grow continuously; nothing the simple style\n * draws does, so once a second is enough for its durations.\n */\nconst CLOCK_TICK_MS: Record<TimelineStyleId, number> = {\n [TIMELINE_STYLE.DETAILED]: 250,\n [TIMELINE_STYLE.SIMPLE]: 1_000,\n};\n/** Past this point on the axis a tick's label ends at its tick rather than centring on it. */\nconst TICK_RIGHT_ALIGN_PERCENT = 92;\n/** The room one tick's label takes on the axis, which sets how many ticks fit. */\nconst TICK_SPACING_PX = 64;\nconst DEFAULT_MAX_TICKS = 6;\n\n/**\n * How many tick intervals the axis has room for, from its measured width. Until\n * it is measured, and where nothing measures it, the default holds.\n */\nfunction useTickBudget(): [React.RefCallback<HTMLElement>, number] {\n const [budget, setBudget] = React.useState(DEFAULT_MAX_TICKS);\n const observer = React.useRef<ResizeObserver | null>(null);\n const ref = React.useCallback((element: HTMLElement | null) => {\n observer.current?.disconnect();\n observer.current = null;\n if (!element || typeof ResizeObserver === \"undefined\") return;\n observer.current = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width > 0) setBudget(Math.max(1, Math.floor(width / TICK_SPACING_PX)));\n });\n observer.current.observe(element);\n }, []);\n return [ref, budget];\n}\n\nconst RUN_STATUS_WORD: Record<RunProgressStatus, string> = {\n pending: \"Pending\",\n running: \"Running\",\n succeeded: \"Succeeded\",\n failed: \"Failed\",\n canceled: \"Canceled\",\n};\n\n/**\n * A status word, or the raw value for a word this version does not know: a\n * reader keeps drawing what a later contract adds rather than failing on it.\n * An invocation's status needs no table: its words are drawn as they are.\n */\nfunction wordFor<K extends string>(table: Record<K, string>, value: string): string {\n return Object.prototype.hasOwnProperty.call(table, value) ? table[value as K] : value;\n}\n\nfunction batchCountsText(batch: TimelineBatch): string | null {\n const counts = batch.counts;\n if (!counts) return null;\n let text = `${counts.done} of ${counts.total} done`;\n if (counts.running > 0) text += ` · ${counts.running} running`;\n if (counts.failed > 0) text += ` · ${counts.failed} failed`;\n return text;\n}\n\nfunction rowDetailText(row: TimelineRow, bar: TimelineBar | null): string {\n const batchText = row.batch ? batchCountsText(row.batch) : null;\n if (batchText) return batchText;\n const status = row.invocation.status;\n if (status === INVOCATION_STATUS.SCHEDULED) return \"scheduled\";\n if (status === INVOCATION_STATUS.SKIPPED) return \"skipped\";\n if (status === INVOCATION_STATUS.CANCELED) return \"canceled\";\n return bar ? formatDuration(bar.endMs - bar.startMs) : \"\";\n}\n\nfunction isRetried(invocation: ProgressInvocation): boolean {\n return invocation.attempts !== undefined && invocation.attempts > 1;\n}\n\n/** The row's tooltip: everything the snapshot says of the invocation, in words. */\nfunction rowTitle(row: TimelineRow, times: InvocationTimes, bar: TimelineBar | null): string {\n const invocation = row.invocation;\n const lines = [`${invocation.pipe_ref} · ${invocation.pipe_type}`];\n let state: string = invocation.status;\n if (times.startedMs !== null) state += `, started ${formatClockTime(times.startedMs)}`;\n if (times.endedMs !== null) state += `, ended ${formatClockTime(times.endedMs)}`;\n if (bar) state += ` (${formatDuration(bar.endMs - bar.startMs)})`;\n lines.push(state.charAt(0).toUpperCase() + state.slice(1));\n if (row.outcome) {\n // Only a condition that resolved took an outcome. A branch read off its path,\n // as every branch of a dry run is, is only the branch for that outcome.\n const outcome =\n row.outcome.key === null ? \"the default outcome\" : `the outcome ${row.outcome.key}`;\n lines.push(row.outcome.fromResolution ? `Took ${outcome}` : `The branch for ${outcome}`);\n }\n if (invocation.condition) {\n const selected = invocation.condition.selected_outcome;\n lines.push(selected === null ? \"Chose its default outcome\" : `Chose the outcome ${selected}`);\n }\n const counts = row.batch?.counts;\n if (counts) {\n lines.push(\n `${counts.total} items: ${counts.done} done, ${counts.running} running, ${counts.failed} failed`,\n );\n }\n if (invocation.skip_reason) lines.push(`Skipped: ${invocation.skip_reason}`);\n if (isRetried(invocation)) lines.push(`Tried ${invocation.attempts} times`);\n if (invocation.last_failure) {\n const at = times.failedMs;\n const { title, detail } = invocation.last_failure.problem;\n lines.push(`Last failure${at === null ? \"\" : ` at ${formatClockTime(at)}`}: ${title}`);\n lines.push(detail);\n }\n if (invocation.degradation) lines.push(`Not progressing: ${invocation.degradation.message}`);\n return lines.join(\"\\n\");\n}\n\ninterface BatchStripProps {\n batch: TimelineBatch;\n}\n\n/** The thin strip of a batch's item states, inside its bar, one cell per run of equal states. */\nfunction BatchStrip({ batch }: BatchStripProps) {\n if (batch.strip.length === 0) return null;\n return (\n <span className=\"mthds-run-timeline-strip\" aria-hidden=\"true\">\n {batch.strip.map((cell) => (\n <span\n key={cell.firstItem}\n className={`mthds-run-timeline-strip-cell mthds-run-timeline-strip-cell--${cell.status}`}\n style={{ flexGrow: cell.count }}\n />\n ))}\n </span>\n );\n}\n\n/**\n * The axis's span in milliseconds, which the timeline sets on its body: a bar's\n * place is an offset in milliseconds from the axis's start, and CSS turns it\n * into a share of the track against this span. Set by the component, not a\n * layout hook for a host.\n */\nconst AXIS_SPAN_VAR = \"--mthds-run-timeline-axis-span\";\n\n/** A number as CSS reads it: rounded to the microsecond, so never in exponent notation. */\nfunction cssNumber(value: number): string {\n return String(Math.round(value * 1000) / 1000);\n}\n\n/** A stretch of the axis, in milliseconds, as a share of the track's width. */\nfunction axisShare(ms: number): string {\n return `calc(${cssNumber(ms)} * 100% / var(${AXIS_SPAN_VAR}))`;\n}\n\ninterface FailureTickProps {\n /** When the last failure happened, when that is known. */\n atMs: number | null;\n /** The bar as drawn. */\n startMs: number;\n endMs: number;\n}\n\n/** Where the invocation's last failure happened, marked on its bar. */\nfunction FailureTick({ atMs, startMs, endMs }: FailureTickProps) {\n if (atMs === null || atMs < startMs || atMs > endMs) return null;\n const span = endMs - startMs;\n const percent = span > 0 ? ((atMs - startMs) / span) * 100 : 0;\n return (\n <span\n className=\"mthds-run-timeline-failure-tick\"\n style={{ left: `${percent}%` }}\n aria-hidden=\"true\"\n />\n );\n}\n\ninterface TimelineRowViewProps {\n row: TimelineRow;\n /** The invocation's moments, parsed once per snapshot. */\n times: InvocationTimes;\n /**\n * The axis the row's bar is measured against, `null` while nothing has\n * started. A row whose bar follows the clock (`barFollowsClock`) is handed the\n * live axis and the reading clock. Every other row is handed the snapshot's\n * recorded span, which starts where the live axis starts and holds still while\n * the clock ticks, and no clock, so its props, and with them its render, stay\n * as they are until the next snapshot. Either way the bar's place is an offset\n * from the axis's start, which CSS turns into a share of the track.\n */\n axis: TimelineWindow | null;\n nowMs: number | null;\n onToggleBatch: (path: string, expanded: boolean) => void;\n}\n\nconst TimelineRowView = React.memo(function TimelineRowView({\n row,\n times,\n axis,\n nowMs,\n onToggleBatch,\n}: TimelineRowViewProps) {\n const invocation = row.invocation;\n const status = invocation.status;\n const bar = axis ? invocationBar(invocation, axis, nowMs, times) : null;\n // The bar as drawn, kept inside the axis it is measured against.\n const drawnStartMs = bar && axis ? Math.max(bar.startMs, axis.startMs) : 0;\n const drawnEndMs =\n bar && axis ? Math.max(drawnStartMs, Math.min(bar.endMs, axis.endMs)) : drawnStartMs;\n const retried = isRetried(invocation);\n const retrying = retried && status === INVOCATION_STATUS.RUNNING;\n const batch = row.batch;\n\n const rowClasses = [\n \"mthds-run-timeline-row\",\n `mthds-run-timeline-row--${status}`,\n retrying && \"mthds-run-timeline-row--retrying\",\n retried &&\n (status === INVOCATION_STATUS.SUCCEEDED || status === INVOCATION_STATUS.SKIPPED) &&\n \"mthds-run-timeline-row--recovered\",\n invocation.degradation && \"mthds-run-timeline-row--degraded\",\n row.keptVisible && \"mthds-run-timeline-row--kept\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n const barClasses = [\n \"mthds-run-timeline-bar\",\n batch && \"mthds-run-timeline-bar--batch\",\n bar?.growing && \"mthds-run-timeline-bar--growing\",\n bar?.openEnded && \"mthds-run-timeline-bar--open-ended\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n let toggleLabel = \"\";\n if (batch) {\n toggleLabel = batch.expanded\n ? `Collapse the ${batch.total} items of ${invocation.pipe_code}`\n : `Expand the ${batch.total} items of ${invocation.pipe_code}`;\n }\n\n return (\n <li\n className={rowClasses}\n data-path={row.path}\n data-status={status}\n title={rowTitle(row, times, bar)}\n >\n <div\n className=\"mthds-run-timeline-name\"\n style={{ paddingLeft: `calc(${row.depth} * var(--mthds-run-timeline-indent))` }}\n >\n {batch ? (\n <button\n type=\"button\"\n className=\"mthds-run-timeline-toggle\"\n aria-expanded={batch.expanded}\n aria-label={toggleLabel}\n onClick={() => onToggleBatch(row.path, !batch.expanded)}\n >\n <span aria-hidden=\"true\">{batch.expanded ? \"▾\" : \"▸\"}</span>\n </button>\n ) : (\n <span className=\"mthds-run-timeline-toggle-spacer\" aria-hidden=\"true\" />\n )}\n <span className=\"mthds-run-timeline-dot\" aria-hidden=\"true\" />\n <span className=\"mthds-run-timeline-code\">{invocation.pipe_code}</span>\n {row.placeLabel && <span className=\"mthds-run-timeline-place\">{row.placeLabel}</span>}\n <span className=\"mthds-run-timeline-sr\">{`, ${status}`}</span>\n </div>\n <div className=\"mthds-run-timeline-track\">\n {bar && axis && (\n <span\n className={barClasses}\n style={{\n left: axisShare(drawnStartMs - axis.startMs),\n width: axisShare(drawnEndMs - drawnStartMs),\n }}\n >\n {batch && <BatchStrip batch={batch} />}\n <FailureTick atMs={times.failedMs} startMs={drawnStartMs} endMs={drawnEndMs} />\n </span>\n )}\n </div>\n <div className=\"mthds-run-timeline-meta\">\n {retried && (\n <span className=\"mthds-run-timeline-badge mthds-run-timeline-badge--retry\">\n <span aria-hidden=\"true\">↻ </span>\n {retrying ? `attempt ${invocation.attempts}` : `${invocation.attempts} attempts`}\n </span>\n )}\n {invocation.degradation && (\n <span className=\"mthds-run-timeline-badge mthds-run-timeline-badge--stuck\">stuck</span>\n )}\n {batch && batch.hiddenItemCount > 0 && (\n <span className=\"mthds-run-timeline-sr\">{`, ${batch.hiddenItemCount} items hidden`}</span>\n )}\n <span className=\"mthds-run-timeline-detail\">{rowDetailText(row, bar)}</span>\n </div>\n </li>\n );\n});\n\n/** A pager's React key: never a path, which keys the rows. */\nconst PAGER_KEY_PREFIX = \"pager:\";\n\n/** How a pager words an item in trouble. */\nconst TROUBLE_WORD: Record<KeptVisibleReason, string> = {\n [KEPT_VISIBLE_REASON.FAILED]: \"failed\",\n [KEPT_VISIBLE_REASON.DEGRADED]: \"stuck\",\n};\n\n/** The items in trouble a collapsed batch's cap leaves out, in words: `51 more failed · 1 more stuck`. */\nfunction troubleNotShownText(batch: TimelineBatch): string {\n return [KEPT_VISIBLE_REASON.FAILED, KEPT_VISIBLE_REASON.DEGRADED]\n .filter((reason) => batch.troubleNotShown[reason] > 0)\n .map((reason) => `${batch.troubleNotShown[reason]} more ${TROUBLE_WORD[reason]}`)\n .join(\" · \");\n}\n\ninterface ItemPagerViewProps {\n pager: TimelineItemPager;\n onToggleBatch: (path: string, expanded: boolean) => void;\n onTurnPage: (path: string, page: number) => void;\n}\n\n/**\n * A batch's pager, a row of the list at its items' depth. Expanded over several\n * pages, it holds Previous and Next, the range drawn, and the jump to the next\n * item in trouble when one lies off the page. Collapsed, it says how many items\n * in trouble the cap leaves out, with a button opening the batch on the page of\n * the first.\n *\n * Keyed by its batch, so a page turn keeps it and the button pressed keeps\n * focus. Previous and Next are `aria-disabled` at their ends rather than\n * disabled, so a button the reader is on stays focused when it reaches its end;\n * a button that goes away with the turn hands focus to the pager's first.\n */\nconst ItemPagerView = React.memo(function ItemPagerView({\n pager,\n onToggleBatch,\n onTurnPage,\n}: ItemPagerViewProps) {\n const { batch, batchPath, pipeCode, depth } = pager;\n const navRef = React.useRef<HTMLElement | null>(null);\n const refocusRef = React.useRef(false);\n React.useEffect(() => {\n if (!refocusRef.current) return;\n refocusRef.current = false;\n const nav = navRef.current;\n if (nav && !nav.contains(document.activeElement)) nav.querySelector(\"button\")?.focus();\n });\n const turn = (page: number, expand: boolean) => {\n refocusRef.current = true;\n onTurnPage(batchPath, page);\n if (expand) onToggleBatch(batchPath, true);\n };\n const page = batch.page;\n const jump = batch.nextTrouble;\n\n let content: React.ReactNode;\n if (batch.expanded && page) {\n const atFirst = page.index === 0;\n const atLast = page.index === page.count - 1;\n content = (\n <>\n <button\n key=\"previous\"\n type=\"button\"\n className=\"mthds-run-timeline-pager-btn\"\n aria-disabled={atFirst}\n onClick={() => !atFirst && turn(page.index - 1, false)}\n >\n <span aria-hidden=\"true\">‹</span>Previous\n </button>\n <span key=\"range\" className=\"mthds-run-timeline-pager-range\" aria-live=\"polite\">\n {`Items ${page.firstItem}–${page.lastItem} of ${page.itemCount}`}\n </span>\n <button\n key=\"next\"\n type=\"button\"\n className=\"mthds-run-timeline-pager-btn\"\n aria-disabled={atLast}\n onClick={() => !atLast && turn(page.index + 1, false)}\n >\n Next<span aria-hidden=\"true\">›</span>\n </button>\n {jump && (\n <button\n key=\"jump\"\n type=\"button\"\n className={`mthds-run-timeline-pager-btn mthds-run-timeline-pager-jump mthds-run-timeline-pager-jump--${jump.reason}`}\n onClick={() => turn(jump.page, false)}\n >\n {`Next ${TROUBLE_WORD[jump.reason]} · item ${jump.item}`}\n </button>\n )}\n </>\n );\n } else {\n content = (\n <>\n <span key=\"more\" className=\"mthds-run-timeline-pager-more\">\n {troubleNotShownText(batch)}\n </span>\n {jump && (\n <button\n key=\"expand\"\n type=\"button\"\n className={`mthds-run-timeline-pager-btn mthds-run-timeline-pager-jump mthds-run-timeline-pager-jump--${jump.reason}`}\n onClick={() => turn(jump.page, true)}\n >\n {`Expand at item ${jump.item}`}\n </button>\n )}\n </>\n );\n }\n\n return (\n <li\n className=\"mthds-run-timeline-pager\"\n data-pager-for={batchPath}\n style={{ paddingLeft: `calc(${depth} * var(--mthds-run-timeline-indent))` }}\n >\n <nav\n ref={navRef}\n className=\"mthds-run-timeline-pager-nav\"\n aria-label={`Items of ${pipeCode}`}\n >\n {content}\n </nav>\n </li>\n );\n});\n\n/**\n * A run's progress as a timeline, drawn from its progress snapshot alone: one\n * row per invocation, nested under its controller by its path and labelled with\n * its pipe code, and a bar on a shared time axis from the invocation's start to\n * its end, which grows while it runs.\n *\n * Nothing is drawn in advance: a row appears when the run reaches its\n * invocation, so there is no method graph behind it and no batch width is ever\n * guessed. A batch is one collapsible row carrying its counts and a strip of its\n * items' states; a wide one starts collapsed and keeps its failed items in view,\n * a page of them at most, and an expanded one draws its items a page at a time.\n * A condition's branch carries the outcome it took. A retried invocation shows\n * its attempts and where its last failure happened, and the invocation where\n * the run is stuck says so.\n *\n * Rows are keyed by path, so repainting with a newer snapshot keeps each drawn\n * row in place, what the reader expanded expanded, and each batch on the page\n * the reader turned it to. While the clock ticks,\n * only the axis and the rows whose bars follow the clock are drawn again.\n */\nexport function RunTimeline({\n snapshot,\n theme = GRAPH_THEME_MODE.SYSTEM,\n systemTheme,\n paletteColors,\n now,\n live = true,\n timelineStyle,\n onTimelineStyleChange,\n styleMenu,\n pipeRegistry,\n entryPipeRef,\n wideBatchThreshold,\n batchPageSize,\n wideParallelThreshold,\n className,\n}: RunTimelineProps) {\n const held = useHeldSnapshot(snapshot);\n const streamKey = progressStreamKey(held);\n\n // A fixed theme is handed to the hook as if injected, so it registers no\n // `prefers-color-scheme` listener whose answer would be thrown away.\n const environmentTheme = useSystemTheme(theme === GRAPH_THEME_MODE.SYSTEM ? systemTheme : theme);\n const resolvedTheme: GraphTheme = theme === GRAPH_THEME_MODE.SYSTEM ? environmentTheme : theme;\n // The theme's palette is the base; the host's `paletteColors` win per key, as on `GraphViewer`.\n const paletteStyle = React.useMemo(\n () => ({ ...getPaletteForTheme(resolvedTheme), ...paletteColors }) as React.CSSProperties,\n [resolvedTheme, paletteColors],\n );\n const containerClassName = [\n \"mthds-run-timeline\",\n `mthds-run-timeline--${resolvedTheme}`,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n // The style follows the graph viewer's controlled and reactive contract: the\n // prop's resolution is adopted whenever it changes, and the menu changes the\n // style in between. Derived during render, so a new prop never draws a frame\n // in the old style.\n const externalStyle = resolveTimelineStyle(timelineStyle);\n const [styleState, setStyleState] = React.useState({\n external: externalStyle,\n active: externalStyle,\n });\n if (styleState.external !== externalStyle) {\n setStyleState({ external: externalStyle, active: externalStyle });\n }\n const activeStyle = styleState.external === externalStyle ? styleState.active : externalStyle;\n const onTimelineStyleChangeRef = React.useRef(onTimelineStyleChange);\n onTimelineStyleChangeRef.current = onTimelineStyleChange;\n const reportedStyleRef = React.useRef(activeStyle);\n React.useEffect(() => {\n if (reportedStyleRef.current !== activeStyle) {\n reportedStyleRef.current = activeStyle;\n onTimelineStyleChangeRef.current?.(activeStyle);\n }\n }, [activeStyle]);\n const styleMenuOptions = React.useMemo(() => resolveTimelineStyleMenu(styleMenu), [styleMenu]);\n // A choice redraws the view the menu sits in, so the button the reader chose\n // from is gone: focus goes to the new one, once it is drawn.\n const menuSlotRef = React.useRef<HTMLDivElement | null>(null);\n const refocusMenuRef = React.useRef(false);\n const chooseStyle = React.useCallback((style: TimelineStyleId) => {\n refocusMenuRef.current = true;\n setStyleState((state) => ({ ...state, active: style }));\n }, []);\n React.useEffect(() => {\n if (!refocusMenuRef.current) return;\n refocusMenuRef.current = false;\n menuSlotRef.current?.querySelector(\"button\")?.focus();\n }, [styleState]);\n const headerEnd =\n styleMenuOptions.length > 0 ? (\n <TimelineStyleMenu\n value={activeStyle}\n options={styleMenuOptions}\n onChange={chooseStyle}\n slotRef={menuSlotRef}\n />\n ) : null;\n\n // What every style shares lives above the switch between them, so changing\n // style never moves the clock back or forgets what the reader opened: the\n // snapshot's moments, one reading clock ticking as often as the active\n // style's drawing moves, each style's expansion, and the detailed style's pages.\n const times = React.useMemo(() => snapshotTimes(held), [held]);\n const followsClock = React.useMemo(\n () =>\n held.invocations.some((invocation) =>\n barFollowsClock(invocation, times.invocations.get(invocation.path)),\n ),\n [held, times],\n );\n const clock = useReadingClock(held, streamKey, {\n now,\n live,\n followsClock,\n tickMs: CLOCK_TICK_MS[activeStyle],\n });\n const detailedExpansion = useStreamRecord<boolean>(streamKey);\n const detailedPages = useStreamRecord<number>(streamKey);\n const simpleExpansion = useStreamRecord<boolean>(streamKey);\n\n // Keyed by style, so a new style fails to compile until it has a view.\n const views: Record<TimelineStyleId, () => React.ReactElement> = {\n [TIMELINE_STYLE.SIMPLE]: () => (\n <SimpleProgressView\n held={held}\n stream={streamKey}\n times={times}\n nowMs={clock.nowMs}\n ticking={clock.ticking}\n expanded={simpleExpansion.values}\n onToggle={simpleExpansion.set}\n pipeRegistry={pipeRegistry}\n entryPipeRef={entryPipeRef}\n wideParallelThreshold={wideParallelThreshold}\n containerClassName={containerClassName}\n containerStyle={paletteStyle}\n headerEnd={headerEnd}\n />\n ),\n [TIMELINE_STYLE.DETAILED]: () => (\n <DetailedTimeline\n held={held}\n times={times}\n nowMs={clock.nowMs}\n ticking={clock.ticking}\n expandedBatches={detailedExpansion.values}\n onToggleBatch={detailedExpansion.set}\n batchPages={detailedPages.values}\n onTurnPage={detailedPages.set}\n wideBatchThreshold={wideBatchThreshold}\n batchPageSize={batchPageSize}\n containerClassName={containerClassName}\n containerStyle={paletteStyle}\n headerEnd={headerEnd}\n />\n ),\n };\n return views[activeStyle]();\n}\n\n/** What `RunTimeline` hands the detailed style: the snapshot it holds, the reading clock, the reader's expansion and pages, which outlive a style switch, and its own props. */\ninterface DetailedTimelineProps {\n held: ProgressSnapshot;\n times: SnapshotTimes;\n /** The reading clock, and whether it ticks on its own. */\n nowMs: number | null;\n ticking: boolean;\n /** The batches the reader opened or closed, by path. */\n expandedBatches: Readonly<Record<string, boolean>>;\n onToggleBatch: (path: string, expanded: boolean) => void;\n /** The page the reader turned each batch to, by path. */\n batchPages: Readonly<Record<string, number>>;\n onTurnPage: (path: string, page: number) => void;\n wideBatchThreshold: number | undefined;\n batchPageSize: number | undefined;\n containerClassName: string;\n containerStyle: React.CSSProperties;\n /** What `RunTimeline` puts at the end of the header: the style menu, when shown. */\n headerEnd: React.ReactNode;\n}\n\n/** An entry as the detailed style draws it: a row with its moments parsed once per snapshot, or a pager. */\ntype DrawnEntry =\n | {\n kind: typeof TIMELINE_ENTRY_KIND.INVOCATION;\n row: TimelineRow;\n times: InvocationTimes;\n followsClock: boolean;\n }\n | TimelineItemPager;\n\n/** The detailed style: every invocation as a row with its bar on the shared axis, and each paged batch's pager. */\nfunction DetailedTimeline({\n held,\n times,\n nowMs,\n ticking,\n expandedBatches,\n onToggleBatch: toggleBatch,\n batchPages,\n onTurnPage: turnPage,\n wideBatchThreshold,\n batchPageSize,\n containerClassName,\n containerStyle,\n headerEnd,\n}: DetailedTimelineProps) {\n const entries = React.useMemo(\n () =>\n buildTimelineRows(held, { expandedBatches, wideBatchThreshold, batchPages, batchPageSize }),\n [held, expandedBatches, wideBatchThreshold, batchPages, batchPageSize],\n );\n const drawnEntries = React.useMemo(\n () =>\n entries.map((entry): DrawnEntry => {\n if (entry.kind === TIMELINE_ENTRY_KIND.PAGER) return entry;\n const rowTimes = times.invocations.get(entry.path) ?? invocationTimes(entry.invocation);\n return {\n kind: entry.kind,\n row: entry,\n times: rowTimes,\n followsClock: barFollowsClock(entry.invocation, rowTimes),\n };\n }),\n [entries, times],\n );\n const axis = timelineWindowAt(times, nowMs);\n const [axisTrackRef, tickBudget] = useTickBudget();\n const ticks = axis ? timelineTicks(axis, tickBudget) : [];\n const bodyStyle = axis\n ? ({ [AXIS_SPAN_VAR]: cssNumber(axis.endMs - axis.startMs) } as React.CSSProperties)\n : undefined;\n\n const containerClasses = [containerClassName, ticking && \"mthds-run-timeline--self-clocked\"]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <section\n className={containerClasses}\n style={containerStyle}\n aria-label=\"Run progress\"\n data-run-status={held.status}\n data-version={held.version}\n >\n <header className=\"mthds-run-timeline-header\">\n <span\n className={`mthds-run-timeline-status mthds-run-timeline-status--${held.status}`}\n data-testid=\"run-timeline-status\"\n >\n {wordFor(RUN_STATUS_WORD, held.status)}\n </span>\n {held.mode === PROGRESS_MODE.DRY && (\n <span className=\"mthds-run-timeline-mode\">Dry run</span>\n )}\n <p className=\"mthds-run-timeline-summary\" aria-live=\"polite\">\n {held.summary}\n </p>\n {headerEnd}\n </header>\n {held.degradation && (\n <p className=\"mthds-run-timeline-degradation\" role=\"status\">\n {held.degradation.message}\n </p>\n )}\n {entries.length === 0 ? (\n // A run that ended with nothing to draw, failed or canceled before its\n // first invocation started, is waiting for nothing.\n <p className=\"mthds-run-timeline-empty\">\n {isRunEnded(held.status) ? \"No progress was recorded.\" : \"Nothing has started yet.\"}\n </p>\n ) : (\n <div className=\"mthds-run-timeline-body\" style={bodyStyle}>\n {axis && (\n <div className=\"mthds-run-timeline-axis\" aria-hidden=\"true\">\n <span className=\"mthds-run-timeline-axis-spacer\" />\n <span className=\"mthds-run-timeline-axis-track\" ref={axisTrackRef}>\n {ticks.map((tick) => (\n <span\n key={tick.offsetMs}\n className={[\n \"mthds-run-timeline-tick\",\n tick.percent === 0 && \"mthds-run-timeline-tick--first\",\n tick.percent > TICK_RIGHT_ALIGN_PERCENT && \"mthds-run-timeline-tick--last\",\n ]\n .filter(Boolean)\n .join(\" \")}\n style={{ left: `${tick.percent}%` }}\n >\n {tick.label}\n </span>\n ))}\n </span>\n <span className=\"mthds-run-timeline-axis-spacer\" />\n </div>\n )}\n <ol className=\"mthds-run-timeline-rows\">\n {drawnEntries.map((drawn) =>\n drawn.kind === TIMELINE_ENTRY_KIND.PAGER ? (\n <ItemPagerView\n key={`${PAGER_KEY_PREFIX}${drawn.batchPath}`}\n pager={drawn}\n onToggleBatch={toggleBatch}\n onTurnPage={turnPage}\n />\n ) : (\n <TimelineRowView\n key={drawn.row.path}\n row={drawn.row}\n times={drawn.times}\n axis={drawn.followsClock ? axis : times.recorded}\n nowMs={drawn.followsClock ? nowMs : null}\n onToggleBatch={toggleBatch}\n />\n ),\n )}\n </ol>\n </div>\n )}\n </section>\n );\n}\n","\"use client\";\n\n/**\n * The snapshot a timeline draws and the clock it reads it against, shared by\n * every timeline style: the fresher of the snapshots it was handed, and a\n * reading clock that starts from the snapshot's `assembled_at` and never steps\n * back within one stream of progress. A style decides only how often its clock\n * ticks and whether anything it draws follows it.\n */\nimport * as React from \"react\";\nimport {\n isRunEnded,\n type ProgressSnapshot,\n type ProgressTimestamp,\n} from \"@timeline/progressSnapshot\";\nimport { fresherSnapshot } from \"@timeline/snapshotFreshness\";\nimport { readingClockMs } from \"@timeline/timelineTime\";\n\n/**\n * The snapshot to draw: of the one held and the one just passed, the fresher by\n * the contract's rule. React's derived-state pattern rather than an effect, so\n * the render that receives a stale snapshot never paints it, not even once.\n */\nexport function useHeldSnapshot(snapshot: ProgressSnapshot): ProgressSnapshot {\n const [state, setState] = React.useState({ given: snapshot, held: snapshot });\n if (state.given !== snapshot) {\n const held = fresherSnapshot(state.held, snapshot);\n setState({ given: snapshot, held });\n return held;\n }\n return state.held;\n}\n\n/** What the clock last showed, for which stream and which reading, and whether it ticked on its own. */\ninterface SelfClock {\n stream: string;\n base: number | null;\n ticking: boolean;\n ms: number | null;\n}\n\nexport interface ReadingClockOptions {\n /** The moment the host pinned, as on `RunTimelineProps.now`. */\n now: ProgressTimestamp | number | undefined;\n /** Whether the clock may tick on its own while the run goes on. */\n live: boolean;\n /** Whether anything drawn follows the clock: with nothing, a tick would redraw nothing that moves. */\n followsClock: boolean;\n /** How often the clock ticks, in milliseconds. */\n tickMs: number;\n}\n\n/**\n * The reading clock, in epoch milliseconds. Pinned by `now` when the host sets\n * it; otherwise the snapshot's `assembled_at`, advanced while the run goes on by\n * the time this page has measured since. It ticks every `tickMs` only while a\n * drawn element follows it (`followsClock`).\n *\n * The self-ticking clock never goes back within one stream of progress. A\n * snapshot that took long to arrive can carry an `assembled_at` older than the\n * moment the clock already shows; the clock then carries on from what it\n * showed, the later of the two readings, rather than jumping back, so nothing\n * that grows with it shrinks and grows again. That floor comes only from a\n * clock that was itself ticking in the same stream: a moment the host pinned\n * with `now`, or a clock standing still, is not one this clock reached on its\n * own, so a clock that starts ticking starts from its snapshot's reading. A\n * snapshot of another stream starts the clock afresh from its own reading.\n */\nexport function useReadingClock(\n held: ProgressSnapshot,\n stream: string,\n { now, live, followsClock, tickMs }: ReadingClockOptions,\n): { nowMs: number | null; ticking: boolean } {\n const base = React.useMemo(() => readingClockMs(held, now), [held, now]);\n const ticking =\n live && now === undefined && base !== null && !isRunEnded(held.status) && followsClock;\n const [clock, setClock] = React.useState<SelfClock>({\n stream,\n base,\n ticking,\n ms: base,\n });\n let shown = clock;\n if (clock.stream !== stream || clock.base !== base || clock.ticking !== ticking) {\n // React's derived-state pattern, as in `useHeldSnapshot`: the render that\n // receives the new reading already shows the clock it starts from.\n const floor = ticking && clock.ticking && clock.stream === stream ? clock.ms : null;\n const ms = base !== null && floor !== null ? Math.max(base, floor) : base;\n shown = { stream, base, ticking, ms };\n setClock(shown);\n }\n React.useEffect(() => {\n if (!ticking) return undefined;\n let previous = performance.now();\n const timer = window.setInterval(() => {\n const current = performance.now();\n const step = current - previous;\n previous = current;\n setClock((state) =>\n state.stream === stream && state.base === base && state.ticking && state.ms !== null\n ? { ...state, ms: state.ms + step }\n : state,\n );\n }, tickMs);\n return () => window.clearInterval(timer);\n }, [ticking, stream, base, tickMs]);\n return { nowMs: ticking ? shown.ms : base, ticking };\n}\n","\"use client\";\n\n/**\n * What the reader chose in a timeline, by key, for one stream of progress: a\n * snapshot of another stream starts afresh. `RunTimeline` holds one record per\n * style of what the reader opened or closed, and one of the pages the reader\n * turned the detailed style's batches to, all above the switch between styles,\n * so changing style and back keeps every choice.\n */\nimport * as React from \"react\";\n\nconst EMPTY_RECORD: Readonly<Record<string, never>> = Object.freeze({});\n\n/** Nothing recorded: every line, row or batch takes its default. */\nfunction emptyRecord<V>(): Readonly<Record<string, V>> {\n return EMPTY_RECORD;\n}\n\nexport interface StreamRecord<V> {\n /** What the reader chose, by key, in the current stream. */\n values: Readonly<Record<string, V>>;\n /** Records a choice; stable within a stream, so a memoized line it is handed to keeps still. */\n set: (key: string, value: V) => void;\n}\n\nexport function useStreamRecord<V>(stream: string): StreamRecord<V> {\n const [state, setState] = React.useState<{\n stream: string;\n values: Readonly<Record<string, V>>;\n }>({ stream, values: emptyRecord<V>() });\n if (state.stream !== stream) {\n // Another stream is drawn: its choices are dropped, not kept for a return to it.\n setState({ stream, values: emptyRecord<V>() });\n }\n const set = React.useCallback(\n (key: string, value: V) => {\n setState((previous) => ({\n stream,\n values: {\n ...(previous.stream === stream ? previous.values : emptyRecord<V>()),\n [key]: value,\n },\n }));\n },\n [stream],\n );\n return { values: state.stream === stream ? state.values : emptyRecord<V>(), set };\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport type { Problem } from \"mthds/errors\";\nimport {\n PROGRESS_MODE,\n RUN_PROGRESS_STATUS,\n timestampMs,\n type ProgressDegradation,\n type ProgressSnapshot,\n} from \"@timeline/progressSnapshot\";\nimport {\n SIMPLE_LINE_KIND,\n SIMPLE_LINE_STATE,\n SIMPLE_RUN_NOTE_REASON,\n buildSimpleProgress,\n simpleProgressChanges,\n type SimpleLineState,\n type SimpleProgress,\n type SimpleProgressLine,\n type SimpleRunNote,\n} from \"@timeline/styles/simpleProgress\";\nimport type { TimelinePipeRegistry } from \"@timeline/styles/registryJoin\";\nimport { invocationTimes, type SnapshotTimes } from \"@timeline/timelineTime\";\nimport {\n DEFAULT_SIMPLE_PROGRESS_STRINGS,\n type SimpleProgressStrings,\n} from \"./simpleProgressStrings\";\n\n/**\n * What `RunTimeline` hands the simple style: the snapshot it holds and its\n * stream, the reading clock and the reader's expansion, which every style\n * shares, and its own props.\n */\nexport interface SimpleProgressViewProps {\n held: ProgressSnapshot;\n stream: string;\n /** Every timestamp of the snapshot, parsed once. */\n times: SnapshotTimes;\n /** The reading clock, and whether it ticks on its own. */\n nowMs: number | null;\n ticking: boolean;\n /** The lines the reader opened or closed, by key. */\n expanded: Readonly<Record<string, boolean>>;\n onToggle: (key: string, expanded: boolean) => void;\n pipeRegistry?: TimelinePipeRegistry;\n entryPipeRef?: string;\n wideParallelThreshold?: number;\n /** The container's classes and palette, which `RunTimeline` resolves for every style. */\n containerClassName: string;\n containerStyle: React.CSSProperties;\n /** What `RunTimeline` puts at the end of the header: the style menu, when shown. */\n headerEnd?: React.ReactNode;\n strings?: SimpleProgressStrings;\n}\n\n/** A state's mark: drawn, never a glyph, so it reads the same in every font. */\nfunction StateMark({ state }: { state: SimpleLineState }) {\n let shape: React.ReactNode = null;\n switch (state) {\n case SIMPLE_LINE_STATE.DONE:\n shape = <path d=\"M3.5 6.2 5.3 8l3.4-3.8\" fill=\"none\" strokeWidth=\"1.6\" />;\n break;\n case SIMPLE_LINE_STATE.FAILED:\n shape = <path d=\"M4 4l4 4M8 4l-4 4\" fill=\"none\" strokeWidth=\"1.6\" />;\n break;\n case SIMPLE_LINE_STATE.SKIPPED:\n shape = <path d=\"M3.8 6h4.4\" fill=\"none\" strokeWidth=\"1.4\" />;\n break;\n case SIMPLE_LINE_STATE.STOPPED:\n shape = <rect x=\"4\" y=\"4\" width=\"4\" height=\"4\" rx=\"0.5\" />;\n break;\n case SIMPLE_LINE_STATE.NOT_RUN:\n shape = <path d=\"M3.8 6h4.4\" fill=\"none\" strokeWidth=\"1.2\" />;\n break;\n default:\n shape = null;\n }\n return (\n <svg\n className={`mthds-simple-progress-mark mthds-simple-progress-mark--${state}`}\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <circle className=\"mthds-simple-progress-mark-ring\" cx=\"6\" cy=\"6\" r=\"5.2\" />\n {state === SIMPLE_LINE_STATE.RUNNING && (\n <path className=\"mthds-simple-progress-mark-arc\" d=\"M6 0.8a5.2 5.2 0 0 1 5.2 5.2\" />\n )}\n {shape}\n </svg>\n );\n}\n\n/** The platform's own words, behind a disclosure. */\nfunction Details({ label, children }: { label: string; children: React.ReactNode }) {\n return (\n <details className=\"mthds-simple-progress-details\">\n <summary>{label}</summary>\n <div className=\"mthds-simple-progress-details-body\">{children}</div>\n </details>\n );\n}\n\nfunction ProblemDetails({\n problem,\n strings,\n}: {\n problem: Problem;\n strings: SimpleProgressStrings;\n}) {\n const nextStep = problem.next_step?.detail;\n return (\n <Details label={strings.details}>\n <p>{problem.detail}</p>\n {nextStep && <p>{nextStep}</p>}\n </Details>\n );\n}\n\nfunction untilOf(degradation: ProgressDegradation, strings: SimpleProgressStrings): string | null {\n const ms = timestampMs(degradation.ends_at);\n return ms === null ? null : strings.clockTime(ms);\n}\n\ninterface NoteProps {\n tone: \"warning\" | \"error\" | \"muted\";\n children: React.ReactNode;\n}\n\nfunction Note({ tone, children }: NoteProps) {\n return (\n <div className={`mthds-simple-progress-note mthds-simple-progress-note--${tone}`}>\n {children}\n </div>\n );\n}\n\n/**\n * A line's health, worded: trying again, stuck, or the problem it failed with.\n * A line that counts items, a for-each line or a branch step, says how many of\n * its items are in trouble, `item` being what one is called.\n */\nfunction HealthNotes({\n line,\n item,\n strings,\n}: {\n line: SimpleProgressLine;\n item: string | null;\n strings: SimpleProgressStrings;\n}) {\n const health = line.health;\n if (!health) return null;\n const notes: React.ReactNode[] = [];\n if (health.problem) {\n notes.push(\n <Note key=\"problem\" tone=\"error\">\n <p>{health.problem.title}</p>\n <ProblemDetails problem={health.problem} strings={strings} />\n </Note>,\n );\n }\n if (health.retryingItems > 0) {\n notes.push(\n <Note key=\"retrying\" tone=\"warning\">\n <p>{strings.tryingAgainItems(health.retryingItems, item)}</p>\n </Note>,\n );\n } else if (health.retryAttempt !== null) {\n notes.push(\n <Note key=\"retrying\" tone=\"warning\">\n <p>{strings.tryingAgain(health.retryAttempt)}</p>\n </Note>,\n );\n }\n if (health.degradation) {\n const until = untilOf(health.degradation, strings);\n notes.push(\n <Note key=\"stuck\" tone=\"warning\">\n <p>\n {health.stuckItems > 0\n ? strings.havingTroubleItems(health.stuckItems, item, until)\n : strings.havingTrouble(until)}\n </p>\n <Details label={strings.details}>\n <p>{health.degradation.message}</p>\n </Details>\n </Note>,\n );\n }\n return notes.length > 0 ? <div className=\"mthds-simple-progress-notes\">{notes}</div> : null;\n}\n\n/** A batch's determinate bar and its counts in words. */\nfunction BatchCounts({\n line,\n strings,\n}: {\n line: SimpleProgressLine;\n strings: SimpleProgressStrings;\n}) {\n const counts = line.counts;\n if (!counts || counts.total <= 0) return null;\n const share = (count: number) => `${(Math.min(count, counts.total) / counts.total) * 100}%`;\n // The contract counts a skipped item as done; the reader counts it apart, so\n // that what is done, failed, skipped and going on adds up to the total.\n const skipped = Math.min(line.skippedItems, counts.done);\n const finished = counts.done - skipped;\n const text = strings.batchCounts(finished, counts.total, counts.running, counts.failed, skipped);\n const segments = [\n [\"done\", finished],\n [\"skipped\", skipped],\n [\"failed\", counts.failed],\n [\"running\", counts.running],\n ] as const;\n return (\n <div className=\"mthds-simple-progress-batch\">\n <div\n className=\"mthds-simple-progress-bar\"\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={counts.total}\n aria-valuenow={finished}\n aria-valuetext={text}\n >\n {segments.map(([name, count]) =>\n count > 0 ? (\n <span\n key={name}\n className={`mthds-simple-progress-bar-${name}`}\n style={{ width: share(count) }}\n />\n ) : null,\n )}\n </div>\n <span className=\"mthds-simple-progress-counts\" aria-hidden=\"true\">\n {text}\n </span>\n </div>\n );\n}\n\nconst TALLY_ORDER = [\n SIMPLE_LINE_STATE.DONE,\n SIMPLE_LINE_STATE.RUNNING,\n SIMPLE_LINE_STATE.FAILED,\n SIMPLE_LINE_STATE.SKIPPED,\n SIMPLE_LINE_STATE.STOPPED,\n] as const;\n\n/** A branch step's items at each state: a mark and a count each. */\nfunction Tally({ line, strings }: { line: SimpleProgressLine; strings: SimpleProgressStrings }) {\n const tally = line.tally;\n if (!tally) return null;\n return (\n <span className=\"mthds-simple-progress-tally\">\n {TALLY_ORDER.filter((state) => tally[state] > 0).map((state) => (\n <span key={state} className=\"mthds-simple-progress-tally-entry\" aria-hidden=\"true\">\n <StateMark state={state} />\n {tally[state]}\n </span>\n ))}\n <span className=\"mthds-run-timeline-sr\">{`, ${strings.tally(tally)}`}</span>\n </span>\n );\n}\n\n/** A line's duration once ended, its elapsed time while it runs, or its state where it has neither. */\nfunction timeText(\n line: SimpleProgressLine,\n nowMs: number | null,\n strings: SimpleProgressStrings,\n): string | null {\n if (\n line.state === SIMPLE_LINE_STATE.SKIPPED ||\n line.state === SIMPLE_LINE_STATE.STOPPED ||\n line.state === SIMPLE_LINE_STATE.NOT_RUN\n ) {\n return strings.state[line.state];\n }\n const invocation = line.invocation;\n if (!invocation || line.kind === SIMPLE_LINE_KIND.NOW) return null;\n const times = invocationTimes(invocation);\n if (times.startedMs === null) return null;\n if (times.endedMs !== null) return strings.duration(times.endedMs - times.startedMs);\n if (line.state === SIMPLE_LINE_STATE.RUNNING && nowMs !== null) {\n return strings.elapsed(nowMs - times.startedMs);\n }\n return null;\n}\n\ninterface LineViewProps {\n line: SimpleProgressLine;\n /** What one of the items is called, on a line that counts them: its own on a for-each line, its batch's on a branch step. */\n item: string | null;\n /**\n * The reading clock, handed only to a line that runs or holds a drawn line\n * that runs, so the others stay as they are while it ticks.\n */\n nowMs: number | null;\n onToggle: (key: string, expanded: boolean) => void;\n strings: SimpleProgressStrings;\n}\n\n/** Whether a line runs, or holds a drawn line that runs: what decides that it is handed the clock. */\nfunction followsClock(line: SimpleProgressLine): boolean {\n return line.state === SIMPLE_LINE_STATE.RUNNING || line.children.some(followsClock);\n}\n\n/** What one of a child's items is called: its own on a for-each line, else its parent's on a for-each line's branch step. */\nfunction itemOfChild(parent: SimpleProgressLine, child: SimpleProgressLine): string | null {\n if (child.kind === SIMPLE_LINE_KIND.FOR_EACH) return child.forEachItem;\n return parent.kind === SIMPLE_LINE_KIND.FOR_EACH ? parent.forEachItem : null;\n}\n\nconst LineView = React.memo(function LineView({\n line,\n item,\n nowMs,\n onToggle,\n strings,\n}: LineViewProps) {\n const time = timeText(line, line.state === SIMPLE_LINE_STATE.RUNNING ? nowMs : null, strings);\n const classes = [\n \"mthds-simple-progress-line\",\n `mthds-simple-progress-line--${line.state}`,\n `mthds-simple-progress-line--${line.kind}`,\n ].join(\" \");\n const title =\n line.kind === SIMPLE_LINE_KIND.FINISHED\n ? strings.finishedBranches(line.foldedCount ?? 0)\n : line.title;\n return (\n <li className={classes} data-key={line.key} data-state={line.state}>\n <div className=\"mthds-simple-progress-row\">\n <StateMark state={line.state} />\n <span className=\"mthds-simple-progress-title\">\n {line.kind === SIMPLE_LINE_KIND.NOW && (\n <span className=\"mthds-simple-progress-now\">{strings.now} </span>\n )}\n <span className=\"mthds-simple-progress-name\">{title}</span>\n {line.kind === SIMPLE_LINE_KIND.FOR_EACH && (\n <span className=\"mthds-simple-progress-tag\">{` · ${strings.forEach(line.forEachItem)}`}</span>\n )}\n {line.kind === SIMPLE_LINE_KIND.TOGETHER && (\n <span className=\"mthds-simple-progress-tag\">{` · ${strings.together}`}</span>\n )}\n {line.outcome && (\n <span className=\"mthds-simple-progress-outcome\">\n {line.outcome.resolved\n ? strings.outcomeTaken(line.outcome.key)\n : strings.branchFor(line.outcome.key)}\n </span>\n )}\n <span className=\"mthds-run-timeline-sr\">{`, ${strings.state[line.state]}`}</span>\n </span>\n <Tally line={line} strings={strings} />\n {time !== null && <span className=\"mthds-simple-progress-time\">{time}</span>}\n {line.expandable ? (\n <button\n type=\"button\"\n className=\"mthds-run-timeline-toggle mthds-simple-progress-toggle\"\n aria-expanded={line.expanded}\n aria-label={line.expanded ? strings.collapse(title) : strings.expand(title)}\n onClick={() => onToggle(line.key, !line.expanded)}\n >\n <svg\n className=\"mthds-simple-progress-chevron\"\n viewBox=\"0 0 12 12\"\n width=\"12\"\n height=\"12\"\n aria-hidden=\"true\"\n >\n <path d=\"M4.5 2.5 8 6l-3.5 3.5\" />\n </svg>\n </button>\n ) : (\n <span className=\"mthds-simple-progress-toggle-spacer\" aria-hidden=\"true\" />\n )}\n </div>\n <BatchCounts line={line} strings={strings} />\n <HealthNotes line={line} item={item} strings={strings} />\n {line.expanded && line.children.length > 0 && (\n <ol className=\"mthds-simple-progress-lines mthds-simple-progress-lines--nested\">\n {line.children.map((child) => (\n <LineView\n key={child.key}\n line={child}\n item={itemOfChild(line, child)}\n nowMs={followsClock(child) ? nowMs : null}\n onToggle={onToggle}\n strings={strings}\n />\n ))}\n </ol>\n )}\n </li>\n );\n});\n\n/** The run's elapsed time: from its first start to the reading clock while it goes on, to its last recorded moment once ended. */\nfunction runElapsedMs(\n progress: SimpleProgress,\n times: SnapshotTimes,\n nowMs: number | null,\n): number | null {\n const recorded = times.recorded;\n if (!recorded) return null;\n if (progress.status === RUN_PROGRESS_STATUS.RUNNING && nowMs !== null) {\n return Math.max(0, Math.max(nowMs, recorded.endMs) - recorded.startMs);\n }\n return recorded.endMs - recorded.startMs;\n}\n\nfunction findLine(lines: SimpleProgressLine[], key: string): SimpleProgressLine | null {\n for (const line of lines) {\n if (line.key === key) return line;\n }\n return null;\n}\n\nfunction headlineOf(\n progress: SimpleProgress,\n elapsedMs: number | null,\n strings: SimpleProgressStrings,\n): string {\n let elapsed: string | null = null;\n if (elapsedMs !== null) {\n elapsed =\n progress.status === RUN_PROGRESS_STATUS.RUNNING\n ? strings.elapsed(elapsedMs)\n : strings.duration(elapsedMs);\n }\n const nothing = progress.lines.length === 0;\n switch (progress.status) {\n case RUN_PROGRESS_STATUS.PENDING:\n return strings.waiting;\n case RUN_PROGRESS_STATUS.SUCCEEDED:\n return strings.done(elapsed);\n case RUN_PROGRESS_STATUS.FAILED: {\n if (nothing && elapsedMs === null) return strings.nothingRecorded;\n const key = progress.failure?.lineKey ?? null;\n const where = key === null ? null : (findLine(progress.lines, key)?.title ?? null);\n return strings.failed(where, elapsed);\n }\n case RUN_PROGRESS_STATUS.CANCELED:\n if (nothing && elapsedMs === null) return strings.nothingRecorded;\n return strings.canceled(elapsed);\n case RUN_PROGRESS_STATUS.RUNNING:\n return strings.working(elapsed);\n default: {\n // A run status a later contract adds: drawn as it is.\n const status: string = progress.status;\n return elapsed === null ? status : `${status} · ${elapsed}`;\n }\n }\n}\n\nfunction RunNoteView({ note, strings }: { note: SimpleRunNote; strings: SimpleProgressStrings }) {\n const degradation = note.degradation;\n if (note.reason === SIMPLE_RUN_NOTE_REASON.UNREACHABLE) {\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{strings.unreachable}</p>\n </Note>\n );\n }\n if (note.reason === SIMPLE_RUN_NOTE_REASON.STUCK) {\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{strings.runStuck(untilOf(degradation, strings))}</p>\n <Details label={strings.details}>\n <p>{degradation.message}</p>\n </Details>\n </Note>\n );\n }\n return (\n <Note tone=\"warning\">\n <p role=\"status\">{degradation.message}</p>\n </Note>\n );\n}\n\n/** What the live region last said, and the reading it said it of. */\ninterface Announcement {\n stream: string;\n progress: SimpleProgress;\n message: string;\n}\n\n/**\n * What the live region says: the top-level lines that ended or started since\n * the previous reading, then the run's end in the headline's words, rather\n * than every snapshot. A reading that changed none of those keeps the last\n * message, so nothing is said again; another stream starts silent.\n */\nfunction useAnnouncement(\n progress: SimpleProgress,\n stream: string,\n headline: string,\n strings: SimpleProgressStrings,\n): string {\n const [state, setState] = React.useState<Announcement>({ stream, progress, message: \"\" });\n if (state.progress === progress) return state.message;\n let message = \"\";\n if (state.stream === stream) {\n const change = simpleProgressChanges(state.progress, progress);\n const parts = [\n ...change.done.map(strings.announceDone),\n ...change.failed.map(strings.announceFailed),\n ...(change.runEnded\n ? [strings.announceEnd(headline)]\n : change.started.map(strings.announceNow)),\n ];\n message = parts.length > 0 ? parts.join(\" \") : state.message;\n }\n setState({ stream, progress, message });\n return message;\n}\n\n/**\n * The simple timeline style: the run as a checklist of its steps in the\n * method's own words, a batch as one line with a bar and its counts, only the\n * work going on unfolded, and the time a quiet duration on each line.\n */\nexport function SimpleProgressView({\n held,\n stream,\n times,\n nowMs,\n ticking,\n expanded,\n onToggle: toggle,\n pipeRegistry,\n entryPipeRef,\n wideParallelThreshold,\n containerClassName,\n containerStyle,\n headerEnd,\n strings = DEFAULT_SIMPLE_PROGRESS_STRINGS,\n}: SimpleProgressViewProps) {\n const progress = React.useMemo(\n () =>\n buildSimpleProgress(held, {\n pipeRegistry,\n entryPipeRef,\n expanded,\n wideParallelThreshold,\n }),\n [held, pipeRegistry, entryPipeRef, expanded, wideParallelThreshold],\n );\n const headline = headlineOf(progress, runElapsedMs(progress, times, nowMs), strings);\n const failure = progress.failure;\n const announcement = useAnnouncement(progress, stream, headline, strings);\n\n const classes = [\n containerClassName,\n \"mthds-simple-progress\",\n ticking && \"mthds-run-timeline--self-clocked\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <section\n className={classes}\n style={containerStyle}\n aria-label=\"Run progress\"\n data-run-status={held.status}\n data-version={held.version}\n >\n <header className=\"mthds-run-timeline-header\">\n <p\n className={`mthds-simple-progress-headline mthds-simple-progress-headline--${held.status}`}\n data-testid=\"run-timeline-status\"\n >\n {headline}\n </p>\n {held.mode === PROGRESS_MODE.DRY && (\n <span className=\"mthds-run-timeline-mode\">{strings.dryRun}</span>\n )}\n {headerEnd}\n </header>\n <p className=\"mthds-run-timeline-sr\" aria-live=\"polite\">\n {announcement}\n </p>\n {progress.retryAttempt !== null && (\n <Note tone=\"warning\">\n <p>{strings.runTryingAgain(progress.retryAttempt)}</p>\n </Note>\n )}\n {progress.runNote && <RunNoteView note={progress.runNote} strings={strings} />}\n {failure?.problem && !failure.shownOnLine && (\n <Note tone=\"error\">\n <p>{failure.problem.title}</p>\n <ProblemDetails problem={failure.problem} strings={strings} />\n </Note>\n )}\n {progress.lines.length > 0 && (\n <ol className=\"mthds-simple-progress-lines\" aria-label={strings.checklistLabel}>\n {progress.lines.map((line) => (\n <LineView\n key={line.key}\n line={line}\n item={line.forEachItem}\n nowMs={followsClock(line) ? nowMs : null}\n onToggle={toggle}\n strings={strings}\n />\n ))}\n </ol>\n )}\n </section>\n );\n}\n","/**\n * Every phrase the simple timeline style shows, in one table. The projection\n * (`buildSimpleProgress`) is language-free; this table words it. English only\n * for now, and shaped so a host can pass its own table later: every phrase is a\n * string or a function of the values it carries, and none is assembled from\n * fragments elsewhere, since another language orders its words differently.\n */\nimport type { SimpleItemTally, SimpleLineState } from \"@timeline/styles/simpleProgress\";\nimport { outcomeLabel } from \"@graph/styles/humanize\";\nimport { formatDuration } from \"@timeline/timelineTime\";\n\nexport interface SimpleProgressStrings {\n /** The headline before anything started. */\n waiting: string;\n /** The headline while the run goes on, with its elapsed time, when known. */\n working: (elapsed: string | null) => string;\n done: (elapsed: string | null) => string;\n /** The headline of a failed run, with the title of the top-level line it failed in, when one holds the failure. */\n failed: (where: string | null, elapsed: string | null) => string;\n canceled: (elapsed: string | null) => string;\n /** The headline of a run that ended before anything started. */\n nothingRecorded: string;\n /** The badge beside the headline on a dry run. */\n dryRun: string;\n /** The checklist's accessible name. */\n checklistLabel: string;\n\n /** A parallel's mark after its title. */\n together: string;\n /** A batch's mark after its title: \"for each filing\", \"for each item\". */\n forEach: (item: string | null) => string;\n /** After a decision's title, the outcome it took: the default outcome's key is `null`. */\n outcomeTaken: (key: string | null) => string;\n /** On a branch of a condition that resolved none, as a dry run's, the outcome it stands for. */\n branchFor: (key: string | null) => string;\n /** A wide parallel's finished branches folded into one line. */\n finishedBranches: (count: number) => string;\n /** The deepest work going on past the indentation cap, before its title. */\n now: string;\n\n /** A batch's counts: \"1 of 3 done · 2 in progress · 1 failed · 1 skipped\". */\n batchCounts: (\n done: number,\n total: number,\n running: number,\n failed: number,\n skipped: number,\n ) => string;\n /** A branch step's items at each state, for a screen reader. */\n tally: (tally: SimpleItemTally) => string;\n\n /** What a line's state reads as, for a screen reader, and beside a line skipped, stopped or never run. */\n state: Record<SimpleLineState, string>;\n\n /** A running line's attempt, past the first. */\n tryingAgain: (attempt: number) => string;\n /** A line's items being tried again, on a line that counts items. */\n tryingAgainItems: (count: number, item: string | null) => string;\n /** Where the run is stuck, with the moment the run fails if it is still stuck then, when known (already worded as a clock time). */\n havingTrouble: (until: string | null) => string;\n /** A line's items where the run is stuck, on a line that counts items. */\n havingTroubleItems: (count: number, item: string | null, until: string | null) => string;\n /** The run's own note when its status could not be read. */\n unreachable: string;\n /** The run's own note when its entry sequence, which no line stands for, is being tried again. */\n runTryingAgain: (attempt: number) => string;\n /** The run's own note when it is stuck at no line drawn. */\n runStuck: (until: string | null) => string;\n /** The disclosure that holds the platform's own words. */\n details: string;\n\n /** What the live region says of a top-level line that ended or started, and of the run's end, given its headline. */\n announceDone: (title: string) => string;\n announceFailed: (title: string) => string;\n announceNow: (title: string) => string;\n announceEnd: (headline: string) => string;\n\n /** A toggle's accessible name. */\n expand: (title: string) => string;\n collapse: (title: string) => string;\n\n /** How long a line or the run took, once it ended. */\n duration: (ms: number) => string;\n /**\n * How long a line or the run has been going, while it runs: in whole seconds,\n * since the clock moves once a second.\n */\n elapsed: (ms: number) => string;\n /** A moment as a clock time in the reader's zone, for \"until 09:45\". */\n clockTime: (ms: number) => string;\n}\n\nfunction plural(count: number, one: string, many: string): string {\n return count === 1 ? one : many;\n}\n\nfunction withElapsed(phrase: string, elapsed: string | null): string {\n return elapsed === null ? phrase : `${phrase} · ${elapsed}`;\n}\n\n/** A count of items in words: \"1 filing\", \"3 items\". */\nfunction itemCount(count: number, item: string | null): string {\n const noun = item ?? \"item\";\n return `${count} ${plural(count, noun, `${noun}s`)}`;\n}\n\n/** The simple style's English phrases. */\nexport const DEFAULT_SIMPLE_PROGRESS_STRINGS: SimpleProgressStrings = {\n waiting: \"Waiting to start\",\n working: (elapsed) => withElapsed(\"Working on it\", elapsed),\n done: (elapsed) => withElapsed(\"Done\", elapsed),\n failed: (where, elapsed) =>\n withElapsed(where === null ? \"Failed\" : `Failed in ${where}`, elapsed),\n canceled: (elapsed) => withElapsed(\"Canceled\", elapsed),\n nothingRecorded: \"No progress was recorded\",\n dryRun: \"Dry run\",\n checklistLabel: \"Steps of the run\",\n\n together: \"at the same time\",\n forEach: (item) => `for each ${item ?? \"item\"}`,\n outcomeTaken: (key) => `→ ${key === null ? \"Default\" : outcomeLabel(key)}`,\n branchFor: (key) => (key === null ? \"otherwise\" : `if ${outcomeLabel(key)}`),\n finishedBranches: (count) => `${count} done`,\n now: \"Now:\",\n\n batchCounts: (done, total, running, failed, skipped) => {\n let text = `${done} of ${total} done`;\n if (running > 0) text += ` · ${running} in progress`;\n if (failed > 0) text += ` · ${failed} failed`;\n if (skipped > 0) text += ` · ${skipped} skipped`;\n return text;\n },\n tally: (tally) => {\n const parts: string[] = [];\n if (tally.done > 0) parts.push(`${tally.done} done`);\n if (tally.running > 0) parts.push(`${tally.running} in progress`);\n if (tally.failed > 0) parts.push(`${tally.failed} failed`);\n if (tally.skipped > 0) parts.push(`${tally.skipped} skipped`);\n if (tally.stopped > 0) parts.push(`${tally.stopped} stopped`);\n return parts.length > 0 ? parts.join(\", \") : \"not started\";\n },\n\n state: {\n upcoming: \"Not started\",\n running: \"In progress\",\n done: \"Done\",\n failed: \"Failed\",\n skipped: \"Skipped\",\n stopped: \"Stopped\",\n notRun: \"Not run\",\n },\n\n tryingAgain: (attempt) => `Trying again (attempt ${attempt})`,\n tryingAgainItems: (count, item) => `Trying again for ${itemCount(count, item)}`,\n havingTrouble: (until) =>\n until === null\n ? \"Having trouble here. Still trying.\"\n : `Having trouble here. Still trying; the run fails if this lasts past ${until}.`,\n havingTroubleItems: (count, item, until) =>\n until === null\n ? `Having trouble with ${itemCount(count, item)}. Still trying.`\n : `Having trouble with ${itemCount(count, item)}. Still trying; the run fails if this lasts past ${until}.`,\n unreachable: \"Progress may be out of date: the run can't be reached right now.\",\n runTryingAgain: (attempt) => `The run is trying again (attempt ${attempt}).`,\n runStuck: (until) =>\n until === null\n ? \"The run is having trouble. Still trying.\"\n : `The run is having trouble. Still trying; it fails if this lasts past ${until}.`,\n details: \"Details\",\n\n announceDone: (title) => `Done: ${title}.`,\n announceFailed: (title) => `Failed: ${title}.`,\n announceNow: (title) => `Now: ${title}.`,\n announceEnd: (headline) => `${headline}.`,\n\n expand: (title) => `Show the steps of ${title}`,\n collapse: (title) => `Hide the steps of ${title}`,\n\n duration: (ms) => (ms < 1_000 ? \"<1s\" : formatDuration(ms)),\n elapsed: (ms) => (ms < 1_000 ? \"<1s\" : formatDuration(Math.floor(ms / 1_000) * 1_000)),\n clockTime: (ms) =>\n new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n }).format(ms),\n};\n","import * as React from \"react\";\nimport { StyleMenu, type StyleMenuEntry } from \"@graph/react/viewer/StyleMenu\";\nimport {\n TIMELINE_STYLE,\n TIMELINE_STYLES,\n type TimelineStyleId,\n} from \"@timeline/styles/timelineStyles\";\n\nconst ICON_PROPS = {\n viewBox: \"0 0 24 24\",\n width: 14,\n height: 14,\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n};\n\n/**\n * The timeline's styles as the style menu shows them: the registry's name and\n * description with an icon each. Keyed by `TimelineStyleId`, so a new style\n * does not compile without one.\n */\nexport const TIMELINE_STYLE_MENU_ENTRIES: Record<TimelineStyleId, StyleMenuEntry> = {\n // Bars of different lengths on a shared axis.\n [TIMELINE_STYLE.DETAILED]: {\n ...TIMELINE_STYLES[TIMELINE_STYLE.DETAILED],\n icon: (\n <svg {...ICON_PROPS}>\n <line x1=\"3\" y1=\"3\" x2=\"3\" y2=\"21\" />\n <line x1=\"7\" y1=\"6\" x2=\"15\" y2=\"6\" />\n <line x1=\"10\" y1=\"12\" x2=\"20\" y2=\"12\" />\n <line x1=\"7\" y1=\"18\" x2=\"13\" y2=\"18\" />\n </svg>\n ),\n },\n // A checklist: a check, then lines of words.\n [TIMELINE_STYLE.SIMPLE]: {\n ...TIMELINE_STYLES[TIMELINE_STYLE.SIMPLE],\n icon: (\n <svg {...ICON_PROPS}>\n <polyline points=\"3 6 5 8 8 4\" />\n <line x1=\"12\" y1=\"6\" x2=\"21\" y2=\"6\" />\n <circle cx=\"5.5\" cy=\"12\" r=\"2\" />\n <line x1=\"12\" y1=\"12\" x2=\"21\" y2=\"12\" />\n <circle cx=\"5.5\" cy=\"18\" r=\"2\" />\n <line x1=\"12\" y1=\"18\" x2=\"21\" y2=\"18\" />\n </svg>\n ),\n },\n};\n\n/** Accessible label of the menu button: the current style, and what the button does. */\nexport function timelineStyleMenuLabel(style: TimelineStyleId): string {\n return `Timeline style: ${TIMELINE_STYLES[style].name} — choose how the run is drawn`;\n}\n\nexport interface TimelineStyleMenuProps {\n value: TimelineStyleId;\n /** The styles offered, in order: two at least. */\n options: readonly TimelineStyleId[];\n onChange: (style: TimelineStyleId) => void;\n /** The element the menu sits in, for `RunTimeline` to find its button again after a choice redraws it. */\n slotRef?: React.Ref<HTMLDivElement>;\n}\n\n/** The style menu at the end of the timeline's header: the graph viewer's menu, over the timeline's styles. */\nexport function TimelineStyleMenu({ value, options, onChange, slotRef }: TimelineStyleMenuProps) {\n return (\n <div className=\"mthds-run-timeline-header-end\" ref={slotRef}>\n <StyleMenu\n value={value}\n options={options}\n onChange={onChange}\n placement=\"down-end\"\n entries={TIMELINE_STYLE_MENU_ENTRIES}\n menuLabel=\"Timeline style\"\n buttonLabel={timelineStyleMenuLabel}\n buttonClassName=\"mthds-run-timeline-style-btn\"\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO;AACP,OAAO;AAGP,OAAO;;;ACPP,YAA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emPagerView","page","followsClock"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelex/mthds-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Shared graph rendering logic for MTHDS method visualization",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"build-storybook": "storybook build"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@pipelex/mthds-form": "^0.
|
|
97
|
+
"@pipelex/mthds-form": "^0.24.0",
|
|
98
98
|
"@xyflow/react": "^12",
|
|
99
99
|
"elkjs": "^0.11.1",
|
|
100
|
-
"mthds": "^0.
|
|
100
|
+
"mthds": "^0.34.0",
|
|
101
101
|
"smol-toml": "^1.7.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"esbuild": "^0.28.0",
|
|
134
134
|
"eslint": "^9.39.4",
|
|
135
135
|
"eslint-plugin-storybook": "^10.3.3",
|
|
136
|
-
"playwright": "^1.
|
|
136
|
+
"playwright": "^1.64.1",
|
|
137
137
|
"prettier": "^3.8.1",
|
|
138
138
|
"react": "^19",
|
|
139
139
|
"shiki": "^3.22.0",
|