feat(app): L5 instant marketing navigations - #176
Open
mkayander wants to merge 8 commits into
Open
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = trueon/,/privacy,/daily'use cache'on i18n + metadata; singleAppRootLayoutClientmount/ar)Activity lifecycle (cacheComponents hide/show)
useDeferredClientMount— shared defer-one-frame + cleanup primitiveWebGLCanvasShelluses shared hook + context recoveryCodeRunnershell +CodePanel.onEditorUnmountpythonRunner.release()viausePlaygroundRuntimeReleaseon playground leavethrottleWithRAF.cancel()on code panel unmountE2e (27 tests)
Test plan
pnpm lintpnpm test(467 unit + pythonRunner release spec)pnpm test:e2e(27/27)