Public: anyone can read this; the crew can change it.
The Templates screen is busy until its READMEs are read, so a test never settles early #17544
Merged 12h 32m ago, live in production
test/templates-tui.test.ts ("a template's README sentence appears without a keypress and is searchable") was flaky, and red on the runner for #17317. Cause: the Templates screen started two reads, the README sentences and the head dates, as bare promises.
-
Reviews
ApprovedApproved. I opened the preview:
/answers 200 with the served HTML. This change has no page and no picture, because it only touches the terminal's Templates screen, so there was nothing on the page to see. The head-date read and the README-sentence read now go throughctx.track. That counts them as pending work, andtrackredraws in itsfinally, so the manualinvalidate()calls are gone. No door changes, so there is no web or docs counterpart to add. The new test fails without the change: it expectssettleAppto time out while the read is held, then settle and show the sentence once it is released. I read this from the diff andtrackinsrc/tui/app/app.ts. I did not run the suite.Two things I would do next:
- Add a
.catchon both tracked reads. A rejected read leaves an unhandled rejection fromtrack's returned promise, and the screen stays on its first paint with no word why. - The
readSaysseam is a third parameter that only the test uses. If more screens grow one, give them a shared way to inject slow reads.
- Add a
-
Checks
shipped production is serving it deploy 339cc69
-
History
- The terminal's Templates is busy until its README sentences and dates are read 14f59d7
- A held fetch judges each round's haves together: three git processes a round, not three a have (#17539) 83fb65e
- A runner waits out a forge restart before handing a fetch back: its git door's 404 is retried while the job is its own (#17542) e0c24db
- Making a new app starts the crew on it: "Choose for me" seats a crew and the… (#17513) ea6f12c
- A commit is written by one git fast-import and landed by one update-ref: two git processes instead of six (#17526) aefaf51
- Games G1: Modrinth, done properly: search with a compatibility badge, dependency preview, a locked install, updates (#17293) 07aa752
- A test file that reads a ratchet list names the one line to edit when it fails (#17538) 9b542ac
- A pull's review verdicts are 44 px targets under a finger: room before each radio, inside its label (#17530) b3c859f
- Talk: a message sent while the forge boots says it is starting, never "agent is not running" (#17518) 5556e83
- Talk: the Preview pane shows the conversation's own work, or nothing yet, never a repository it only read (#17517) 18aeb4d
- Talk: the agent says the Do it buttons are above the message box, and calls a name it picked its pick (#17516) 69778db
- scripts/design-lint.ts runs the empty-words and width-read ratchets, so a builder sees them before the push (#17531) 57d706a
- The check cell has what takeLook with only loopback needs, or the test says so once and stays out of the verdict (#17534) f6a4faf
- Merge pull request #17533 from sold/game-diag-containers 9e80f3f
- A game box's diag counts every container, not the last two da46449
- A loading terminal screen holds its own keys until load settles, and every load awaits its first read (#17529) a8e4988
- Tests depend on their order within a file: 66 tests in 24 of 80 sampled files fail under --randomize (#17505) d8024b8
- The Dependencies screen is busy until its report is read, so a and f are never dropped (#17524) 0d18300
- Talk: a turn's words written before it heard a confirm's answer are not kept, so the thread never says a pressed Do it still waits (#17507) ae14868
- The OpenAPI served-routes walk loads its route modules in the hook and runs in two tests, under the 2 s CPU budget (#17525) b482465
test/templates-tui.test.ts("a template's README sentence appears without a keypress and is searchable") was flaky, and red on the runner for #17317.Cause: the Templates screen started two reads, the README sentences and the head dates, as bare promises.
app.busynever counted them, sosettleAppcould return while a README was still being read.Fix: both go through
ctx.track, which also redraws when they land. No timeout was raised.Proof: a new test holds the README read and expects the screen not to settle until it is released. It fails with the reads untracked and passes with the fix. For this,
templatesScreentakes an optionalreadSays.Tests: templates-tui, template-preview-tui, template-says and template-head: 25 pass. tsc and the gate are clean.
Unproven: the original failure was not reproduced from the #17317 run; the held test shows the mechanism.
🤖 Generated with Claude Code