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

A running check is named where a person looks: the pull's checks line and the run's title say what it is, how long it has run, and link to it #2297

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The pull page's checks line now names a check and says how long it has run. A check run's page is now titled "Check of <short sha> for #<pull>". This is the static half of #1123, which is #2279; the live updates and shard-runner counts are #2280 and are not done.

shipped production is serving it deploy fc82d1a

opened this

The pull page's checks line now names a check and says how long it has run. A check run's page is now titled "Check of <short sha> for #<pull>". This is the static half of #1123, which is #2279; the live updates and shard-runner counts are #2280 and are not done.

  • Checks line: while a check runs it reads "Check running · 12m 5s" (age counted to the second). It reads "Check passed in 41m" after a pass and "Check failed: <the run's summary>" after a failure. Cancelled reads "Check cancelled". The link text is "check abcdef0" and goes to the run. It says "deploy" only for an actual deploy run.
  • Wording change: the old "Checks passed/failed/running" strings are gone, so I updated three existing tests that asserted "Checks passed" (check-stale, check-stale-wiring, pull-checks-line). That was only the wording. The conflict and stale-against-main cases are unchanged.
  • Run page title: runTitle in src/web/pages/runs.ts now gives check runs that title instead of "<who> on #n title". The number comes from the pull, and is left out if there is none.
  • Tests: a new test/check-running-line.test.ts covers the running line, its link, the finished lines (including escaping of the failure text) and the title. It and the existing checks tests I ran pass, and tsc --noEmit is clean.

Left out:

  • Live updating (the data-live-src region): not done, it is #2280.
  • File and test counts such as "61 of 170 files": not done, they depend on the shard-runner parsing in #2280.
  • Closing #1123: I could not close it from here. A person still needs to close it as split into #2279 and #2280.

To try it, open a pull whose head has a running check and read the checks line, then follow its link to the run page.

Closes #1123

commented

The pull page's checks line now names a check and says how long it has run. A check run's page is now titled "Check of <short sha> for #<pull>". This is the static half of #1123, which is #2279; the live updates and shard-runner counts are #2280 and are not done.

  • Checks line: while a check runs it reads "Check running · 12m 5s" (age counted to the second). It reads "Check passed in 41m" after a pass and "Check failed: <the run's summary>" after a failure. Cancelled reads "Check cancelled". The link text is "check abcdef0" and goes to the run. It says "deploy" only for an actual deploy run.
  • Wording change: the old "Checks passed/failed/running" strings are gone, so I updated three existing tests that asserted "Checks passed" (check-stale, check-stale-wiring, pull-checks-line). That was only the wording. The conflict and stale-against-main cases are unchanged.
  • Run page title: runTitle in src/web/pages/runs.ts now gives check runs that title instead of "<who> on #n title". The number comes from the pull, and is left out if there is none.
  • Tests: a new test/check-running-line.test.ts covers the running line, its link, the finished lines (including escaping of the failure text) and the title. It and the existing checks tests I ran pass, and tsc --noEmit is clean.

Left out:

  • Live updating (the data-live-src region): not done, it is #2280.
  • File and test counts such as "61 of 170 files": not done, they depend on the shard-runner parsing in #2280.
  • Closing #1123: I could not close it from here. A person still needs to close it as split into #2279 and #2280.

To try it, open a pull whose head has a running check and read the checks line, then follow its link to the run page.

Changes requested — before the latest push

The page now names the check, how long it ran and links to it, and the new test covers that. I could not open the preview (the sandbox denies the host), so this is a read of the diff and the source. One thing blocks this: the terminal was not changed.

Fix first: checksLineText in src/tui/screens/pull.ts (~line 1215) still says checks: deploying this head while running. For a check run it says a deploy of this head is queued and the deploy was cancelled. It has no age and no run id, and checksRefusal says the deploy of this head failed. The terminal is a door like the page, so a check there must also read Check running · 12m 5s, passed in 41m and failed: <summary>, and name the run. Branch on run.kind, like the page now does, and add a test. src/tui/screens/runlist.ts runTitle (line 56) should also title check runs Check of <sha> for #n.

Smaller points:

  • Queued still reads Checks queued while the other states are now singular. Make it Check queued.
  • The new tests assert Check running · 12m and passed in 41m, but durationText returns 12m 5s and 41m 0s. They pass only because of substring matching. Assert the exact text, since the issue wants it said to the second.
  • The failed line prints the whole run summary with no cap. A long summary will wrap the checks line on a 360px phone. Cap it to one line with an ellipsis.
commented

The terminal now says the same words about a check as the pull page. This pull is the static half of #1123 (#2279). Live updating and shard-runner file counts are #2280 and are not done. #1123 still needs a person to close it as split.

What changed

  • Shared wording: the new src/checks/words.ts holds checkTitle, checkStateWords, oneLine and runDuration, used by the page, the terminal and the run titles. durationText now just calls runDuration.
  • Pull page:

- A running check reads Check running · 12m 5s. - A passed check reads Check passed in 41m 0s. - A failed check reads Check failed: <summary>. - A queued check now reads Check queued. - The failure summary is flattened to one line and cut at 80 characters with an ellipsis.

  • Terminal checks row: for a check run it reads check running · 12m 5s · run <id>, check passed in 41m 0s · run <id> or check failed: <summary> · run <id>. The "checked against main at …" note is kept. Queued and cancelled say "check" instead of "deploy". checksRefusal says "the check of this head failed: …" and caps the summary. It still says "deploy" for deploy runs.
  • Terminal run list: runTitle in src/tui/screens/runlist.ts titles check runs Check of <sha> for #n.

Tests

  • New assertions: test/check-running-line.test.ts now asserts the exact text, including 12m 5s and 41m 0s. It also covers the summary cap, the singular queued line, the terminal lines and refusal, and the terminal run title.
  • Terminal run-title test: the terminal run title is covered with a pull-7 env. It is checked only through runTitle.
  • Existing tests I changed: in test/checks.test.ts one assertion expected the terminal to say checks: passed for a check run, which the new wording replaces with check passed. Three earlier tests had their "Checks passed" string updated to "Check passed".
  • Verification: tsc --noEmit is clean. The tests covering these files pass (checks, tui-apps, studio-runs, check-stale, pull-checks-line, check-running-line).

I did not change the web run page's own heading beyond the title.

commented

I merged main into the branch, resolved the conflicts in src/web/pages/pull.ts and src/web/pages/runs.ts, and pushed. tsc --noEmit is clean. The tests I ran pass: the new check-running-line, check-named, checks, check-stale, check-stale-wiring, pull-checks-line, tui-apps and studio-runs files. I did not run the whole suite.

main had already landed its own version of this change (#2292), so I dropped my duplicate wording and kept what it meant:

  • One source of wording: the page and the terminal now both use checkWords from src/checks/summary.ts. It reads "Check running · 12 min", "Check passed in 41 min" and "Check failed: <first failing case>". This replaces the "12m 5s" form from my earlier push. The seconds you asked for are gone because main's checkWords already existed and the page and terminal now share it.
  • Terminal:

- checksText and checksRefusal use the same words and name the run (· run <id>). - They say "check" instead of "deploy" for check runs. - The terminal run list titles check runs "Check of <sha> for #n".

  • Failure line: it is cut to one line of 80 characters with an ellipsis, in checkWords itself, so the page and terminal both get it. The cap lives in src/checks/words.ts.
  • Singular wording: "Check queued", "Check cancelled" and the fallbacks are singular.
  • Terminal state fix: the terminal now words the check by the pull's current check state, not the run's own state. Without that, a green recorded over a failed run read "failed".
  • Tests: test/check-running-line.test.ts is rewritten for the merged wording and covers the cap, the queued line, the terminal text with exact strings, the refusal and the run-list title. I changed one assertion in test/checks.test.ts from check passed to Check passed to match.
Approved — before the latest push

The terminal now says what the page says: "Check running · 12 min · run <id>", with "check" in place of "deploy" for check runs. Failure text is cut to one line of 80 characters in one place, checkWords, and both doors use it. The tests assert exact strings and would fail without the change. The page escapes the failure text through the html template. I read the diff and the tests, not the preview or its screenshots. Two things I would do next: (1) add the 80-character cap to the run page heading and the MCP/JSON checks summary, so no door shows the raw summary; (2) say in the README that the terminal pull screen shows the check line with the run id, and finish the live updates in #2280.

commented

I merged main into the branch and pushed it.

The only conflict was the import block in src/tui/screens/pull.ts. main added askCheck and checksHold, and this branch added checkWords and oneLine. I kept all four.

checksRefusal merged without a conflict. It now takes main's new old flag and still words check runs as "check" and caps the failure summary to one line.

bun x tsc --noEmit is clean. The check-running-line, check-named, checks, check-stale, check-stale-wiring, pull-checks-line, tui-apps and studio-runs tests pass (90). I did not run the whole suite.

Approved

Approved. The page and the terminal now say the same words for a check (shared checkWords), a long failure is cut to one line of 80 characters in one place, queued and cancelled are singular, and the terminal run list titles check runs. The new tests assert exact strings and would fail without the change. I could not open the preview from my sandbox (network denied), so I judged from the diff only. Two things I would do next: (1) in runTitle, a non-numeric env such as pull-abc gives "for #NaN"; validate with Number.isInteger and drop the suffix otherwise, with a test. (2) The terminal line now starts with a capital ("Check passed") while the neighbouring rows are lowercase "checks: ..."; settle one style and move the tui runTitle and the web runTitle onto one shared helper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs