From 6f64e557e528e89ade6517e5cdf9fc33ac749192 Mon Sep 17 00:00:00 2001 From: timkjr Date: Tue, 15 Sep 2026 23:37:26 -0500 Subject: [PATCH] docs(plan): fix session-creation test bug found by Task 4's implementer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task 4's implementer found two real bugs in this plan's browser-test helpers: POST /api/sessions nests the id at data.session.id (not data.id), and mode:'shell' needs a follow-up POST .../shell to actually spawn a PTY. Fixed in Task 4's own snippet (documentation accuracy — already fixed in the real committed code) and pre-emptively in Tasks 5/6's createShellSession() helper before either was dispatched, so neither implementer has to rediscover it independently. Also corrected the + ``` In `CLAUDE.md`, find the Frontend load-order line (`... → terminal-ui.js(7) → respawn-ui.js(8) → ...`) and insert `terminal-split.js(7.5)` between them, matching the existing `X.Y of 16` `@loadorder` numbering convention already used for other `.5`-numbered modules (e.g. `tab-rail-resize.js(6.5)`). @@ -704,7 +711,14 @@ describe('split-pane orchestration in a real browser', () => { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ workingDir: '/tmp', mode: 'shell' }), }); - return (await res.json()).data.id; + // POST /api/sessions nests the session under data.session, and mode:'shell' + // does not spawn a PTY on creation alone (pid: null, no pane) — an explicit + // POST .../shell is what actually starts it (both found and fixed by Task 4's + // implementer against this exact pattern; carried forward here so this task + // does not rediscover the same two bugs). + const id = (await res.json()).data.session.id; + await fetch(`/api/sessions/${id}/shell`, { method: 'POST' }); + return id; }); } @@ -971,7 +985,14 @@ describe('split-pane auto-collapse in a real browser', () => { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ workingDir: '/tmp', mode: 'shell' }), }); - return (await res.json()).data.id; + // POST /api/sessions nests the session under data.session, and mode:'shell' + // does not spawn a PTY on creation alone (pid: null, no pane) — an explicit + // POST .../shell is what actually starts it (both found and fixed by Task 4's + // implementer against this exact pattern; carried forward here so this task + // does not rediscover the same two bugs). + const id = (await res.json()).data.session.id; + await fetch(`/api/sessions/${id}/shell`, { method: 'POST' }); + return id; }); }