diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-13 17:44:44 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-13 17:44:44 +0100 |
| commit | b148d9ad66bd5a1a927409fc9dce73a7f3afd8cd (patch) | |
| tree | e232ef3317c48ad122641745f3c95f765aa85460 /tests/test_dashboard.mjs | |
| parent | 573f63f72ae66e2765609138e393a96293566184 (diff) | |
| download | deck-it-b148d9ad66bd5a1a927409fc9dce73a7f3afd8cd.tar.gz deck-it-b148d9ad66bd5a1a927409fc9dce73a7f3afd8cd.zip | |
feat(dashboard): running modules as chips that open a panel
The running row of 118px cards took height from music and spending and
cut its lines into marquees. It is now a row of chips (icon, value,
progress fill) copied from each module's slot; a tap opens the full
slot in a centred <dialog closedby="any">, which a tap outside closes
without reaching what is under it, and a tap inside opens the tab.
A module may export detail(state, el) for the panel. The build VM's
shows the job command, start and elapsed time, CPU, memory and disk as
meters, and the plan package by package: its result once finished
(progress.results, sbb-remote 0.13.1), building, or waiting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_dashboard.mjs')
| -rw-r--r-- | tests/test_dashboard.mjs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_dashboard.mjs b/tests/test_dashboard.mjs index dac4e5b..2448c38 100644 --- a/tests/test_dashboard.mjs +++ b/tests/test_dashboard.mjs @@ -17,7 +17,7 @@ import assert from "node:assert/strict"; import { area, line, push, spendParts, batteryGlyph, HISTORY } from "../static/dashboard.js"; import { busy as printing } from "../static/modules/k1c.js"; -import { busy as building } from "../static/modules/sbbuilder.js"; +import { busy as building, planRows } from "../static/modules/sbbuilder.js"; import { busy as live } from "../static/modules/obs.js"; // push keeps the last HISTORY samples @@ -58,3 +58,9 @@ assert.equal(building({ jobs: [{ status: "running" }] }), true); assert.equal(building({ jobs: [{ status: "done" }] }), false); assert.equal(live({ connected: true, recording: true }), true); assert.equal(live({ connected: true, recording: false, streaming: false }), false); + +// planRows: results first, then the package building, the rest waiting +assert.deepEqual(planRows({ plan: ["a/x", "b/y", "c/z"], + progress: { results: { "a/x": "failed" }, current: "b/y" } }).map((r) => r.status), + ["failed", "building", "waiting"]); +assert.deepEqual(planRows(undefined), []); |
