From 162c8a23788fcf7c1ae35c11e294322a403adb5b Mon Sep 17 00:00:00 2001 From: karti-ai <176560021+karti-ai@users.noreply.github.com> Date: Fri, 28 Aug 2026 12:22:23 -0700 Subject: [PATCH] fix(web): redirect authenticated login route --- apps/web/src/App.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 7b2592a..d191429 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -244,13 +244,11 @@ function AppRoutes() { {/* `/` is the front door, and the front door is Piggy. -------------------------------------------------- - Signing in does not navigate: the auth gate simply starts rendering - these routes at whatever address the browser is already on, which for - anyone arriving fresh is `/`. So "land on Piggy after sign-in" and - "`/` is Piggy" are the same sentence, and this is the only line that - decides it. A post-sign-in `navigate()` was rejected: it fires on one - path through the gate and not on a hard refresh, so the product would - open somewhere different depending on how you got there. + Signing in does not navigate from the form: the auth gate starts + rendering these routes at the browser's current address. `/` goes to + Piggy directly, while `/login` has its own authenticated-only redirect + below so a person who used the explicit sign-in URL does not land on + the catch-all Not found page. It is a redirect rather than Piggy mounted at the index, because the workspace needs ONE address. Two paths rendering it would leave the @@ -273,6 +271,7 @@ function AppRoutes() { into them still resolve directly, with no pass through here. */} } /> + } /> } /> } /> } />