Skip to content

feat(app): L5 instant marketing navigations - #176

Open
mkayander wants to merge 8 commits into
mainfrom
cursor/l5-instant-marketing-8f0a
Open

feat(app): L5 instant marketing navigations#176
mkayander wants to merge 8 commits into
mainfrom
cursor/l5-instant-marketing-8f0a

Conversation

@mkayander

@mkayander mkayander commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

L5 Instant Nav / Cache Components for marketing routes, plus Activity lifecycle hardening for heavy clients (WebGL, Monaco, Pyodide) and e2e coverage.

L5 marketing instant navigations

  • instant = true on /, /privacy, /daily
  • 'use cache' on i18n + metadata; single AppRootLayoutClient mount
  • Root layout reads proxy locale header directly (RTL for /ar)

Activity lifecycle (cacheComponents hide/show)

  • useDeferredClientMount — shared defer-one-frame + cleanup primitive
  • WebGLWebGLCanvasShell uses shared hook + context recovery
  • MonacoCodeRunner shell + CodePanel.onEditorUnmount
  • PyodidepythonRunner.release() via usePlaygroundRuntimeRelease on playground leave
  • Benchmark RAFthrottleWithRAF.cancel() on code panel unmount

E2e (27 tests)

  • Landing WebGL nav + forced context recovery
  • Instant marketing nav + WebGL on return home
  • Playground Monaco 3× home ↔ playground
  • Playground Python leave/return (Pyodide release)
  • Hero preview playback controls after instant nav away/back

Test plan

  • pnpm lint
  • pnpm test (467 unit + pythonRunner release spec)
  • pnpm test:e2e (27/27)
Open in Web Open in Cursor 

Suspense-split root locale headers() via RootHtmlShell and remove root
instant=false. Cache locale bundles with use cache; wrap session and
playground device hints in LocaleAppLayoutRuntime Suspense with an
instant shell fallback.

Opt marketing pages into instant=true; keep playground/profile at
instant=false. Add @next/playwright instant() e2e tests for client
navigations between /, /privacy, and /daily.
@vercel

vercel Bot commented Aug 23, 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 24, 2026 4:48pm

Address deep review findings on L5 instant marketing:

- Remove LocaleAppLayout Suspense swap that remounted TrpcProvider/Redux
  on every hard navigation (session flash, lost client state).
- Restore single AppRootLayoutClient with parallel session/i18n/headers load.
- Drop root Suspense fallback that hardcoded lang=en/dir=ltr; read locale
  header directly in RootHtmlShell with root instant=false.
- Re-add locale layout instant=false (session/headers runtime reads).
- Add e2e regression for /ar html dir=rtl.
@mkayander
mkayander marked this pull request as ready for review August 23, 2026 20:59
Decorative home 3D models showed gray radial-gradient masks with
'THREE.WebGLRenderer: Context Lost' after navigating away and back.

Add WebGLCanvasShell: defer mount one frame, dispose renderer on
unmount, and remount on webglcontextlost. Use it from LogoModelView
and PythonLogoModelView.
Assert active WebGL canvases on home after privacy round-trip with no
Context Lost console errors, and remount after WEBGL_lose_context.
Reset isReady on WebGLCanvasShell cleanup so Cache Components Activity
boundaries recreate canvases after gl.dispose(). Defer context-loss remount
one frame and tighten e2e helpers (footer privacy link, active-canvas-only
lose_context, instant-nav WebGL assertion).
Defer Monaco mount one frame and reset on cleanup so Cache Components
Activity hide-show cycles recreate the editor instead of rendering against
a disposed InstantiationService. Clear CodePanel refs on unmount.

Add e2e that navigates home ↔ playground three times and asserts Monaco
stays visible with no dispose/domNode console errors.
Add pythonRunner.release() and usePlaygroundRuntimeRelease so Pyodide
terminates when playground hides under cacheComponents. Extract shared
useDeferredClientMount for WebGL and Monaco shells. Cancel benchmark
throttleWithRAF on unmount.

Add e2e for Pyodide playground leave/return, hero preview instant nav,
and document heavy-client lifecycle policy.
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