Files
Miranda LimonczenkoandClaude Opus 5 f91c58d361 fix(docs e2e): say when a broken link is a redirect
A docs preview never serves apps/www/lib/redirects.js. That table belongs
to the www project, which production requests pass through first. So a
link that resolves through a redirect fails on a preview and passes on
supabase.com, and the failure said only "should resolve (status 404)".

Look the path up in that table on failure. When a redirect covers it, add
the redirect and the destination to link to instead. A link with no
redirect is just broken, so its message is unchanged.

The link still fails either way.

Loads redirects.js via createRequire as plain CommonJS data, so no www app
code runs. Two things needed handling in the real table: two entries are
host or query conditional and can't be evaluated without request context,
and 27 destinations are absolute URLs or contain a query string that
path-to-regexp can't compile. Only one of those has a dynamic source that
would need substitution, so compile() is called only when a match captured
params, and that call is still guarded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 12:19:27 -07:00
..