Skip to content

tui: the story-gate pause reuses the spec viewer and never shows the pause reason #515

Description

@pbean

Split out of #502 review (codex P2). Pre-existing shape, newly reachable.

action_review_pause routes PAUSE_STORY_GATE to _review_gate (src/bmad_loop/tui/app.py:546), which builds a SpecReviewModal titled "<label> — review the finalized spec" (:591-606). A story gate fires before the story is recorded in state.tasks — deliberately, so a resume re-picks it and re-asks the ledger (src/bmad_loop/engine.py:839) — so _paused_spec always returns (None, "") for it (app.py:783-793). The operator gets (no spec file resolved) / (empty spec) (src/bmad_loop/tui/screens/modals.py:474,478) under a title promising a spec, with Approve & resume as the only action; if the entry is still open, resuming re-pauses at the same gate.

The actionable payload is state.paused_reason — it names the blocking entries and the remedy (engine.py:939-943). _review_gate never renders it.

Scoping, because codex overstated this:

Fix shape: render paused_reason in _review_gate when there is no spec (or give the spec-less gates their own small viewer), which fixes epic-boundary at the same time.

No TUI test exercises a story-gate pause — tests/test_tui_app.py has no story-gate coverage; its SpecReviewModal tests all use a pause that has a real task.spec_file. Worth adding with the fix.

Metadata

Metadata

Assignees

No one assigned

    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