Skip to content

Reject unresolved showcase route placeholders#105

Merged
f-gueguen merged 4 commits into
mainfrom
codex/showcase-route-hygiene-v2-frontend
Jun 8, 2026
Merged

Reject unresolved showcase route placeholders#105
f-gueguen merged 4 commits into
mainfrom
codex/showcase-route-hygiene-v2-frontend

Conversation

@f-gueguen

Copy link
Copy Markdown
Contributor

Summary

  • Why: prevent prospect/showcase route inputs and preview payloads from carrying unresolved {lang} / %7Blang%7D placeholders into backend route creation or rendered preview metadata.
  • What: added shared placeholder detection, rejected placeholder source URLs before proxying prospect showcase requests, and suppressed placeholder dashboard URLs in preview status payloads.
  • Synced generated backend docs manifest against the backend showcase route hygiene branch.

Testing

  • corepack pnpm test - 116 files, 686 tests passed.
  • corepack pnpm check
  • corepack pnpm test:contracts - 5 files, 30 tests passed.
  • WEBLINGO_REPO_PATH=/Users/francoisgueguen/Documents/workspaces-self/saas/weblingo_showcase_route_hygiene_v2_backend corepack pnpm docs:sync:check
  • WEBLINGO_REPO_PATH=/Users/francoisgueguen/Documents/workspaces-self/saas/weblingo_showcase_route_hygiene_v2_backend corepack pnpm docs:sync

Docs sync and capability matrix

  • Updated generated backend sync manifest only.
  • Ran WEBLINGO_REPO_PATH=/Users/francoisgueguen/Documents/workspaces-self/saas/weblingo_showcase_route_hygiene_v2_backend corepack pnpm docs:sync and committed content/docs/_generated/backend-sync-manifest.json.
  • docs/backend/DASHBOARD_SPECS.md not updated; no user-facing backend dashboard capability coverage changed in the website repo.

@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 Ready Ready Preview, Comment Jun 8, 2026 9:27am

@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: 9db69bebb6

ℹ️ 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".

Comment on lines +27 to +29
if (typeof value !== "string" || hasUnresolvedRoutePlaceholder(value)) {
return null;
}

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 Clear unsafe ready-state links instead of preserving them

When a ready status payload contains a placeholder URL while the job already has a stored preview/demo URL (for example from localStorage or an earlier event before this guard), this returns null the same way a missing field does. buildPayloadLocationPatch does not clear missing links for status === "ready", so the terminal patch passes undefined and the reducer preserves the existing unsafe URL, leaving the placeholder link clickable despite the new rejection path. Distinguish unsafe values from absent values or explicitly clear unsafe links for ready payloads.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 79f2154: ready status payloads now explicitly clear unsafe placeholder preview and dashboard URLs instead of preserving stale stored links.

Comment thread internal/core/route-placeholders.ts Outdated
@@ -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 Limit placeholder rejection to route tokens

This helper treats any brace or %7B/%7D in a URL as an unresolved route placeholder, so valid source pages with encoded structured query state such as /search?state=%7B...%7D are now rejected by the create proxy and dashboard source URL validation. The route placeholder contract in this repo is specifically the {lang} routing token, so this should match that token (and its encoded form) rather than every literal/encoded brace.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 79f2154: unresolved route detection now matches the {lang} route token only, so encoded structured query state is no longer rejected.

@f-gueguen f-gueguen marked this pull request as ready for review June 8, 2026 10:37
@f-gueguen f-gueguen merged commit ebcb2e5 into main Jun 8, 2026
6 checks passed
@f-gueguen f-gueguen deleted the codex/showcase-route-hygiene-v2-frontend branch June 8, 2026 10:37
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