Skip to content

fix(mobile): keep the paperclip open while a reply streams - #1575

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Nov 9, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

What

The mobile composer's paperclip (attach) button stayed disabled for the whole
duration of a streamed reply. That guard was written when a send during a run
could only be refused; now that a send is queued behind the run instead, a text
draft could be queued but a draft with a photo could not — the one control that
adds the files was the one control the run locked.

This drops the remote.streaming term from the button's disabled/style
conditions. editable still locks it for the short upload/send phase, where a
new pick would race the submission already in flight, and a host without file
transfer still hides it. The queueing policy and the upload travel on the same
prompt command, so the photo reaches the session and runs at the turn boundary.

Commits

  • fix(mobile): keep the paperclip open while a reply streams

Verification

Run in the main worktree on the branch tip (da89b8e0b), mobile TypeScript only:

  • npx tsc --noEmit (mobile) → exit 0, no diagnostics
  • npx eslint src/features/chat/composer/ComposerToolbar.tsx src/features/chat/__tests__/ComposerDock.test.ts src/remote/__tests__/usePromptOutbox.test.ts → exit 0
  • npx jest --runInBand on the two touched suites → 2 suites passed, 104 tests passed
    (the main worktree's mobile/node_modules is missing @react-native/jest-preset, so the run resolved it via NODE_PATH pointing at another worktree's installed tree; no dependency or lockfile change was made)

User-visible changes

  • Mobile composer attach button: enabled while a reply streams (was: disabled for the whole streamed reply). A picked photo now joins the send and is queued behind the running turn, then sent at the turn boundary. Revert: cbaa5dedb.
  • No default, permission, migration or flag changes. Hosts without file transfer still hide the control, and the upload/send phase still locks it.

The attach button was disabled whenever `remote.streaming` was true, left
over from when a send during a run could only be refused. Since a send now
goes to the session's queue instead, a text draft could be queued and a
draft with a photo could not: the one control that adds the files was the
one control the run locked.

Drop the streaming guard (the short upload/send phase still locks it via
`editable`, and a host without file transfer still hides it). The queueing
policy and the uploads already travel on the same prompt command, so the
photo reaches the session and runs at the turn boundary.

Tests: the paperclip stays enabled and hands over with the queueing policy
while streaming; the outbox carries the attachment and the policy in one
prompt.
@huichen huichen changed the title fix(mobile): keep the attachment button usable while a reply streams fix(mobile): keep the paperclip open while a reply streams Nov 9, 2026
@huichen
huichen enabled auto-merge (squash) November 9, 2026 16:18
@huichen
huichen merged commit c5fab11 into main Nov 9, 2026
10 checks passed
@huichen
huichen deleted the pr/huichen branch November 9, 2026 16:38
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