From 28b795d687717efcbbba732b997f6e207c84318c Mon Sep 17 00:00:00 2001 From: macro88 <88macro@proton.me> Date: Mon, 16 Nov 2026 20:25:29 +0800 Subject: [PATCH 1/3] Keep inactive overview gestures off the Home screen --- src/shell/Overview.tsx | 13 ++++++------- src/shell/WorkspaceStage.tsx | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/shell/Overview.tsx b/src/shell/Overview.tsx index 6633f638..e20dc1fd 100644 --- a/src/shell/Overview.tsx +++ b/src/shell/Overview.tsx @@ -10,7 +10,6 @@ import { useShellStyles, type ShellPalette, type ShellFonts } from './theme'; export interface OverviewHandle { focusCard: (id: string | null) => void; revealCard: (id: string | null) => void } interface Props { - hidden?: boolean; sessions: readonly NappletDescriptor[]; geometry: OverviewGeometry; size: Size; @@ -36,12 +35,13 @@ function focusView(view: ViewInstance | TextInstance | null | undefined) { const sessionKey = (session: NappletDescriptor): string => session.id; /** Only transparent controls virtualize; the live native views stay in WorkspaceStage. */ -export const Overview = forwardRef(function Overview({ hidden = false, sessions, geometry, size, visible, busy, focusedId, progress, scrollY, swipeId, swipeY, pending, onFocus, onClose, onOpen, onDragEnd, onMeasure }, ref) { +export const Overview = forwardRef(function Overview({ sessions, geometry, size, visible, busy, focusedId, progress, scrollY, swipeId, swipeY, pending, onFocus, onClose, onOpen, onDragEnd, onMeasure }, ref) { const { styles } = useShellStyles(createStyles); const scroll = useRef>(null); const heading = useRef(null); const cardRefs = useRef(new Map()); - const scrollGesture = useMemo(() => Gesture.Native(), []); + const inactive = busy || !visible; + const scrollGesture = useMemo(() => Gesture.Native().enabled(!inactive), [inactive]); const setCardRef = useCallback((id: string, view: ViewInstance | null) => { if (view) cardRefs.current.set(id, view); else cardRefs.current.delete(id); }, []); @@ -65,10 +65,10 @@ export const Overview = forwardRef(function Overview({ hi const stride = cardHeight + geometry.captionHeight + 20; const renderCard = useCallback(({ item, index }: { item: NappletDescriptor; index: number }) => ( - ), [busy, focusedId, geometry, onClose, onDragEnd, onFocus, onMeasure, pending, scrollGesture, setCardRef, swipeId, swipeY]); - return