fix(story-mode): no celebration when the turn is not a clean finish

From review round 8: "Mission complete!" with confetti and cheering
helpers sat over balloons saying the page will not work as opened, a
helper's tests have not run, or a problem is left. The final panel is now
calm (no confetti, a neutral robot) whenever work was still out at the
turn's end, nothing worked, or Claude's last words name an open problem
(`page.openNote`: a key point about something wrong, not done, not
checked or not fixed); the last of these reads "Done, with a catch".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-18 15:23:19 +02:00
1 parent faca7571e2
commit 88040c997d
17 files changed
+80 -7

No files matched your search

+11 -2
View File
@@ -1436,7 +1436,14 @@ const StoryArt = (() => {
}
return;
}
if (p.page.noneWorked) {
// Not a clean finish (nothing worked, work still out, or Claude named an open problem): no party.
const calm =
p.page.noneWorked ||
p.page.helpersRunning ||
p.page.finishedLater ||
p.page.openNote ||
p.page.events.some((e) => e.running && !e.helper);
if (calm) {
agent(ctx, ax, 250, { frame: f, scale: sc, mood: 'neutral', l: [-34, -48], r: [34, -48] });
return;
}
@@ -2484,7 +2491,9 @@ Object.assign(CodemanApp.prototype, {
: page.helpersRunning || page.finishedLater || page.events.some((e) => e.running && !e.helper)
? // Work was still out when the turn ended (and maybe still is): not a clean finish.
'Done for now'
: 'Mission complete!';
: page.openNote
? 'Done, with a catch'
: 'Mission complete!';
const chips = rt.splash.querySelector('.story-chips');
const items = [];
if (page.durationMs !== undefined) items.push({ text: this._storyDuration(page.durationMs) });