[PR #6820] [MERGED] fix(mobile): keep zoomed composers visible and match menu colors #7343

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

📋 Pull Request Information

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

Base: staging ← Head: fix/6811-zoomed-chat-keyboard


📝 Commits (10+)

  • b1d5cde test: cover mobile keyboard while chat is zoomed
  • a432721 fix: track keyboard geometry without treating pinch zoom as occlusion
  • 00707c4 fix: reset keyboard height baseline when viewport width changes
  • b794172 fix: preserve keyboard inset through split-view resizing
  • f080130 test: capture zoomed composer after viewport settles
  • 853fcd0 fix(ui): match mobile menu resource icon colors
  • b595463 test(ui): check textarea stays inside zoomed keyboard viewport
  • eee32db Merge branch 'staging' into fix/6811-zoomed-chat-keyboard
  • 7454d0e docs(ui): note keyboard and split-view baseline ceiling
  • d6e1f9a Merge remote-tracking branch 'origin/staging' into fix/6811-zoomed-chat-keyboard

📊 Changes

4 files changed (+154 additions, -10 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 e2e/core-flows.e2e.ts (+120 -0)
📝 packages/client/src/components/layout/AppShell.tsx (+29 -10)
📝 packages/client/src/components/layout/TopBar.tsx (+2 -0)

📄 Description

Linked issue

Closes #6811

Why this change

When a mobile user zoomed the page before opening the keyboard, the chat composer could remain behind it. The shared viewport handler returned immediately at any pinch scale other than 1, ignoring keyboard resize and dismissal events.

The mobile More menu also omitted the Characters and Settings icon colors, so they inherited the global accent instead of their pink and gray panel colors.

What changed

The existing handler now compares viewport heights after accounting for pinch scale, so zoom alone does not trigger keyboard mode. While the keyboard is open, the shell uses the actual visible height. Dismissing the keyboard restores the normal layout even if zoom and textarea focus remain. Width changes adjust the existing height baseline by the layout-height difference, preserving an open keyboard across split-view resizing. No new dependency, component or browser-specific branch is needed.

A retained regression covers scales 1.05, 1.25 and 2, draft preservation, dismissal without blur, split-view resizing both before and during keyboard use, and Android-style layout resizing. The mobile More menu also uses the existing pink Characters and gray Settings resource tokens, matching the corresponding panels. The Unreleased changelog records both fixes.

Validation

Current published head: eee32db78468ef28a2fa5645883bd75ee5e94ae3 is a clean merge of the feature head below with staging fd859ccd. Git merge-tree verification found no conflict resolutions or feature edits. The combined candidate 867d64d0208e49cce13c40310d81839756fad787 preserves all three PRs and Kolache’s staging changes, and passes fresh pnpm install, pnpm check, and UI smoke 7/7. Only the changelog overlaps; all feature source/test blobs match their reviewed and tested heads.

Feature head: b595463bac3bef29d96965e599c0eac93fd2e3e9. The viewport handler remains unchanged from b79417220; f080130a4 corrected screenshot timing. 853fcd09e adds only two existing resource-color classes and a changelog entry. The final test-only commit strengthens textarea containment assertions at every keyboard-open geometry.

  • pnpm install and pnpm check passed at 853fcd09e, with unchanged final product source (localization, formatting, lint/types and production build).
  • pnpm smoke:ui: 7 passed at 853fcd09e. A disposable actual-browser proof checked Characters pink (#f472b6) and Settings gray (#9ca3af) in mobile Chromium and WebKit, dark and light modes: 4 passed. Before/after screenshots were inspected; no retained test is needed for these two class additions.
  • Final-head strengthened viewport regression: 3/3 passed on mobile Chromium, mobile WebKit, and touch-sized Firefox. Both textarea edges are checked for all seven keyboard-open geometries. E2E types and changed-case formatting passed; temporary Firefox configuration was removed.
  • The new regression failed against the original handler at b1d5cdea2: zoomed keyboard events never enabled keyboard mode.
  • Focused mobile Chromium/WebKit viewport, pinch, composer, menu and history coverage: 11 passed, 3 existing platform-specific skips at b79417220 (unchanged production code).
  • pnpm smoke:ui: 7 passed at b79417220 (unchanged production code).
  • Final expanded split-view and Android-style regression: 3 passed on Chromium, WebKit and Firefox at f080130a4.
  • An additional temporary Firefox 155.0 touch-sized project passed all 3 focused zoom, keyboard and dismissal cases; its config was removed after the run. This tests Gecko with simulated viewport measurements, not Android hardware.
  • Independent source review caught an open-keyboard split-view edge case; it was reproduced and fixed with retained coverage.
  • Local CodeRabbit's initial split-view baseline finding was reproduced and fixed. The shared follow-up completed on c172ae4c with the final viewport handler. Its request for stronger textarea containment assertions is addressed and revalidated in b595463b. Its clamp suggestion was dismissed because Math.max(largestViewportHeight, unzoomedHeight) already clamps the adjusted baseline before use; reseeding on blur could prematurely expand the shell while a keyboard is closing. Independent review confirmed these reasons.
  • The two-class color addition and test-only assertion update have independent source/browser proof. The supplemental local review completed successfully with zero findings across the color, changelog, and test-only delta. Hosted review of the final head and required CI remain merge gates.

Commands for the focused runs:

pnpm regression:ui e2e/core-flows.e2e.ts --project=mobile-chromium --project=mobile-webkit --grep 'native mobile pinch|pinch zoom keeps|zoomed mobile chat|iPhone chat menus|iPhone Conversation Presence|mobile chat composer follows|mobile composers preserve' --workers=1
pnpm regression:ui e2e/core-flows.e2e.ts --project=mobile-chromium --project=mobile-webkit --grep 'zoomed mobile chat keeps' --workers=1

Manual verification notes

Reviewed before/after browser screenshots from disposable chats. Keyboard measurements are simulated through VisualViewport; no physical Android Firefox keyboard session was available. Chromium's existing native pinch test passed; WebKit's two-finger pinch remains a physical-device check. No UI copy, theme tokens or persisted storage changed.

  • Manually verify a slightly zoomed chat in Android Firefox with the software keyboard open and after dismissal.
  • Manually verify native pinch zoom and editing on an iPhone.

Docs and release impact

Unreleased changelog entries for the keyboard fix and matching mobile menu colors. No version bump or user-guide changes.

UI evidence

Before/after Chromium and WebKit screenshots with exact revisions and simulation limits. Download/open the self-contained HTML to view the embedded screenshots.

Mobile More menu before/after screenshots, including both themes and browser engines. Download/open the self-contained HTML to view the embedded screenshots.

Summary by CodeRabbit

  • Bug Fixes
    • Chat composers now stay visible above the on-screen keyboard while zoomed and adjust correctly when the keyboard opens, closes, or the screen is resized.
  • Style
    • Characters and Settings icons in the mobile More menu now match the pink and gray colors used in panel navigation.

🔄 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/6820 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/28/2026 **Status:** ✅ Merged **Merged:** 9/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/6811-zoomed-chat-keyboard` --- ### 📝 Commits (10+) - [`b1d5cde`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b1d5cdea270797c83de69a9040f77dddd79e835c) test: cover mobile keyboard while chat is zoomed - [`a432721`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a43272148665d9c27f06d8f4bec62a8b4baa0c83) fix: track keyboard geometry without treating pinch zoom as occlusion - [`00707c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/00707c431b7019374debdbc17f596a97dc1282c7) fix: reset keyboard height baseline when viewport width changes - [`b794172`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b79417220f83fa5ee371cbe50cadbafe10b5e49a) fix: preserve keyboard inset through split-view resizing - [`f080130`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f080130a446fb8e66a6dba42ad6fe855d5dccd7c) test: capture zoomed composer after viewport settles - [`853fcd0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/853fcd09e5c442a1a0ee3f863720477bca9c488e) fix(ui): match mobile menu resource icon colors - [`b595463`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b595463bac3bef29d96965e599c0eac93fd2e3e9) test(ui): check textarea stays inside zoomed keyboard viewport - [`eee32db`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eee32db78468ef28a2fa5645883bd75ee5e94ae3) Merge branch 'staging' into fix/6811-zoomed-chat-keyboard - [`7454d0e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7454d0ecca016c542b3e86ef9700f5225ae50310) docs(ui): note keyboard and split-view baseline ceiling - [`d6e1f9a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d6e1f9a66d98e68415149fa566833861e6b90843) Merge remote-tracking branch 'origin/staging' into fix/6811-zoomed-chat-keyboard ### 📊 Changes **4 files changed** (+154 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `e2e/core-flows.e2e.ts` (+120 -0) 📝 `packages/client/src/components/layout/AppShell.tsx` (+29 -10) 📝 `packages/client/src/components/layout/TopBar.tsx` (+2 -0) </details> ### 📄 Description ## Linked issue Closes #6811 ## Why this change When a mobile user zoomed the page before opening the keyboard, the chat composer could remain behind it. The shared viewport handler returned immediately at any pinch scale other than 1, ignoring keyboard resize and dismissal events. The mobile More menu also omitted the Characters and Settings icon colors, so they inherited the global accent instead of their pink and gray panel colors. ## What changed The existing handler now compares viewport heights after accounting for pinch scale, so zoom alone does not trigger keyboard mode. While the keyboard is open, the shell uses the actual visible height. Dismissing the keyboard restores the normal layout even if zoom and textarea focus remain. Width changes adjust the existing height baseline by the layout-height difference, preserving an open keyboard across split-view resizing. No new dependency, component or browser-specific branch is needed. A retained regression covers scales 1.05, 1.25 and 2, draft preservation, dismissal without blur, split-view resizing both before and during keyboard use, and Android-style layout resizing. The mobile More menu also uses the existing pink Characters and gray Settings resource tokens, matching the corresponding panels. The Unreleased changelog records both fixes. ## Validation Current published head: `eee32db78468ef28a2fa5645883bd75ee5e94ae3` is a clean merge of the feature head below with staging `fd859ccd`. Git merge-tree verification found no conflict resolutions or feature edits. The combined candidate `867d64d0208e49cce13c40310d81839756fad787` preserves all three PRs and Kolache’s staging changes, and passes fresh `pnpm install`, `pnpm check`, and UI smoke 7/7. Only the changelog overlaps; all feature source/test blobs match their reviewed and tested heads. Feature head: `b595463bac3bef29d96965e599c0eac93fd2e3e9`. The viewport handler remains unchanged from `b79417220`; `f080130a4` corrected screenshot timing. `853fcd09e` adds only two existing resource-color classes and a changelog entry. The final test-only commit strengthens textarea containment assertions at every keyboard-open geometry. - `pnpm install` and `pnpm check` passed at `853fcd09e`, with unchanged final product source (localization, formatting, lint/types and production build). - `pnpm smoke:ui`: 7 passed at `853fcd09e`. A disposable actual-browser proof checked Characters pink (`#f472b6`) and Settings gray (`#9ca3af`) in mobile Chromium and WebKit, dark and light modes: 4 passed. Before/after screenshots were inspected; no retained test is needed for these two class additions. - Final-head strengthened viewport regression: 3/3 passed on mobile Chromium, mobile WebKit, and touch-sized Firefox. Both textarea edges are checked for all seven keyboard-open geometries. E2E types and changed-case formatting passed; temporary Firefox configuration was removed. - The new regression failed against the original handler at `b1d5cdea2`: zoomed keyboard events never enabled keyboard mode. - Focused mobile Chromium/WebKit viewport, pinch, composer, menu and history coverage: 11 passed, 3 existing platform-specific skips at `b79417220` (unchanged production code). - `pnpm smoke:ui`: 7 passed at `b79417220` (unchanged production code). - Final expanded split-view and Android-style regression: 3 passed on Chromium, WebKit and Firefox at `f080130a4`. - An additional temporary Firefox 155.0 touch-sized project passed all 3 focused zoom, keyboard and dismissal cases; its config was removed after the run. This tests Gecko with simulated viewport measurements, not Android hardware. - Independent source review caught an open-keyboard split-view edge case; it was reproduced and fixed with retained coverage. - Local CodeRabbit's initial split-view baseline finding was reproduced and fixed. The shared follow-up completed on `c172ae4c` with the final viewport handler. Its request for stronger textarea containment assertions is addressed and revalidated in `b595463b`. Its clamp suggestion was dismissed because `Math.max(largestViewportHeight, unzoomedHeight)` already clamps the adjusted baseline before use; reseeding on blur could prematurely expand the shell while a keyboard is closing. Independent review confirmed these reasons. - The two-class color addition and test-only assertion update have independent source/browser proof. The supplemental local review completed successfully with zero findings across the color, changelog, and test-only delta. Hosted review of the final head and required CI remain merge gates. Commands for the focused runs: ```sh pnpm regression:ui e2e/core-flows.e2e.ts --project=mobile-chromium --project=mobile-webkit --grep 'native mobile pinch|pinch zoom keeps|zoomed mobile chat|iPhone chat menus|iPhone Conversation Presence|mobile chat composer follows|mobile composers preserve' --workers=1 pnpm regression:ui e2e/core-flows.e2e.ts --project=mobile-chromium --project=mobile-webkit --grep 'zoomed mobile chat keeps' --workers=1 ``` ### Manual verification notes Reviewed before/after browser screenshots from disposable chats. Keyboard measurements are simulated through VisualViewport; no physical Android Firefox keyboard session was available. Chromium's existing native pinch test passed; WebKit's two-finger pinch remains a physical-device check. No UI copy, theme tokens or persisted storage changed. - [ ] Manually verify a slightly zoomed chat in Android Firefox with the software keyboard open and after dismissal. - [ ] Manually verify native pinch zoom and editing on an iPhone. ## Docs and release impact Unreleased changelog entries for the keyboard fix and matching mobile menu colors. No version bump or user-guide changes. ## UI evidence [Before/after Chromium and WebKit screenshots with exact revisions and simulation limits](https://gist.github.com/SpicyMarinara/5450792e94704866d5a6bf36259e6168). Download/open the self-contained HTML to view the embedded screenshots. [Mobile More menu before/after screenshots, including both themes and browser engines](https://gist.github.com/SpicyMarinara/00ff68ebd60d1ad43d53e11643fa8788). Download/open the self-contained HTML to view the embedded screenshots. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Chat composers now stay visible above the on-screen keyboard while zoomed and adjust correctly when the keyboard opens, closes, or the screen is resized. * **Style** * Characters and Settings icons in the mobile More menu now match the pink and gray colors used in panel navigation. <!-- 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:18:50 +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#7343
No description provided.