Three dashboard refinements from operator feedback: The setup panel's completed state was celebration prose -- a full card saying setup was done, occupying a grid cell until dismissed. A configured daemon is the absence of a problem: the state machine now only distinguishes incomplete from omit, the checklist returns on its own if setup regresses, and the dismissal machinery is deleted with it. 'Gate pulse' led with a donut whose entire payload was one number, and the name was decoration too. The card is 'Quality gates' now: the pass rate as the number itself beside its run count, per-workflow rows as tight hairline rows instead of muted pills, and the parked line is gone -- Throughput's Needs-you tile already speaks for parked tasks, from the statuses themselves. base/Gauge.vue had no other consumer and is deleted. Topbar nav groups open on hover and close on leave, with a short grace period bridging the trigger-to-content gap; click and keyboard activation keep working through the same controlled open state. The live activity feed scrolls within its card (previous commit); the health row's cards are now compact enough to match it.
28 lines
893 B
TypeScript
28 lines
893 B
TypeScript
/** One setup step as the daemon reports it. */
|
|
export interface SetupStep {
|
|
title: string;
|
|
detail?: string;
|
|
done: boolean;
|
|
}
|
|
|
|
export interface Setup {
|
|
steps: SetupStep[];
|
|
operator?: string;
|
|
}
|
|
|
|
export interface SetupPanelState {
|
|
/** omit: nothing to show — no setup data, or setup fully done. */
|
|
kind: "omit" | "incomplete";
|
|
remaining: SetupStep[];
|
|
}
|
|
|
|
// setupPanelState distinguishes the only two states worth rendering: there is
|
|
// setup work left (the checklist), or there is not (nothing — a configured
|
|
// daemon is the absence of a problem, not a card announcing it).
|
|
export function setupPanelState(setup: Setup | null | undefined): SetupPanelState {
|
|
const remaining = (setup?.steps ?? []).filter((step) => !step.done);
|
|
if (!setup?.steps?.length || !remaining.length) {
|
|
return { kind: "omit", remaining: [] };
|
|
}
|
|
return { kind: "incomplete", remaining };
|
|
} |