Skip to content

fix(composer): queue follow-ups after limits, compaction, and background waits - #25

Draft
wSedlacek wants to merge 7 commits into
mainfrom
t3/queue-messages-after-resume
Draft

wSedlacek wants to merge 7 commits into
mainfrom
t3/queue-messages-after-resume

Conversation

@wSedlacek

Copy link
Copy Markdown

Reopened from closed upstream PR pingdotgg#32010 as a draft for t3.1code.
Idea rank: 24 of 108. Branch is as it was upstream; it likely needs a rebase (modernize) before review.

Problem

After a usage-limit stop, during provider compaction, or while a thread is waiting on an awaited command/subagent, follow-ups could not be queued: Send stayed busy, offered Submit/Steer, or started immediately instead of joining the queue.

Expected

Queue follow-ups in those states. They run after the limit continuation, compaction, or background wait finishes. Steer stays unavailable there. The Waiting banner and Stop action remain visible while background work holds the thread.

Approach

  • Server: queue_after_active waits behind a usage-limited run when no active run exists
  • Web/mobile: treat compaction and awaited background work as active for follow-up dispatch, without folding that wait into isWorking (which would hide the Waiting banner)
  • Mobile: detail-derived shells include pending background tasks so Queue still works when the shell stream is unavailable

Web and mobile share the same dispatch rules for one product behavior. Scope is the reported queue regressions; no separate issue was required beyond maintainer direction in this thread.

Test plan

  • vp run check:changed (format, lint, knip, typecheck, focused tests, react compiler)
  • Server: queues a message sent with Queue while a usage limit blocks the thread
  • Web logic: planComposerTurn / composerSendControlBusy for compaction and background wait
  • Hit a usage limit, Queue a follow-up, Resume — queued message waits for the continuation
  • While compacting, Queue a message — no stuck spinner; message joins the queue
  • While Waiting on a command/subagent, Queue a follow-up — banner/Stop stay; Steer not offered

Model/harness: Composer via Cursor / T3 Code.

🤖 Generated with Claude Code

wSedlacek and others added 7 commits November 9, 2026 09:11
…und waits

Queue messages sent while a usage limit blocks the thread, while the provider
is compacting, or while the thread is waiting on an awaited command or
subagent, instead of starting immediately or leaving the send button stuck.
Do not fold awaited background work into isWorking, which hid the banner and
Stop action. Populate pending tasks on mobile detail-derived shells so Queue
still works when the shell stream is missing.
Compact is a start_immediately send. Keep it unavailable during background
waits even though those waits stay out of isWorking for the Waiting banner.
…er-resume

# Conflicts:
#	apps/mobile/src/state/use-thread-composer-state.ts
#	apps/web/src/components/ChatView.tsx
#	apps/web/src/components/chat/ChatComposer.tsx
#	apps/web/src/components/chat/composerCommandKey.ts
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants