Skip to content

feat(app): playground App Router pilot shell (Phase 3) - #167

Open
mkayander wants to merge 2 commits into
mainfrom
cursor/playground-app-shell-8f0a
Open

feat(app): playground App Router pilot shell (Phase 3)#167
mkayander wants to merge 2 commits into
mainfrom
cursor/playground-app-shell-8f0a

Conversation

@mkayander

@mkayander mkayander commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 3 kickoff: adds an App Router playground pilot shell under internal-marketing, sharing UI and SEO logic with the existing Pages /playground route.

Changes

App Router pilot route

  • /internal-marketing/[locale]/playground/[[...slug]] — full playground UI with pilot noindex metadata and canonical pointing at public /playground URLs.

Shared extraction

  • PlaygroundPageView — client shell used by both routers.
  • resolvePlaygroundPageSeo — shared SEO resolver for Pages gSSP and App generateMetadata.

App Router navigation bridge

  • usePlaygroundRoute — slug state + navigation for Pages and pilot paths.
  • playgroundRoute — path parse/build helpers.
  • usePlaygroundSlugs / useSearchParam / useMobilePlaygroundView — App Router support via next/navigation.

Review follow-ups (latest commit)

  • remapPlaygroundPathToBaselastPlaygroundPath restore remaps slug segments onto the current basePath (fixes pilot jumping to public URLs).
  • buildPlaygroundPath — filters empty slug segments (fixes trailing-slash case URLs).
  • setCase — no longer passes empty solutionSlug segment.

Verification

  • pnpm lint — pass
  • pnpm test — 449 tests pass
  • Vercel preview smoke — API routes, public pages, pilot playground all green

Still blocked

  • Public cutover of /playground to App (needs next.config i18n removal)
  • Next 16.3.x / cacheComponents / unstable_instant
Open in Web Open in Cursor 

- Extract PlaygroundPageView shared by Pages and App pilot routes
- Add /internal-marketing/[locale]/playground/[[...slug]] with pilot metadata
- Share resolvePlaygroundPageSeo between gSSP and generateMetadata
- Add usePlaygroundRoute bridge for slug navigation under App Router
- Extend useSearchParam and usePlaygroundSlugs for next/navigation
- Add playgroundRoute path helpers and vitest next/navigation mock
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dstruct Ready Ready Preview Aug 10, 2026 7:23am

@mkayander
mkayander marked this pull request as ready for review August 9, 2026 21:24
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

- Remap lastPlaygroundPath restore onto current basePath (pilot vs public)
- Omit empty slug segments in buildPlaygroundPath and setCase navigation
- Add remapPlaygroundPathToBase helper with unit tests
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