Repository navigation
test(docs): redirect - #41399
test(docs): redirect#41399
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
WalkthroughThis change replaces a specific redirect entry for the auth UI overview documentation with a catch-all pattern that routes all auth-helpers documentation paths to the SSR migration guide, maintaining the permanent redirect status. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
| permanent: true, | ||
| source: '/docs/guides/auth/auth-helpers/auth-ui-overview', | ||
| destination: '/docs/guides/auth/auth-helpers/auth-ui', | ||
| source: '/docs/guides/auth/auth-helpers/:path*', | ||
| destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers', | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if the file exists and its size
wc -l apps/www/lib/redirects.jsRepository: supabase/supabase
Length of output: 91
🏁 Script executed:
# Read the catch-all redirect at lines 1302-1305
sed -n '1300,1310p' apps/www/lib/redirects.jsRepository: supabase/supabase
Length of output: 424
🏁 Script executed:
# Read dependent redirects mentioned at lines 1326, 1331, 1336
sed -n '1320,1345p' apps/www/lib/redirects.jsRepository: supabase/supabase
Length of output: 799
🏁 Script executed:
# Read the fourth dependent redirect around line 2163
sed -n '2160,2170p' apps/www/lib/redirects.jsRepository: supabase/supabase
Length of output: 375
🏁 Script executed:
# Search for other references to auth-helpers paths in the codebase
rg "docs/guides/auth/auth-helpers" --type=js --type=ts --type=jsx --type=tsx --type=md -cRepository: supabase/supabase
Length of output: 88
🏁 Script executed:
# Also check for references in redirect destinations specifically
rg "auth-helpers" apps/www/lib/redirects.js | wc -lRepository: supabase/supabase
Length of output: 63
🏁 Script executed:
# Search for auth-helpers references across the entire codebase
rg "auth-helpers" apps/www --max-count=20Repository: supabase/supabase
Length of output: 11715
🏁 Script executed:
# Count total auth-helpers references by file to understand scope
rg "auth-helpers" apps/www -l | head -20Repository: supabase/supabase
Length of output: 1151
Redirect chains detected: update dependent redirects to point directly to the final destination.
This catch-all redirect creates multi-hop chains with existing rules in the file. Several redirects point TO auth-helpers paths that will now be caught by this new rule, causing users and search engines to traverse multiple redirects:
/docs/reference/auth-helpers→/docs/guides/auth/auth-helpers/→ migration guide/docs/reference/auth-helpers/next-js→/docs/guides/auth/auth-helpers/nextjs→ migration guide/docs/reference/auth-helpers/sveltekit→/docs/guides/auth/auth-helpers/sveltekit→ migration guide/docs/guides/auth/auth-helpers/nextjs-server-components→/docs/guides/auth/auth-helpers/nextjs→ migration guide
Redirect chains dilute SEO value and slow down user experience. Each redirect requires reloading content, which disrupts user experience.
Update the dependent redirects to point directly to the migration guide destination:
{
permanent: true,
source: '/docs/reference/auth-helpers',
- destination: '/docs/guides/auth/auth-helpers/',
+ destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers',
},
{
permanent: true,
source: '/docs/reference/auth-helpers/next-js',
- destination: '/docs/guides/auth/auth-helpers/nextjs',
+ destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers',
},
{
permanent: true,
source: '/docs/reference/auth-helpers/sveltekit',
- destination: '/docs/guides/auth/auth-helpers/sveltekit',
+ destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers',
},
{
permanent: true,
source: '/docs/guides/auth/auth-helpers/nextjs-server-components',
- destination: '/docs/guides/auth/auth-helpers/nextjs',
+ destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers',
},Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In apps/www/lib/redirects.js around lines 1302 to 1305, the new catch-all
redirect for /docs/guides/auth/auth-helpers/:path* causes redirect chains;
update any existing redirects that currently point to auth-helpers paths so they
point directly to
'/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers' instead
(e.g., rules for /docs/reference/auth-helpers,
/docs/reference/auth-helpers/next-js, /docs/reference/auth-helpers/sveltekit,
and /docs/guides/auth/auth-helpers/nextjs-server-components), leaving the
catch-all if still needed but ensuring no redirect targets another redirect.
This reverts commit 070bb84.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.