Health: count only flows the engine acts on, format durations with their unit

The "running" tile counted paused and invalid flows as running, so it read
"5/5" beside "1 flow(s) cannot run". Its note is now additive rather than a
precedence chain, so a quarantine no longer hides the invalid count.

Adds dur() beside si(): a ms reading picks its own unit, so a slow run reads
"1.24 s" instead of "1.2k ms".
This commit is contained in:
2026-08-20 08:24:57 +02:00
parent 285b5cfc6f
commit 4845bf7c11
6 changed files with 93 additions and 20 deletions
@@ -8,7 +8,7 @@ import { UplotChart } from "@/components/Common/UplotChart"
import { useEngineEvents } from "@/components/Flow/liveStore"
import { PANEL_SECTION } from "@/components/Flow/SidePanel"
import { Button } from "@/components/ui/button"
import { cn, si } from "@/lib/utils"
import { cn, dur } from "@/lib/utils"
import {
ago,
auditQueryOptions,
@@ -319,8 +319,8 @@ export function HealthActivity({ range }: { range: Range }) {
>
{run.status}
</span>
<span className="w-16 shrink-0 text-right text-muted-foreground">
{si(run.duration_ms)} ms
<span className="w-20 shrink-0 whitespace-nowrap text-right text-muted-foreground">
{dur(run.duration_ms)}
</span>
<span className="w-16 shrink-0 text-right text-xs text-muted-foreground">
{ago(run.started_at)}