From cd6cbf99973aba33054a93b20b7e7e457d39df2e Mon Sep 17 00:00:00 2001 From: iris Date: Tue, 2 Jun 2026 09:55:35 +0200 Subject: [PATCH] chore: fix stale build.mjs comments + CLAUDE.md dashboard package map --- CLAUDE.md | 9 ++++++--- frontend/packages/dashboard/build.mjs | 9 +++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b9bff34a..dc2fe3e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -178,10 +178,13 @@ frontend/ npm workspaces (esbuild → static dist). Built exporting { create, linkify }; pure JS, no IIFE globals; consumed by dashboard + agent. packages/dashboard/ @hive/dashboard SPA: src/{index.html, tabs.js, - flow.html, flow.js, common.js, dashboard.css} + + flow.html, flow.js, logs.html, logs.js, + common.js, stream-worker.js, common.css, + dashboard.css, flow.css, logs.css} + build.mjs → dist/{index.html, flow.html, - static/{tabs.js, flow.js, dashboard.css, - stream-worker.js}}. + logs.html, static/{tabs.js, flow.js, logs.js, + stream-worker.js, common.css, dashboard.css, + flow.css, logs.css}}. packages/agent/ @hive/agent default per-container UI: src/ {index, stats, screen}.html + {app, stats}.js + agent.css → dist/{*.html, static/*}. diff --git a/frontend/packages/dashboard/build.mjs b/frontend/packages/dashboard/build.mjs index 5f6d2c48..6e16cd57 100644 --- a/frontend/packages/dashboard/build.mjs +++ b/frontend/packages/dashboard/build.mjs @@ -17,9 +17,10 @@ // dist/static/flow.css /flow.html only (flow chrome + composer) // dist/static/logs.css /logs.html only (log viewer sub-tabs) // -// Both JS entries inline `./common.js` (DOM helpers, Panel singleton, -// NOTIF, path linkification) — esbuild dedupes the shared module -// between bundles. The Rust binary mounts `dist/` as a +// All three JS entries bundle `./common.js` (DOM helpers, Panel singleton, +// NOTIF, path linkification) independently — esbuild inlines the shared +// module into each bundle rather than emitting a shared chunk (no +// `splitting: true`). The Rust binary mounts `dist/` as a // `tower_http::ServeDir` fallback; the layout above keeps every URL // the HTML files reference reachable without rewriting paths in the // HTML. @@ -37,7 +38,7 @@ const staticDir = (p) => resolve(here, 'dist', 'static', p); rmSync(dist(''), { recursive: true, force: true }); mkdirSync(staticDir(''), { recursive: true }); -// Bundle both JS entries. ES-module output, browser target, no minify +// Bundle all three JS entries. ES-module output, browser target, no minify // (line-aligned source aids debugging; minification belongs in a later // follow-up once asset sizes warrant it). esbuild writes each entry // to `static/.js` based on the entryPoint basename.