chore: upgrade to next.js 16 + new findable-ui major (phase 2 from findable-ui#952) (#3087)#3090
Open
frano-m wants to merge 2 commits into
Open
chore: upgrade to next.js 16 + new findable-ui major (phase 2 from findable-ui#952) (#3087)#3090frano-m wants to merge 2 commits into
frano-m wants to merge 2 commits into
Conversation
…ndable-ui#952) (#3087) closes #3087 - bump next ^16, eslint-config-next ^16, @next/eslint-plugin-next ^16, @next/mdx ^16 - bump next-mdx-remote ^6, @databiosphere/findable-ui ^54.1 - add @mui/material-nextjs ^9 + @emotion/server ^11; wire AppCacheProvider in _app.tsx and DocumentHeadTags + documentGetInitialProps in _document.tsx - pin builds to webpack via --webpack flag (tracks vercel/next.js#82607) - migrate .eslintrc.json + .eslintignore → eslint.config.mjs (flat config), replace eslint-plugin-eslint-comments with @eslint-community variant, swap eslint-plugin-typescript-sort-keys for eslint-plugin-perfectionist ^4, bump eslint ^9, react-hooks ^7, jsdoc ^63, sort-destructure-keys ^3 - pass blockJS: false to next-mdx-remote serialize options (v6 default silently strips JSX expression attributes) - bump engines.node to 22.13.0, add .nvmrc, update CI workflow - drop redundant glob ^11.0.4 override - update ErrorBoundary import path to errorBoundary/errorBoundary (v54 dropped the directory barrel) - replace removed findable-ui Markdown component in Publication: render publication.title and citation as plain strings; clean one anomalous biccn-publications.json title (Na+/K+ paper) to use unicode superscript; follow-up for crossref title sanitization tracked in #3089 - uninstall isomorphic-dompurify (no longer needed) - suppress react-hooks/set-state-in-effect in useSearch with disable comment referencing follow-up #3088 (encode pagination in URL query) - fix mechanical lint errors surfaced by the new rule set (jsdoc, sort-keys, explicit return types, nested template literal); typography constants keep their CSS-author order via inline sort-keys disables Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the data-portal app to Next.js 16 and the latest major @databiosphere/findable-ui, with associated tooling and SSR plumbing updates (ESLint v9 flat config, MUI Emotion cache integration, and MDX serialization behavior alignment).
Changes:
- Bump core dependencies (Next.js 16, findable-ui v54, next-mdx-remote v6) and Node engine baseline (22.13.0), updating CI accordingly.
- Add MUI Next.js (pages router) SSR Emotion cache wiring via
AppCacheProvider(_app.tsx) andDocumentHeadTags/documentGetInitialProps(_document.tsx). - Migrate ESLint config to flat config (
eslint.config.mjs), update lint script, and apply small code/doc tweaks to satisfy updated rule sets and removed APIs.
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
views/SearchView/hooks/useSearch.ts |
Suppresses react-hooks/set-state-in-effect for URL→state sync (tracked follow-up). |
viewModelBuilders/viewModelBuilders.ts |
Adds explicit JSX return types and JSDoc param clarifications. |
viewModelBuilders/dataDictionaryMapper/viewModelBuilders.ts |
Simplifies string building (avoids nested template literals). |
viewModelBuilders/dataDictionaryMapper/columnDefs.ts |
Key reordering to satisfy sort rules. |
viewModelBuilders/dataDictionaryMapper/accessorFn.ts |
Widen accessor return type to ReactNode. |
utils/trackerNetwork.ts |
Adds JSDoc param/returns annotations. |
utils/docPages.ts |
Sets blockJS: false for next-mdx-remote v6 serialization to preserve JSX expression attributes. |
utils/availableNetworks.ts |
Adds @returns documentation for filtering behavior. |
tsconfig.json |
Updates TS settings for Next 16 (moduleResolution: bundler, jsx: react-jsx). |
theme/typography/constants.ts |
Adds scoped sort-keys suppressions to preserve readable key ordering. |
site-config/data-portal/dev/config.ts |
Reorders dataSource block (no functional change). |
pages/_document.tsx |
Adds MUI Next.js document helpers for Emotion SSR tags. |
pages/_app.tsx |
Wraps app in MUI AppCacheProvider; updates findable-ui ErrorBoundary import path. |
package.json |
Dependency bumps, webpack pin for Next CLI, ESLint v9 tooling, Node engine bump, remove unused override. |
eslint.config.mjs |
Introduces ESLint v9 flat config replacing legacy .eslintrc.json + .eslintignore. |
constants/biccn-publications.json |
Cleans a publication title (replaces HTML sup tags with Unicode superscripts). |
components/HCABioNetworks/.../publication.tsx |
Removes Markdown rendering and renders publication title/citation as plain text. |
apis/tracker/api.ts |
Adds missing @returns JSDoc lines. |
apis/azul/hca-dcp/common/entities.ts |
Removes explicit-any suppressions; uses unknown index signatures. |
.nvmrc |
Pins local Node version to 22.13.0. |
.github/workflows/run-checks.yml |
Updates CI Node version to 22.13.0. |
.eslintrc.json |
Removed (replaced by flat config). |
.eslintignore |
Removed (replaced by flat config ignores). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Closes #3087
Parent epic: DataBiosphere/findable-ui#952 (Phase 2 — Next 16 rollout across consumers)
Grandparent: DataBiosphere/findable-ui#884 (Next 16 upgrade plan)
Follow-ups (this repo):
react-hooks/set-state-in-effectsuppression inuseSearch.ts)complete-biccn-publicationsscriptReference PRs for the same upgrade on prior consumers:
Summary
next ^16family,next-mdx-remote ^6,@databiosphere/findable-ui ^54.1.AppCacheProvider(_app.tsx) +DocumentHeadTags/documentGetInitialProps(_document.tsx).next dev/next buildto webpack — tracks vercel/next.js#82607..eslintrc.json+.eslintignore→eslint.config.mjs(flat config, ESLint v9). Swapseslint-plugin-eslint-comments→@eslint-community/eslint-plugin-eslint-comments,eslint-plugin-typescript-sort-keys→eslint-plugin-perfectionist ^4. Bumpsreact-hooks ^7,jsdoc ^63,sort-destructure-keys ^3.engines.nodeto22.13.0; adds.nvmrc; updates CI workflow.glob ^11.0.4override.Data-portal-specific surfaces fixed in this PR
pages/_app.tsx—ErrorBoundaryimport path →errorBoundary/errorBoundary(v54 dropped the directory barrel).utils/docPages.ts— passblockJS: falsetonext-mdx-remote/serializeoptions (v6 default silently strips JSX expression attributes).components/.../Publication/publication.tsx— findable-ui v54 removed theMarkdowncomponent. Verified the data: of 24 publication titles inconstants/biccn-publications.json, 23 are plain strings; one had embedded<sup>+</sup>HTML with stray whitespace from a Crossref scrape. Cleaned that title to use Unicode⁺, and switched the renderer to plain text —<CardTitle>{publication.title}</CardTitle>etc. Sanitization of future Crossref fetches tracked in Sanitize Crossref-fetched publication titles in complete-biccn-publications script #3089.views/SearchView/hooks/useSearch.ts—react-hooks v7flags theuseEffect → setRequestURLsync asset-state-in-effect. The deeper fix (movesearchIndexinto the URL) is out of scope for the upgrade; suppressed inline with// eslint-disable-next-line ... -- track via #3088.theme/typography/constants.ts—@media (...)keys kept after letter keys via inline// eslint-disable-next-line sort-keys -- disabling key order for readability(mirrors findable-ui's own convention).sort-keysreorderings, return-type annotations, and onesonarjs/no-nested-template-literalsfix to satisfy the new rule set.viewModelBuilders/dataDictionaryMapper/accessorFn.ts— return type ofbuildTierNSourcewidened from inferred toReactNode(matches actualLinkProps['children']type; no behavior change).isomorphic-dompurify(no longer needed once the local Markdown component / MarkdownRenderer path was dropped).npm audit fix
Ran
npm audit fix(no--force); 6 moderate vulns remain, all transitivepostcssvianext. No fix available until Next ships an update. To be handled separately.Test plan
npm run build-dev:data-portalsucceeds (verified locally)npm run lint— 0 errors, 8 pre-existing TODO warnings (verified locally)tsc --noEmitclean (verified locally)/hca-bio-networks/<network>/publications— publication titles + citations render as plain text, including the cleaned Na⁺/K⁺ paper/search?q=...— search results load and pagination works (no mid-browse resets)blockJS: falsepreserved any JSX attributes that were previously rendering🤖 Generated with Claude Code