Skip to content

migrating to cache components nextjs#114

Merged
nabilfatih merged 20 commits into
previewfrom
cache
Apr 12, 2026
Merged

migrating to cache components nextjs#114
nabilfatih merged 20 commits into
previewfrom
cache

Conversation

@nabilfatih

@nabilfatih nabilfatih commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Replace setRequestLocale and client-side use(params) across many pages
with server-side next-intl APIs (getLocale/getTranslations) and update
the
internationalization getRequestConfig to resolve locale from root params
and return 404 for invalid locales

Add DeferredAiSheetOpen and DeferredComments dynamic client components
and
minimal Loading placeholders. Rename not-found to global-not-found and
add
metadata. Move providers into app shell, enable cacheComponents, and add
cacheLife imports. Bump next in internationalization package and update
pnpm lock
Removed server-side setRequestLocale calls and related locale extraction
(use(params)/getLocaleOrThrow)
across many pages and layouts, simplifying next-intl imports to only
what's needed. Moved the
data-pagefind-body attribute into LayoutContent and removed the wrapper
in AppShell. Provide a
fallback VirtualContext in use-virtual to avoid undefined context and
supply a stable virtualRef.
@nabilfatih nabilfatih self-assigned this Apr 9, 2026
@vercel

vercel Bot commented Apr 9, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
api Skipped Skipped Apr 12, 2026 1:54pm
mcp Skipped Skipped Apr 12, 2026 1:54pm

Request Review

Add a Node script that builds a Pagefind index directly from MDX/content
source (apps/www/scripts/pagefind.ts) and switch postbuild to run it.
Remove data-pagefind-ignore attributes across pages and components so
their content is included. Add remark + remark-mdx deps, fix MDX content
types and rendering (call Content component, extract exercise Q/A), and
remove stale "Enable static rendering" comments.
Delete /ask page, Ask CTA and results components, and the entire
packages/seo/ask dataset and types. Remove ask-related imports from
sitemap and indexing scripts.
devin-ai-integration[bot]

This comment was marked as resolved.

@vercel vercel Bot temporarily deployed to Preview – api April 9, 2026 22:10 Inactive
@vercel vercel Bot temporarily deployed to Preview – mcp April 9, 2026 22:10 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 00:23 Inactive
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 00:23 Inactive
Extract result-group components in the search UI. Add
getPagefindSectionResults, hasPagefindExcerpt, and trimExcerptPrefix to
normalize Pagefind sub-results, hide empty excerpt markup in the UI, and
add tests for the new behavior.
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 10:47 Inactive
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 10:47 Inactive
Cover normalizePagefindResult cases: preserve empty HTML excerpts,
keep excerpts unchanged when the title isn't repeated at the start,
and trim repeated title prefixes that merge into a text token.
Also add a test for getPagefindSectionResults returning an empty
array when sub_results is empty.
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 13:14 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 13:14 Inactive
Use Mantine's useDisclosure and useLayoutEffect to close or reset
transient controls (dropdowns, drawers, collapsibles, audio, dialogs)
when Next.js hides pages via Cache Components. Add explanatory comments
and replace several useState usages. Remove MainShellBoundary which is
no longer needed.
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 18:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 18:18 Inactive
Rename and relocate many pages from (dynamic)/(static) into (main)
and (site) route groups to simplify routing. Remove duplicate per-group
layouts and add a single (app)/(main)/layout that renders AppShell to
avoid shell-state divergence. Seed the Convex Better Auth token once at
the shared (app) boundary (using ConvexAppProviders and Suspense) so
static and dynamic routes coexist with correct SSR and hydration.
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 19:03 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 19:03 Inactive
Introduce AppProviders and SharedProviders and mount them at the
appropriate layout boundaries. Move request-scoped Convex/user seeding
into AppProviders and scope search/Pagefind/AI/content-view providers
into SharedProviders. Remove the old providers index and
ConvexAppProviders,
move try-out routes into the shared group, and update affected layouts,
imports, and the app shell to use the new boundaries.
@vercel vercel Bot temporarily deployed to Preview – mcp April 10, 2026 20:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 10, 2026 20:18 Inactive
@nabilfatih nabilfatih changed the base branch from main to preview April 10, 2026 20:21
Remove server-side async inequality functions and the imports from the
MDX files; use static boundaryLine2D values instead. Add useLayoutEffect
and canvasKey state in CoordinateSystem to force remount of the
ThreeCanvas when the visualization is hidden, preventing stale WebGL
scenes and resetting play/drag state.
Add importContentModule for canonical localized MDX dynamic imports and
use it from the scoped content loader. Simplify getScopedContent calls
and update callers and tests to match the new importer signature.
Refactor exercise/article components to accept pre-imported question/
answer nodes and adjust page logic accordingly. Apply minor
design-system
cleanups (docblocks, remove unnecessary "use client", scroll area
types).
devin-ai-integration[bot]

This comment was marked as resolved.

nabilfatih and others added 6 commits April 11, 2026 22:16
Implement loaders that read exercise question/answer metadata and
choices without importing compiled MDX, including a GitHub raw fallback
for missing choices. Export cache-wrapped helpers for page usage and
add comprehensive unit tests covering success paths and edge cases.
Introduce getScopedPathTarget for root-only path validation and make
getScopedContentTarget compose over it to add locale-specific MDX path.

Update getScopedReferences to use the path-only target (ref modules are
locale-agnostic) and adjust tests to mock the importer and assert it is
called with the root-relative directory path.
Replace the monolithic packages/contents/_lib/exercises.ts with four new
modules: collection, renderable, set, and source. Update import sites
across
apps to use the new paths and adjust references to getExerciseCount,
getExercisesContent, getExerciseByNumber, and related helpers. Remove
the
ChoicesValidationError from shared errors.
Replace the old @takumi-rs/image-response usage with takumi-js/response
and update serverExternalPackages to include @takumi-rs/core. Remove the
deprecated dependency, add takumi-js, and bump pagefind to 1.5.2. Update
pnpm lockfile to match. Add a brief JSDoc for the OgImage renderer.
@vercel vercel Bot temporarily deployed to Preview – mcp April 12, 2026 13:54 Inactive
@vercel vercel Bot temporarily deployed to Preview – api April 12, 2026 13:54 Inactive
@nabilfatih nabilfatih merged commit c026aa2 into preview Apr 12, 2026
4 checks passed
@nabilfatih nabilfatih deleted the cache branch April 12, 2026 14:00
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