fix(story-mode): a quoted report marks what it skips, a run that never loaded says so (review round 11)

From the fact-checker's last items:
- A helper's report quoted in a notice joined its first sentence to one
  from paragraphs later with nothing between: where text was left out,
  the balloon now says "…" (found in the report itself, so two
  sentences that follow each other are never marked).
- "The first run fails on purpose, as you asked" for a run that never
  loaded a test (a collection error) now reads "At first the tests don't
  even load, as you asked; the second run passes.", as a test panel
  already says it.
- A list intro without a count ("What failed and how I fixed it:") brings
  its items while they fit in 360 characters, not 260.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-18 18:05:48 +02:00
1 parent 1a66dbabfb
commit bcfef8af5b
4 files changed
+55 -10

No files matched your search

+24
View File
@@ -9,6 +9,7 @@ import {
buildStoryPage,
buildStoryTurns,
classifyBashCommand,
closingText,
createStoryReducer,
exactDuration,
firstSentence,
@@ -1103,6 +1104,29 @@ describe('buildStoryPage', () => {
expect(performance.now() - start).toBeLessThan(1500);
});
it('a quoted report marks only the text it skips with "…"', () => {
const report = [
'I wrote README.md and committed it.',
'It covers usage and the exit codes.',
'It reads the file and prints the counts for each column, one line per column. '.repeat(3),
'One known issue: big numbers are shown rounded.',
].join('\n\n');
// The second sentence follows the first: no mark. The issue is three paragraphs on: marked.
expect(
closingText(
report,
['It covers usage and the exit codes.', 'One known issue: big numbers are shown rounded.'],
' … '
)
).toBe(
'I wrote README.md and committed it. It covers usage and the exit codes. … One known issue: big numbers are shown rounded.'
);
// Claude's own closing words are never marked.
expect(closingText(report, ['One known issue: big numbers are shown rounded.'])).toBe(
'I wrote README.md and committed it. One known issue: big numbers are shown rounded.'
);
});
it('a short ending keeps the sentence that leaves something open', () => {
const page = pageOf([
prompt('run them'),