Repository navigation
feat(threads): add shell input to thread composers - #194
Merged
Merged
Conversation
nixuuu
added a commit
that referenced
this pull request
Nov 5, 2026
A message sent to an idle thread no longer flashes in the queue panel before it starts. It goes straight to the timeline as "Starting". **Cause:** `SendMessage` published the new turn as `queued` before it was dispatched, and the web listed every queued turn in the queue panel until the worker reported `running`. Dispatch itself sent no update. **Fix** - **Gateway:** an idle message and its worker command are saved and published together (`coreEnqueueTurn`), and dispatch now sends an update. New fields (additive): `Turn.dispatched` and `Thread.turn_starting`, both filled from the same dispatched condition. - **Web:** a queued turn that is already dispatched counts as starting. It shows "Starting" in the timeline, and the queue panel, its counters and its edit, reorder and remove actions leave it out. - **Steer:** a dispatched, starting turn is a valid steer target. The worker still decides whether to accept the steer; if it refuses, the message falls back to a real queued message. Without this, a shell steer (#194) sent during that window was queued instead of steered. **Tests:** `tests/integration/queue-dispatch.test.ts` covers: - an idle send that is dispatched from its first visible state; - a busy send that stays queued until its turn comes; - queue conflicts on a dispatched turn; - steer fallback; - older clients. The composer shell suite passes unchanged (17/17). `check:tmp`: 1321 passed, 0 failed. Checked in a browser (recording and screenshots) for an idle send, a send while a turn runs, and the hand-off to the next queued message. Copy audit: "Starting" is an existing status label. The flash has been there since the queue panel was added, so there is no fix link.
nixuuu
added a commit
that referenced
this pull request
Nov 5, 2026
…231) Stage 5 of 5, mobile UX: catch up with recent web features in the thread view. **Done** - Full access with confirmation. - The work group is open while the agent works and collapsed after the turn (the default fold behaviour from #195). - Tighter work rows in the `work` scale; commands in monospace. - The shell command card and `!` mode in the composer (#194). - "Starting" for a dispatched queued turn (#197). - File badges in the message bubble. - Finished subagents collapse into one count that opens the lineage panel (#182). - The type scale for overlays, chrome, work rows and the context row (#174/#193). - Rejected messages show their reason, instead of a generic retry note. **Deferred** - The work fold settings (per device on the web). - Badges placed inline in the text and queue editing (#200/#201); files stay as chips. - Linked computers in pickers (needs `LinkedComputerSnapshot` merging). - Worktree and ref in a new thread. - Approval countdown and expiry cards. - Connector errors. - Mentions, side threads and goal editing. **Checked** on the Android emulator, light and dark. `check:tmp`: 1425 passed, 0 failed. `expo lint` and `tsc` are clean. **Copy audit (§8):** - "Runs as a shell command when delivered." - "Starting" - "N finished subagents" - "Set and manage goals in Canopy on the web."
This was referenced Nov 13, 2026
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.
Typing
!at the start of a message turns the thread composer into shell mode. The command runs on the thread's worker, and the agent gets its output.Composer
!gives the composer a rose border and the hint "Runs as a shell command when delivered.". Removing the!leaves shell mode.When the command runs: at delivery, not when it is typed.
Where it runs: on the thread's worker, in the thread's workspace or worktree directory, through the user's login shell. stdin is closed, so interactive commands get EOF.
Limits
What the agent receives: a marked block, not the raw
!command:The block states that the output is untrusted data.
Timeline: a distinct "Shell command" card, with:
Safety and durability
Contracts: additive fields in
proto/canopy/ui/v1/gateway.protoandproto/canopy/worker/v1/worker_link.proto, plus capability negotiation.Tests
tests/integration/composer-shell.test.ts(17 tests):composer-shell-linked.test.tsandshell-recovery.test.ts.check:tmp: 1294 passed, 0 failed.Copy audit (§8):
Screenshots were checked in light and dark mode, at desktop and phone width, with long commands and with failing commands.
Not verified: live providers, and runs on macOS or Windows.