Skip to content

fix(mobile): Send composer images in upload wire format#4035

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
juliusmarminge:codex/pr3910-composer-image-uploads
Jul 16, 2026
Merged

fix(mobile): Send composer images in upload wire format#4035
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
juliusmarminge:codex/pr3910-composer-image-uploads

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 16, 2026

Copy link
Copy Markdown
Member

Extracted from #3910.

Converts client-only draft image attachments to the upload wire shape for direct turn starts and queued outbox retries, with focused composer-image tests.

Validation inherited from #3910: vp check and mobile native lint passed before the split. The full typecheck is currently blocked in this workspace by unavailable mobile dependencies (expo-blur, expo-quick-actions, and @tabler/icons-react-native).

Note

Fix composer image attachments to strip client-only fields before upload

Macroscope summarized 519da2d.


Note

Low Risk
Narrow serialization fix at send boundaries with a unit test; no auth or persistence changes.

Overview
Composer image drafts keep extra client fields (id, previewUri) for UI; startTurn expects UploadChatImageAttachment, which only includes type, name, mimeType, sizeBytes, and dataUrl.

This PR adds toUploadChatImageAttachments in composerImages.ts and uses it when building turn input in buildProjectThreadStartTurnInput (new threads / queued creation) and in use-thread-outbox-drain when retrying queued messages on existing threads. A unit test asserts the stripped wire shape.

Reviewed by Cursor Bugbot for commit 519da2d. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 589e1598-b5de-4f69-88be-792db14b0a60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 16, 2026
@juliusmarminge
juliusmarminge marked this pull request as ready for review July 16, 2026 09:09

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 5209b64. Configure here.

Comment thread apps/mobile/src/lib/projectThreadStartTurn.ts
@macroscopeapp

macroscopeapp Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Straightforward bug fix that strips client-only fields from image attachments before sending over the wire. The change is small, well-tested, and has clear intent with limited scope.

You can customize Macroscope's approvability policy. Learn more.

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge
juliusmarminge merged commit 2a33a18 into pingdotgg:main Jul 16, 2026
16 checks passed
adamfgr pushed a commit to agriffiths-bots/t3code that referenced this pull request Jul 17, 2026
* [codex] Fix onboarding connection status (pingdotgg#4001)

Co-authored-by: codex <codex@users.noreply.github.com>

* Isolate native diff highlight grammar state (pingdotgg#4029)

* Fix macOS fullscreen titlebar spacing (pingdotgg#4019)

* Prevent duplicate project workspace roots (pingdotgg#3829)

Co-authored-by: codex <codex@users.noreply.github.com>

* Normalize over-indented markdown list items (pingdotgg#4020)

Co-authored-by: codex <codex@users.noreply.github.com>

* Resolve localhost preview URLs for remote environments (pingdotgg#4011)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(mobile): Send composer images in upload wire format (pingdotgg#4035)

* Fix iOS terminal Enter input encoding (pingdotgg#4043)

* Add native mobile share target support (pingdotgg#4021)

Co-authored-by: codex <codex@users.noreply.github.com>

---------

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Ishan <ishansachu1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant