Flow: waiting
/flow (a forge admin who is a person) shows three quiet places work waits, each with its one action. A section with nothing to say draws nothing; when all three are quiet there is no card.
- Approved, waiting on the merge queue — per repository, how many approved pulls wait and how long the oldest has (
src/flow/approved_wait.ts). Action: open the oldest pull. - Stale crew pulls — crew pulls with no push for 7 days, oldest first (
src/flow/stale_fold.ts), each with the note that folds it back into its issue. It only proposes; a person closes. - Work a crew fork never proposed — a crew fork's branch 6 h old or more that heads no pull (
src/flow/alarm_unproposed.ts), once, with a link to the branch. Branches are read with the branches page's helpers; no branch name reaches a shell.
Terminal: the palette entry "Pulls to land" (src/tui/screens/waiting.ts, for a forge admin who is a person, offered nothing to anyone else) reads the same readWaiting and lists the same three sections as text lines; a quiet lane says "Nothing waiting."
Cost: the unproposed-work scan reads git for every crew fork, so readWaiting holds its result for 60 seconds per process; the other two sections are plain queries and are read each time. Stale pulls carry their repository, so two repositories with the same pull number and branch stay apart.
Code: src/web/pages/flow-waiting.ts (reads and draws), mounted by one line in src/web/pages/flow.ts. Test: test/flow-waiting.test.ts.
The one action (#14086)
Each stalled row carries one form button, never a silent wait: an approved pull waiting gets Re-run check (POST /:owner/:name/pulls/:n/checks, the oldest one), a stale crew pull gets Close (POST …/pulls/:n/state), and a crew branch that heads no pull gets Open a pull, a plain link to the compose page with the branch filled in. Each button's accessible name carries the repository and pull number, and a row for someone who cannot write to its repository shows a muted line instead. Both posts are same-origin only, need write access to the repository, and come back to /flow with the route's own receipt sentence. In the terminal, n/p pick a row and enter does its action (ask a check, close, or open the new-pull screen on that branch), through the same functions and write gate; a row the person cannot write to names no action.
Green, not landed (#15803)
A pull whose check on its head has been green for more than six hours and that has not landed says, in one line, what it waits for and the one thing that unblocks it: "Green for 30 hours, not landed: it waits for review. To unblock: a reviewer reviews it on its current head."
The cause is the first that holds: a hold, a conflict with the base, a chapter, then whoever acts next (a person, the builder after changes were asked, a reviewer, the landing queue). waitsFor in src/core/landing.ts words it; pullWaitsFor in src/flow/waits_for.ts reads the facts.
Where it shows:
- The pull page, under the path and the landing estimate.
/flow, the "Green, not landed" list: oldest first, at most 50, each row links the pull and lists what it waits for and the action. Only the repositories the viewer may read are listed.- The terminal, the palette's "Pulls to land" screen, as one text line per pull, filtered the same way.
GET /api/v1/repos/:owner/:name/pulls/:number, aswaitsFor: { cause, says, action, line }or null, and the MCPpulltool, the same object.- The MCP
pullstool, aswaitsFor, the line or null.
One difference: the pull page, the pull's JSON, the pull tool and pulls with repo read the merge, so they can say "it conflicts with its base". /flow, the terminal and pulls without repo read no git, so for the same conflicted pull they name the next cause instead (usually review or the queue). Open the pull to see a conflict.
Cost: a list passes the check it already read, so a pull that is not green for six hours costs no extra query; only a stalled pull reads who acts next, its hold and its chapter. Test: test/pull-waits-for.test.ts.