fabro/docs/plans
fabro-sh-0530[bot] f73f2a53f3
Replace queued with pending/runnable and add approval flow (web + API s… (#371)
## Summary

Replaces the single `queued` pre-execution state with explicit `pending`
and `runnable` states, and wires approve/deny actions for
parent-generated child runs that require human approval before they can
execute. This diff covers the web UI and OpenAPI spec layers of that
change.

## What changed

**Run status model**
- `queued` is removed from all TypeScript types, display maps, column
routing, and tests.
- `pending` (awaiting approval) and `runnable` (eligible for the
scheduler) replace it as distinct board columns and `RunStatus` variants
with their own labels and colors (`runnable` gets cyan; `pending` stays
muted).

**Approval actions**
- New `approveRun` / `denyRun` API calls in `run-actions.ts` invoke the
new `POST /runs/{id}/approve` and `POST /runs/{id}/deny` endpoints.
- `canApprove` predicate requires both `status.kind === "pending"` and
`lifecycle.approval?.state === "pending"` — a run whose status is
pending but has no approval record does not expose the action.
- `useApproveRun` / `useDenyRun` mutations in `mutations.ts` follow the
same pattern as `useCancelRun`.
- `ActionsMenu` in `run-detail.tsx` gains Approve (lifecycle group) and
Deny (destructive group) menu items.

**Board and event plumbing**
- `columnForStatus` now routes `pending → pending column` and `runnable
→ runnable column`; `submitted` stays in the pending column.
- `BOARD_STATUS_EVENTS` and `RUN_SUMMARY_EVENTS` replace `run.queued`
with `run.start_requested`, `run.pending`, `run.approved`, `run.denied`,
and `run.runnable`.
- The `pending` column is hidden when empty (same behaviour the old
`queued` column had).

**Waterfall phases (`run-phases.ts`)**
- `queued` phase is removed; `pending` and `runnable` phases are added
in order.
- The submitted phase closes at `run.start_requested` rather than
`run.queued`.
- Each phase derives its timestamps from its own event rather than a
single `firstTs` lookup, making multi-phase pre-execution timelines
accurate.

**OpenAPI spec**
- `POST /api/v1/runs/{id}/approve` and `POST /api/v1/runs/{id}/deny`
endpoints added with 200/404/409 responses.
- `startRun` description updated to describe the pending/runnable
branching behaviour.
- `cancelRun` description updated to reference `pending`/`runnable`
instead of `queued`.

### Plan Summary

- **Task 3** (OpenAPI schema additions for approve/deny endpoints) —
complete in this diff.
- **Task 6** (Web UI surfaces: board columns, run-detail actions,
waterfall phases, event subscriptions) — complete in this diff.
- **Task 7** (doc cleanup: references to `queued` replaced in plans,
brainstorms, and QA docs) — complete in this diff.


### Fabro Details

<details>
<summary>Ran 9 stages in 127m 37s for $104.98</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 2s | – | 0 |
| preflight_compile | 2m 15s | – | 0 |
| preflight_lint | 2m 29s | – | 0 |
| implement | 92m 10s | $91.53 | 0 |
| simplify_opus | 18m 35s | $10.65 | 0 |
| simplify_gpt | 7m 36s | $2.81 | 0 |
| verify | 3m 42s | – | 0 |
| fmt | 3s | – | 0 |
| **Total** | **127m 37s** | **$104.98** | **0** |

</details>

<details>
<summary>Ran <code>ImplementPlan.fabro</code> (12 nodes and 15
edges)</summary>

```dot
digraph ImplementPlan {
    graph [
        goal="Implement and simplify",
        model_stylesheet="
            * { model: claude-opus-4-7; }
        "
    ]
    rankdir=LR

    start [shape=Mdiamond, label="Start"]
    exit  [shape=Msquare, label="Exit"]

    toolchain         [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
    preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check -q --workspace 2>&1", max_retries=0]
    preflight_lint    [label="Preflight Lint", shape=parallelogram, script="cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1", max_retries=0]
    fix_lints         [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
    implement         [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD.", model="gpt-55", reasoning_effort="xhigh"]
    simplify_opus     [label="Simplify (Opus)", prompt="@prompts/simplify.md"]
    simplify_gpt      [label="Simplify (GPT-55)", prompt="@prompts/simplify.md", model="gpt-55"]
    verify            [label="Verify", shape=parallelogram, script="cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1 && cargo dev docs refresh 2>&1 && cargo dev docs check 2>&1", goal_gate=true, retry_target="fixup"]
    fixup             [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings, test failures, and generated docs errors.", max_visits=3]
    fmt               [label="Format", shape=parallelogram, script="cargo +nightly-2026-04-14 fmt --all 2>&1", max_retries=0]

    start -> toolchain
    toolchain -> preflight_compile [condition="outcome=succeeded"]
    toolchain -> exit
    preflight_compile -> preflight_lint [condition="outcome=succeeded"]
    preflight_compile -> exit
    preflight_lint -> implement [condition="outcome=succeeded"]
    preflight_lint -> fix_lints
    fix_lints -> preflight_lint
    implement -> simplify_opus -> simplify_gpt -> verify
    verify -> fmt   [condition="outcome=succeeded"]
    verify -> fixup
    fixup -> verify
    fmt -> exit
}

```

</details>

⚒️ Generated with [Fabro](https://fabro.sh)

---------

Co-authored-by: Fabro <noreply@fabro.sh>
Co-authored-by: fabro <fabro@anthropic.com>
Co-authored-by: Bryan Helmkamp <bryan@brynary.com>
2026-05-23 15:34:33 -04:00
..
2026-04-02-001-feat-server-daemon-management-plan.md docs: fix Mintlify MDX parsing 2026-04-24 10:59:25 -04:00
2026-04-02-002-feat-http-store-client-auto-start-plan.md refactor(cli): route run state through the shared server daemon 2026-04-05 00:15:33 -04:00
2026-04-04-run-event-simplification-plan.md refactor: simplify run event representation 2026-04-04 12:59:42 -04:00
2026-04-04-shared-nextest-test-daemon-plan.md refactor(cli): route run state through the shared server daemon 2026-04-05 00:15:33 -04:00
2026-04-05-cli-deglobalize-server-url-and-storage-dir-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-cli-exec-explicit-local-and-mode-removal-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-cli-model-server-canonical-and-llm-removal-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-cli-run-lifecycle-cleanup-compaction-plan.md plan 2026-04-05 11:03:02 -04:00
2026-04-05-run-adjacent-server-only-cleanup-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-run-create-server-target-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-run-manifest-and-preflight-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-05-server-canonical-secrets-doctor-repo-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-06-cli-config-socket-storage-separation-plan.md plans 2026-04-06 10:17:30 -04:00
2026-04-06-object-backed-artifact-uploads.md refactor(artifacts): clean up stale artifact wording 2026-04-07 23:13:22 -04:00
2026-04-06-settings-command-server-local-merge-plan.md plan 2026-04-06 10:43:41 -04:00
2026-04-06-subprocess-run-workers-signal-control-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-07-fix-attach-terminal-authoritative-stream-plan.md plans 2026-04-07 16:05:11 -04:00
2026-04-07-global-cas-blob-refs-plan.md plans 2026-04-07 17:18:42 -04:00
2026-04-07-interview-control-channel-and-server-slack-plan.md feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
2026-04-07-run-manifest-blobs-and-bundle-removal-plan.md plan 2026-04-07 23:44:44 -04:00
2026-04-07-run-state-projection-consolidation-plan.md plans 2026-04-07 16:05:21 -04:00
2026-04-07-store-dump-server-owned-export-plan.md plans 2026-04-07 17:18:42 -04:00
2026-04-07-worker-http-only-run-store-migration-plan.md plans 2026-04-07 16:05:11 -04:00
2026-04-08-001-feat-fabro-uninstall-command-plan.md feat(cli): add fabro uninstall command 2026-04-08 16:31:32 -04:00
2026-04-08-cli-services-command-context-refactor-plan.md plan 2026-04-08 16:24:11 -04:00
2026-04-08-fabro-spa-asset-crate-plan.md feat: embed fabro spa and align interruption semantics 2026-04-08 14:43:44 -04:00
2026-04-08-optional-web-ui-server-plan.md docs(plan): add optional web ui server plan 2026-04-08 16:09:42 -04:00
2026-04-08-production-web-ui-test-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-08-production-web-ui.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-08-settings-toml-redesign-implementation-plan.md refactor(integrations): make chat integrations Slack-only 2026-05-09 11:43:16 -04:00
2026-04-09-settings-toml-redesign-handoff-2.md docs(plans): commit stage 6 handoff 2 (previously untracked) 2026-04-09 18:51:44 -04:00
2026-04-09-settings-toml-redesign-handoff-3.md docs(plans): write stage 6.6 + 6.3b-partial handoff 2026-04-09 17:35:23 -04:00
2026-04-09-settings-toml-redesign-handoff-4.md docs(plans): write Stage 6 wrap-up handoff — all substages complete 2026-04-09 18:44:13 -04:00
2026-04-09-settings-toml-redesign-handoff.md refactor(integrations): make chat integrations Slack-only 2026-05-09 11:43:16 -04:00
2026-04-15-002-feat-ip-allowlist-plan.md plans 2026-04-18 12:36:41 -04:00
2026-04-15-canonical-blocked-run-status-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-18-001-feat-webhook-strategy-plan.md plans 2026-04-18 12:36:41 -04:00
2026-04-19-001-feat-archived-run-status-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-19-002-feat-run-files-changed-tab-plan.md refactor(redact): extract redaction into dedicated crate 2026-04-24 15:02:23 -04:00
2026-04-19-002-feat-web-ui-lifecycle-actions-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-04-19-003-feat-cli-auth-login-plan.md refactor(redact): extract redaction into dedicated crate 2026-04-24 15:02:23 -04:00
2026-04-19-home-storage-path-ownership-cleanup-plan.md plans 2026-04-19 15:18:21 -04:00
2026-04-19-remove-inbound-tls-termination-plan.md plans 2026-04-19 15:18:21 -04:00
2026-04-20-001-fix-cli-server-same-host-assumptions-plan.md chore: move testing-strategy doc into docs-internal 2026-04-25 12:38:41 -04:00
2026-04-20-002-refactor-extract-fabro-client-crate-plan.md chore: move testing-strategy doc into docs-internal 2026-04-25 12:38:41 -04:00
2026-04-20-003-refactor-fabro-store-record-abstractions-plan.md refactor(store): extract Record/Repository abstractions 2026-04-21 08:29:34 -04:00
2026-04-20-003-refactor-unify-run-vocabulary-metadata-plan.md chore: move testing-strategy doc into docs-internal 2026-04-25 12:38:41 -04:00
2026-04-22-001-refactor-settings-api-entrypoints-plan.md close config boundary audit and settings snapshot naming 2026-04-23 19:30:30 -04:00
2026-04-22-002-feat-web-install-object-store-step-plan.md feat(install): add object-store step to web install 2026-04-22 19:31:09 -04:00
2026-04-22-003-refactor-lock-down-server-secrets-plan.md docs 2026-04-23 08:35:43 -04:00
2026-04-22-004-refactor-worker-jwt-auth-plan.md refactor(auth): use per-run worker JWTs for subprocesses 2026-04-23 11:04:45 -04:00
2026-04-23-001-refactor-collapse-settings-resolve-indirection-plan.md refactor(config): collapse settings resolver 2026-04-23 08:00:56 -04:00
2026-04-23-001-refactor-command-context-alignment-plan.md chore: move testing-strategy doc into docs-internal 2026-04-25 12:38:41 -04:00
2026-04-23-002-refactor-combine-trait-uv-pattern-plan.md refactor(config): move settings combine into types 2026-04-23 08:42:19 -04:00
2026-04-23-003-refactor-config-types-boundary-and-dense-migration-plan.md close config boundary audit and settings snapshot naming 2026-04-23 19:30:30 -04:00
2026-04-23-003-refactor-llm-client-resolution-and-run-services-plan.md refactor(redact): extract redaction into dedicated crate 2026-04-24 15:02:23 -04:00
2026-04-23-003-refactor-pr-commands-server-side-plan.md feat(dev): port docker build workflow 2026-04-24 15:55:03 -04:00
2026-04-23-004-refactor-converge-rewind-into-fork-plan.md refactor(workflow): make rewind fork and archive 2026-04-24 11:42:37 -04:00
2026-04-24-001-refactor-adopt-uv-patterns-plan.md chore: move testing-strategy doc into docs-internal 2026-04-25 12:38:41 -04:00
2026-04-25-001-refactor-docker-sandbox-clone-based-plan.md refactor(sandbox): make Docker clone-based by default 2026-04-26 18:21:02 -04:00
2026-04-27-sandbox-native-git-metadata-plan.md Make git metadata sandbox-native 2026-04-27 21:43:15 -07:00
2026-04-28-collapse-in-place-types-plan.md docs: archive collapse-in-place-types plan 2026-04-28 09:36:14 -07:00
2026-04-30-001-feat-command-output-streaming-cas-logs-plan.md chore: add plans 2026-04-30 15:04:44 -04:00
2026-05-03-fix-agent-stage-cancellation-plan.md chore: plans 2026-05-03 13:10:04 -04:00
2026-05-08-remove-retro-stage-plan.md chore: plan 2026-05-08 11:31:19 -07:00
2026-05-09-plural-pull-request-data-model-plan.md chore: plans 2026-05-08 18:59:49 -07:00
2026-05-10-sandbox-capabilities-follow-on-plan.md chore: plans 2026-05-10 10:24:07 -04:00
2026-05-10-sandbox-details-tab-plan.md refactor(core): simplify reviewed run cleanup 2026-05-10 22:53:20 -04:00
2026-05-10-unified-run-type-shape-plan.md Replace queued with pending/runnable and add approval flow (web + API s… (#371) 2026-05-23 15:34:33 -04:00
2026-05-11-add-acp-backend-test-plan.md Add ACP backend support (#237) 2026-05-11 23:39:43 -04:00
2026-05-11-add-acp-backend.md Add ACP backend support (#237) 2026-05-11 23:39:43 -04:00
2026-05-11-add-fabro-mcp-server-test-plan.md feat(mcp): add interrupt action to fabro_run_interact (#296) 2026-05-17 12:12:32 -04:00
2026-05-11-add-fabro-mcp-server.md feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
2026-05-11-daytona-real-agent-smoke-qa-plan.md Add ACP backend support (#237) 2026-05-11 23:39:43 -04:00
2026-05-13-rich-run-failure-contract-plan.md refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
2026-05-20-acp-steering-plan.md [codex] Add ACP steering support (#329) 2026-05-20 17:21:56 -04:00
2026-05-21-wall-and-active-time-metrics-plan.md refactor(agent): simplify reviewed changes 2026-05-22 21:51:45 -04:00
2026-05-22-001-fix-mcp-create-schema-mismatch-plan.md refactor(agent): simplify reviewed changes 2026-05-22 21:51:45 -04:00
2026-05-22-002-remove-session-sandboxes-feature-flag-plan.md refactor(agent): simplify reviewed changes 2026-05-22 21:51:45 -04:00
2026-05-22-ask-fabro-sidebar-wiring.md refactor(agent): simplify reviewed changes 2026-05-22 21:51:45 -04:00
run-projection-simplification.md chore: plans 2026-05-10 10:24:07 -04:00