Public: anyone can read this; the crew can change it.
A stuck-flow alarm names the one action that unblocks it, as a link the owner taps #15179
Check · Review · Land · Live done — Landed and live in production.
The stuck-pull alarm now names the one action that unblocks it, as a label and a path to the pull. The type check and the four related flow-alarm test files pass (23 tests); I did not run the full suite, and the forge's check will.
shipped production is serving it deploy cfe12e4
7 earlier comments · 1 event
The stuck-pull alarm now shows its action as a link on the flow board and in the terminal, with a label per stage. The type check and 52 tests across the flow-alarm and terminal flow files pass; I did not run the full suite.
- Rendered on the page.
alarmLinesprints the alarm sentence, then the action label as the link, for example<a href="/alice/r/pulls/7">Merge it</a>. Alarms without an action keep the old sentence-as-link form. A new test intest/flow-alarm-stuck-action.test.tschecks the rendered HTML. - Terminal and docs. The
src/tui/screens/flow.tsflow screen prints<sentence> <label>: <path>.docs/features/flow-stuck.mdis new and describes the stages and their links. - Honest labels.
- Wall: "Allow or send back".
- Red check: "Open the red check".
- Green check: "Merge it".
- Anything else (a run in progress, a push, a review, a release): "Open the pull", which only opens the pull page.
- Each stage has a test.
- Red opens the check. It links to the latest check's run page,
/owner/name/runs/<id>. I did not find a log anchor, so it links the run page. - Types.
StuckStageis now a shared union (wall | red | green | other).stuckActionstays exported because the new tests use it.
The repository's pre-push hook wanted a commit saying how to try the change, so I added an empty "Try:" commit.
To try it: leave an approved pull quiet for 30 minutes, open /flow, and look for the link at the end of its alarm line.
🤖 Generated with Claude Code
<!-- look-pages cd15a6683945 --> Look pages for cd15a66, from the gate:
look pages (inferred): this pull changes src/web/studio/alarm_lines.ts; the forge pictures / (src/web/studio/alarm_lines.ts), /docs (src/web/studio/alarm_lines.ts), /explore (src/web/studio/alarm_lines.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A stuck-pull alarm on /flow and in the terminal now ends in the one action that unblocks the pull, as a link. That is the original change. This push fixes the check's red on this pull, which came from one missing piece.
The cause was that docs/features/flow-stuck.md had no front matter. The features index requires each note to open with topic: and row:, so that one note broke the features-index and feature-note tests. I added topic: Ship and undo and a row: line. After the fix, test/feature-orphans.test.ts, test/features-index-script.test.ts, test/feature-front-matter.test.ts, test/flow-alarm-stuck-action.test.ts and test/fork-tree-chip.test.ts pass here. That covers the notes tests and the fork-tree-chip test from the check's list.
The other failures in the check log are in the page-budget and report timing tests. The forge says test/repo-pages-timing.test.ts, test/page-budget.test.ts and test/pages-budget.test.ts are already red on main at abfb176, so they are not counted against this pull. I did not run them or the full suite here.
What the pull does
- Which action: an approved, unheld pull quiet for 30 minutes gets a named action.
- Held at the access wall: Allow or send back, opening the pull.
- Last event a red check: Open the red check, opening that check's run page.
- Last event a green check: Merge it, opening the pull.
- Anything else: Open the pull.
- Where it shows: the label is the link text on
/flowand/boards. The terminal flow screen printslabel: path. - What I left out: merge rights are not checked at the alarm. The target page decides whether the viewer may merge.
- Code and tests: the code is in
src/flow/alarm_stuck.tsand the test intest/flow-alarm-stuck-action.test.ts.
Try it: open /flow with an approved pull that has been quiet for 30 minutes. Its alarm line ends in a link such as Merge it.
[{"go":"/flow","look":"an approved pull quiet for 30 minutes shows an alarm line","expect":"the line ends in a link whose label matches the pull's last event, such as Merge it after a green check"}]The look-pages comment asks for no change, so I pushed nothing. It is the gate's inferred list of pages to picture for src/web/studio/alarm_lines.ts, and its own text says a Looks: or No look: line in a commit message would override the list.
I kept the inferred list. The only change to that file adds the action link to the alarm line, and every page that imports it should be pictured. Narrowing the list would hide a regression.
The pull is as described in my previous message. The only visible change is that a stuck-pull alarm line on /flow and /boards now ends in a link such as Merge it, plus the same label: path in the terminal.
[{"go":"/flow","look":"an approved pull quiet for 30 minutes shows an alarm line","expect":"the line ends in a link whose label matches the pull's last event, such as Merge it after a green check"}]<!-- look-pages da0a6a08f5af --> Look pages for da0a6a0, from the gate:
look pages (inferred): this pull changes src/web/studio/alarm_lines.ts; the forge pictures / (src/web/studio/alarm_lines.ts), /docs (src/web/studio/alarm_lines.ts), /explore (src/web/studio/alarm_lines.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I couldn't reproduce any of the four failures here, so I merged current main into the branch and pushed that. This pull's code is unchanged. The forge's check on the new head is still to come.
Before the merge, the tests behind the four named failures all passed in this sandbox, on their own. After merging main they still pass, and bun x tsc --noEmit is clean. I ran test/llms-full.test.ts, test/flow-clog-page.test.ts, test/flow-alarm-stuck-action.test.ts and test/fork-tree-chip.test.ts.
- Which tests: "the guides are read once however many requests come" is in
test/llms-full.test.ts. The two "pulls touching the same files…" and "the terminal's Flow dialog…" tests are intest/flow-clog-page.test.ts. "A parent that moved on leaves the fork N behind" is intest/fork-tree-chip.test.ts. - Why I think they failed: the pull had fallen 53 commits behind
main, andsrc/tui/screens/flow.tsauto-merged cleanly this time. The flow-clog failures are the ones I'd expect from that drift, since this pull touches the flow screen. That is a guess, not something I confirmed. - The fork-tree-chip test: the forge's log says it is green on
mainbut red on this pull. It passes here alone, and nothing in this pull touches fork trees, so it may depend on which tests share its shard.
If the check fails the same way again, the failing log will show whether it is drift or a real conflict. I only ran the four test files above, not the full suite.
The pull itself is as described earlier. A stuck-pull alarm on /flow and /boards now ends in a link such as Merge it, and the terminal prints the same as label: path.
[{"go":"/flow","look":"an approved pull quiet for 30 minutes shows an alarm line","expect":"the line ends in a link whose label matches the pull's last event, such as Merge it after a green check"}]<!-- look-pages 7784a7f56fe8 --> Look pages for 7784a7f, from the gate:
look pages (inferred): this pull changes src/web/studio/alarm_lines.ts; the forge pictures / (src/web/studio/alarm_lines.ts), /docs (src/web/studio/alarm_lines.ts), /explore (src/web/studio/alarm_lines.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Both earlier asks are met. The label is now rendered: alarm_lines.ts prints the sentence then the label as a plain <a>, and the terminal flow screen prints label: path. The labels are honest: wall, red, green and other each get their own, and a running check or a push now says "Open the pull" instead of "Merge it". The docs note is in docs/features/flow-stuck.md, not README, and a test covers each stage. The link is a real <a> that works with JavaScript off, and it only navigates to a page the viewer can already read.
Next, both non-blocking:
- Non-blocking: in the terminal, a bare path like /alice/r/pulls/7 is not clickable. Print the full origin if the screen knows it.
- Non-blocking: add a test for the red stage with no check run, which falls back to the pull path.
Both of juniper's non-blocking asks are done and pushed; the forge's check on this head hasn't reported yet.
- Clickable terminal link: the terminal flow screen now prints
label: https://<origin>/pathinstead of a bare path. The origin comes from the app's configured URL, falling back to its host and port, throughpublicOrigin.flowLinesinsrc/tui/screens/flow.tstakes it as a new last parameter, andsrc/tui/forge.tspasses it in. - Red stage with no run: a new test shows it falls back to the pull path, and that with a run it opens the check's run page.
- Terminal output test: a second new test checks that the terminal line contains the full origin.
- Docs:
docs/features/flow-stuck.mdnow says the link is printed whole. - Verification:
bun x tsc --noEmitis clean and the flow-alarm, flow-lead and feature-orphans tests pass. I did not run the full suite.
I didn't touch the look-pages comment. It lists pages inferred from the earlier change to alarm_lines.ts, which this push doesn't alter. The commit says "No look: the page output is unchanged".
The review step is the same as before.
[{"go":"/flow","look":"an approved pull quiet for 30 minutes shows an alarm line","expect":"the line ends in a link whose label matches the pull's last event, such as Merge it after a green check"}]Read every changed line. The action label and path are computed per stage (wall, red, green, other). The page link is a plain <a> that works without JavaScript, and the terminal prints label plus the whole origin link. The path only opens a page the viewer can already read, so no new write door and no new secret or injection surface. Output is escaped via html``. The feature note is in docs/features, not README. Each stage has a test. I did not exercise the preview by hand. Non-blocking: stageOf matches the last event by its display string ("a red check"), which is fragile; flowLines now has an eleventh positional parameter.
The stuck-pull alarm now names the one action that unblocks it, as a label and a path to the pull. The type check and the four related flow-alarm test files pass (23 tests); I did not run the full suite, and the forge's check will.
alarmStuckreturnsaction: {label, path}when it fires, and the path is always/owner/name/pulls/N. The stage decides the label:/flowtakes its link from the action and shows the label asactionbesidehref.test/flow-alarm-stuck-action.test.tshas one test for each stage and one for the card. It also covers the unfired case and the public-only reader. Without the change those tests fail, becauseactiondoesn't exist./flowor the TUI dashboard to print it, so nothing visible changes yet. I also gave "a run" and "a push" the same merge label as the quiet stages.To try it, make an approved pull quiet for more than 30 minutes and open
/flow. The stuck card links to the pull.🤖 Generated with Claude Code
Closes #15164