From 8d2a4f9611b6b538cc0a7c03d7174db54589db7f Mon Sep 17 00:00:00 2001 From: Lexus2016 Date: Sun, 15 Nov 2026 14:06:43 +0100 Subject: [PATCH 1/2] engine: a finished turn no longer reads busy for ten minutes (#130) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit paneBusy() gates every exit of the subscription poll loop except the idle watchdog, so a pane that reads busy forever ends a turn the TUI already finished as a 10-minute timeout while the live pane shows the answer. - The elapsed-timer signal matched the whole pane. CLI 2.1.311 renders a finished subagent as "Done (3 tool uses · 12.4k tokens · 8s)", which matched for as long as it stayed on screen. It now matches only a spinner-shaped line (ellipsis verb), above the input box. - The animation signal diffed the whole pane, so a statusline clock or a draft typed into the live pane read as a spinner. It now diffs only the conversation above the input box; no box on screen falls back to the whole pane as before. - RULE_RE accepts a labeled rule: a chat opened with --name draws its title into the box's top rule, and the box was invisible in exactly the studio's chats (which also let a numbered draft read as a #20 widget). - The idle-timeout error names the signal that last held the pane busy. test/pane-busy.test.js pins both directions; each change reverted alone turns cases red. --- CLAUDE.md | 15 ++++++- claude-interactive.js | 70 +++++++++++++++++++++++-------- package.json | 2 +- test/pane-busy.test.js | 94 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 160 insertions(+), 21 deletions(-) create mode 100644 test/pane-busy.test.js diff --git a/CLAUDE.md b/CLAUDE.md index 6eef731..4db091d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -32,7 +32,7 @@ npm run release # bump, commit, tag, push → GitHub npm run release:mac # on the Mac with the cert: build, notarize, verify, upload, bump the cask ``` -No linting and no build step configured. `npm test` chains 108 test files under `test/`: 20 DOM-less render/UI-logic tests (`test/render/*.test.mjs`, run through `node --test`) plus 88 plain-`node` suites in `test/` covering the focused workspace and its Back/Forward history (`focused-workspace.test.js`, `secondary-navigation.test.js` — see "Focused workspace navigation" below), the form workflows of every section (`settings-ux`, `team-forms-ux`, `section-controls-ux`, `page-forms-ux` — see docs/SECTION-CONTROLS-REVIEW.md), the sidebar rows and chat delete (`sidebar-ux.test.js` runs the real `delSess`/`delSelectedHist` in a `vm`: a 409 `UNMERGED_WORK` is asked about and resent with force, never swallowed — both doors used to close the tab and reload, so the chat came straight back; and it pins that hover-only row actions take no width on a mouse), the overload detector, env load order, multi-agent results, terminals, bots, telegram, updates, kanban scheduling, the Kanban card's run-settings badges (`kanban-run-badges.test.js` pins the card's model/effort/engine chain against the one `startTask` actually resolves — the two live in different files and the card silently lies when they drift), the board-only `create_task` status (`task-backlog.test.js`), session expiry (`session-expiry.test.js` boots a real server TWICE against one `APP_DIR`, ages sessions in SQLite between the boots, and pins that expiry removes the worktree, branch and queued messages of a clean session while keeping one with uncommitted work, its Kanban cards, and an orphan tree younger than an hour), the external agents' model/effort catalogs (`agent-catalog.test.js` — #123: the Settings form and `POST /api/external-agents` both carry them, and the browser's comma parser is RUN against the server sanitiser so the two cannot drift), the Kanban group form (`kanban-group-button.test.js` RUNS the real `buildChainForm` in a `vm` context so a stray free variable in its template throws there instead of silently killing the modal — see #115 — and parses every inline `