Documentation
¶
Overview ¶
Package ui serves the awf visual graph tool: a localhost HTTP server that renders a workflow's graph (via the Slice-1 graph package) and overlays run state. Slice 2a is read-only and request-driven (static graph + snapshot overlay); the live SSE overlay is Slice 2b.
Request flow:
GET / -> embedded SPA (ui/dist) GET /api/runs -> runs for the loaded workflow (digest-filtered) GET /api/graph?run=<id> -> graph.Projection (static, or static + snapshot overlay)
projectionFor is the single place a (workflow, run) becomes a Projection; Slice 2b's SSE watch loop will call it too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RunRow ¶
type RunRow struct {
RunID string `json:"run_id"`
Status string `json:"status"`
Workflow string `json:"workflow"`
// VersionMatch is true when the run's recorded definition digest equals the digest of the
// workflow file the UI was launched against — i.e. the run executed against the current
// version. When false, the run is an earlier (or later) version of the same workflow; the
// SPA badges it. The run still renders faithfully against its own snapshot.
VersionMatch bool `json:"version_match"`
}
RunRow is one entry in GET /api/runs.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the immutable loaded workflow and an overlay cache. The workflow is loaded once at startup (editing the file requires a restart -- documented).
func New ¶
New builds a Server for an already-loaded workflow. digest is the workflow's content digest (used to filter /api/runs); stateDir is the runs/ base.