Skip to content

Reapply "test(docs): redirect" (#41439) - #41440

Merged
charislam merged 1 commit into
masterfrom
charis/revert
Dec 17, 2025
Merged

charislam merged 1 commit into
masterfrom
charis/revert

Conversation

@charislam

@charislam charislam commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

This reverts commit c0137e9.

Summary by CodeRabbit

  • Documentation
    • Updated redirect routing for authentication-related documentation to direct users to server-side migration guidance.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Dec 17, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
zone-www-dot-com Ready Ready Preview, Comment Dec 17, 2025 3:20pm
7 Skipped Deployments
Project Deployment Review Updated (UTC)
studio Ignored Ignored Dec 17, 2025 3:20pm
cms Skipped Skipped Dec 17, 2025 3:20pm
design-system Skipped Skipped Dec 17, 2025 3:20pm
docs Skipped Skipped Dec 17, 2025 3:20pm
studio-self-hosted Skipped Skipped Dec 17, 2025 3:20pm
studio-staging Skipped Skipped Dec 17, 2025 3:20pm
ui-library Skipped Skipped Dec 17, 2025 3:20pm

@supabase

supabase Bot commented Dec 17, 2025

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

A redirect configuration change in the documentation site replaces a specific auth-helpers route with a generalized wildcard pattern. The new rule matches any path under /docs/guides/auth/auth-helpers/ and redirects to the server-side SSR migration guidance page instead of the specific auth-ui endpoint.

Changes

Cohort / File(s) Change Summary
Redirect Configuration
apps/www/lib/redirects.js
Replaced specific redirect /docs/guides/auth/auth-helpers/auth-ui-overview → /docs/guides/auth/auth-helpers/auth-ui with generalized wildcard route /docs/guides/auth/auth-helpers/:path* → /docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

This is a straightforward configuration change affecting a single redirect entry with clear intent and minimal complexity.

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • ChrisChinchilla
  • cemalkilic

Poem

🐰 A path once fixed in stone so clear,
Now spreads its wings to catch all near!
Through wildcard routes, we softly guide,
To SSR's migration tide.
The docs now lead the clearer way! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete and does not follow the required template structure with sections like 'What kind of change', 'Current behavior', 'New behavior', and 'Additional context'. Complete the description using the provided template, specifying that this is a revert/fix, explaining why the original commit was needed, and linking to the relevant issues if applicable.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly references the PR's primary objective: reapplying a previous change (test redirect rules) by reverting an unwanted revert commit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch charis/revert

Comment @coderabbitai help to get the list of available commands and usage tips.

@charislam
charislam enabled auto-merge (squash) December 17, 2025 15:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0137e9 and 6829846.

📒 Files selected for processing (1)
  • apps/www/lib/redirects.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: typecheck

Comment thread apps/www/lib/redirects.js
Comment on lines +1303 to +1304
source: '/docs/guides/auth/auth-helpers/:path*',
destination: '/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# First, let's verify the exact content at lines 1303-1304
echo "=== Content at lines 1303-1304 ==="
sed -n '1303,1304p' apps/www/lib/redirects.js

# Check surrounding context (lines 1300-1310)
echo -e "\n=== Context around lines 1303-1304 ==="
sed -n '1300,1310p' apps/www/lib/redirects.js

# Check the conflicting redirects mentioned
echo -e "\n=== Lines 1326, 1331, 1336 (claimed conflicting redirects) ==="
sed -n '1320,1340p' apps/www/lib/redirects.js

# Search for all auth-helpers redirects in the file
echo -e "\n=== All auth-helpers related redirects ==="
rg -n "auth-helpers" apps/www/lib/redirects.js

Repository: supabase/supabase

Length of output: 2141


🏁 Script executed:

#!/bin/bash

# Check git history for the commit mentioned
echo "=== Checking git log for auth-helpers redirect changes ==="
git log --oneline -20 -- apps/www/lib/redirects.js

# Try to find if there was a recent revert
echo -e "\n=== Searching for revert commits ==="
git log --oneline -50 -- apps/www/lib/redirects.js | grep -i revert

Repository: supabase/supabase

Length of output: 207


🏁 Script executed:

#!/bin/bash

# Search for references to auth-helpers paths in documentation and code
echo "=== References to auth-helpers in markdown files ==="
rg "auth-helpers" --type-list | head -5
rg "auth-helpers" -g "*.md" -g "*.mdx" -C 2 | head -100

echo -e "\n=== References to auth-helpers in js/ts files ==="
rg "auth-helpers" -g "*.js" -g "*.ts" -g "*.jsx" -g "*.tsx" -C 1 | head -100

Repository: supabase/supabase

Length of output: 18767


🏁 Script executed:

#!/bin/bash

# Search for auth-helpers page content files
echo "=== Searching for auth-helpers content files ==="
find apps/docs/content -name "*auth-helpers*" -o -path "*/auth-helpers*" -type f 2>/dev/null | head -20

# Check if the guides directory has auth-helpers subdirectory
echo -e "\n=== Checking auth-helpers content directory structure ==="
find apps/docs/content/guides/auth -type d | grep -i auth-helpers

# Look for any markdown files in auth-helpers guides
echo -e "\n=== Auth-helpers guide files ==="
find apps/docs/content/guides/auth -name "*.mdx" -o -name "*.md" | grep -i auth-helpers

Repository: supabase/supabase

Length of output: 1330


🏁 Script executed:

#!/bin/bash

# Check what's in the auth guides directory
echo "=== Files in auth guides directory ==="
ls -la apps/docs/content/guides/auth/ 2>/dev/null || echo "Directory not found"

# Check for auth-helpers guide file specifically
echo -e "\n=== Searching for auth-helpers.mdx content file ==="
find apps/docs/content -name "auth-helpers.mdx" -o -name "auth-helpers.md"

# Check navigation menu constants to understand the intended state
echo -e "\n=== NavigationMenu constants content (auth-helpers section) ==="
sed -n '1,500p' apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts | grep -A 20 "auth-helpers"

Repository: supabase/supabase

Length of output: 3268


🏁 Script executed:

#!/bin/bash

# Check the nav menu structure for auth-helpers
echo "=== Checking NavigationMenu.constants.ts for auth-helpers items ==="
rg -A 30 "auth-helpers" apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts | head -80

Repository: supabase/supabase

Length of output: 1953


Address redirect chains created by wildcard auth-helpers pattern.

The wildcard redirect at line 1303 creates 2-hop redirect chains with existing redirects. For example:

  • /docs/reference/auth-helpers/next-js → /docs/guides/auth/auth-helpers/nextjs (line 1331) → /docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers (line 1303)

Auth-helpers pages still exist in the codebase (auth-ui.mdx, nextjs.mdx, sveltekit.mdx, etc.) and are referenced in navigation menus. Permanent 301 redirects that chain degrade SEO performance and user experience.

Either:

  1. Remove the conflicting redirects (lines 1325–1326, 1330–1331, 1335–1336) if auth-helpers docs are fully deprecated, or
  2. Make the wildcard pattern more specific to avoid catching intermediate redirects (e.g., redirect only the index, not all paths)
🤖 Prompt for AI Agents
In apps/www/lib/redirects.js around lines 1303–1304 (and conflicting redirects
at 1325–1326, 1330–1331, 1335–1336), the wildcard redirect for
'/docs/guides/auth/auth-helpers/:path*' is causing 2-hop redirect chains with
more specific auth-helpers redirects; either remove the specific redirects
(lines 1325–1326, 1330–1331, 1335–1336) if those pages are fully deprecated, or
replace the wildcard with a single-index redirect (e.g., change the source to
'/docs/guides/auth/auth-helpers' so only the index redirects to
'/docs/guides/auth/server-side/migrating-to-ssr-from-auth-helpers') to avoid
catching intermediate paths and preserve existing per-page redirects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants