feat(dashboard): show jobq node tree in build queue

Add NodeView::parent to the wire (hive-sh4re + hive-c0re dag_view), then
render the recursive parent/child tree in the dashboard build queue instead
of the previous flat chain/fan-out layout.

Wire change (hive-sh4re, hive-c0re):
- NodeView gains parent: Option<NodeId> (skip_serializing_if = None)
- dag_view() projects node.parent, filtering out the Dag container id
  (top-level work nodes become parent: None on the wire)

Frontend (builds.js):
- Replace nodeComponents + splitFanOut with buildNodeTree (uses parent
  edges directly) + topoSort helper (orders siblings by deps)
- renderTreeNode walks the tree depth-first, rendering indented rows
  with └─/├─ connectors and agent label per chip
- Flat chains and fan-out heuristics are gone; structure comes straight
  from the scheduler's parent axis

Closes: none (parent issue tracked in forge)
This commit is contained in:
iris 2026-07-25 20:16:20 +02:00 committed by mara
commit cb936fe2fe
3 changed files with 94 additions and 142 deletions

View file

@ -127,6 +127,12 @@ pub struct NodeView {
/// store-only nodes don't render a link that 404s.
#[serde(default)]
pub has_log: bool,
/// Structural parent in the jobq tree — `None` for top-level nodes
/// (direct children of the DAG container). Sub-nodes carry the id of
/// their containing parent node. The client uses this to render the
/// recursive tree rather than inferring structure from `deps` alone.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parent: Option<NodeId>,
}
/// A queued / running / failed DAG — a thin projection of one container