Conversation
❌ Deploy Preview for storybook-addon-catalog failed. Why did it fail? →
|
✅ Deploy Preview for storybook-frontpage ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Testing in progress…🟢 UI Tests: web/frontpage: 37 tests unchanged |
|
Tip All tests passed and all changes approved!🟢 UI Tests: web/frontpage: 37 tests unchanged |
|
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 |
There was a problem hiding this comment.
Pull request overview
Updates the addon-catalog tag details route to pre-generate a larger set of tag pages at build time by expanding the static params list.
Changes:
- Added a cached tag list loader that combines category tags with a capped subset of non-category tags.
- Updated
generateStaticParams()to use the new cached tag list (instead of only category tags). - Minor formatting fix in
generateMetadata().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const getCachedTags = unstable_cache( | ||
| async () => [ | ||
| ...(await fetchTagsData({ isCategory: true })), | ||
| ...(await fetchTagsData()).slice(0, 300), | ||
| ], |
There was a problem hiding this comment.
getCachedTags returns all category tags plus the first 300 non-category tags. That means generateStaticParams() can pre-render more than 300 pages (categories + 300), which seems to conflict with the PR goal of prerendering “the first 300 tag pages”. If the intent is an overall cap, apply the limit after combining (or otherwise clarify/encode the intended cap in code).
| async () => [ | ||
| ...(await fetchTagsData({ isCategory: true })), | ||
| ...(await fetchTagsData()).slice(0, 300), | ||
| ], |
There was a problem hiding this comment.
In getCachedTags, (await fetchTagsData()).slice(0, 300) still fetches the full non-category tag list and only then truncates it. If the tags list is large, this can unnecessarily increase build time/memory and network usage for prerendering. Consider adding a server-side limit (e.g., query arg/variable) or a dedicated data function that only retrieves the needed N tag names.
No description provided.