aboutsummaryrefslogtreecommitdiffstats
path: root/static/app.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 19:58:53 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 19:58:53 +0100
commitd0ef71dc2e15860fb99e8d49810dc6d91ec76f79 (patch)
treef82a5d7c95765a142584f7d44cd82e412c55f7f2 /static/app.js
parentf363c7052251da945724eb9c7e6fcd5eebadd393 (diff)
downloaddeck-it-d0ef71dc2e15860fb99e8d49810dc6d91ec76f79.tar.gz
deck-it-d0ef71dc2e15860fb99e8d49810dc6d91ec76f79.zip
fix(dashboard): review fixes
- The OBS slot has no one-tap stop: a tap opens the OBS tab, so a stray touch cannot end a recording. - Scrolling lines are measured once their slot is on screen, and every slot again when one comes or goes. - The lock watcher survives a missing pidof. - Trend gradients are in user space, so a flat line still paints. - Uptime under an hour shows minutes. - The shell no longer imports panel files for the modules the dashboard draws. - The spec matches the build VM and OBS slots and the error wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/app.js')
-rw-r--r--static/app.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/static/app.js b/static/app.js
index c296b90..79010bf 100644
--- a/static/app.js
+++ b/static/app.js
@@ -105,14 +105,17 @@ function mountTab(name, panel, section) {
poll(name, panel.interval ?? 1, (st) => panel.update?.(st, wrap));
}
+// Modules with no panel file: dashboard.js draws them.
+const DRAWN = ["stats", "tablet", "llm", "actions"];
+
async function boot() {
const r = await fetch("/api/modules");
if (!r.ok) return;
// Every panel's code at once; then mount in the server's order, so the
// tabs do not shuffle with whichever import lands first.
const names = (await r.json()).map(({ name }) => name);
- const loaded = await Promise.all(names.map((name) =>
- import(`./modules/${name}.js`).then((m) => m.default, () => null)));
+ const loaded = await Promise.all(names.map((name) => (DRAWN.includes(name) ? null
+ : import(`./modules/${name}.js`).then((m) => m.default, () => null))));
names.forEach((name, i) => {
const panel = loaded[i];
if (!panel?.tab) return; // no tab: drawn by the Dashboard, if at all