Repository navigation
✨ Workflow models: Settings → Workflows tab (library, diagram, ingest) - #17681
Conversation
Settings gains a Workflows tab listing every stored workflow model with provenance/compile badges and bound-repository counts, a read-only detail view that draws the compiled columns and states as an SVG diagram, and an Ingest form over POST /api/workflows/ingest. The Activity Monitor model badge deep-links into the library entry. Binding stays on Settings → Repos. Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review findings from Intent alignment (read at head 1. Diagnostics text is never shown (badge tooltips read
|
Refs #17620 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
One minor but real issue; otherwise this reads correct to me. Checked every helper the new file calls against the v5 tree (renderConfigTab, switchConfigTab, openConfigDialog(type, agent, initialTabOverride), hivePrompt, saveErrorMessage, dashboardRoleAtLeast, _inceptionAuthHeaders, formatDashboardDateTime) — all exist with the signatures used. Every interpolation of server-supplied text in the library table, detail view, SVG diagram and ingest result goes through esc(); the only bare ${…} are numeric SVG coordinates and the static nav tab ids. Model name/version are encodeURIComponent-ed in every URL.
Workflows tab can stick on "Loading the workflow library…" — config-workflows-library.js, renderGovWorkflows():
if (!_workflowState.loaded) {
loadWorkflowLibrary(() => { if (_configState.tab === 'Workflows') renderConfigTab('Workflows'); });
return wfLibNav(...) + '…Loading the workflow library…';
}loadWorkflowLibrary (base, src/pkg/dashboard/static-src/js/config-workflows.js:15-17) begins if (_workflowState.loading) return; — it returns without calling onDone when a load is already in flight. The Repos tab kicks off the same load (config-workflows.js:50) with a callback that only re-renders if _configState.tab === 'Repos'. So: open Settings → Repos, click the adjacent Workflows tab before GET /api/workflows returns → the Workflows callback is dropped, the Repos callback sees the wrong tab and does nothing, and the placeholder never refreshes until the user clicks another nav. wfLibReload() has the same shape (loaded = false; await loadWorkflowLibrary() returns immediately if a load is pending, then re-renders a tab that re-enters the same early return). Severity low — the window is one fetch — but it is the first place in the UI where two tabs race on this loader. Simplest fix is in the loader: queue onDone callbacks while loading is true and drain them in finally, which also fixes the Repos path for free.
Not a defect, just noting: renderGovWorkflows() consuming _wfLib.pending calls wfLibOpen(), which synchronously calls wfLibRerender() → renderConfigTab('Workflows') → renderGovWorkflows() again while the outer call is still building its string. Both renders end up producing the same "Loading key…" body so it is harmless today, but it is a re-entrant render.
Body vs. diff: the body says index.html was regenerated and the citation guard is clean — both are in the diff and the corresponding checks are green on this head. No gap found.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
RFC phase 3b of the workflow-models RFC (#17620), on v5 (follows #17679).
What
GOVERNOR_CONFIG_TABS, between Repos and Budget) with:hive-default, local, ingested): provenance badge, compile badge (compiles/compiles · N warnings/does not compile), source, states/columns, bound repositories; View · Duplicate · Export (in-app JSON viewer) · Delete (withheld while bound).owner/repo, Preview / Ingest-and-save viaPOST /api/workflows/ingest.openWorkflowLibraryEntry).Guards
workflows_library_ui_test.go: wiring asserts + node tests of the pure renderers (renderWorkflowLibraryRows,workflowDiagramSvg,wfBoundRepos,wfIngestDefaultName,wfProvenanceOf).index.htmlregenerated (gen -checkclean); api-reference citations clean.Docs
docs/design/workflow-models.md→ "Workflows tab (RFC phase 3b)"; changelog fragment.