fix(story-mode): name the check that failed, say whose plan a failure was, and when background work finished

From review round 9:
- "another check" was too vague to act on. A check other than the tests
  is named by its tool: a layout check (a formatter), a style check (a
  linter), a type check, the build. "Fix and test, 2 rounds: a test fails
  and Claude fixes it, then a layout check fails and Claude fixes that;
  everything passes."
- A failure the prompt asked for reads "The first run fails on purpose,
  as you asked; the second passes." ("The tests don't even load, as you
  asked."); one Claude planned itself keeps "Test first: … as planned".
- A test run sent to the background that reported in a later turn reads
  "Claude starts the tests in the background; later they pass.", not as
  if they passed in that turn.
- The test board says "1 test" and, when nothing loaded, "1 error".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-18 15:45:17 +02:00
1 parent 59d70caeb3
commit 555efef53d
9 files changed
+66 -35

No files matched your search

+7 -2
View File
@@ -689,6 +689,11 @@ const StoryArt = (() => {
return { w, h };
}
/** A terminal card: the commands (`› …`), then, dimmer, the first lines one of them printed. */
/** A test board's label: "1 test", "19 tests", or "1 error" when nothing even loaded. */
function boardLabel(t, total) {
if (t && !t.passed && !t.failed && t.errors) return `${t.errors} error${t.errors === 1 ? '' : 's'}`;
return `${total} test${total === 1 ? '' : 's'}`;
}
function terminal(ctx, x, y, w, h, lines, f, printed = []) {
rr(ctx, x, y, w, h, 7);
inked(ctx, C.line, 2.5);
@@ -1094,7 +1099,7 @@ const StoryArt = (() => {
const dots = Math.min(42, total);
const fail = bad ? Math.max(1, Math.round((bad / total) * dots)) : 0;
const fill = running ? (f * 0.6) % (dots + 6) : Math.min(dots, (f - 4) * 1.6);
b = board(ctx, 16, 106, `${total} tests`, dots, fail, fill);
b = board(ctx, 16, 106, boardLabel(t, total), dots, fail, fill);
} else {
b = verdict(ctx, 16, 106, 'checks', p.panel.ok, f);
}
@@ -1153,7 +1158,7 @@ const StoryArt = (() => {
if (total) {
const dots = Math.min(28, total);
const fail = bad ? Math.max(1, Math.round((bad / total) * dots)) : 0;
b = board(ctx, bx, 116, `${total} tests`, dots, fail, Math.min(dots, (f - 4) * 1.6));
b = board(ctx, bx, 116, boardLabel(t, total), dots, fail, Math.min(dots, (f - 4) * 1.6));
} else b = verdict(ctx, bx, 116, 'checks', p.panel.ok, f);
hit('output', bx, 116, b.w, b.h, 'See the test output');
}