Skip to content

React compiler#278

Open
burtonjong wants to merge 3 commits intomainfrom
react-compiler
Open

React compiler#278
burtonjong wants to merge 3 commits intomainfrom
react-compiler

Conversation

@burtonjong
Copy link
Member

@burtonjong burtonjong commented Jan 31, 2026

Summary by CodeRabbit

  • New Features

    • Upgraded Next.js to version 16.1.6 and React to 19.2.4 for improved performance and latest platform features.
  • Bug Fixes

    • Enhanced error handling in the race information display to gracefully manage missing or empty API responses.
  • Chores

    • Updated development dependencies and build configuration tools.
    • Reorganized runtime versus build-time dependencies.

✏️ Tip: You can customize this high-level summary in your review settings.

@burtonjong burtonjong requested a review from a team as a code owner January 31, 2026 22:53
@vercel
Copy link

vercel bot commented Jan 31, 2026

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

Project Deployment Actions Updated (UTC)
helios-telemetry Ready Ready Preview, Comment Jan 31, 2026 11:02pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@burtonjong has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

This PR updates the client package to Next.js 16 and React 19.2.4, enables React Compiler configuration, reorganizes server build tools to devDependencies, moves uuid to server runtime dependencies, removes root-level dependencies, and adds defensive data handling in RaceTab component.

Changes

Cohort / File(s) Summary
Dependency Cleanup
package.json, packages/server/package.json
Root dependencies block removed; server-side rimraf, ts-node, and typescript moved from dependencies to devDependencies; uuid added as server runtime dependency.
Client Framework & Configuration
packages/client/package.json, packages/client/next.config.mjs
Next.js bumped to 16.1.6, React and ReactDOM updated to 19.2.4, type definitions updated, babel-plugin-react-compiler added as devDependency; React Compiler enabled in Next.js config.
Component Defensive Logic
packages/client/src/components/tabs/RaceTab.tsx
Added null/falsy check for API response data, setting driverData to empty array when data is absent instead of assuming response.data exists.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰✨ React compiles with swifter grace,
Dependencies find their proper place,
Server tools hop to dev's delight,
RaceTab guards against the night,
Sixteen versions leap ahead so bright!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'React compiler' is partially related to the changeset. While the PR does add React compiler support (reactCompiler: true in Next.js config and babel-plugin-react-compiler dependency), it encompasses much broader changes including Next.js/React version upgrades, dependency reorganization, and defensive error handling—making the title incomplete and somewhat narrow.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch react-compiler

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/client/package.json (1)

55-79: ⚠️ Potential issue | 🟠 Major

Resolutions override the newer React type versions and violate peer dependencies.

The resolutions block pins @types/react to 19.0.7 and @types/react-dom to 19.0.3. However, @types/[email protected] declares a peer dependency on @types/react@^19.2.0, so forcing 19.0.7 violates that constraint. This can result in missing or incorrect type definitions.

Update resolutions to match the devDependencies versions:

Suggested fix
   "resolutions": {
-    "@types/react": "19.0.7",
-    "@types/react-dom": "19.0.3"
+    "@types/react": "19.2.10",
+    "@types/react-dom": "19.2.3"
   }
🤖 Fix all issues with AI agents
In `@packages/client/package.json`:
- Around line 55-64: Update the dependencies in package.json to align with
Next.js 16.1.6 by changing the "eslint-config-next" entry to "16.1.6" and
bumping "eslint" to a version that satisfies its peer dependency (upgrade
"eslint" from "8.57.0" to a compatible v9 release, e.g., ">=9.0.0" or a specific
9.x like "9.8.0"); ensure the package.json handles peer requirements and run
npm/yarn install and lint to verify no peer-compatibility errors for
"eslint-config-next" and "eslint".

In `@packages/client/src/components/tabs/RaceTab.tsx`:
- Around line 124-134: fetchDriverNames() returns the data array directly, so
the current code incorrectly checks response.data and always sets an empty list;
change the promise handler to treat the resolved value as the drivers array
(e.g., rename response → drivers), check if the array is falsy/empty, then map
over drivers (each of type IDriverData) to build { Rfid, driver } and call
setDriverData(mappedArray); update the handler attached to fetchDriverNames()
accordingly and keep error handling (or add a .catch) if needed.

In `@packages/server/package.json`:
- Around line 53-56: The package.json start script currently includes the
runtime hook "ts-node/register" which is provided by the devDependency "ts-node"
and will be missing in production; update the "start" script to remove
"ts-node/register" and keep only "tsconfig-paths/register" so production uses
the compiled dist/server.js (i.e., ensure start invokes node -r
tsconfig-paths/register dist/server.js instead of loading ts-node/register), and
verify "ts-node" remains a devDependency.

Comment on lines +55 to 64
"@types/react": "19.2.10",
"@types/react-dom": "19.2.3",
"@types/react-plotly.js": "^2.6.3",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"autoprefixer": "^10.4.19",
"babel-plugin-react-compiler": "^1.0.0",
"eslint": "8.57.0",
"eslint-config-next": "15.1.4",
"eslint-config-prettier": "^9.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

eslint-config-next 16 Next.js 16 compatibility version requirements

💡 Result:

  • Version matching: eslint-config-next is released in lockstep with Next.js, so for Next.js 16.x you should use [email protected] (same major, typically same minor/patch as your next version).
  • eslint-config-next@16 peer requirements: it declares eslint >= 9.0.0 (peer dependency). TypeScript is an optional peer dependency with typescript >= 3.3.1. [1]
  • Next.js 16 platform requirements (context): Next.js 16 requires Node.js 20.9+ and TypeScript 5.1+. [2]
  • Behavior change in Next.js 16: next lint (and the eslint option in next.config.*) was removed; run ESLint via the ESLint CLI instead. [3]

Sources:
[1] [email protected] lock entry showing peerDependencies (eslint >=9.0.0, typescript >=3.3.1 optional)
[2] Next.js 16 blog “Version Requirements” table
[3] Next.js “Upgrading: Version 16” guide (removal of next lint / next.config eslint option)


🌐 Web query:

eslint-config-next version 16.1.6 release

💡 Result:

[email protected] was released/published on January 27, 2026. [1]

It corresponds to the Next.js v16.1.6 patch release (a backport bugfix release) with core changes including upgrading to SWC 54 and response-cache LRU fixes/tweaks. [2][3]

Sources: [1] [2] [3]


Update eslint-config-next to 16.1.6 and upgrade eslint to satisfy peer dependencies.

eslint-config-next is released in lockstep with Next.js. With Next.js 16.1.6, you must use [email protected], which requires eslint >= 9.0.0 as a peer dependency. The current setup pins eslint at 8.57.0, which will cause compatibility issues.

Proposed updates
-    "eslint": "8.57.0",
+    "eslint": "^9.0.0",
     "eslint-config-next": "15.1.4",
+    "eslint-config-next": "16.1.6",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@types/react": "19.2.10",
"@types/react-dom": "19.2.3",
"@types/react-plotly.js": "^2.6.3",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"autoprefixer": "^10.4.19",
"babel-plugin-react-compiler": "^1.0.0",
"eslint": "8.57.0",
"eslint-config-next": "15.1.4",
"eslint-config-prettier": "^9.1.0",
"@types/react": "19.2.10",
"@types/react-dom": "19.2.3",
"@types/react-plotly.js": "^2.6.3",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"autoprefixer": "^10.4.19",
"babel-plugin-react-compiler": "^1.0.0",
"eslint": "^9.0.0",
"eslint-config-next": "16.1.6",
"eslint-config-prettier": "^9.1.0",
🤖 Prompt for AI Agents
In `@packages/client/package.json` around lines 55 - 64, Update the dependencies
in package.json to align with Next.js 16.1.6 by changing the
"eslint-config-next" entry to "16.1.6" and bumping "eslint" to a version that
satisfies its peer dependency (upgrade "eslint" from "8.57.0" to a compatible v9
release, e.g., ">=9.0.0" or a specific 9.x like "9.8.0"); ensure the
package.json handles peer requirements and run npm/yarn install and lint to
verify no peer-compatibility errors for "eslint-config-next" and "eslint".

Comment on lines 124 to +134
fetchDriverNames()
.then((response) => {
const driverData = response.data.map((driver: IDriverData) => ({
Rfid: driver.Rfid,
driver: driver.driver,
}));
setDriverData(driverData);
if (!response.data) {
setDriverData([]);
} else {
const driverData = response.data.map((driver: IDriverData) => ({
Rfid: driver.Rfid,
driver: driver.driver,
}));
setDriverData(driverData);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

fetchDriverNames() already returns data — response.data will be undefined.

This change makes the driver list always empty because response is the data array (or error object), not an Axios response. Handle the returned value directly.

Proposed fix
-    fetchDriverNames()
-      .then((response) => {
-        if (!response.data) {
-          setDriverData([]);
-        } else {
-          const driverData = response.data.map((driver: IDriverData) => ({
-            Rfid: driver.Rfid,
-            driver: driver.driver,
-          }));
-          setDriverData(driverData);
-        }
-      })
+    fetchDriverNames()
+      .then((response) => {
+        if (!Array.isArray(response)) {
+          setDriverData([]);
+          return;
+        }
+        const driverData = response.map((driver: IDriverData) => ({
+          Rfid: driver.Rfid,
+          driver: driver.driver,
+        }));
+        setDriverData(driverData);
+      })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
fetchDriverNames()
.then((response) => {
const driverData = response.data.map((driver: IDriverData) => ({
Rfid: driver.Rfid,
driver: driver.driver,
}));
setDriverData(driverData);
if (!response.data) {
setDriverData([]);
} else {
const driverData = response.data.map((driver: IDriverData) => ({
Rfid: driver.Rfid,
driver: driver.driver,
}));
setDriverData(driverData);
}
fetchDriverNames()
.then((response) => {
if (!Array.isArray(response)) {
setDriverData([]);
return;
}
const driverData = response.map((driver: IDriverData) => ({
Rfid: driver.Rfid,
driver: driver.driver,
}));
setDriverData(driverData);
})
🤖 Prompt for AI Agents
In `@packages/client/src/components/tabs/RaceTab.tsx` around lines 124 - 134,
fetchDriverNames() returns the data array directly, so the current code
incorrectly checks response.data and always sets an empty list; change the
promise handler to treat the resolved value as the drivers array (e.g., rename
response → drivers), check if the array is falsy/empty, then map over drivers
(each of type IDriverData) to build { Rfid, driver } and call
setDriverData(mappedArray); update the handler attached to fetchDriverNames()
accordingly and keep error handling (or add a .catch) if needed.

Comment on lines 53 to 56
"prettier": "^3.3.3",
"rimraf": "^5.0.5",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat packages/server/package.json | head -80

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 1875


🏁 Script executed:

ls -la packages/server/dist/ 2>&1 || echo "dist/ does not exist"

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 164


🏁 Script executed:

cat packages/server/tsconfig.json

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 695


🏁 Script executed:

# Check if there are any references to ts-node/register in the codebase
rg "ts-node/register" packages/server/

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 186


🏁 Script executed:

# Check if there are TypeScript files in src/ that might need runtime transpilation
find packages/server/src -name "*.ts" -o -name "*.tsx" | head -20

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 1204


🏁 Script executed:

# Verify the build output - check if tsconfig includes src properly
cat packages/server/tsconfig.json | grep -A 10 "include\|exclude"

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 179


🏁 Script executed:

# Final check: verify the server entry point
cat packages/server/src/main.ts 2>/dev/null || cat packages/server/src/index.ts 2>/dev/null | head -20

Repository: UCSolarCarTeam/Helios-Telemetry

Length of output: 383


start script requires ts-node/register, but ts-node is only in devDependencies.

Production installs with npm install --production omit devDependencies, causing npm start to fail. Since the build process (npm run build) pre-compiles TypeScript to dist/server.js, the ts-node/register hook is not needed at runtime. Remove it from the start script:

Fix: remove ts-node/register from start
-    "start": "node -r ts-node/register -r tsconfig-paths/register dist/server.js",
+    "start": "node -r tsconfig-paths/register dist/server.js",

The tsconfig-paths/register hook remains necessary to resolve path aliases defined in tsconfig.json.

🤖 Prompt for AI Agents
In `@packages/server/package.json` around lines 53 - 56, The package.json start
script currently includes the runtime hook "ts-node/register" which is provided
by the devDependency "ts-node" and will be missing in production; update the
"start" script to remove "ts-node/register" and keep only
"tsconfig-paths/register" so production uses the compiled dist/server.js (i.e.,
ensure start invokes node -r tsconfig-paths/register dist/server.js instead of
loading ts-node/register), and verify "ts-node" remains a devDependency.

Copy link
Collaborator

@justin-phxm justin-phxm left a comment

Choose a reason for hiding this comment

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

good if you address coderabbit comments

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.

2 participants