fix(mobile): accept Android clipboard images in composer - #4836
fix(mobile): accept Android clipboard images in composer#4836adityavardhansharma wants to merge 1 commit into
Conversation
|
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 Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved 75d0e1d Straightforward bug fix adding Android clipboard image support by wrapping the composer in You can customize Macroscope's approvability policy. Learn more. |
What Changed
TextInputWrapperclipboard integration.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.tsxvp run typecheck(fromapps/mobile)git diff --check origin/main...HEADChecklist
Note
Accept Android clipboard images in the mobile composer
TextInputWrapper(fromexpo-paste-input) and adds auseNativePastehook in T3ComposerEditor.native.tsx to intercept paste events and forward image URIs toonPasteImages.onComposerPasteImagespath is retained alongside the new hook-based path.styleprop now applies toTextInputWrapperinstead ofNativeView;NativeViewalways 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
styleto the wrapper.Overview
Android clipboard images in the native composer now go through the same
expo-paste-inputpath as other mobile inputs:TextInputWrapperplususeNativePaste, forwarding image URIs to the existingonPasteImagesattachment flow. The nativeonComposerPasteImageshandler is unchanged for platforms that still emit it.Layout: the composer’s external
styleprop applies toTextInputWrapper(withminHeight: 0); the innerNativeViewalways 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.