fix(story-mode): a stop names the step Claude was on and what its to-do list still had open

From review round 9: "You stop Claude here, during its step 3." said
where Claude was, not what that meant. The stop now carries the step's
own words, "during its step 3 (new tests under test/)", and when Claude
kept a to-do list, what was still open on it: "Not done yet: Write the
new tests; Update the README and 1 more."

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-18 16:15:16 +02:00
1 parent 70b1ebcc19
commit 79b37122df
4 files changed
+41 -4

No files matched your search

@@ -304,7 +304,7 @@
{
"kind": "complete",
"ok": null,
"story": "You stop Claude here, during its step 3. Saved before the stop: 2 commits.",
"story": "You stop Claude here, during its step 3 (new tests under test/). Saved before the stop: 2 commits.",
"director": "interrupted · 2 min 41 s · 5 tool calls · 4 files changed",
"balloon": "Step 3: new tests under test/.",
"tests": null,
+1 -1
View File
@@ -101,7 +101,7 @@ describe('Story Mode on real sessions', () => {
['human', true],
]);
expect(pages[3].panels.at(-1)?.story).toBe(
'You stop Claude here, during its step 3. Saved before the stop: 2 commits.'
'You stop Claude here, during its step 3 (new tests under test/). Saved before the stop: 2 commits.'
);
});
+25
View File
@@ -984,6 +984,31 @@ describe('buildStoryPage', () => {
expect(pageOf([prompt('c'), ...bash('b1', 'git commit -qm x', 'Commit', ''), end(1000)]).events[1].commits).toBe(1);
});
it('a stop names the step Claude was on and what its to-do list still had open', () => {
const stopped = (lines: unknown[]) =>
pageOf([...lines, prompt('[Request interrupted by user]')]).panels.find((p) => p.kind === 'complete')!.caption
.story;
expect(
stopped([
prompt('three things'),
tool('t1', 'TodoWrite', {
todos: [
{ content: 'Split the module', status: 'completed' },
{ content: 'Write the new tests', status: 'in_progress' },
{ content: 'Update the README', status: 'pending' },
{ content: 'Update CONTRIBUTING', status: 'pending' },
],
}),
result('t1', 'Todos have been modified successfully.'),
...bash('b1', 'git commit -qm "split"', 'Commit', ''),
said('Step 2: **new tests** under `test/`. First I work out the values.'),
])
).toBe(
'You stop Claude here, during its step 2 (new tests under test/). Saved before the stop: 1 commit. Not done yet: Write the new tests; Update the README and 1 more.'
);
expect(stopped([prompt('go'), ...bash('b1', 'ls', 'List', 'a')])).toBe('You stop Claude here.');
});
it('the first save in a folder Claude made a repository says so; a bare copy target does not count', () => {
const save = (lines: unknown[]) => pageOf(lines).panels.find((p) => p.kind === 'save')!.caption.story;
expect(