import type { HistoryPoint } from "@/client" import { Sparkline } from "@/components/Common/Sparkline" /** * A flow's execution trend, drawn from the 60 slices the rollup carries. * * Sixty slices of whatever window is selected, so the curve stays the same * width and only its resolution moves. The same curve the node panel and the * edge popover draw, dot included, in the chart ramp this page's other graphs * use. The dot marks the newest slice rather than this instant: the server * holds the slice that is still filling back, so the curve ends on one that is * all there. */ export function Spark({ counts }: { counts: number[] }) { const points: HistoryPoint[] = counts.map((value, index) => ({ ts: index, value, })) if (points.every((point) => point.value === 0)) { return nothing yet } return ( ) }