docs: remove historic framing, state what JobqGraph is now

This commit is contained in:
iris 2026-08-16 15:02:57 +02:00 committed by mara
commit ecf01f5e87
3 changed files with 14 additions and 18 deletions

View file

@ -229,9 +229,8 @@ not the graph.
operations: rebuilds, meta-update cascades, and first-spawns. One operations: rebuilds, meta-update cascades, and first-spawns. One
operation runs at a time; the worker drains FIFO. **Is a mounted operation runs at a time; the worker drains FIFO. **Is a mounted
`JobqGraph`** (the shared generic graph-viewer Preact component, `JobqGraph`** (the shared generic graph-viewer Preact component,
`@hive/shared/jobq-graph.js` — the same one swarm-ui uses, a Preact port `@hive/shared/jobq-graph.js` — the same one swarm-ui uses) —
of the former shadow-DOM `<hive-jobq-graph>` custom element) — `builds.js` `builds.js` does not render the queue itself; it just mounts the component
does not render the queue itself; it just mounts the component
(`mountJobqGraph(container, props)`, since this page has no JSX (`mountJobqGraph(container, props)`, since this page has no JSX
pipeline) with an `onUpdate` callback to drive the two things below it pipeline) with an `onUpdate` callback to drive the two things below it
that the generic view doesn't show. The component owns fetching, cold that the generic view doesn't show. The component owns fetching, cold

View file

@ -1,18 +1,16 @@
// JobqGraph.js — <JobqGraph>, a Preact component rendering any // JobqGraph.js — <JobqGraph>, a Preact component rendering any
// hive_jobq graph from the wire shape GET /api/jobq/graph serves (any // hive_jobq graph from the wire shape GET /api/jobq/graph serves (any
// endpoint serving `Vec<hive_jobq_wire::GraphNode>` works — see // endpoint serving `Vec<hive_jobq_wire::GraphNode>` works — see
// hive-jobq-wire's README). Preact port of the former shadow-DOM // hive-jobq-wire's README). Renders an indented state tree:
// `<hive-jobq-graph>` custom element, same contract (indented state // `payload.label` verbatim, `payload.data` as a generic key/value list.
// tree, `payload.label` verbatim, `payload.data` as a generic key/value // Light DOM, since both the dashboard (no JSX pipeline) and swarm-ui
// list) — light DOM now, since both the dashboard (no JSX pipeline) and // (JSX) consume it. Written with plain `h()` calls, not JSX, so one file
// swarm-ui (JSX) consume it. Written with plain `h()` calls, not JSX, so // compiles unmodified under both consumers' esbuild configs.
// one file compiles unmodified under both consumers' esbuild configs.
// //
// `cancellable` adds a per-node cancel button calling `onCancel(id)` // `cancellable` adds a per-node cancel button calling `onCancel(id)`
// directly (a plain prop, not a DOM CustomEvent — no shadow boundary to // directly (a plain prop). `onUpdate(nodes)` fires after every fetch,
// cross anymore). `onUpdate(nodes)` fires after every fetch, for a host // for a host needing the raw list (a count badge, a live-log panel)
// needing the raw list (a count badge, a live-log panel) without its own // without its own parallel fetch.
// parallel fetch.
// //
// Two ways to use this: JSX (swarm-ui) — `<JobqGraph endpoint="..." // Two ways to use this: JSX (swarm-ui) — `<JobqGraph endpoint="..."
// cancellable onCancel={...} onUpdate={...} />`, a normal component. Or // cancellable onCancel={...} onUpdate={...} />`, a normal component. Or

View file

@ -1,12 +1,11 @@
/* jobq-graph.css styles for the `JobqGraph` Preact component /* jobq-graph.css styles for the `JobqGraph` Preact component
(`./JobqGraph.js`). Light-DOM adaptation of the former shadow-scoped (`./JobqGraph.js`), rendered into light DOM under `.jg-root`.
`<hive-jobq-graph>` stylesheet `:host` became `.jg-root`, everything `@import` this from a page-level CSS file (dashboard) or a
else unchanged. `@import` this from a page-level CSS file (dashboard) component-level one (swarm-ui), matching how every other
or a component-level one (swarm-ui), matching how every other
`@hive/shared` stylesheet is consumed see JobqGraph.js's top comment `@hive/shared` stylesheet is consumed see JobqGraph.js's top comment
for why this file is never imported from JS. Theme custom properties for why this file is never imported from JS. Theme custom properties
(--fg, --red, ...) are plain inherited custom properties here, same as (--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 { .jg-root {
display: block; display: block;