[PR #4050] [MERGED] Fix mobile composer overlap with Android Firefox keyboard #6221

Closed
opened 2026-10-23 04:08:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4050
Author: @SpicyMarinara
Created: 7/24/2026
Status: ✅ Merged
Merged: 7/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/4044-mobile-keyboard


📝 Commits (3)

  • 725855d Fix mobile composer keyboard overlap
  • ad65724 Merge branch 'staging' into agent/4044-mobile-keyboard
  • 951f37e test(e2e): assert mobile composer stays below the top viewport edge

📊 Changes

5 files changed (+135 additions, -12 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 e2e/core-flows.e2e.ts (+89 -0)
📝 packages/client/index.html (+1 -1)
📝 packages/client/src/components/layout/AppShell.tsx (+35 -11)
📝 packages/client/src/styles/globals.css (+7 -0)

📄 Description

Why

Android Firefox can expose a software-keyboard-adjusted visual viewport while leaving fixed content anchored to the larger layout viewport. Marinara already measured visualViewport.height, but only used that value to cap the textarea height; the fixed app shell and its bottom-anchored composer still extended beneath the keyboard.

What changed

  • Requests interactive-widget=resizes-content in the viewport metadata so supporting mobile browsers resize page content for the software keyboard.
  • Tracks the smallest live visual, window, and document viewport height plus the visual viewport offset.
  • Re-samples viewport geometry after focus because Android browsers can publish keyboard dimensions after the initial focus event.
  • Sizes and positions the complete mobile app shell from those values, keeping Conversation, Roleplay, and Game composers within the visible region.
  • Adds a mobile browser regression that simulates a reduced and vertically shifted visual viewport and verifies the Roleplay composer remains above its bottom edge.
  • Documents the fix in the v2.3.5 changelog.

Validation so far

  • Focused mobile Playwright keyboard-viewport regression: 1 passed
  • git diff --check

Manual verification requested

  • Manually verify the composer stays above the keyboard in Android Firefox through a Tailscale connection.
  • Manually verify Conversation, Roleplay, and Game inputs with the keyboard opening and closing.
  • Manually verify Android Chrome and the native Android shell do not gain an empty lower gap.

Closes #4044

Summary by CodeRabbit

  • Bug Fixes

    • Improved mobile chat layout behavior on Android Firefox so the composer remains visible above the software keyboard.
    • App content now adjusts to changing visual viewport size and position, including delayed keyboard transitions.
    • Added responsive handling to keep the mobile app shell correctly sized and positioned.
  • Tests

    • Added mobile end-to-end coverage for keyboard-related viewport resizing and composer positioning.
  • Documentation

    • Updated the unreleased changelog with the Android Firefox keyboard layout fix.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4050 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/24/2026 **Status:** ✅ Merged **Merged:** 7/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/4044-mobile-keyboard` --- ### 📝 Commits (3) - [`725855d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/725855d7b84e031faf0871f6c750e9128606cf0c) Fix mobile composer keyboard overlap - [`ad65724`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ad657243b6d55de10a6c88794f79d68b816d6d61) Merge branch 'staging' into agent/4044-mobile-keyboard - [`951f37e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/951f37e8995e62197d996f8d24cc0ba216105269) test(e2e): assert mobile composer stays below the top viewport edge ### 📊 Changes **5 files changed** (+135 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `e2e/core-flows.e2e.ts` (+89 -0) 📝 `packages/client/index.html` (+1 -1) 📝 `packages/client/src/components/layout/AppShell.tsx` (+35 -11) 📝 `packages/client/src/styles/globals.css` (+7 -0) </details> ### 📄 Description ## Why Android Firefox can expose a software-keyboard-adjusted visual viewport while leaving fixed content anchored to the larger layout viewport. Marinara already measured `visualViewport.height`, but only used that value to cap the textarea height; the fixed app shell and its bottom-anchored composer still extended beneath the keyboard. ## What changed - Requests `interactive-widget=resizes-content` in the viewport metadata so supporting mobile browsers resize page content for the software keyboard. - Tracks the smallest live visual, window, and document viewport height plus the visual viewport offset. - Re-samples viewport geometry after focus because Android browsers can publish keyboard dimensions after the initial focus event. - Sizes and positions the complete mobile app shell from those values, keeping Conversation, Roleplay, and Game composers within the visible region. - Adds a mobile browser regression that simulates a reduced and vertically shifted visual viewport and verifies the Roleplay composer remains above its bottom edge. - Documents the fix in the v2.3.5 changelog. ## Validation so far - Focused mobile Playwright keyboard-viewport regression: 1 passed - `git diff --check` ## Manual verification requested - [ ] Manually verify the composer stays above the keyboard in Android Firefox through a Tailscale connection. - [ ] Manually verify Conversation, Roleplay, and Game inputs with the keyboard opening and closing. - [ ] Manually verify Android Chrome and the native Android shell do not gain an empty lower gap. Closes #4044 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved mobile chat layout behavior on Android Firefox so the composer remains visible above the software keyboard. - App content now adjusts to changing visual viewport size and position, including delayed keyboard transitions. - Added responsive handling to keep the mobile app shell correctly sized and positioned. - **Tests** - Added mobile end-to-end coverage for keyboard-related viewport resizing and composer positioning. - **Documentation** - Updated the unreleased changelog with the Android Firefox keyboard layout fix. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6221
No description provided.