From 0f3201e699a00ca64ca512e69825d1a5a9d5c3ae Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Mon, 29 Jun 2026 23:32:06 -0700 Subject: [PATCH] Use native edge chrome on file and review routes --- .../src/features/files/ThreadFilesRouteScreen.tsx | 10 ++++++++++ apps/mobile/src/features/review/ReviewSheet.tsx | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx index 662bcb4dca..a97443dfa2 100644 --- a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx +++ b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx @@ -4,6 +4,7 @@ import { useLocalSearchParams, useRouter } from "expo-router"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ActivityIndicator, + Platform, Pressable, ScrollView, Text as RNText, @@ -24,6 +25,7 @@ import { EmptyState } from "../../components/EmptyState"; import { LoadingScreen } from "../../components/LoadingScreen"; import { cn } from "../../lib/cn"; import { resolveFileSelectionNavigationAction } from "../../lib/adaptive-navigation"; +import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect"; import { tryOpenExternalUrl } from "../../lib/openExternalUrl"; import { buildThreadFilesNavigation, buildThreadRoutePath } from "../../lib/routes"; import { MOBILE_TYPOGRAPHY } from "../../lib/typography"; @@ -58,6 +60,7 @@ import { import { useWorkspaceFileAssetUrl } from "./workspaceFileAssetUrl"; type FileViewMode = "preview" | "source"; +const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version); function firstRouteParam(value: string | string[] | undefined): string | null { if (Array.isArray(value)) { @@ -579,6 +582,13 @@ export function ThreadFilesTreeScreen() { headerStyle: { backgroundColor: "transparent" }, headerShadowVisible: false, headerTitle: renderHeaderTitle, + scrollEdgeEffects: { + top: TOP_SCROLL_EDGE_EFFECT, + bottom: "hidden", + left: "hidden", + right: "hidden", + }, + unstable_navigationItemStyle: Platform.OS === "ios" ? "editor" : undefined, headerSearchBarOptions: { allowToolbarIntegration: true, autoCapitalize: "none", diff --git a/apps/mobile/src/features/review/ReviewSheet.tsx b/apps/mobile/src/features/review/ReviewSheet.tsx index 82c7b5b879..e62baf44e5 100644 --- a/apps/mobile/src/features/review/ReviewSheet.tsx +++ b/apps/mobile/src/features/review/ReviewSheet.tsx @@ -17,6 +17,7 @@ import { import { ActivityIndicator, FlatList, + Platform, Pressable, ScrollView, type NativeSyntheticEvent, @@ -31,6 +32,7 @@ import { AppText as Text } from "../../components/AppText"; import { environmentCatalog } from "../../connection/catalog"; import { useEnvironmentPresentation } from "../../state/presentation"; import { useAtomCommand } from "../../state/use-atom-command"; +import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect"; import { useThemeColor } from "../../lib/useThemeColor"; import { MOBILE_TYPOGRAPHY } from "../../lib/typography"; import { useThreadDraftForThread } from "../../state/use-thread-composer-state"; @@ -59,6 +61,8 @@ import { resolveReviewAvailability } from "./reviewAvailability"; import { resolveSelectedReviewFileId } from "./reviewPaneSelection"; import { buildReviewSectionMenu } from "./review-section-menu"; +const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version); + const REVIEW_HEADER_SPACING = 0; const ReviewNotice = memo(function ReviewNotice(props: { readonly notice: string }) { @@ -589,6 +593,13 @@ export function ReviewSheet() { backgroundColor: "transparent", }, headerTitle: renderHeaderTitle, + scrollEdgeEffects: { + top: TOP_SCROLL_EDGE_EFFECT, + bottom: "hidden", + left: "hidden", + right: "hidden", + }, + unstable_navigationItemStyle: Platform.OS === "ios" ? "editor" : undefined, }} />