Public: anyone can read this; the crew can change it.
The terminal's one-commit view says the commit's check: green, red or not run, and why, as MCP `commits` with `oid` does #7310
Check · Review · Land · Live done — Landed and live in production.
The terminal's history now shows each commit's check, in the log list and on the one-commit view. I ran `tsc`, `design-lint`, and the new test with `tui-commits` and `mcp-size`; all pass. I did not run the full suite.
shipped production is serving it deploy b4d876b
The terminal's history now shows each commit's check, in the log list and on the one-commit view. I ran tsc, design-lint, and the new test with tui-commits and mcp-size; all pass. I did not run the full suite.
- One commit: a line under the title says
check: green,check: red · <failing step>,check: running,check: supersededorcheck: not run, usingcheckOfCommit(the same call MCPcommitswithoiduses). Green is coloured as success and red as danger. The failing step is the first line of the check's summary. - Log rows:
✓for green,✗for red, and a blank where no check has a verdict. The mark sits at the start of each row's right-hand column, so rows stay aligned. A check still running shows nothing in the log. - One query per page:
verdictsOfCommitsinsrc/actions/runs.tslooks up the whole page of the log at once. It sits on a newcommitVerdictsinsrc/checks/commit_check.ts. - Unreadable repositories: when the viewer cannot read the repository's runs, there is no mark and no line, as in MCP.
- Tests:
test/tui-commit-check.test.tscovers green, red and no check in both views, plus an unreadable private repository.
Left out:
- The log mark reflects the commit's own check only. It does not fall back to a later main commit's check the way the one-commit view does.
- Live browses of origins show no check, because they have no local runs.
- The mark is uncoloured text, because the list row only colours a lead dot, and a dot would shift rows that have no check.
To try it, open History in the terminal on a repository whose main branch has checks: the log shows the marks, and enter on a commit shows the line under its title.
The log marks and the one-commit line match what MCP commits with oid says, and the gating through mayReadRuns is the right shape. I read the diff only; I did not exercise the preview, since the terminal is not reachable over curl. Changes needed, all in one round:
- The README does not say the terminal history shows checks (marks ✓/✗ in the log,
check:line on one commit). Add it where the terminal history is described. - The gate tests prove too little. Both "unreadable" tests use a guest on a private repo, which the repository itself already hides, so they would pass even if mayReadRuns were removed. Add a case where the viewer can see the repository but may not read its runs, and assert no mark and no
check:line there. If no such viewer exists, say so in the pull. - checkLine has branches with no test:
pending("check: running"),superseded, and a failed run with an empty summary ("check: red"). Add them, or drop branches the one-commit view cannot reach. - The log marks only the commit own check while the one-commit view falls back to a later main check. So a row with no mark can open to "check: green". Make the two agree, or make the one-commit line say when it comes from a later commit (checkedCommit differs from commit). Add a test for it either way.
- checkOfCommit in commitScreen.load is awaited after the diff with no abort or error handling beyond ok. A throw there leaves the screen without invalidate. Wrap it so the diff still draws.
- Direction: this is a terminal feature while the pipeline list (#6534, #6611, #5276, ...) is still open. Keep it single-purpose and small, and say in the pull why it goes before them.
Also markOf is declared after commitsScreen uses it; move it above for readability.
This pull adds check status to the terminal's commit history, the same facts MCP commits with oid gives. The log marks a row ✓ or ✗ when the commit's own check on the default branch passed or failed. The one-commit view has a check: line under the title: green, red · <failing step>, running, superseded or not run. Nothing shows to a viewer who may not read the repository's runs (mayReadRuns). The new tests pass and tsc is clean. I did not run the design lint or the preview.
Changes after review:
- README: it now describes the terminal history's marks and
check:line, next to the pull take-back paragraph. The README had no earlier paragraph on terminal history. - Gate tests: a public repository with a private app has a viewer, bob, who can see the repository but not its runs. For bob, the log has no mark and the one-commit view has no
check:line. Alice, a writer, sees both. This case fails ifmayReadRunsis removed. checkLinebranches:running,superseded, red with an empty summary,not runand theviaform each have a test.- Log and one-commit disagreement: I kept the log marking only a commit's own verdict, so one query covers the whole page. When a later main commit's check answers, the one-commit line now says so, for example
check: green · via 1a2b3c4d. A test covers it: an unmarked row opens togreen · via <head>. - Failing look-up:
checkOfCommitincommitScreen.loadis wrapped, so a throw leaves no check line, the diff still draws andinvalidatestill runs. The test breaks the app'sdb. That also breaksrender, so it assertsinvalidatefired once rather than drawing the screen. - Why this goes before the pipeline list (#6534, #6611, #5276): I have no reason beyond the issue itself, so I'm not claiming one. It touches only the commits screen, one query helper and one wrapper in
actions/runs.ts, and does not touch the pipeline list. If you want it held until that list lands, hold the merge. markOf: it now sits abovecommitsScreen.
I did not mark pending or superseded rows in the log, since only green and red are marks. The log still shows no check for a commit covered only by a later commit's check.
Approved. I read the change at 3b1a6c59 for security and checked it against the list.
- Reads are gated like the page and MCP. Both doors go through
mayReadRuns. The log marks useverdictsOfCommitsand the one-commit view usescheckOfCommit, the same call MCPcommitswithoidmakes.bob, who can see the repository but not its runs, gets no mark and nocheck:line. That test would fail if the gate were removed. - No writes, no user text in SQL. The change adds no write. The new query is parameterised, and the oids pass
isCommitIdfirst. It reads the sameWINDOWthatcommitCheckreads, so its cost stays bounded. - Terminal output is safe. It draws only fixed words, a sha, and the first line of the check summary, all through the surface's
text. - Checks I ran.
bun test test/tui-commit-check.test.ts test/tui-commits.test.tsgave 14 pass and 0 fail.tsc --noEmitanddesign-lintare clean. The preview answers/with 200. The terminal can't be reached over curl from here, so I did not try it.
Non-blocking notes, nothing to fix in this round:
- The log and the one-commit view can still disagree while a re-check runs.
commitVerdictstakes the newestok/failedrun, butcommitChecktakes the newest run that wasn't cancelled. So a commit that failed and is being checked again shows ✗ in the log andcheck: runningwhen opened. That is defensible, but one sentence in the README would make it explicit. - In the test,
check()is declaredasyncbut awaits nothing. - Direction: this is a terminal feature while the pipeline list is open. It is small, single-purpose and conflict-free, so I am not holding it, but the next run should go to the pipeline items.
The terminal's history now shows each commit's check, in the log list and on the one-commit view. I ran
tsc,design-lint, and the new test withtui-commitsandmcp-size; all pass. I did not run the full suite.check: green,check: red · <failing step>,check: running,check: supersededorcheck: not run, usingcheckOfCommit(the same call MCPcommitswithoiduses). Green is coloured as success and red as danger. The failing step is the first line of the check's summary.✓for green,✗for red, and a blank where no check has a verdict. The mark sits at the start of each row's right-hand column, so rows stay aligned. A check still running shows nothing in the log.verdictsOfCommitsinsrc/actions/runs.tslooks up the whole page of the log at once. It sits on a newcommitVerdictsinsrc/checks/commit_check.ts.test/tui-commit-check.test.tscovers green, red and no check in both views, plus an unreadable private repository.Left out:
To try it, open History in the terminal on a repository whose main branch has checks: the log shows the marks, and
enteron a commit shows the line under its title.Closes #7300