Skip to content

Reject unresolved showcase route placeholders#104

Draft
f-gueguen wants to merge 1 commit into
mainfrom
codex/showcase-route-hygiene-frontend
Draft

Reject unresolved showcase route placeholders#104
f-gueguen wants to merge 1 commit into
mainfrom
codex/showcase-route-hygiene-frontend

Conversation

@f-gueguen

Copy link
Copy Markdown
Contributor

Summary

  • Why: unresolved {lang} placeholders can leak into prospect showcase URLs, dashboard source URLs, and preview/status links.
  • What: add a shared placeholder detector and reject or suppress placeholder-bearing showcase/dashboard/preview URLs before they are persisted or displayed.

Testing

  • corepack pnpm test
  • corepack pnpm check
  • corepack 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

  • Updated docs/backend/DASHBOARD_SPECS.md if user-facing backend capability coverage changed. — N/A
  • Ran WEBLINGO_REPO_PATH=/absolute/path/to/weblingo corepack pnpm docs:sync and committed content/docs/_generated/* when backend HEAD advanced. — N/A for this website-only branch

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
weblingo-website Error Error Jun 8, 2026 5:52am

@f-gueguen

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant