Serve what starts a workflow instead of re-deriving it in the dashboard #1960
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#1960
Reference in new issue
Block a user
What is wrong
The workflow editor's trigger card works out which other workflows start this one (
workflow.call,workflow.handoff,workflow.approve) by parsing every definition in the browser (ui/src/workflows/workflow-triggers.ts,startsViaandresultChoices). That re-implements the engine's call semantics client-side, so a change to those step types can silently make the card wrong.Wanted
The control plane serves, per workflow, what starts it: intake routes, bindings, schedules, playbooks and the workflows that call, hand off to or approve into it, from the same code the engine uses. The dashboard renders that list.
Done when
startsViaandresultChoicesare deleted from the UI.Also serve each step type's title with the vocabulary (x-step-types carries name, needs_repository and settings only), so ui/src/workflows/workflow-graph.ts TYPE_TITLES can go.
Done in
841c6aea. workflow.StartedBy reads every definition with the engine's own step settings (call's workflow, handoff's target including every value of a templated agent-result enum, approve's then), and /api/workflows serves started_by on each definition. The trigger card renders that list; startsVia and resultChoices are deleted from the UI. Checked end to end on a rebuilt archie-ui: implement lists feasibility (approve) and triage (handoff). Step titles are split out as their own follow-up, since moving the table server-side changes nothing visible. task check passed.