commit 6854b2f64ee528bc8a43cbfcb845c093dabade93
parent cc7c2f9a2bbbfe6e97d23da59043795da6438fe3
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 04:53:43 -0400
umtool: a Running row says how far on the right and its progress words under it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/umtool/components/shell/RunningList.tsx b/umtool/components/shell/RunningList.tsx
@@ -28,30 +28,40 @@ const usd = (n: number) => `$${n.toFixed(2)}`;
function Row({ item: i }: { item: ActivityItem }) {
const queued = i.state === "queued";
- const right = i.generation && typeof i.spend === "number" ? usd(i.spend) : null;
- const small = [i.target, right && i.meter?.text && !queued ? i.meter.text : null].filter(Boolean).join(" · ");
+ const spend = i.generation && typeof i.spend === "number" ? usd(i.spend) : null;
+ const pct = !queued && typeof i.meter?.fraction === "number" ? `${Math.round(i.meter.fraction * 100)}%` : null;
+ // The right cell: a generation job's spend (Meter), else how far it is, else
+ // where it waits. The words of its progress go on the line under it.
+ const right = spend ? (
+ <span className="font-mono text-[11.5px] font-medium text-meter" data-running-spend={i.spend}>
+ {spend}
+ </span>
+ ) : queued ? (
+ <JobProgressText meter={i.meter} className="font-mono text-[11px] text-muted-2" />
+ ) : pct ? (
+ <span className="font-mono text-[11px] text-muted-2" data-running-pct="">
+ {pct}
+ </span>
+ ) : null;
+ const words = !queued && i.meter?.text ? i.meter : null;
const body = (
<>
<span className={queued ? "truncate text-muted-2" : "truncate"} data-running-kind="">
{i.kindLabel ?? i.label}
</span>
- {right ? (
- <span className="font-mono text-[11.5px] font-medium text-meter" data-running-spend={i.spend}>
- {right}
- </span>
- ) : (
- <JobProgressText meter={i.meter} className="font-mono text-[11px] text-muted-2" />
- )}
- {small && (
+ {right ?? <span />}
+ {(i.target || words) && (
<small className="col-span-2 truncate font-mono text-[11px] text-muted-2" data-running-target="">
- {small}
+ {i.target}
+ {i.target && words ? " · " : null}
+ {words && <JobProgressText meter={words} />}
</small>
)}
{!queued && <JobProgressBar meter={i.meter} />}
</>
);
const cls = "grid grid-cols-[minmax(0,1fr)_auto] gap-x-2 gap-y-0.5 text-[12px] text-text-2 no-underline hover:text-text";
- const title = [i.kindLabel ?? i.label, i.target, i.state].filter(Boolean).join(" · ");
+ const title = [i.kindLabel ?? i.label, i.target, i.meter?.text, i.state].filter(Boolean).join(" · ");
return (
<li data-running={i.id} data-running-state={i.state} data-running-source={i.source}>
{i.external ? (
diff --git a/umtool/e2e/running.spec.ts b/umtool/e2e/running.spec.ts
@@ -94,8 +94,9 @@ test("the rail lists the editor's running and queued jobs, a draft's spend, and
// A sync: its channel, its count; it has no piece, so it links the editor's /jobs.
const sync = r.locator("[data-running=e2e-sync]");
await expect(sync.locator("[data-running-kind]")).toHaveText("Download missing");
- await expect(sync.locator("[data-running-target]")).toHaveText("sitechan");
+ await expect(sync.locator("[data-running-target]")).toHaveText("sitechan · 2/8 downloads");
await expect(sync.locator("[data-job-progress-text]")).toHaveText("2/8 downloads");
+ await expect(sync.locator("[data-running-pct]")).toHaveText("25%");
await expect(sync.locator("a")).toHaveAttribute("href", `${STUB}/jobs`);
// A queued draft is a row, said as queued; queued syncs and the lanes fold.
@@ -103,6 +104,7 @@ test("the rail lists the editor's running and queued jobs, a draft's spend, and
await expect(queued).toHaveAttribute("data-running-state", "queued");
await expect(queued.locator("[data-job-progress-text]")).toHaveText("queued · 1 ahead");
await expect(queued.locator("[data-job-progress]")).toHaveCount(0);
+ await expect(queued.locator("[data-running-target]")).toHaveCount(0);
await expect(r.locator("[data-running=e2e-q1]")).toHaveCount(0);
await expect(r.locator("[data-running=e2e-lane-dl]")).toHaveCount(0);
await expect(r.locator("[data-running-more]")).toHaveText("+ 3 queued · 2 lanes");