From f11d56d80c31b7ed897e4da1121efafa411eb4ae Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Tue, 2 Jun 2026 19:00:14 +0300 Subject: [PATCH] fix: consistent mobile surface dimming and overlay scrim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a dark scrim for MobileOverlayPanel instead of a translucent background so it dims the rest of the screen like the sessions sheet. Rework MobileSurfaceShell to mirror that structure: the scrim is the fixed parent's background with a quick fade (keeping it on a compositing layer iOS Safari clips to the viewport), and the sheet is a flex child sized to leave the top safe area dimmed — dropping the old top shadow that pooled at the corners. Mount Files/Changes/Settings only while open so each recomputes its safe-area layout fresh, fixing intermittent top-inset dimming, and drop the dim behind the header overflow menu to avoid a scrim-to-scrim flicker on select. --- packages/ui/src/apps/MobileApp.tsx | 90 ++++++++++--------- packages/ui/src/apps/MobileSurfaceShell.tsx | 25 +++--- .../src/components/ui/MobileOverlayPanel.tsx | 2 +- 3 files changed, 64 insertions(+), 53 deletions(-) diff --git a/packages/ui/src/apps/MobileApp.tsx b/packages/ui/src/apps/MobileApp.tsx index aa686406..7a3a8ee9 100644 --- a/packages/ui/src/apps/MobileApp.tsx +++ b/packages/ui/src/apps/MobileApp.tsx @@ -99,7 +99,7 @@ const MobileOverflowMenu: React.FC<{
); diff --git a/packages/ui/src/apps/MobileSurfaceShell.tsx b/packages/ui/src/apps/MobileSurfaceShell.tsx index 20da21b1..7f5d9d82 100644 --- a/packages/ui/src/apps/MobileSurfaceShell.tsx +++ b/packages/ui/src/apps/MobileSurfaceShell.tsx @@ -69,7 +69,7 @@ export const MobileSurfaceShell: React.FC = ({ return () => window.clearTimeout(id); } setEntered(false); - const id = window.setTimeout(() => setMounted(false), 220); + const id = window.setTimeout(() => setMounted(false), 300); return () => window.clearTimeout(id); }, [open]); @@ -180,31 +180,32 @@ export const MobileSurfaceShell: React.FC = ({ return createPortal(
-