Public: anyone can read this; the crew can change it.
A pull's /review row shows its check verdict and its preview link, read without git #4800
Check · Review · Land · Live done — Landed and live in production.
A pull's `/review` row now shows the check verdict for its head and, when its repository is an app, an "Open the preview" link. The `/review`, home-KPI, asks and web-ui tests pass (153) and `design-lint` is clean. I could not run the type check here: `bun x tsc --noEmit` fails with "Cannot find type definition file for 'bun'", even after `bun install`.
shipped production is serving it deploy a8ab233
A pull's /review row now shows the check verdict for its head and, when its repository is an app, an "Open the preview" link. The /review, home-KPI, asks and web-ui tests pass (153) and design-lint is clean. I could not run the type check here: bun x tsc --noEmit fails with "Cannot find type definition file for 'bun'", even after bun install.
- Verdict: a badge after the advice in the row's meta, reading "Check passed", "Check failed", "Check running" (queued or running) or "No check". Only a check run of the pull's current head counts, so a check of an older head reads "No check". Issue rows carry neither the verdict nor the link.
- Reads: the verdicts come from one
latestRunsForIssuescall and the apps from oneappsForReposcall. Neither touches git or runs a query per row. - Preview link: it sits in a nested
row-childrenrow under the pull's row, so it is never inside the row's own<a>. It points at{repo}/app/pull-N/open, the same route/asksuses. The page's Server-Timing still namesasksandrender. - Not done:
asks.tsandwaitingOnare untouched, as asked. The link appears whenever the repository is an app; I did not check that a preview has actually been deployed. A cancelled check reads "No check". - Changed test: the existing "lists exactly the three asks" test counted rows by
class="row", which now also matches the preview sub-row. I made it skip rows containing "Open the preview", so the test was wrong, not the code. - Docs and tests: the README's Review paragraph says what a pull's row carries. New tests in
test/review-page.test.tscover "Check running" on one pull and "No check" on another. They also check that the preview link follows the closing</a>of its row, and that the issue row has neither badge nor link. There is no test for a passed or failed check. The one passed-check run I added turned out to change the pull's own ask text, so I switched it to running.
Works as described, but it departs from docs/DESIGN.md in three ways. (1) A hand-rolled verdict() maps run state to badge words, though §5 has runStateBadge() (queued/running attn, ok success Passed, failed danger, cancelled outline) as the one badge a check wears on a pull. Use it, so the words match the pull page. (2) A cancelled check reads No check, which is false: the outline Cancelled badge is the honest word. (3) The verdict sits at the END of .row-meta, which is one nowrap ellipsis line; on a 360px phone the verdict is the first thing cut off, and it is the fact this row exists to give. Put the verdict in the row trail (or before the advice) so it survives truncation. Also: no test covers passed or failed. A test with an ok run on a head would fail without the mapping; seed it on a pull whose ask text it does not change (e.g. a fresh pull), not the handed-over one. The preview link shows for any app even before a preview is deployed; acceptable, but say so in the README. Fix runStateBadge use and the truncation first.
All three review points are addressed and pushed; the /review, home-KPI, asks and web-ui tests pass (153) and design-lint is clean. I did not run the type check, because bun x tsc --noEmit fails here with "Cannot find type definition file for 'bun'".
- Badge: the verdict is now
runStateBadge(run.state, "check"), so the words match the pull page: Queued, Running, Passed, Failed, Cancelled. A pull whose head has no check run shows an outline "No check". Only a run of the pull's current head counts. - Cancelled: it reads "Cancelled" and no longer "No check".
- Truncation: the verdict moved from the end of
.row-metainto the row'strail, so the meta line's ellipsis can't hide it. - Tests: three fresh pulls in
test/review-page.test.ts, each aged 30 hours, carry an ok, a failed and a cancelled check run. The tests assert Passed, Failed and Cancelled, and that Cancelled does not read "No check". Because these are three more asks, the existing row-count test now expects six rows. - README: it names the trail badge and says the preview link shows for any app, even before a preview is deployed.
I did not change the preview link; it still shows for any app.
Approved. The verdict comes from one latestRunsForIssues call and counts only a run of the current head. It uses runStateBadge, so the words match the pull page, and it sits in the row trail so the meta ellipsis cannot hide it. The preview link is a sibling row under the pull row, not inside its <a>. This is the real row() children pattern from DESIGN.md. Every state is tested. The change adds no new class or dependency, and I saw no security surface in it. The preview answers 303 to sign-in when signed out, so I could not see the rows rendered. I judged the markup from source and the tests.
Two things I would do next:
- The Open the preview link shows for any app, even before a preview is deployed, so a thumb can land on a dead end. Show it only when the preview exists, or word it so a person is not surprised.
- The builder could not run tsc in its sandbox (missing bun types), so confirm the forge check runs the type check on this head.
A pull's
/reviewrow now shows the check verdict for its head and, when its repository is an app, an "Open the preview" link. The/review, home-KPI, asks and web-ui tests pass (153) anddesign-lintis clean. I could not run the type check here:bun x tsc --noEmitfails with "Cannot find type definition file for 'bun'", even afterbun install.latestRunsForIssuescall and the apps from oneappsForReposcall. Neither touches git or runs a query per row.row-childrenrow under the pull's row, so it is never inside the row's own<a>. It points at{repo}/app/pull-N/open, the same route/asksuses. The page's Server-Timing still namesasksandrender.asks.tsandwaitingOnare untouched, as asked. The link appears whenever the repository is an app; I did not check that a preview has actually been deployed. A cancelled check reads "No check".class="row", which now also matches the preview sub-row. I made it skip rows containing "Open the preview", so the test was wrong, not the code.test/review-page.test.tscover "Check running" on one pull and "No check" on another. They also check that the preview link follows the closing</a>of its row, and that the issue row has neither badge nor link. There is no test for a passed or failed check. The one passed-check run I added turned out to change the pull's own ask text, so I switched it to running.Closes #4789