Repository navigation
fix(mobile): harden media input and keep session loading responsive - #3835
Merged
wgqqqqq merged 2 commits intoNov 9, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Android could crash when no photo picker or speech-recognition activity was installed, and general chat read selected photos on the UI thread. Opening a session could leave the previous screen visible while it loaded; creating a session also waited for model selection before loading its transcript. On iOS, history photos decoded at full resolution and speech partial results could overwrite manual edits made during dictation.
Type and Areas
Type: bug fix
Areas: native Android and iOS, shared mobile session store
Motivation / Impact
Missing OEM/system media handlers now leave the app usable. Remote conversations open into a loading transition immediately, and a slow model-setting RPC no longer holds back an already-loaded transcript. Sending remains guarded during initialization. Platform activity handling stays in Android; the session lifecycle change stays in the shared feature store. No persisted field becomes required and no wire command or capability requirement changes.
Verification
AI-assisted; focused unit and Android/iOS simulator testing, without a live remote desktop or real speech-provider reproduction.
Passed on this branch, based on upstream main
fcf05dd5a:src/apps/mobile/shared:./gradlew :core-feature:jvmTest --tests '*RemoteSessionStoreTest'— 108 passed, including gated model initialization, model failure, draft retention and initial-message ordering.src/apps/mobile/android:./gradlew :app:assembleDebug :app:testDebugUnitTest --tests '*AppShellStateTest' :app:assembleDebugAndroidTest— build passed; 12 shell-state tests passed.src/apps/mobile/android:./gradlew :app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.openbitfun.mobile.app.ComposerMediaInputTest,com.openbitfun.mobile.app.AccountRemoteScreenTest— 12 passed on a dedicated Android 17 emulator. Covers missing/denied handlers, photo resize/preview/send, unreadable media, dictation restoration/isolation, and remote screen presentation. Handlers/results are injected; real OEM speech providers were not exercised.src/apps/mobile/ios:./Testing/run-pure-swift-tests.sh— passed, including actual ImageIO decode checks for 4000×3000 images, full-screen bounds, EXIF rotation, small/invalid images, and dictation partial correction/manual-edit protection.src/apps/mobile/shared:./gradlew :core-feature:assembleOpenBitFunMobileCoreDebugXCFramework— passed; the iOS app links a newly generated core containing these session fixes.src/apps/mobile/ios:xcodebuild -project OpenBitFun.xcodeproj -scheme OpenBitFun -configuration Debug -destination 'platform=iOS Simulator,name=OpenBitFun Streaming QA iPhone' -derivedDataPath /tmp/OpenBitFun-iOS-PR3835 CODE_SIGNING_ALLOWED=NO build— passed with Xcode 26.3.-parallel-testing-enabled NO -only-testing:OpenBitFunUITests/PromptSuggestionUITests test— 1 passed on iOS 26.3; verifies composer draft fill, focus, and keyboard after the editor-binding change. Uses isolated preview data and does not send host commands.pnpm run mobile:ui:check, projectplutil -lint, andgit diff --checkpassed.All Gradle commands used Android Studio's bundled JBR; Apple builds used a process-local Xcode 26.3 developer directory.
pnpm run mobile:architecturereports three existing findings: theClientBuildContractTestreference to HarmonyOS and default arguments inAccountUiState/ConversationModels. The exact same findings reproduce on an unmodified archive of the upstream base; this PR does not change those files or the checker.Remote scenarios: remote-control behavior exercised with simulated host commands/streams and native emulator tests. No live Relay/SSH, Peer Device Mode, or Detached Dispatch end-to-end run. Real microphone capture, speech permission dialogs/providers, and a full iOS remote conversation were not exercised; the iOS simulator run covers the composer UI. Latest main and open PRs were checked before porting the fixes; no existing PR was found covering these paths.
Reviewer Notes
The conversation loading UI is the existing layout; this changes when it becomes the active route. Unrelated connection-entry redesigns, HarmonyOS presentation edits, website content, and design demos are excluded. iOS keeps its existing native loading transition; there are no theme or layout changes. No permissions, persisted data, or transport formats change.
Checklist