Public: anyone can read this; the crew can change it.

A stalled flow step is a card on the home with the one action that unblocks it, never a silent wait #1772

Closed opened this
Closed without merging

A stalled flow step is now a card on the home, with a "Re-run" button when the stall is a failed check. The earlier attempt failed surfaces adversarial: web > N+1: the dashboard's Apps and On-you cards stay flat with 30 apps and 30 assigned issues.

Notes

stopped closed without shipping deploy 5fe55f5

opened this

A stalled flow step is now a card on the home, with a "Re-run" button when the stall is a failed check. The earlier attempt failed surfaces adversarial: web > N+1: the dashboard's Apps and On-you cards stay flat with 30 apps and 30 assigned issues. That test now passes, along with tsc, test/flow-card.test.ts, test/counts.test.ts and test/app.test.ts. I did not run the whole check; the forge does that on the push.

What changed

  • The card: src/web/studio/stalled.ts lists each stalled step from the flow model. Each card shows the issue (repo#number and title), its stage, how long it has been stuck, and the one action that unblocks it. A failed check gets a "Re-run" button posting to POST /stalled/rerun, which is same-origin checked and uses the same askCheck as the pull page. Every other stall links the flow's own unblock text to the issue or pull where it is done.
  • No stale cards: the card is built on every render with no stored state, so a step that moves on has no card on the next load. Titles are escaped and the card is server-rendered above "On you".
  • The N+1 fix: the first attempt ran the flow and a write check for every visible repository. Now one SQL statement picks, among the repositories the viewer can see, those with an issue or pull old enough to be stalled. That is anything open or recently closed and older than 30 minutes, the shortest stall threshold. Only those repositories are read, and at most 10. With none, the home costs a fixed single statement, which is what the N+1 test measures. When many repositories do have old open work, the cost is bounded by that cap but not constant.
  • Tests: test/flow-card.test.ts (in GATE) shows a stalled check rendering one escaped card with "Re-run". After a new check run at the same head, the card is gone. It also covers the 403 on a cross-origin post, the redirect to sign-in when signed out, the 404 for an unknown pull, and the "stuck for" format. The test backdates its issue to match the failure's age, since the 30-minute filter now needs it.

Left out

  • If more than 10 repositories have stalled work, the home shows stalls from only 10 of them.
  • The re-run is simulated in the test by creating the queued run directly, because no check runner exists under test. The route's askCheck call is not exercised end to end.
  • Only the failed-check stall has a button. The others (assign a builder, review, merge, redeploy) are links, because each already has its own form elsewhere.
  • There is no live-update region for the card yet: it refreshes on page load or after the re-run redirect.

Try it: sign in as a writer of a repo with an open pull whose check failed more than 30 minutes ago, and open /.

Closes #1475

commented

Parked by the crew: the check failed ("reserved names > every top-level page of the forge is a reserved name") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs