feat(composer): long-press send button to queue message#1613
Draft
bjspi wants to merge 1 commit into
Draft
Conversation
Tap the send button still sends (unchanged). A long-press now queues the draft instead, reusing the existing queue path (queueComposerMessage / onQueue) that already powers the "queue" send-behavior setting and Mod+Enter. This exposes queueing as a touch gesture so mobile users can queue a follow-up while an agent is running without changing a setting. - Add pure, tested runLongPressQueueAction helper in input/state.ts - queueMessageImpl now reports whether it queued, so haptic feedback only fires on a real queue (native only) - Send button gains an accessibilityHint (reuses composer.input.queueMessage) - Long-press is gated to the normal send state and to composers that actually support queueing Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Linked issue
None yet. There's no prior issue or design discussion for this. Per
CONTRIBUTING.md, a new feature normally wants a linked issue + design alignment first — happy to file a feature request and discuss scope/fit before you spend time on this, or to close it if long-press-to-queue isn't a direction you want. Opening as a draft for visibility.Type of change
What does this PR do
Adds a long-press gesture on the send button that queues the current draft instead of sending it. Tap/click still sends exactly as before — behaviour on a normal press is unchanged.
It does not introduce a new queue mechanism. It reuses the existing one (
queueComposerMessage/onQueue/ the sessionqueuedMessagesstore) that already powers thesendBehavior: "queue"setting and theMod+Entershortcut. This PR just exposes that same path through an additional trigger, so mobile users can queue a follow-up while an agent is running without changing a setting.Concretely:
runLongPressQueueActionincomposer/input/state.ts(queues, then fires an optional side effect only if something was actually queued).queueMessageImplnow returns whether it queued, so the native haptic only fires on a real queue.onLongPress(gated to the normal send state and to composers that actually support queueing) plus anaccessibilityHintreusing the existingcomposer.input.queueMessagestring — no new i18n keys.expo-haptics,isNative-gated) so the queue action is felt on mobile.Three files changed:
composer/input/input.tsx,composer/input/state.ts,composer/input/state.test.ts.How did you verify it
Honest disclosure up front: I have not run the app on a device/simulator, so there are no per-platform screenshots or video yet. I don't want to pass off automated checks as UI testing. What I actually ran, locally on this branch:
npm run test --workspace=@getpaseo/appscoped topackages/app/src/composer→ 97 tests pass (12 files), including 3 new unit tests forrunLongPressQueueAction(no-op when queueing unavailable; fires the side effect only when a message is queued; skips it when there's nothing to queue).npm run typecheck(app workspace, afterbuild:client+build:serverdeps) → clean.npm run linton the changed files → 0 warnings, 0 errors.npm run format(oxfmt) → all three files already match.What I have not done and what this still needs before merge:
Glad to gather that evidence or hand it off — flagging clearly rather than implying testing I didn't do.
Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatran (Biome/oxfmt)