Skip to content

feat(composer): long-press send button to queue message#1613

Draft
bjspi wants to merge 1 commit into
getpaseo:mainfrom
bjspi:feat/longpress-queue-send
Draft

feat(composer): long-press send button to queue message#1613
bjspi wants to merge 1 commit into
getpaseo:mainfrom
bjspi:feat/longpress-queue-send

Conversation

@bjspi

@bjspi bjspi commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature (interaction/UX change — no prior design alignment yet, see above)
  • Refactor / code improvement
  • Docs

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 session queuedMessages store) that already powers the sendBehavior: "queue" setting and the Mod+Enter shortcut. 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:

  • New pure helper runLongPressQueueAction in composer/input/state.ts (queues, then fires an optional side effect only if something was actually queued).
  • queueMessageImpl now returns whether it queued, so the native haptic only fires on a real queue.
  • The send button gains onLongPress (gated to the normal send state and to composers that actually support queueing) plus an accessibilityHint reusing the existing composer.input.queueMessage string — no new i18n keys.
  • Medium haptic feedback on native (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/app scoped to packages/app/src/composer97 tests pass (12 files), including 3 new unit tests for runLongPressQueueAction (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, after build:client + build:server deps) → clean.
  • npm run lint on 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:

  • Real on-device verification of the gesture on iOS, Android, desktop, and web (tap still sends; ~500 ms hold queues + haptic on native; queued item shows in the queue track; auto-dispatches on the running→idle transition). The queue logic itself is the existing, already-shipping path, but the long-press trigger and haptic have only been exercised by unit tests, not by hand on each platform.

Glad to gather that evidence or hand it off — flagging clearly rather than implying testing I didn't do.

Checklist

  • One focused change. Unrelated cleanups split out.
  • npm run typecheck passes
  • npm run lint passes
  • npm run format ran (Biome/oxfmt)
  • UI changes include screenshots or video for every affected platform — not done yet (see above)
  • Tests added or updated where it made sense

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>
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