From 4570e65ce850778ae267c58a515394037fed0b63 Mon Sep 17 00:00:00 2001 From: Bolun Zhang Date: Tue, 12 May 2026 15:27:49 +0800 Subject: [PATCH] fix(app): respect iPad safe area in settings sidebar (#922) Co-authored-by: zbl --- packages/app/src/screens/settings-screen.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/app/src/screens/settings-screen.tsx b/packages/app/src/screens/settings-screen.tsx index 0b9dc5fe7..e57a15fbf 100644 --- a/packages/app/src/screens/settings-screen.tsx +++ b/packages/app/src/screens/settings-screen.tsx @@ -720,9 +720,16 @@ function SettingsSidebar({ }, [hosts, localServerId]); const isDesktopApp = isElectronRuntime(); const items = SIDEBAR_SECTION_ITEMS.filter((item) => !item.desktopOnly || isDesktopApp); + const insets = useSafeAreaInsets(); const padding = useWindowControlsPadding("sidebar"); const isDesktop = layout === "desktop"; - const containerStyle = isDesktop ? sidebarStyles.desktopContainer : sidebarStyles.mobileContainer; + const containerStyle = useMemo( + () => [ + isDesktop ? sidebarStyles.desktopContainer : sidebarStyles.mobileContainer, + isDesktop ? { paddingTop: insets.top } : null, + ], + [insets.top, isDesktop], + ); const selectedSectionId = view.kind === "section" ? view.section : null; const selectedServerId = view.kind === "host" ? view.serverId : null; const isProjectsSelected = view.kind === "projects" || view.kind === "project";