From ecf01f5e87a1cb90b4e2fbc2c3cf62bc2fd0987d Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 16 Aug 2026 15:02:57 +0200 Subject: [PATCH] docs: remove historic framing, state what JobqGraph is now --- docs/web-ui/dashboard.md | 5 ++--- .../shared/src/jobq-graph/JobqGraph.js | 18 ++++++++---------- .../shared/src/jobq-graph/jobq-graph.css | 9 ++++----- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index 028892ea..683f3528 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -229,9 +229,8 @@ not the graph. operations: rebuilds, meta-update cascades, and first-spawns. One operation runs at a time; the worker drains FIFO. **Is a mounted `JobqGraph`** (the shared generic graph-viewer Preact component, -`@hive/shared/jobq-graph.js` — the same one swarm-ui uses, a Preact port -of the former shadow-DOM `` custom element) — `builds.js` -does not render the queue itself; it just mounts the component +`@hive/shared/jobq-graph.js` — the same one swarm-ui uses) — +`builds.js` does not render the queue itself; it just mounts the component (`mountJobqGraph(container, props)`, since this page has no JSX pipeline) with an `onUpdate` callback to drive the two things below it that the generic view doesn't show. The component owns fetching, cold diff --git a/frontend/packages/shared/src/jobq-graph/JobqGraph.js b/frontend/packages/shared/src/jobq-graph/JobqGraph.js index 96f97ee4..000e35ec 100644 --- a/frontend/packages/shared/src/jobq-graph/JobqGraph.js +++ b/frontend/packages/shared/src/jobq-graph/JobqGraph.js @@ -1,18 +1,16 @@ // JobqGraph.js — , a Preact component rendering any // hive_jobq graph from the wire shape GET /api/jobq/graph serves (any // endpoint serving `Vec` works — see -// hive-jobq-wire's README). Preact port of the former shadow-DOM -// `` custom element, same contract (indented state -// tree, `payload.label` verbatim, `payload.data` as a generic key/value -// list) — light DOM now, since both the dashboard (no JSX pipeline) and -// swarm-ui (JSX) consume it. Written with plain `h()` calls, not JSX, so -// one file compiles unmodified under both consumers' esbuild configs. +// hive-jobq-wire's README). Renders an indented state tree: +// `payload.label` verbatim, `payload.data` as a generic key/value list. +// Light DOM, since both the dashboard (no JSX pipeline) and swarm-ui +// (JSX) consume it. Written with plain `h()` calls, not JSX, so one file +// compiles unmodified under both consumers' esbuild configs. // // `cancellable` adds a per-node cancel button calling `onCancel(id)` -// directly (a plain prop, not a DOM CustomEvent — no shadow boundary to -// cross anymore). `onUpdate(nodes)` fires after every fetch, for a host -// needing the raw list (a count badge, a live-log panel) without its own -// parallel fetch. +// directly (a plain prop). `onUpdate(nodes)` fires after every fetch, +// for a host needing the raw list (a count badge, a live-log panel) +// without its own parallel fetch. // // Two ways to use this: JSX (swarm-ui) — ``, a normal component. Or diff --git a/frontend/packages/shared/src/jobq-graph/jobq-graph.css b/frontend/packages/shared/src/jobq-graph/jobq-graph.css index c42387e5..8cd88245 100644 --- a/frontend/packages/shared/src/jobq-graph/jobq-graph.css +++ b/frontend/packages/shared/src/jobq-graph/jobq-graph.css @@ -1,12 +1,11 @@ /* jobq-graph.css — styles for the `JobqGraph` Preact component - (`./JobqGraph.js`). Light-DOM adaptation of the former shadow-scoped - `` stylesheet — `:host` became `.jg-root`, everything - else unchanged. `@import` this from a page-level CSS file (dashboard) - or a component-level one (swarm-ui), matching how every other + (`./JobqGraph.js`), rendered into light DOM under `.jg-root`. + `@import` this from a page-level CSS file (dashboard) or a + component-level one (swarm-ui), matching how every other `@hive/shared` stylesheet is consumed — see JobqGraph.js's top comment for why this file is never imported from JS. Theme custom properties (--fg, --red, ...) are plain inherited custom properties here, same as - any other light-DOM rule — no shadow boundary to pierce anymore. */ + any other light-DOM rule. */ .jg-root { display: block;