Skip to content

chore: Update to next 16, react 19, add react compiler#1434

Merged
kodiakhq[bot] merged 16 commits into
mainfrom
tom/next-update
Dec 4, 2025
Merged

chore: Update to next 16, react 19, add react compiler#1434
kodiakhq[bot] merged 16 commits into
mainfrom
tom/next-update

Conversation

@teeohhem
Copy link
Copy Markdown
Contributor

@teeohhem teeohhem commented Dec 3, 2025

fixes: HDX-2956

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 3, 2025

🦋 Changeset detected

Latest commit: 5801169

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/common-utils Minor
@hyperdx/api Minor
@hyperdx/app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Dec 4, 2025 11:40pm

@claude
Copy link
Copy Markdown

claude Bot commented Dec 3, 2025

PR Review: Next.js 16, React 19, React Compiler Upgrade

Critical Issues

  • Logic bug in MetricNameSelect.tsx:153 → Condition !metricsFromQuery.find(metric => metric.value !== ...) is inverted - should be === not !==. This breaks saved metric fallback logic when metric is not in query results.

Important Issues

  • ⚠️ Next.js config spreading anti-pattern (next.config.mjs:60) → Spreading withNextra() into nextConfig breaks config merge - move headers/output into nextConfig directly
  • ⚠️ React Compiler escape hatch with TODO (TableHeader.tsx:23) → "use no memo" disables compiler optimization with vague TODO - document specific resize bug or file issue
  • ⚠️ useWatch performance concern (DBEditTimeChartForm.tsx) → Multiple useWatch calls (4+ per series) may cause excessive re-renders - commit message claims this fixes re-render bug but does not explain how

Questions

  • Node version bump (.nvmrc) - does CI/Docker use this version?
  • Is Turbopack webpack workaround (package.json scripts) still needed after CSS fixes?

Summary: 1 critical logic bug, 1 config anti-pattern, rest are documentation/performance concerns.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 3, 2025

E2E Test Results

All tests passed • 45 passed • 3 skipped • 361s

Status Count
✅ Passed 45
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 3

View full report →

@teeohhem teeohhem changed the title chore: Update to next 15, react 19, add react compiler. chore: Update to next 16, react 19, add react compiler. Dec 3, 2025
@teeohhem teeohhem changed the title chore: Update to next 16, react 19, add react compiler. chore: Update to next 16, react 19, add react compiler Dec 3, 2025
},
async down(db: Db, client: MongoClient) {
async down(db: Db, _client: MongoClient) {
await db.collection('users').updateMany({}, { $unset: { accessKey: '' } });
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

new version of eslint - linting fixes

node_modules
archive
migrate-mongo-config.ts
jest.setup.ts
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

package deprecated in eslint 9. Ignores moved to main config file

Comment thread packages/api/.eslintrc.js
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deprecated config file format. I moved this to new standard flat .mjs file

Comment thread packages/app/.eslintrc.js
},
},
],
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deprecated config file format. I moved this to new standard flat .mjs file

}
: {}),
}),
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deprecated config file format. I moved this to new standard flat .mjs file

Comment thread packages/app/package.json
"build": "next build",
"dev": "npx dotenv -e .env.development -- next dev --webpack",
"dev:local": "NEXT_PUBLIC_IS_LOCAL_MODE=true npx dotenv -e .env.development -- next dev --webpack",
"build": "next build --webpack",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

really want us to use the new turbopack build, but there are issues with some of the css and its compilation inside of ts. Will create a follow up ticket

Comment thread package.json
"packages/api/src/routers/external-api/**/*.ts": [
"prettier --write --ignore-unknown",
"eslint --fix --quiet",
"eslint --flag v10_config_lookup_from_file --fix --quiet",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

eslint 9 changed how config files are discovered. If there wasn't a root config file in a mono repo, lint commands won't work. They added a flag to revert to old eslint behavior and plan to make it the default again in eslint10.

eslint/eslint#18574

const basePath = process.env.NEXT_PUBLIC_HYPERDX_BASE_PATH;

const nextConfig = {
reactCompiler: true,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

enables react compiler. It will optimize things that would benefit from being memo'ed or wrapped in callbacks. You can see what it's doing if you use react devtools.

There is additional logging I can add in a future ticket. This new logging will output which components cannot be optimized and help us fix them manually.

@brandon-pereira
Copy link
Copy Markdown
Member

Tested and things LGTM - Did a general test of the app and didn't observe any issues.

brandon-pereira
brandon-pereira previously approved these changes Dec 4, 2025
@teeohhem teeohhem marked this pull request as draft December 4, 2025 17:26
we use pages router, which is client by default. Unnecessary
@teeohhem
Copy link
Copy Markdown
Contributor Author

teeohhem commented Dec 4, 2025

Addressing the claude code review inline:

Critical Issues
❌ React Compiler not configured → Add Babel plugin configuration
The PR adds babel-plugin-react-compiler to dependencies and sets reactCompiler: true in next.config.mjs, but there's no babel.config.js or Next.js compiler configuration to actually enable the React Compiler. This means the flag is enabled but the compiler won't run.

You do not need babel configured for this to run. It uses the nextjs integration.

Important Issues
⚠️ Breaking change: publicRuntimeConfig removed → Verify all consumers updated
The old publicRuntimeConfig.version was replaced with NEXT_PUBLIC_APP_VERSION env var. While AppNav.tsx was updated, ensure no other code or external consumers rely on getConfig().publicRuntimeConfig.version.

⚠️ instrumentationHook removed without replacement → Verify OTel instrumentation still works
The experimental.instrumentationHook: true config was removed entirely. This may break OpenTelemetry instrumentation if it relied on this hook.

publicRuntimeConfig was removed and we now use the env config
instrumentationHook is now on by default

@brandon-pereira
Copy link
Copy Markdown
Member

@teeohhem a couple other things:

  1. Go to chart explorer (http://localhost:8080/chart?source=68b75158610c5e72acb01460&where=&select=&whereLanguage=lucene&orderBy=&config={%22name%22:%22%22,%22select%22:[{%22aggFn%22:%22quantile%22,%22aggCondition%22:%22%22,%22aggConditionLanguage%22:%22lucene%22,%22valueExpression%22:%22Duration%22,%22level%22:0.5}],%22where%22:%22%22,%22whereLanguage%22:%22lucene%22,%22displayType%22:%22line%22,%22granularity%22:%22auto%22,%22source%22:%22690539ea5ab5f5289adc29de%22,%22groupBy%22:%22ServiceName%22}), use Demo Traces. You'll see results.. then click "Search" and observe error:
Screenshot 2025-12-04 at 12 54 46 PM Screenshot 2025-12-04 at 12 43 51 PM
  1. Not sure if we want to run this codemod, or make a ticket for this deprecation warning:
Screenshot 2025-12-04 at 12 44 28 PM
  1. When resizing the search page, it has substantial lag. I wonder if its some automemoized issue? Other pages like Services don't have this issue.
reszing.mov

fixes issue where it needed a full re-render in order to show the sql column field
Copy link
Copy Markdown
Member

@brandon-pereira brandon-pereira left a comment

Choose a reason for hiding this comment

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

Changes look good, we can open another ticket for the legacyBehavior issue

@kodiakhq kodiakhq Bot merged commit 52d2798 into main Dec 4, 2025
9 checks passed
@kodiakhq kodiakhq Bot deleted the tom/next-update branch December 4, 2025 23:41
knudtty pushed a commit that referenced this pull request Apr 16, 2026
fixes: HDX-2956

Co-authored-by: Brandon Pereira <7552738+brandon-pereira@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants