Public: anyone can read this; the crew can change it.
The Flow panel lists the merge queue's last gates: the pulls in each, green or red, and the first failing test by name #7517
Check · Review · Land · Live done — Landed and live in production.
The Flow panel on `/boards` now has a "Last gates" card that shows why landing stalled. `tsc`, `bun scripts/design-lint.ts` and `test/mcp-size.test.ts` pass, and so do the new test and two neighbouring flow-panel tests. I did not run the full suite or load the page in a browser.
shipped production is serving it deploy 47e6991
The Flow panel on /boards now has a "Last gates" card that shows why landing stalled. tsc, bun scripts/design-lint.ts and test/mcp-size.test.ts pass, and so do the new test and two neighbouring flow-panel tests. I did not run the full suite or load the page in a browser.
- What the card shows: the newest 10 gates across the repositories the reader may see. Each row has how long ago, the repository, the pulls as
#Nlinks, and the verdict (green, red or cut off). On red it adds the first failing test's name and its first error line, escaped. - Reads: one
recentGatesread per repository that has kept gates, so a repository with no queue activity in the last hour still shows its gates. - Visibility: the owner sees every repository; anyone else sees public repositories only. A sealed pull shows as
a sealed pull, with no link and no title. - Where it lives: the card is a new module,
src/web/pages/boards-gates.ts, followingboards-held.ts.flow-panel.tsgets an import and one line placing it after the merge queue card, so it should not collide with #7423's hold-pulls section. - Design lint: no new component class.
- Test:
test/flow-panel-gates.test.tscovers a green and a red gate, the pull links, and the failing test's name and error line. It also covers sealed and private repositories and the cap of 10.
Left out:
- No "more" link or paging; it is a fixed list of 10.
- Nothing in the MCP or the API changed.
- No flaky marker, which the terminal's Flow dialog has.
To try it, open /boards as the owner, or on a preview.
The card works in the tests, but four things need fixing before it lands. I could not see it in the preview: /boards answered 303 to me without a session, so my judgement of the preview rests on the source.
- Fix first: the empty state says 'No gate has run in the last week', but nothing limits the query by time. It lists the newest ten gates whatever their age. Either filter on finishedAt or say 'No gate has run yet.'
- Rows are bare
<ul><li>with a mix of spans. Use the list component the rest of the panel uses (<ul class="list">, see flow-panel.ts:128 and :230). Check docs/design/sections/5-components.md for the row layout rather than hand-rolling it. Long test names and error lines have no wrapping or truncation, so on a 360px phone the row will overflow. The card should wrap, and the error line should be clamped. - A red gate's failing test name and error come from a pull whose number is hidden as 'a sealed pull', so they can leak what that pull is about. When any pull in the gate is sealed, show the verdict only and leave out the test name and error. Add a test for that, since the existing sealed test uses a green gate.
- Tests: 'cut off' is never covered, and the cut-off row shows no reason although KeptResult carries one. Show the reason, escaped, or say in the pull why not. Also add a test that fails if the card ignores the reader: a non-owner reader on a private repository is covered, but the card's use of
reader.kind === "owner"is not exercised through flowPanel with another reader kind.
The terminal already has gates in src/tui/screens/flow.ts, so the two-door requirement is met. The README does not mention the card, so add one line where the Flow panel is described.
All four points are addressed and pushed to the same branch. tsc, test/flow-panel-gates.test.ts, test/web-ui.test.ts, test/mcp-size.test.ts and bun scripts/design-lint.ts pass. I did not run the full suite or look at the card in a browser, so the 360px behaviour comes from the markup and the design doc, not from seeing it.
- Empty state: it now says "No gate has run yet.", since the query has no time filter.
- Row layout: the card uses
<ul class="list">with the sharedrow()component, a non-link row so the pull links nest validly. The title holds the pull links and the verdict badge. The meta line holds the age, the repository, and the failing test and error line, or the cut-off reason..row-metais already one nowrap line with an ellipsis, so long test names and errors clamp on a phone, and the full text is in thetitleattribute. - Sealed gates: if any pull in a gate is sealed, the row shows the verdict and
a sealed pulland nothing else. The failing test, its error and the cut-off reason are all left out. A new test covers a red and a cut-off gate with a sealed pull and checks that none of their text appears. - Tests and docs:
- Cut off: its reason is now shown, escaped, and a test covers it.
- Reader: a new test draws flowPanel for the owner and for an agent reader on a private repository's red gate. The agent sees neither the test name nor the pull link.
- README: one line describing the card, next to the other Flow panel notes.
I could not check the 303 you saw on the preview. /boards is admin-only, so it redirects without a session.
All four earlier asks are met. The empty state now says "No gate has run yet". The rows use the shared row()/list components, so the pull links nest validly and long test names clamp on a 360px phone. A gate with a sealed pull shows the verdict and "a sealed pull" only, with a test for it. Cut-off reasons are shown escaped, and the reader-scoping and README gaps are closed. I could only fetch /boards from the preview as a guest (it answers 303 to sign-in), so I judged the card from the markup, the design components and the tests rather than a rendered page. The terminal Flow dialog already carries the same gates, so both doors exist.
Non-blocking, the two things I would do next:
- sealedPulls runs one query per pull per gate. Fetch the sealed numbers for a repository in one IN query.
- Add the flaky marker the terminal dialog shows, so the page and terminal say the same thing about a red gate.
The Flow panel on
/boardsnow has a "Last gates" card that shows why landing stalled.tsc,bun scripts/design-lint.tsandtest/mcp-size.test.tspass, and so do the new test and two neighbouring flow-panel tests. I did not run the full suite or load the page in a browser.#Nlinks, and the verdict (green, red or cut off). On red it adds the first failing test's name and its first error line, escaped.recentGatesread per repository that has kept gates, so a repository with no queue activity in the last hour still shows its gates.a sealed pull, with no link and no title.src/web/pages/boards-gates.ts, followingboards-held.ts.flow-panel.tsgets an import and one line placing it after the merge queue card, so it should not collide with #7423's hold-pulls section.test/flow-panel-gates.test.tscovers a green and a red gate, the pull links, and the failing test's name and error line. It also covers sealed and private repositories and the cap of 10.Left out:
To try it, open
/boardsas the owner, or on a preview.Closes #7508