From 7b15b15af3d0ca68b84ca914b4ff4246a95931b5 Mon Sep 17 00:00:00 2001 From: Gauvain Date: Wed, 15 Jul 2026 00:33:27 +0200 Subject: [PATCH] fix(nav): clarify the focus-guard comment scope --- hooks/useAppRouter.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hooks/useAppRouter.ts b/hooks/useAppRouter.ts index ce255fe3e..82bc7b1b3 100644 --- a/hooks/useAppRouter.ts +++ b/hooks/useAppRouter.ts @@ -31,9 +31,10 @@ export function useAppRouter() { const push = useCallback( (href: Parameters[0]) => { - // Duplicate-screen guard: a push blurs the source screen synchronously in - // the navigation state (only the native render is slow). A second tap then - // sees an unfocused screen and is dropped. Resets automatically on return. + // Rapid-push guard: a push blurs the source screen synchronously in the + // navigation state (only the native render is slow). Any further push from + // this screen — duplicate or not — is dropped until focus returns, so taps + // fired before the pushed screen renders can't stack screens. // No navigation context => nothing to guard (deep-link pushes from root). if (navigation?.isFocused?.() === false) return; if (typeof href === "string") {