Skip to content

fix(mobile): support Android image attachments - #7375

Closed
mitchellmoss wants to merge 1 commit into
pingdotgg:mainfrom
mitchellmoss:agent/android-heif-attachments
Closed

fix(mobile): support Android image attachments#7375
mitchellmoss wants to merge 1 commit into
pingdotgg:mainfrom
mitchellmoss:agent/android-heif-attachments

Conversation

@mitchellmoss

@mitchellmoss mitchellmoss commented Aug 18, 2026

Copy link
Copy Markdown

What Changed

  • Expose the existing image picker in the collapsed Android composer.
  • Read picker URIs when Android does not return base64 data.
  • Convert HEIF and HEIC images to JPEG before attachment validation.
  • Validate the converted size and use the converted cache file for previews.
  • Add focused tests for URI fallback, conversion, and resource cleanup.

The provider attachment contract remains GIF, JPEG, PNG, and WebP.

Why

The native Android composer hides image picking until the editor expands. Android media providers can also return picker assets without base64 data, and HEIF or HEIC images do not match the provider upload contract.

Issue #2803 reports the same visible symptom on mobile web. This PR changes only the native Android client.

Checks completed:

  • vp test apps/mobile/src/lib/composerImages.test.ts (7 passed)
  • targeted vp lint
  • targeted vp format --check
  • vp run --filter @t3tools/mobile typecheck
  • Android release APK build
  • Samsung SM-F966U1 on Android 16: selected an 800 x 600 HEIF fixture through Android Photo Picker and confirmed the attachment thumbnail appeared without sending a message
  • Claude Fable 5 high-effort review: no blocking or important findings

UI Changes

A clean before-and-after screenshot is still needed before this draft is marked ready. Device UI-tree verification confirmed the collapsed attachment control and selected-image thumbnail.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • No animation or interaction timing changes

Model: GPT-5.6-Sol
Harness: Codex in T3 Code

Note

Add Android image attachment support with HEIF-to-JPEG conversion in mobile composer

  • Adds an 'Add attachment' ControlPill button to the collapsed composer view in ThreadComposer.tsx that triggers image picking.
  • Extends pickComposerImages in composerImages.ts to detect HEIF/HEIC images and convert them to JPEG using expo-image-manipulator, updating filename, MIME type, and preview URI accordingly.
  • Falls back to reading base64 directly from the file URI via expo-file-system when the Android image picker omits base64 data.
  • Error messages are tailored to reflect the filename and whether a HEIF conversion was attempted.
  • Risk: sizeBytes is set to undefined after HEIF conversion and recomputed from base64, which may cause size limit checks to behave differently for converted images.

Macroscope summarized ca961fc.

@coderabbitai

coderabbitai Bot commented Aug 18, 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 Plus

Run ID: b7a4c3bd-9778-4a1c-9053-9e6cc7825083

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 18, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Closing as part of the open-PR backlog sweep (wave 1).

Reason: Abandoned draft; mobile already picks/shares images and files via later landed work.
Related: #8237 / #8959 / #9929

Reopen if this is still wanted and you’re willing to rebase onto current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants