feat: structural canvas via route groups (removes usePathname/Suspense)#423
Merged
ignmandagaran merged 2 commits intoJul 1, 2026
Conversation
Replaces the usePathname + BLACKLISTED_PATHS check with a route-group approach: - CanvasLayer: the single persistent canvas, mounted once in the root layout, visibility driven by the isCanvasInPage store flag (no usePathname). - SetCanvasMode: client effect setter a group layout renders to declare canvas on/off — runs client-side, so no prerender hazard, no <Suspense>. - PageShell: the (pages) main+Footer chrome, extracted so both the canvas and plain groups can share it. Wiring (route moves + root/layout swap) is the next step; see notes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace ContentWrapper's usePathname + BLACKLISTED_PATHS with route groups: - (canvas)/ and (plain)/ groups; (content)/ sub-layout shares PageShell chrome - root layout mounts the persistent CanvasLayer (no usePathname, no Suspense) - SetCanvasMode in each group layout toggles canvasVisible; isCanvasInPage stays sticky so the WebGL Scene persists across navigations - showcase index (canvas) / [slug] (plain) split across groups - not-found sets canvas mode; 21 cross-refs + contact path updated Build green (89/89). Runtime canvas behavior pending browser QA.
317c8b8
into
ignmandagaran/adopt-cache-components
3 checks passed
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
Replaces the
usePathname+BLACKLISTED_PATHSruntime check inContentWrapper(the last page-level<Suspense>after Cache Components adoption) with a structural route-group approach. Now fully wired and verified —ContentWrapper/usePathnameare removed.Stacked on #422.
Mechanism
CanvasLayer— the single 3D canvas, mounted once in the root layout (persists across nav). Visibility driven by store flags, nousePathname→ no<Suspense>.isCanvasInPage(sticky — keeps the WebGL Scene mounted across navigations) +canvasVisible(per-route show/hide).SetCanvasMode— a client effect-setter each group layout renders to declare canvas on/off (client-only → no prerender hazard).PageShell— shared<main>+Footer chrome for the(content)sub-layout in both groups.Structure
/showcase(canvas) and/showcase/[slug](plain) split cleanly across groups — Next accepts it.Verified
usePathname, noContentWrapperSuspense.Notes / follow-ups
labstaysƒ(its owninstant = falseuser-agent redirect — unrelated to canvas).not-found.tsx) sets canvas mode directly; the 404-within-a-plain-route path is worth a manual check.Checklist
usePathname/page-level<Suspense>for the canvas