Repository navigation
Type-ahead and queue the next message during a run (#92) - #115
Merged
currentbits merged 1 commit intoAug 16, 2026
Merged
Conversation
The composer was hard-disabled while a thread was working, so the next instruction had to wait on the spinner. Now the prompt stays live: a send during a run is held in useCoder and delivered on that thread's run terminal, including "stopped" (interrupt-then-redirect is the point of typing mid-run). Queueing twice appends rather than replacing, so a second thought never silently drops the first. The queue lives at the useCoder level, not in ThreadView/Composer, so it still fires for a thread the user has switched away from. Only what cannot be queued — Build, Best of N, model, permission mode — stays locked while busy; archived threads keep the old hard lock. Co-Authored-By: Claude Opus 5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
currentbits
deleted the
coder/composer-is-hard-disabled-during-runs-al-389f73
branch
October 3, 2026 16:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #92.
Why
ThreadViewpasseddisabled={isWorking || isArchived}to the Composer, which disabled the textarea itself. While an agent worked you could not draft — let alone queue — the next instruction, so every run meant babysitting the spinner.What changed
src/useCoder.ts—startRunagainst a thread that is alreadyworkingholds the prompt instead of bouncing off the backend's "run already active". The existing working→terminal detection in thethread:updatedsubscriber delivers it. Queueing twice appends (first\n\nsecond) rather than replacing, so a second thought never silently drops the first. Delivery happens on any terminal includingstopped— interrupt-then-redirect is the reason you type mid-run;Cancelis there when you want the queued text gone instead.useCoderlevel, not inThreadView/Composer, so it still fires for a thread you have switched away from.src/components/Composer.tsx— newbusyprop. The prompt, attachments, @-mentions and Send stay live while a run is active;locked = disabled || busykeeps the things that cannot be queued (Build, Best of N, model, permission mode) gated as before.disablednow means only "archived", which keeps the old hard lock.ThreadView/App— passesbusy={isWorking}, hints the placeholder with "Queue the next instruction…", and renders a muted "Queued …" strip with a Cancel button under the working status strip.Known ceiling
The queue is renderer-side and in-memory, so a reload mid-run drops it (marked with a
ponytail:comment). Move it into the thread record if it needs to survive a restart.Tests
New
test/queuedFollowup.test.tsxdrives the realAppover the fake IPC surface: type-ahead mid-run, delivery exactly once on the terminal push, append-on-second-queue, and cancel (never runs).test/composer.test.tsxupdated: the old "run is active" block now covers archived threads; a new block covers busy (prompt live, Send queues, Build/model still locked).Full renderer suite green (691 tests),
npm run typecheckclean.PR created by the Claude Code agent