mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(story-mode): live helper steps behind an unchanged page, a clean reopen, no wedged view
From review round 7 (PR review):
- A helper's drawer froze while the helper worked: a background helper
writes only to its own transcript, so the parent page answered 304 and
the refresh returned before anything refreshed the drawer. An unchanged
page now still refreshes an open drawer's working helpers (ETag'd).
- A helper messaged twice read as superseded ("The trail stops here…"):
its one-page run took its ending from the first turn. It takes the last.
- More than 60 turns in a small file listed the newest 60 with no hint;
`older` is now set whenever the list leaves turns out.
- One /story request that never settled wedged the view, even across a
reopen. Requests carry a token and a 30 s timeout, and opening resets
the request state, with what was announced and shown.
- The background canvases (megabytes each at 2x) are released when Story
Mode closes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
91ee063fc2
commit
e7ce3b8e56
6 files changed
+132
-9
No files matched your search
@@ -202,6 +202,16 @@ describe('GET /api/sessions/:id/story', () => {
|
||||
expect(res.json().data).toMatchObject({ supported: true, turns: [], page: null });
|
||||
});
|
||||
|
||||
it('says when the list leaves turns out past the 60 it shows, even in a small file', async () => {
|
||||
const lines: unknown[] = [];
|
||||
for (let i = 0; i < 80; i++) lines.push(prompt(`job ${i}`), said('ok'), end(1000));
|
||||
writeFileSync(transcript, jsonl(lines));
|
||||
const { app } = await setup();
|
||||
const body = (await app.inject({ method: 'GET', url: URL })).json();
|
||||
expect(body.data.turns).toHaveLength(60);
|
||||
expect(body.data.older).toBe(true);
|
||||
});
|
||||
|
||||
it('404s an unknown session', async () => {
|
||||
const { app } = await setup();
|
||||
const res = await app.inject({ method: 'GET', url: '/api/sessions/nope/story' });
|
||||
|
||||
Reference in new issue
Block a user