Problem
formatAction in src/reporter.ts:22 handles visit, click, fill, and select, but has no case for wait_for. Any step that falls through returns the literal string "unknown action".
wait_for failures do populate error.action — test/runner.test.ts:526 asserts exactly that:
expect(result.error?.action).toEqual({ wait_for: "Nonexistent Text" });
So when a wait_for step fails, the user sees:
✗ my-flow (5.1s)
Step 1: unknown action
Error: Timeout waiting for "Dashboard"
The error message carries the text, but the step line — the part that tells you which step and what kind — is useless.
Why it slipped
wait_for shipped in 5f84a68 alongside flowspec init. PRD-0004 had listed it as a non-goal ("Explicit wait_for step type (may be a future PRD)"), so it never got its own PRD, and the reporter was never updated to match the new step type.
Fix
Add the missing case:
if ("wait_for" in action) {
return `wait_for "${action.wait_for}"`;
}
Optional, while in there
fill and select render as bare "fill" / "select" with no indication of which fields they targeted. Naming the fields would make failures more actionable:
Step 2: fill "Email", "Password"
Step 3: select "Category"
test/reporter.test.ts:153 only asserts toContain("fill"), so this would not break existing tests.
Context
Split out of PRD-0006 (pre-flight setup steps, #5) to keep that PRD scoped. wait_for is the natural way to wait out an auth redirect in a setup block, so this becomes more visible once setup ships — but the bug exists today, independently.
Problem
formatActioninsrc/reporter.ts:22handlesvisit,click,fill, andselect, but has no case forwait_for. Any step that falls through returns the literal string"unknown action".wait_forfailures do populateerror.action—test/runner.test.ts:526asserts exactly that:So when a
wait_forstep fails, the user sees:The error message carries the text, but the step line — the part that tells you which step and what kind — is useless.
Why it slipped
wait_forshipped in5f84a68alongsideflowspec init. PRD-0004 had listed it as a non-goal ("Explicitwait_forstep type (may be a future PRD)"), so it never got its own PRD, and the reporter was never updated to match the new step type.Fix
Add the missing case:
Optional, while in there
fillandselectrender as bare"fill"/"select"with no indication of which fields they targeted. Naming the fields would make failures more actionable:test/reporter.test.ts:153only assertstoContain("fill"), so this would not break existing tests.Context
Split out of PRD-0006 (pre-flight setup steps, #5) to keep that PRD scoped.
wait_foris the natural way to wait out an auth redirect in asetupblock, so this becomes more visible once setup ships — but the bug exists today, independently.