Skip to content

SSG all tag pages instead of categories only#411

Open
shilman wants to merge 5 commits into
shilman/next-15-upgradefrom
shilman/ssg-tags
Open

SSG all tag pages instead of categories only#411
shilman wants to merge 5 commits into
shilman/next-15-upgradefrom
shilman/ssg-tags

Conversation

@shilman

@shilman shilman commented Apr 13, 2026

Copy link
Copy Markdown
Member

Summary

  • SSG all tag pages instead of categories only

Notes

Cherry-picked from #398 (by @kylegach), rebased on top of the Next.js 15 upgrade (#410).

Test plan

  • Verify tag pages are statically generated at build time
  • Confirm no regressions on category pages

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 13, 2026 11:58
@chromatic-com

chromatic-com Bot commented Apr 13, 2026

Copy link
Copy Markdown

Important

Testing in progress…

🟢 UI Tests: web/ui: 11 tests unchanged
UI Review: web/ui: Comparing 11 stories…
Storybook icon Storybook Publish: web/ui: 11 stories published

@chromatic-com

chromatic-com Bot commented Apr 13, 2026

Copy link
Copy Markdown

Important

UI Tests need review – Review now

🟡 UI Tests: web/frontpage: 3 changes must be accepted as baselines
🟢 UI Review: web/frontpage: 29 stories published -- no changes
Storybook icon Storybook Publish: web/frontpage: 29 stories published

@chromatic-com

chromatic-com Bot commented Apr 13, 2026

Copy link
Copy Markdown

Important

Testing in progress…

🟢 UI Tests: web/ui: 11 tests unchanged
UI Review: web/ui: Comparing 11 stories…
Storybook icon Storybook Publish: web/ui: 11 stories published

@chromatic-com

chromatic-com Bot commented Apr 13, 2026

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: web/ui: 11 tests unchanged
🟢 UI Review: web/ui: 11 stories published -- no changes
Storybook icon Storybook Publish: web/ui: 11 stories published

@netlify

netlify Bot commented Apr 13, 2026

Copy link
Copy Markdown

Deploy Preview for storybook-addon-catalog failed. Why did it fail? →

Name Link
🔨 Latest commit eed8d03
🔍 Latest deploy log https://app.netlify.com/projects/storybook-addon-catalog/deploys/69dceb1e60849f00081f856e

@netlify

netlify Bot commented Apr 13, 2026

Copy link
Copy Markdown

Deploy Preview for storybook-frontpage failed. Why did it fail? →

Name Link
🔨 Latest commit eed8d03
🔍 Latest deploy log https://app.netlify.com/projects/storybook-frontpage/deploys/69dceb1e6e741100081bbb73

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(), removing JSX.Element return 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.

Comment on lines +37 to +40
const getCachedTags = unstable_cache(
async () => fetchTagsData(),
['tags'],
);

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +28
"@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",

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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).

Copilot uses AI. Check for mistakes.
Comment thread .npmrc
@@ -1,0 +1 @@
legacy-peer-deps=true

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^8",
"eslint-config-next": "14.2.4",

Copilot AI Apr 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"eslint-config-next": "14.2.4",
"eslint-config-next": "^15",

Copilot uses AI. Check for mistakes.
@shilman shilman changed the base branch from main to shilman/next-15-upgrade April 14, 2026 01:52
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.

3 participants