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
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 `<hive-jobq-graph>` 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

View file

@ -1,18 +1,16 @@
// JobqGraph.js — <JobqGraph>, a Preact component rendering any
// hive_jobq graph from the wire shape GET /api/jobq/graph serves (any
// endpoint serving `Vec<hive_jobq_wire::GraphNode>` works — see
// hive-jobq-wire's README). Preact port of the former shadow-DOM
// `<hive-jobq-graph>` 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) — `<JobqGraph endpoint="..."
// cancellable onCancel={...} onUpdate={...} />`, a normal component. Or

View file

@ -1,12 +1,11 @@
/* jobq-graph.css styles for the `JobqGraph` Preact component
(`./JobqGraph.js`). Light-DOM adaptation of the former shadow-scoped
`<hive-jobq-graph>` 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;