[PR #5733] [MERGED] Fix iOS document-pan viewport alignment #6909

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/5733
Author: @SpicyMarinara
Created: 9/1/2026
Status: ✅ Merged
Merged: 9/1/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5710-ios-visual-viewport-page-top


📝 Commits (2)

  • e9da232 chore: start iOS visual viewport correction
  • 6d53444 fix: follow absolute iOS visual viewport

📊 Changes

3 files changed (+17 additions, -13 deletions)

View changed files

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

📄 Description

Linked issue

Closes #5710

Why this change

  • Physical-iPhone verification confirms #5732 did not resolve composer focus moving Roleplay below the visible screen.
  • That regression only simulated visualViewport.offsetTop. Current iOS WebKit can visually pan the document while reporting a larger absolute pageTop, so the shell remained aligned to an incomplete coordinate.

What changed

  • Align the mobile chat shell to the larger of visualViewport.offsetTop and visualViewport.pageTop, retaining the existing viewport-height clamp.
  • Extend the existing mobile keyboard regression so pageTop can diverge from the under-reported offset.
  • Correct the existing Unreleased changelog entry.

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-first proof on current staging failed as expected: shell top was 72px while the clamped absolute visual viewport top was 299px.
  • The focused viewport regression passes on mobile WebKit and mobile Chromium after the fix.
  • pnpm check passes, including Impeccable context, localization, formatting, lint, E2E type-checking, and production builds.

Manual verification notes

  • Physical-iPhone confirmation remains required after deployment to staging because desktop Playwright WebKit cannot invoke the real iOS keyboard/document pan.
  • Manually verify Roleplay composer focus, keyboard dismissal, and recovery after scrolling while the keyboard is open.

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)

No documentation, localization catalog, or release metadata changes are needed. The existing Unreleased changelog entry is corrected.

Summary by CodeRabbit

  • Bug Fixes
    • Improved iPhone layout positioning when the software keyboard appears, including cases where WebKit reports an inaccurate keyboard offset.
    • Chat shell and composer elements now remain aligned with the visual viewport during keyboard interactions.
  • Tests
    • Updated mobile browser coverage to validate viewport positioning with differing offset and page-top values.
  • Documentation
    • Clarified the unreleased iPhone chat fields changelog entry.

🔄 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/5733 **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-visual-viewport-page-top` --- ### 📝 Commits (2) - [`e9da232`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e9da232537fffb44f8d6ee31df55caab754dc44a) chore: start iOS visual viewport correction - [`6d53444`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d534442f36061a58d0bfa984aa5f8237d551c99) fix: follow absolute iOS visual viewport ### 📊 Changes **3 files changed** (+17 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -1) 📝 `e2e/core-flows.e2e.ts` (+15 -11) 📝 `packages/client/src/components/layout/AppShell.tsx` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #5710 ## Why this change - Physical-iPhone verification confirms #5732 did not resolve composer focus moving Roleplay below the visible screen. - That regression only simulated `visualViewport.offsetTop`. Current iOS WebKit can visually pan the document while reporting a larger absolute `pageTop`, so the shell remained aligned to an incomplete coordinate. ## What changed - Align the mobile chat shell to the larger of `visualViewport.offsetTop` and `visualViewport.pageTop`, retaining the existing viewport-height clamp. - Extend the existing mobile keyboard regression so `pageTop` can diverge from the under-reported offset. - Correct the existing Unreleased changelog entry. ## 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-first proof on current staging failed as expected: shell top was `72px` while the clamped absolute visual viewport top was `299px`. - The focused viewport regression passes on mobile WebKit and mobile Chromium after the fix. - `pnpm check` passes, including Impeccable context, localization, formatting, lint, E2E type-checking, and production builds. ### Manual verification notes - Physical-iPhone confirmation remains required after deployment to staging because desktop Playwright WebKit cannot invoke the real iOS keyboard/document pan. - Manually verify Roleplay composer focus, keyboard dismissal, and recovery after scrolling while the keyboard is open. ## 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) No documentation, localization catalog, or release metadata changes are needed. The existing Unreleased changelog entry is corrected. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved iPhone layout positioning when the software keyboard appears, including cases where WebKit reports an inaccurate keyboard offset. - Chat shell and composer elements now remain aligned with the visual viewport during keyboard interactions. - **Tests** - Updated mobile browser coverage to validate viewport positioning with differing offset and page-top values. - **Documentation** - Clarified the unreleased iPhone chat fields changelog entry. <!-- 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#6909
No description provided.