[PR #5732] [MERGED] Fix iPhone Roleplay composer focus blank screen #6908

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5732
Author: @SpicyMarinara
Created: 9/1/2026
Status: ✅ Merged
Merged: 9/1/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5710-ios-roleplay-focus-empty-page


📝 Commits (4)

  • 6ff30d3 chore: start iOS Roleplay focus fix
  • cd8cd6b fix: keep iPhone shell inside focused viewport
  • 4b0eaff Merge remote-tracking branch 'origin/staging' into fix/5710-ios-roleplay-focus-empty-page
  • 5b872da chore: refresh PR after staging update

📊 Changes

3 files changed (+11 additions, -24 deletions)

View changed files

📝 CHANGELOG.md (+1 -1)
📝 e2e/core-flows.e2e.ts (+9 -18)
📝 packages/client/src/components/layout/AppShell.tsx (+1 -5)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #5710

Why this change

  • On iPhone in Roleplay mode, focusing the composer can pan the visible viewport below the fixed app shell and reveal only the dark document backing above the keyboard.
  • #5712 locked the document, but it also retained an iOS-only rule that discarded visualViewport.offsetTop. When WebKit pans the visible viewport to reveal the textarea anyway, the shell stays at layout-viewport zero and falls above what the user can see.

What changed

  • Let the existing mobile shell positioning follow the clamped visual-viewport top on iOS, matching the Android path and removing the obsolete iOS-only suppression.
  • Tighten the existing mobile keyboard regression so both iPhone-sized WebKit and Android-sized Chromium require the shell and composer to remain inside the panned visible viewport.
  • Update the existing Unreleased changelog entry for #5710.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Automated verification notes

  • Regression proof first failed on unmodified staging: WebKit reported a 72px visual-viewport offset while the shell variable remained at 0px.
  • The focused viewport regression passed on mobile-webkit and mobile-chromium after the one-path correction.
  • pnpm check passed, including Impeccable context, localization, formatting, lint, E2E types, and the production build.
  • The complete local mobile matrix reached 205 passed and 196 skipped. Nine unrelated cases failed on their first broad pass; eight passed immediately when isolated. One existing Characters-panel WebKit assertion remained locally red on a 0.55px subpixel overlap. It does not exercise the changed viewport path or files.

Manual verification notes

  • Manually verify Roleplay composer focus, typing, keyboard dismissal, and transcript scrolling in the installed iPhone PWA.
  • Physical-iPhone after-state confirmation remains required because Playwright can simulate the visual-viewport geometry but cannot open the real iOS keyboard.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

A user-focused CHANGELOG.md entry is included. No user documentation, translation-pack, or release metadata changes are needed.

UI evidence (if applicable)

The reporter supplied a physical-iPhone before screenshot showing the Roleplay shell displaced completely above the keyboard. The regression now measures the corresponding after-state geometry on iPhone-sized WebKit; physical-device confirmation remains the manual gate.

Summary by CodeRabbit

  • Bug Fixes
    • Improved iPhone chat-field behavior so the app remains aligned with the visible viewport when the software keyboard opens.
    • Prevented the Roleplay screen from exposing dark page backing during keyboard interactions.
    • Reduced persistent visual memory usage by releasing inactive backgrounds after transitions and avoiding unnecessary full-screen rendering hints.

🔄 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/5732 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/1/2026 **Status:** ✅ Merged **Merged:** 9/1/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5710-ios-roleplay-focus-empty-page` --- ### 📝 Commits (4) - [`6ff30d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6ff30d3dfb30e2766cce6a47e642b53a07d1297f) chore: start iOS Roleplay focus fix - [`cd8cd6b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd8cd6bf2c438f0c50b539b28879a4c2551a296d) fix: keep iPhone shell inside focused viewport - [`4b0eaff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4b0eaff76cb4adf0a1ba08cfa867962682191070) Merge remote-tracking branch 'origin/staging' into fix/5710-ios-roleplay-focus-empty-page - [`5b872da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b872daee04ae251ddecab835fe907a86b5fc39d) chore: refresh PR after staging update ### 📊 Changes **3 files changed** (+11 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -1) 📝 `e2e/core-flows.e2e.ts` (+9 -18) 📝 `packages/client/src/components/layout/AppShell.tsx` (+1 -5) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #5710 ## Why this change - On iPhone in Roleplay mode, focusing the composer can pan the visible viewport below the fixed app shell and reveal only the dark document backing above the keyboard. - #5712 locked the document, but it also retained an iOS-only rule that discarded `visualViewport.offsetTop`. When WebKit pans the visible viewport to reveal the textarea anyway, the shell stays at layout-viewport zero and falls above what the user can see. ## What changed - Let the existing mobile shell positioning follow the clamped visual-viewport top on iOS, matching the Android path and removing the obsolete iOS-only suppression. - Tighten the existing mobile keyboard regression so both iPhone-sized WebKit and Android-sized Chromium require the shell and composer to remain inside the panned visible viewport. - Update the existing Unreleased changelog entry for #5710. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Automated verification notes - Regression proof first failed on unmodified staging: WebKit reported a 72px visual-viewport offset while the shell variable remained at 0px. - The focused viewport regression passed on `mobile-webkit` and `mobile-chromium` after the one-path correction. - `pnpm check` passed, including Impeccable context, localization, formatting, lint, E2E types, and the production build. - The complete local mobile matrix reached 205 passed and 196 skipped. Nine unrelated cases failed on their first broad pass; eight passed immediately when isolated. One existing Characters-panel WebKit assertion remained locally red on a 0.55px subpixel overlap. It does not exercise the changed viewport path or files. ### Manual verification notes - Manually verify Roleplay composer focus, typing, keyboard dismissal, and transcript scrolling in the installed iPhone PWA. - Physical-iPhone after-state confirmation remains required because Playwright can simulate the visual-viewport geometry but cannot open the real iOS keyboard. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) A user-focused `CHANGELOG.md` entry is included. No user documentation, translation-pack, or release metadata changes are needed. ## UI evidence (if applicable) The reporter supplied a physical-iPhone before screenshot showing the Roleplay shell displaced completely above the keyboard. The regression now measures the corresponding after-state geometry on iPhone-sized WebKit; physical-device confirmation remains the manual gate. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved iPhone chat-field behavior so the app remains aligned with the visible viewport when the software keyboard opens. * Prevented the Roleplay screen from exposing dark page backing during keyboard interactions. * Reduced persistent visual memory usage by releasing inactive backgrounds after transitions and avoiding unnecessary full-screen rendering hints. <!-- 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:14:48 +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#6908
No description provided.