Skip to content

fix(android): keep IME prompts usable - #208

Closed
omgoshjosh wants to merge 2 commits into
dzianisv:mainfrom
omgoshjosh:fix/android-ime-scroll-composer-upstream
Closed

omgoshjosh wants to merge 2 commits into
dzianisv:mainfrom
omgoshjosh:fix/android-ime-scroll-composer-upstream

Conversation

@omgoshjosh

@omgoshjosh omgoshjosh commented Sep 21, 2026 •

Copy link
Copy Markdown

Summary

  • reconcile Android edge-to-edge keyboard coordinates with the safe-area top inset
  • bound question options in their own scroll surface while pinning navigation
  • cap the multiline composer from live Android IME geometry and enable internal scrolling

Validation

  • npm test (340 passing)
  • npm run typecheck
  • npm run check:versions

Evidence

  • Reproduction: Android: chat input hidden behind keyboard #194 and /var/folders/fc/xccpf99d62b5_sc13zpgvjd80000gn/T/opencode/mobile-ime-repro-20260920/
  • Real-device install/smoke is queued behind the broker active 10 GB iOS build lane; no capacity bypass was attempted.

Closes #194

@omgoshjosh

Copy link
Copy Markdown
Author

QA physical Pixel candidate smoke: FAIL/BLOCKED for authoritative UI states, not a code failure.

Verified: commit 95b001d loaded from branch Metro on physical Pixel 8 Pro (38141FDJG00BG7), 1008x2244, portrait; bundle contains question-options-scroll, keyboardVerticalOffset, COMPOSER_MIN_HEIGHT, and scrollEnabled markers. npm test: 340/340; typecheck and version parity pass.

External blocker: installed compatible dev client persisted server URL 127.0.0.1:12400, so no session/question/composer screen could be reached. Attempting normal navigation opened an unrelated Google consent flow; no consent or app data change was made. No native rebuild or feature-code edit.

Artifacts: file:///var/folders/fc/xccpf99d62b5_sc13zpgvjd80000gn/T/opencode/mobile-ime-repro-20260920/candidate/branch-loaded.png, branch-loaded.xml, android.bundle.js, post-smoke.log, post-smoke.xml, metro-candidate.log. Device lease, adb reverse mappings, Metro process, and port claim were cleaned up.

@omgoshjosh

Copy link
Copy Markdown
Author

QA PASS at 95b001d on Pixel 8 Pro 38141FDJG00BG7. The prior 127.0.0.1:12400 blocker was resolved by reproducing the question-aware mock endpoint and reversing 12400; Metro used host 13000 with device 8081 -> 13000 reverse. Evidence: /Users/josh/agents/media/mobile-ime-qa-95b001d-20260921/ and prior candidate bundle/log evidence at /private/var/folders/fc/xccpf99d62b5_sc13zpgvjd80000gn/T/opencode/mobile-ime-repro-20260920/candidate/.\n\nPASS: keyboard-visible question card independently scrolls lower choices while Dismiss/Next remain reachable; multiline composer shows multiple lines/caret and supports internal scroll/edit. Smoke coverage included keyboard dismissal, send, attachments, running/stop-capable mock path, compact resize, default and 1.5x text scale, safe-area geometry, portrait lock. Device class: 763x1536 app/window at 360dpi; physical screenshots 1008x2244. Cleanup verified: zero broker leases, no QA reverse mappings/processes/port claims, settings restored. No feature code or product files changed.

@omgoshjosh
omgoshjosh marked this pull request as ready for review September 21, 2026 07:15
@omgoshjosh

Copy link
Copy Markdown
Author

Final bug-focused review: PASS at 95b001d. No blocking regression found in bd18960 + 95b001d: Android now reconciles edge-to-edge IME/window coordinates, question choices have the bounded internal scroll owner with pinned navigation, and the multiline composer retains internal scrolling within its existing 120dp cap. iOS offset 90 is unchanged. Gates: 340 tests, typecheck, version parity; physical Pixel 8 Pro QA PASS: /Users/josh/agents/media/mobile-ime-qa-95b001d-20260921/. Residual risk: one physical Pixel/IME combination. Ready for maintainer review; not merged.

@xtiang7c0

xtiang7c0 commented Sep 27, 2026 •

Copy link
Copy Markdown

Correction: the initial screenshot captured Gboard while it was still opening.

On a Nothing Phone 2a (A142), Android 16, using Gboard, PR head commit 95b001d still leaves the composer covered once the keyboard settles. This reproduces after closing and reopening the app.

I retract the previous pass result. The question-card flow was not tested.

@dzianisv

Copy link
Copy Markdown
Owner

Superseded by #236 (merged into main as 2667ad5), which ports your bounded multiline composer and scrollable QuestionPrompt (byte-identical for QuestionPrompt.tsx) — thank you, this was the multiline layer of the fix for #194/#156. The static insets.top offset was replaced by the live IME height from #201.

@dzianisv dzianisv closed this Nov 13, 2026
meramsey pushed a commit to meramsey/opencode-mobile that referenced this pull request Nov 13, 2026
…ianisv#156)

Port of the live-IME-height mechanism from dzianisv#201 (Keyboard.metrics() +
keyboardDidShow/Hide listeners, explicit reset to 0 on hide) plus the
bounded multiline composer and scrollable QuestionPrompt from dzianisv#208.

API-35 guard: the native IME-insets listener in MainActivity owns the
IME height on Android 15+, so the JS padding applies only below API 35 —
exactly one layer applies it on every API level. iOS keeps
behavior="padding" with offset 90.

dzianisv#208's static insets.top offset is deliberately not ported: it measured
56 dp short on a Pixel 11 Pro (see dzianisv#194).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: chat input hidden behind keyboard

3 participants