Files
supabase/apps/studio/compat
Alaister Young 96a9d19db1 fix(studio): strip trailing slash from useRouter().pathname for index routes
TanStack route ids for index routes carry a trailing slash
(e.g. '/project/$ref/'), and toNextPathPattern was passing that
through verbatim. Next's pages-router never includes a trailing
slash in router.pathname, so consumers like the project sidebar's
active-route check (router.pathname.split('/')[3]) saw an empty
string for index pages instead of undefined - and the home icon
stopped highlighting on /project/<ref>.

Drop the trailing slash unconditionally, except for the root path
itself.
2026-05-11 15:15:54 +08:00
..