Reject unresolved showcase route placeholders#104
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08a3bce7cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,5 @@ | |||
| const UNRESOLVED_ROUTE_PLACEHOLDER_RE = /[{}]|%7b|%7d/i; | |||
There was a problem hiding this comment.
Narrow placeholder detection to actual route tokens
This regex treats any literal or percent-encoded brace anywhere in the URL as an unresolved route placeholder. With the new validateSourceUrl/proxy checks calling this on url.href, valid customer source URLs such as https://example.com/search?filters=%7B%22category%22%3A%22books%22%7D are rejected with the placeholder error, and similarly encoded JSON-like fragments in returned links are suppressed even though they are not {lang} route placeholders. Please match the specific unresolved route token pattern instead of all braces.
Useful? React with 👍 / 👎.
Summary
{lang}placeholders can leak into prospect showcase URLs, dashboard source URLs, and preview/status links.Testing
corepack pnpm testcorepack pnpm checkcorepack pnpm test:contracts— N/A, no backend contract surface changed in this website branch.WEBLINGO_REPO_PATH=/absolute/path/to/weblingo corepack pnpm docs:sync:check(required when CI cross-repo token is unavailable) — N/A, no docs or backend-derived generated content changed.Docs sync and capability matrix
docs/backend/DASHBOARD_SPECS.mdif user-facing backend capability coverage changed. — N/AWEBLINGO_REPO_PATH=/absolute/path/to/weblingo corepack pnpm docs:syncand committedcontent/docs/_generated/*when backend HEAD advanced. — N/A for this website-only branch