Skip to content

fix(queue): show dispatched turns directly in the timeline - #197

Merged
nixuuu merged 1 commit into
devfrom
fix/queue-flash
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/queue-flash

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

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 (feat(threads): add shell input to thread composers #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.

Accept an idle message and its StartTurn command in one transaction, then publish dispatch state before worker delivery. Serialize admission with queue changes and prevent another turn from starting during the worker acknowledgement gap.

Add compatible turn and overview dispatch fields. Show starting turns in the timeline and exclude them from queue counters and actions. Keep steer fallback queued and preserve older clients.

Cover first visibility, running queue handoff, dispatched-turn conflicts and older protobuf clients with gateway integration tests.
@nixuuu
nixuuu merged commit 19f42ee into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/queue-flash branch November 5, 2026 16:24
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."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant