SSG all tag pages instead of categories only#411
Conversation
|
Important Testing in progress…🟢 UI Tests: web/ui: 11 tests unchanged |
|
Important UI Tests need review – Review now🟡 UI Tests: web/frontpage: 3 changes must be accepted as baselines |
|
Important Testing in progress…🟢 UI Tests: web/ui: 11 tests unchanged |
|
Tip All tests passed and all changes approved!🟢 UI Tests: web/ui: 11 tests unchanged |
❌ Deploy Preview for storybook-addon-catalog failed. Why did it fail? →
|
❌ Deploy Preview for storybook-frontpage failed. Why did it fail? →
|
There was a problem hiding this comment.
Pull request overview
Updates the Next.js app(s) to statically generate tag detail pages more broadly (beyond category tags), alongside a set of Next.js 15 / React 19 upgrade-related adjustments (dependencies, typing updates, and Next runtime API changes).
Changes:
- Expand tag page static generation in addon-catalog by sourcing tag params from the full tag list.
- Apply Next.js 15 / React 19 migration updates (awaiting
params/headers(), removingJSX.Elementreturn annotations, framer-motion API adjustments). - Refactor LLM banner generation into a shared helper and update plausible/Next config wiring.
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/package.json | Bumps React/React types for workspace compatibility. |
| packages/ui/src/footer/top-section.tsx | Removes explicit JSX.Element return type (React 19 typing). |
| packages/ui/src/dropdown-menu/index.tsx | Removes explicit JSX.Element return type (React 19 typing). |
| packages/ui/package.json | Upgrades Next/Plausible/React types and adds shiki. |
| package.json | Adds root-level React/ReactDOM dependencies for the workspace. |
| apps/frontpage/package.json | Upgrades Next/React ecosystem deps (incl. framer-motion, graphql, shiki). |
| apps/frontpage/next.config.js | Updates plausible proxy config and adjusts Next 15 config options. |
| apps/frontpage/next-env.d.ts | Updates TypeScript references for Next route typing. |
| apps/frontpage/lib/get-llms-banner-lines.ts | Extracts reusable banner generation for LLM endpoints. |
| apps/frontpage/components/home/share/player.tsx | Updates framer-motion transition type. |
| apps/frontpage/components/home/develop/demo/controls.tsx | Updates framer-motion animation controls typing for v12. |
| apps/frontpage/components/home/automate/ui-tests/ui-tests.tsx | Refines ref typings for React 19 strictness. |
| apps/frontpage/components/docs/footer/actions.ts | Awaits headers() per Next 15 API changes. |
| apps/frontpage/app/versions/route.ts | Awaits headers() per Next 15 API changes. |
| apps/frontpage/app/releases/iframe/[slug]/page.tsx | Awaits async params per Next 15 type/runtime changes. |
| apps/frontpage/app/releases/[slug]/page.tsx | Awaits async params per Next 15 type/runtime changes. |
| apps/frontpage/app/recipes/[...name]/page.tsx | Awaits async params per Next 15 type/runtime changes. |
| apps/frontpage/app/providers.tsx | Updates PlausibleProvider initialization for next-plausible v4. |
| apps/frontpage/app/llms.txt/route.ts | Switches to shared banner helper for LLM output. |
| apps/frontpage/app/llms-full.txt/route.ts | Switches to shared banner helper for LLM output. |
| apps/frontpage/app/layout.tsx | Removes explicit JSX.Element return type (React 19 typing). |
| apps/frontpage/app/docs/[...slug]/page.tsx | Awaits async params per Next 15 type/runtime changes. |
| apps/addon-catalog/package.json | Upgrades Next/React deps; retains older eslint config version. |
| apps/addon-catalog/app/providers.tsx | Simplifies PlausibleProvider usage for next-plausible v4. |
| apps/addon-catalog/app/(home)/tag/[...name]/page.tsx | Changes static params generation to use broader tag list. |
| .npmrc | Forces legacy peer dep resolution for installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const getCachedTags = unstable_cache( | ||
| async () => fetchTagsData(), | ||
| ['tags'], | ||
| ); |
There was a problem hiding this comment.
generateStaticParams() now calls fetchTagsData() with no arguments via getCachedTags(), but fetchTagsData coerces isCategory with Boolean(isCategory) and the GraphQL query requires isCategory: Boolean!. With isCategory undefined this becomes false, so you will only pre-render non-category tags and stop pre-rendering category tags. To SSG all tag pages, merge results from both fetchTagsData({ isCategory: true }) and fetchTagsData({ isCategory: false }) (or update fetchTagsData/query to support an unfiltered “all tags” call).
| "@mdx-js/loader": "^3.0.1", | ||
| "@mdx-js/react": "^3.0.1", | ||
| "@next/bundle-analyzer": "^14.2.5", | ||
| "@next/mdx": "^14.2.4", | ||
| "@next/third-parties": "^14.2.4", | ||
| "@next/bundle-analyzer": "^15", | ||
| "@next/eslint-plugin-next": "^14.2.35", | ||
| "@next/mdx": "^15", | ||
| "@next/third-parties": "^15", |
There was a problem hiding this comment.
@next/eslint-plugin-next is a lint-time dependency but is listed under dependencies. Moving it back to devDependencies avoids shipping/installing lint tooling in production environments (and also makes it clearer it’s not required at runtime).
| @@ -1,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
Setting legacy-peer-deps=true globally can mask real peer dependency incompatibilities and make installs less reliable (especially across environments). Prefer fixing the underlying peer dependency issues or scoping --legacy-peer-deps to specific workflows if it’s only needed temporarily.
| legacy-peer-deps=true | |
| # Do not globally disable peer dependency resolution. | |
| # Resolve peer dependency conflicts in package versions, or use | |
| # `npm install --legacy-peer-deps` only for temporary, scoped workflows. |
| "@types/react": "^19", | ||
| "@types/react-dom": "^19", | ||
| "eslint": "^8", | ||
| "eslint-config-next": "14.2.4", |
There was a problem hiding this comment.
eslint-config-next is pinned to 14.2.4 while this app now depends on next: ^15. Keeping Next’s ESLint config on the previous major can lead to peer-dependency conflicts and rules that don’t match the installed Next version; please align eslint-config-next to the same major as next.
| "eslint-config-next": "14.2.4", | |
| "eslint-config-next": "^15", |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Notes
Cherry-picked from #398 (by @kylegach), rebased on top of the Next.js 15 upgrade (#410).
Test plan
🤖 Generated with Claude Code