mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8105] [MERGED] fix(mobile): keep the app out from under the camera on a sideways phone #8106
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8105
Author: @SpicyMarinara
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @SpicyMarinara
Base:
staging← Head:claude/landscape-camera-safe-area📝 Commits (4)
c648deefix(mobile): keep the app out from under the camera on a sideways phone139faf4fix(mobile): slide phone sheets fully off-screen past the camera stripa9e909bfix(mobile): anchor the panel selection bar to its sheet and fade the detail sheetea99fbetest(mobile): tighten the camera-strip proofs and scope the Android note📊 Changes
20 files changed (+334 additions, -47 deletions)
View changed files
📝
docs/development/ios-pwa-safe-area.md(+12 -0)📝
e2e/core-flows.e2e.ts(+188 -0)📝
packages/client/src/components/chat/ChatResourceMobileDropDock.tsx(+1 -1)📝
packages/client/src/components/chat/ConversationMessageShared.tsx(+1 -1)📝
packages/client/src/components/chat/YouTubePlayer.tsx(+3 -1)📝
packages/client/src/components/game-assets/FileEditorModal.tsx(+1 -1)📝
packages/client/src/components/layout/AppShell.tsx(+35 -14)📝
packages/client/src/components/layout/GlobalOmnibar.tsx(+1 -1)📝
packages/client/src/components/layout/PersonalExtensionContributionsMenu.tsx(+1 -1)📝
packages/client/src/components/layout/TopBar.tsx(+1 -1)📝
packages/client/src/components/presets/PresetVariablesEditor.tsx(+1 -1)📝
packages/client/src/components/ui/AppBanner.tsx(+1 -1)📝
packages/client/src/components/ui/AvatarCropWidget.tsx(+1 -1)📝
packages/client/src/components/ui/ExpandedTextarea.tsx(+1 -1)📝
packages/client/src/components/ui/FloatingWindow.tsx(+2 -2)📝
packages/client/src/components/ui/MacroTextarea.tsx(+2 -2)📝
packages/client/src/components/ui/Modal.tsx(+2 -2)📝
packages/client/src/styles/globals.css(+28 -11)📝
packages/client/src/styles/mari.css(+3 -2)📝
scripts/regressions/mobile-safe-area-inset.regression.ts(+49 -3)📄 Description
Linked issue
No issue was opened. The maintainer reported this directly from an iPhone and asked for a fix. Translated-docs follow-up: https://github.com/Pasta-Devs/Marinara-Engine/issues/8106.
Why this change
On an iPhone turned to landscape, Marinara Engine ran underneath the camera (notch or Dynamic Island), so part of the UI was covered. In portrait, the app keeps a strip in the page-backing colour where the status bar sits. The maintainer asked for the same in landscape, flipped to the sides.
The cause is old. Since an early alpha, the body has had
padding-left/right: env(safe-area-inset-left/right)in the phone layout. But the app shell isfixed inset-0, and on iOS it isposition: absolutewith no left or right, so it always ignored that padding and spanned the whole width.What changed
On a phone turned sideways, Marinara Engine now stops short of the camera on both sides. The two side strips show the same page-backing colour as the status-bar strip in portrait. iPhone reports the inset on both sides, so both get a strip whichever way you turn it.
Overlays keep out of the camera too:
Dimmed backgrounds stay out of the strips, as they stay below the status-bar strip in portrait.
Phone sheets now slide in and out from fully off-screen, so no slice of them shows in a strip while they move.
The app's decorative stars stay inside the app instead of floating in the strips.
Nothing changes in portrait, on iPad, on desktop or in the Android app. Those report no side insets; Android keeps pages clear of the cutout itself.
For developers:
env()once, into--mari-safe-area-inset-left/right(globals.css). Everything else uses these variables.scripts/regressions/mobile-safe-area-inset.regression.tsnow rejects raw sideenv()anywhere else, and pins the shell rule and the five phone sheets and backdrops (MOBILE_SHELL_PANEL_X_CLASS).docs/development/ios-pwa-safe-area.mdhas a new "Landscape: the camera's side insets" section.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks on head
ea99fbef1(earlier revisions where noted):pnpm checkexited 0.pnpm regression: 1019/1019 passed (first revision).node scripts/run-regressions.mjs --filter mobile-safe-area-insetpassed.a phone turned sideways keeps the app out from under its camera(874×402, both mobile projects):env()insets of 59px through the DevTools Protocol (Emulation.setSafeAreaInsetsOverride).e2e/phone-bubbles.e2e.tsande2e/command-palette.e2e.tson both mobile projects: 33 passed, 27 skipped by design (first revision).pnpm smoke:uipassed.installed Home destinations appear as browser tabsfailed once on mobile-webkit. It was waiting for an accent colour that another test had changed. It passes alone (2/2), and CI runs one worker per shard.Manual verification notes
Still needs a human:
Review notes
139faf480. 4 minor ona9e909b1f, all addressed in the head commit. 1 onea99fbef1, dismissed: it flags the tracker sheet'sbg-zinc-950/95palette colour, which is unchanged and predates this PR (the only edit to that line removedw-screen). Theming the tracker sheet is out of scope here.a9e909b1f:right-0again, and the chats/settings sheet iscontain: layout, so on iOS (where that sheet's blur is off) it is still the bar's frame. Today framer-motion's own styles already make the sheet that frame, socontain: layoutpins down existing behaviour rather than changing it.x: 0again, so framer-motion leaves no transform behind.139faf480:image/*strings is a nit in a lint-style guard.innerWidthwith 8px margins.docs/development/ios-pwa-safe-area.mdis out of date: its viewport tag andinteractive-widgetadvice no longer matchindex.html. That needs a separate docs pass.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/development/ios-pwa-safe-area.mdhas a new section; translations are tracked in https://github.com/Pasta-Devs/Marinara-Engine/issues/8106. No version bump.UI evidence (if applicable)
Local Playwright screenshots (Home and the chat list at 874×402 with emulated 59px insets) are not attached. Please use the manual checks above.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.