Skip to content

fix(mobile): accept Android clipboard images in composer - #4836

Open
adityavardhansharma wants to merge 1 commit into
pingdotgg:mainfrom
adityavardhansharma:agent/android-clipboard-image-paste-v2
Open

fix(mobile): accept Android clipboard images in composer#4836
adityavardhansharma wants to merge 1 commit into
pingdotgg:mainfrom
adityavardhansharma:agent/android-clipboard-image-paste-v2

Conversation

@adityavardhansharma

@adityavardhansharma adityavardhansharma commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Wrap the Android native composer with the existing TextInputWrapper clipboard integration.
  • Route pasted image URIs through the existing composer attachment flow without changing iOS behavior.

Why

Android keyboards and clipboard history can send images through the platform receive-content API instead of a normal text paste. The native composer was not connected to the repository's existing paste-input integration, so Android reported those images as unsupported.

Reusing the established wrapper keeps the change focused and avoids a second native content parsing and caching implementation.

Validation

  • vp check apps/mobile/src/native/T3ComposerEditor.native.tsx
  • vp run typecheck (from apps/mobile)
  • git diff --check origin/main...HEAD

Checklist

  • This PR is small and focused
  • I explained what changed and why

Note

Accept Android clipboard images in the mobile composer

  • Wraps the native composer view in a TextInputWrapper (from expo-paste-input) and adds a useNativePaste hook in T3ComposerEditor.native.tsx to intercept paste events and forward image URIs to onPasteImages.
  • The existing native onComposerPasteImages path is retained alongside the new hook-based path.
  • Behavioral Change: the external style prop now applies to TextInputWrapper instead of NativeView; NativeView always uses { flex: 1, minHeight: 0 }, which may affect layout in some screens.

Macroscope summarized 75d0e1d.


Note

Low Risk
Focused mobile UI integration reusing an established paste helper; main review surface is possible composer layout regressions from moving style to the wrapper.

Overview
Android clipboard images in the native composer now go through the same expo-paste-input path as other mobile inputs: TextInputWrapper plus useNativePaste, forwarding image URIs to the existing onPasteImages attachment flow. The native onComposerPasteImages handler is unchanged for platforms that still emit it.

Layout: the composer’s external style prop applies to TextInputWrapper (with minHeight: 0); the inner NativeView always uses { flex: 1, minHeight: 0 } instead of inheriting that style directly.

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

@coderabbitai

coderabbitai Bot commented Jul 29, 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: 6de5bbe9-509d-483b-bcec-a91fe4968939

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 size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 29, 2026
@adityavardhansharma
adityavardhansharma marked this pull request as ready for review July 29, 2026 13:11
@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 75d0e1d

Straightforward bug fix adding Android clipboard image support by wrapping the composer in TextInputWrapper and using an existing useNativePaste hook. The pattern is already established in the codebase and the change is self-contained with no schema or API impact.

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

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

Labels

size:XS 0-9 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