mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(story-mode): a new file counts what it ends with, a rewrite is a change, short endings are read (review round 11)
From the fact-checker: - A script created and then edited in the same panel showed "+95 -3": a file created in the span counts what it ends with, never lines removed from its own draft (+92), on the badge, the panel and the page. - "Claude writes 4 files" for files an earlier panel wrote and this one rewrote with here-documents: writing a file the turn already touched is changing it. - "Claude says: Compacted": a local command's output is the CLI's own, a note, not Claude's words. - "The CHANGELOG helper is still running" was dropped under "Mission complete!": key sentences were read only in endings over 160 characters; a short ending is read too, and that one is a note. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d3c55e04a3
commit
dc980d121c
9 files changed
+109
-36
No files matched your search
@@ -1063,8 +1063,12 @@ const StoryArt = (() => {
|
||||
// With several files the badge counts the card in front: a total beside one file's card read as
|
||||
// that file's own. The Director's cut has every file's count.
|
||||
const front = files.length > 1 && first ? edits.filter((d) => d.file === first.file) : null;
|
||||
const added = front ? front.reduce((n, d) => n + d.added, 0) : p.panel.added;
|
||||
const removed = front ? front.reduce((n, d) => n + d.removed, 0) : p.panel.removed;
|
||||
// A file created here counts what it ends with, never lines it removed from its own draft.
|
||||
const fa = front ? front.reduce((n, d) => n + d.added, 0) : 0;
|
||||
const fr = front ? front.reduce((n, d) => n + d.removed, 0) : 0;
|
||||
const fresh = !!front?.some((d) => d.created);
|
||||
const added = front ? (fresh ? Math.max(0, fa - fr) : fa) : p.panel.added;
|
||||
const removed = front ? (fresh ? 0 : fr) : p.panel.removed;
|
||||
if (added)
|
||||
sfx(
|
||||
ctx,
|
||||
|
||||
Reference in new issue
Block a user