Skip to content

[feat] Add a Workflow Runs page to the dashboard #1088

Closed

Description

@hsuchifeng

Parent: #818

Goal

Show active local workflow state and team run records in the existing dashboard, with safe responses to eligible human gates.

Scope

  • Add a Workflow Runs page using the existing bundled dashboard structure.
  • Add read APIs for active local runs and reported run records visible to the selected workspace.
  • Show workflow, driver, status, current step, named end, duration, tokens, team revision, PR URL, scorer labels when present, and pending-record state.
  • Clearly distinguish local live state from team-reported history.
  • Add run and gate detail views.
  • Allow approve/choose responses through a same-origin protected POST endpoint.
  • Reuse the engine’s respond operation and audit fields.
  • Add CSRF or equivalent origin protection; do not expose a wildcard-CORS mutation endpoint.
  • Never return or render prompts, outputs, diffs, secrets, or private paths.
  • Add English and Chinese dashboard strings.

Out of scope

Published state snapshots, cross-machine ownership, starting runs from dashboard, editing workflows, provider approvals, remote hosting, triggers, and event waits.

Dependencies

Acceptance criteria

  • Workspace scoping matches existing dashboard behavior.
  • Live runs and reported history have clear source labels.
  • Gate responses reject stale revisions.
  • Required gates use the non-agent dashboard channel.
  • External web pages cannot submit localhost responses.
  • No sensitive workflow content reaches API or HTML.
  • Existing dashboard pages and SSE remain intact.

Verification

Focused server/client scoping, record, gate, origin-protection, redaction, and UI-state tests; build/typecheck/lint; one real-CLI dashboard E2E displaying and responding to a gate. Update dashboard and workflow guides in both languages.

Activity

  1. SaulMoro commented on Oct 14, 2026

    @SaulMoro
    Collaborator

    Notes from #1078 (#1129) for reading live run state:

    • Step statuses are pending | leased | running | succeeded | failed | skipped. running is a workflow step whose child steps are in progress; the step a driver works on is the leased one.
    • Steps inside sub-workflows are paths (ship.check.classify), and they exist in the run only once reached. Totals and "current step" cannot be computed from the top-level definition alone.
    • A run can carry end, the named end it reached; the run's outcome is that end's declared outcome.
    • Sensitive fields in the run file: inputs (the run's, and a workflow step's own inputs for its child) and snapshots of every child definition with their prompts and env templates. A lease's rendered env is not stored but is rebuilt from inputs. None of these should reach the API or HTML.

    The engine rules that span files are in docs/dev/workflow-engine.md, added by #1129.

  2. SaulMoro commented on Oct 15, 2026

    @SaulMoro
    Collaborator

    Where the page's fields come from:

    Acceptance criteria to add:

    • A record without teamRevision renders without a broken link, and still shows sourceHash.
    • A record with three prs renders three links.
  3. SaulMoro commented on Oct 16, 2026

    @SaulMoro
    Collaborator

    Three things from #1148 for reading runs:

    • More sensitive fields in the run file. Besides inputs and the definitions, a run now keeps each for_each instance's item, each for_each step's results (every item with its outputs), and the outputs of earlier passes in passes and run.archive. An item often comes from inputs or from another step's outputs. None of these should reach the API or HTML.
    • A run can have several current steps. A driver that sends running holds several leases at once, and --driver local runs up to workflows.max_parallel commands. "Current step" is the list of leased steps. There is also a new status, cancelled, for steps an end or a break stopped.
    • Entries and counts differ. The end record has an entry per pass, while stepCounts counts each instance the run ended with once. In one run whose loop ran three passes over two items, stepCounts.total was 8 and steps had 16 entries. Take counts from stepCounts.
  4. self-assigned this
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions