mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-02 08:59:32 +01:00
fix(story-mode): a push in its own command is not a commit
From review round 6: commit, then push as a second command (the most common way to ship) drew as "Claude saves the work in 2 commits and uploads it." for one commit, and the commit's message was dropped. A command's `commits` was only recorded above one, and the save panel then counted every save command as one. It is now recorded whenever a command commits and is the only thing counted: "Claude saves the work and uploads it: "feat: add mode()"." A push of earlier commits reads "Claude uploads the work." Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c36700a9c0
commit
c5ee5aaf0a
4 files changed
+38
-13
No files matched your search
@@ -950,6 +950,22 @@ describe('buildStoryPage', () => {
|
||||
expect(page.filesChanged).toBe(2);
|
||||
});
|
||||
|
||||
it('a commit then a push in its own command is one commit, named; a push alone only uploads', () => {
|
||||
const save = (lines: unknown[]) => pageOf(lines).panels.find((p) => p.kind === 'save')!.caption.story;
|
||||
expect(
|
||||
save([
|
||||
prompt('ship it'),
|
||||
...bash('b1', 'git commit -qm "feat: add mode()"', 'Commit', ''),
|
||||
...bash('b2', 'git push origin main', 'Push', 'To ./origin.git\n f80bb31..3e0fb80 main -> main'),
|
||||
end(1000),
|
||||
])
|
||||
).toBe('Claude saves the work and uploads it: "feat: add mode()".');
|
||||
expect(save([prompt('push'), ...bash('b1', 'git push', 'Push', 'Everything up-to-date'), end(1000)])).toBe(
|
||||
'Claude uploads the work.'
|
||||
);
|
||||
expect(pageOf([prompt('c'), ...bash('b1', 'git commit -qm x', 'Commit', ''), end(1000)]).events[1].commits).toBe(1);
|
||||
});
|
||||
|
||||
it('a python or node script fed by a here-document: the files it opens for writing, never guessed', () => {
|
||||
const files = (command: string) => heredocWrites(command, '/w').map((d) => d.file);
|
||||
expect(
|
||||
|
||||
Reference in new issue
Block a user