[PR #5675] [MERGED] fix(client): route all bottom safe-area consumers through the Gecko-aware override hook #6878

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5675
Author: @Romuromylus
Created: 8/30/2026
Status: ✅ Merged
Merged: 8/30/2026
Merged by: @Romuromylus

Base: staging ← Head: fix/safe-area-inset-bottom-consumers


📝 Commits (2)

  • e9b0ad8 fix(client): route all bottom safe-area consumers through the Gecko-aware override hook
  • 6e48927 Merge branch 'staging' into fix/safe-area-inset-bottom-consumers

📊 Changes

24 files changed (+64 additions, -33 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/client/src/components/chat/ChatCommonOverlays.tsx (+2 -2)
📝 packages/client/src/components/chat/ChatGalleryDrawer.tsx (+1 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+3 -3)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+1 -1)
📝 packages/client/src/components/chat/HomeBrowserHub.tsx (+2 -2)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+1 -1)
📝 packages/client/src/components/chat/NewChatConnectionGate.tsx (+1 -1)
📝 packages/client/src/components/game-assets/AudioPlayerModal.tsx (+1 -1)
📝 packages/client/src/components/game-assets/FileEditorModal.tsx (+1 -1)
📝 packages/client/src/components/game-assets/ImagePreviewModal.tsx (+1 -1)
📝 packages/client/src/components/game/GameCharacterSheet.tsx (+1 -1)
📝 packages/client/src/components/game/GameInventory.tsx (+1 -1)
📝 packages/client/src/components/game/GameNarration.tsx (+1 -1)
📝 packages/client/src/components/game/GameReadableDisplay.tsx (+1 -1)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+1 -1)
📝 packages/client/src/components/game/NewGameExperienceChooser.tsx (+1 -1)
📝 packages/client/src/components/modals/AboutMeViewerModal.tsx (+1 -1)
📝 packages/client/src/components/presets/PresetEditor.tsx (+1 -1)
📝 packages/client/src/components/ui/MacroTextarea.tsx (+2 -2)

...and 4 more files

📄 Description

Linked issue

Closes #5667

Why this change

#5666 fixed the Android Firefox dead band above the system navigation bar, but only for the mobile shell panels and the chat composer — the two surfaces #5665 reported. Gecko's Android build reports env(safe-area-inset-bottom) as the navigation-bar height even though its layout viewport already stops above the bar, so any raw env() consumer double-compensates into an empty band that clips content. Roughly two dozen other client call sites still consumed the inset raw: full-screen mobile modals, the chat settings and gallery drawers, the setup wizards, the game overlays (character sheet, inventory, narration, readables), the selection action bar, the browser hub, and the floating launcher/call buttons all still showed the band on Android Firefox.

What changed

  • Wrapped every remaining raw env(safe-area-inset-bottom) in the override hook #5666 introduced — var(--mari-safe-area-inset-bottom, env(safe-area-inset-bottom)) — across 21 client components and the four floating-launcher rules in globals.css (32 call sites total). The hook is zeroed for Gecko via the existing single @supports (-moz-appearance: none) block; no new @supports block is introduced. Non-Gecko engines are unchanged because the var falls back to env() wherever the override is not set, including the sites that use the inset as a max() floor inside modal centering. Top/left/right insets are untouched.
  • Extended scripts/regressions/mobile-safe-area-inset.regression.ts with a sweep over packages/client/src that fails if any raw env(safe-area-inset-bottom) consumer reappears outside the override-hook fallback, so new surfaces can't silently reintroduce the band.
  • Added a CHANGELOG entry under Unreleased.

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

Manual verification notes

  • pnpm check passes locally; node ./scripts/run-regressions.mjs --filter mobile-safe-area-inset and --filter roleplay-streaming both pass (the latter guards the single-Gecko-@supports-block invariant this change must not break).
  • Verified against the production client bundle that Tailwind generated every new arbitrary-value utility: the built CSS contains 19 var(--mari-safe-area-inset-bottom, …) occurrences (identical class strings dedupe) and zero env(safe-area-inset-bottom) outside the fallback position.
  • Negative control: the regression sweep run against the pre-fix tree flags the raw consumers, so it genuinely pins this migration.
  • The mechanical wrap preserves each site's existing expression shape (max() floors, calc() offsets), so iOS/Chromium resolve to byte-identical values. Remaining to eyeball on devices: a full-screen modal and the chat settings drawer on Android Firefox (band gone, flush with the fixed shell panels) and once on iOS Safari (home-indicator clearance unchanged).

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] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

See the screenshots on #5665 for the band's appearance; the affected surfaces here show the same artifact until this change and match the fixed shell panels after it.

Summary by CodeRabbit

  • Bug Fixes
    • Improved mobile spacing across chat panels, game screens, modals, drawers, and action bars.
    • Corrected bottom safe-area handling on Firefox for Android to help prevent content from being obscured by navigation controls.
    • Improved interaction behavior for the Game Setup Wizard overlay.
  • Tests
    • Added regression coverage to detect mobile safe-area handling issues throughout the application.

🔄 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/5675 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 8/30/2026 **Status:** ✅ Merged **Merged:** 8/30/2026 **Merged by:** [@Romuromylus](https://github.com/Romuromylus) **Base:** `staging` ← **Head:** `fix/safe-area-inset-bottom-consumers` --- ### 📝 Commits (2) - [`e9b0ad8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e9b0ad87bf64f66ebd4eddc4100ce89b75b0cb3c) fix(client): route all bottom safe-area consumers through the Gecko-aware override hook - [`6e48927`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6e4892767d2e84f9dac6542a16ef6a83d77eead2) Merge branch 'staging' into fix/safe-area-inset-bottom-consumers ### 📊 Changes **24 files changed** (+64 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/client/src/components/chat/ChatCommonOverlays.tsx` (+2 -2) 📝 `packages/client/src/components/chat/ChatGalleryDrawer.tsx` (+1 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+3 -3) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+1 -1) 📝 `packages/client/src/components/chat/HomeBrowserHub.tsx` (+2 -2) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+1 -1) 📝 `packages/client/src/components/chat/NewChatConnectionGate.tsx` (+1 -1) 📝 `packages/client/src/components/game-assets/AudioPlayerModal.tsx` (+1 -1) 📝 `packages/client/src/components/game-assets/FileEditorModal.tsx` (+1 -1) 📝 `packages/client/src/components/game-assets/ImagePreviewModal.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameCharacterSheet.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameInventory.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameNarration.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameReadableDisplay.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+1 -1) 📝 `packages/client/src/components/game/NewGameExperienceChooser.tsx` (+1 -1) 📝 `packages/client/src/components/modals/AboutMeViewerModal.tsx` (+1 -1) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+1 -1) 📝 `packages/client/src/components/ui/MacroTextarea.tsx` (+2 -2) _...and 4 more files_ </details> ### 📄 Description ## Linked issue Closes #5667 ## Why this change #5666 fixed the Android Firefox dead band above the system navigation bar, but only for the mobile shell panels and the chat composer — the two surfaces #5665 reported. Gecko's Android build reports `env(safe-area-inset-bottom)` as the navigation-bar height even though its layout viewport already stops above the bar, so any raw `env()` consumer double-compensates into an empty band that clips content. Roughly two dozen other client call sites still consumed the inset raw: full-screen mobile modals, the chat settings and gallery drawers, the setup wizards, the game overlays (character sheet, inventory, narration, readables), the selection action bar, the browser hub, and the floating launcher/call buttons all still showed the band on Android Firefox. ## What changed - Wrapped every remaining raw `env(safe-area-inset-bottom)` in the override hook #5666 introduced — `var(--mari-safe-area-inset-bottom, env(safe-area-inset-bottom))` — across 21 client components and the four floating-launcher rules in `globals.css` (32 call sites total). The hook is zeroed for Gecko via the existing single `@supports (-moz-appearance: none)` block; no new `@supports` block is introduced. Non-Gecko engines are unchanged because the var falls back to `env()` wherever the override is not set, including the sites that use the inset as a `max()` floor inside modal centering. Top/left/right insets are untouched. - Extended `scripts/regressions/mobile-safe-area-inset.regression.ts` with a sweep over `packages/client/src` that fails if any raw `env(safe-area-inset-bottom)` consumer reappears outside the override-hook fallback, so new surfaces can't silently reintroduce the band. - Added a CHANGELOG entry under Unreleased. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm check` passes locally; `node ./scripts/run-regressions.mjs --filter mobile-safe-area-inset` and `--filter roleplay-streaming` both pass (the latter guards the single-Gecko-`@supports`-block invariant this change must not break). - Verified against the production client bundle that Tailwind generated every new arbitrary-value utility: the built CSS contains 19 `var(--mari-safe-area-inset-bottom, …)` occurrences (identical class strings dedupe) and zero `env(safe-area-inset-bottom)` outside the fallback position. - Negative control: the regression sweep run against the pre-fix tree flags the raw consumers, so it genuinely pins this migration. - The mechanical wrap preserves each site's existing expression shape (`max()` floors, `calc()` offsets), so iOS/Chromium resolve to byte-identical values. Remaining to eyeball on devices: a full-screen modal and the chat settings drawer on Android Firefox (band gone, flush with the fixed shell panels) and once on iOS Safari (home-indicator clearance unchanged). ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) See the screenshots on #5665 for the band's appearance; the affected surfaces here show the same artifact until this change and match the fixed shell panels after it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved mobile spacing across chat panels, game screens, modals, drawers, and action bars. * Corrected bottom safe-area handling on Firefox for Android to help prevent content from being obscured by navigation controls. * Improved interaction behavior for the Game Setup Wizard overlay. * **Tests** * Added regression coverage to detect mobile safe-area handling issues throughout the application. <!-- 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:31 +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#6878
No description provided.