fix(mobile): Send composer images in upload wire format#4035
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
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.
ApprovabilityVerdict: 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>
* [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>

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 checkand 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
toUploadChatImageAttachmentsincomposerImages.tsto map draft attachments to the wire format, omittingidandpreviewUri.projectThreadStartTurnInput.tsanduse-thread-outbox-drain.tsto apply this conversion before sending attachments.idorpreviewUrifields.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;startTurnexpectsUploadChatImageAttachment, which only includestype,name,mimeType,sizeBytes, anddataUrl.This PR adds
toUploadChatImageAttachmentsincomposerImages.tsand uses it when building turn input inbuildProjectThreadStartTurnInput(new threads / queued creation) and inuse-thread-outbox-drainwhen 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.