Documentation
¶
Overview ¶
Package craftdash renders the operator's live monitor for craft-plan execution: each plans.PlanRun's DAG as a mermaid flowchart (done nodes faded grey, dispatched nodes bold/gold, parked nodes red) plus a per-item progress table. It is the primary way an operator watches Executor B work a plan tick by tick.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MermaidForPlan ¶
MermaidForPlan renders the plan DAG as mermaid flowchart source.
State -> class: done -> "done" (faded grey), dispatched -> "active" (bold gold), parked -> "parked" (red); waiting nodes get no class (default mermaid styling). KindBlocked nodes always render parked-red even if, for some reason, their NodeRun.State was never flipped to NodeParked — a blocked node is never a healthy default-styled node.
Node label is "<kind> <item> x<qty>", with "<br/>@<agent>" appended on active nodes that have a pinned agent, or "<br/>PARKED (<reason>): <detail>" on parked nodes. Synthetic haul (xfer) nodes render with kind "xfer".
Edges are drawn consumer --> producer (DependsOn direction); an edge whose consumer (the arrow's source) is dispatched/active uses a thick link (==>) so the diagram highlights exactly what's being worked right now.
Node ids are sanitized for mermaid: '/' and any rune outside [a-zA-Z0-9_-] become '_'. Label content pulled from plan data (item id, agent id, park detail) is stripped of characters that could break out of a mermaid quoted label or inject markup (", [, ], <, >).
Types ¶
This section is empty.