Skip to content

Conversation

@alexaka1
Copy link
Owner

@alexaka1 alexaka1 commented Oct 25, 2025

Summary by CodeRabbit

  • Chores

    • Updated Node runtime and Docker base image to Node 24; upgraded Next.js/MDX/ESLint packages; adjusted dev scripts, workspace hoisting and TypeScript settings; expanded .dockerignore; switched MDX plugin references to package identifiers; streamlined CI lint reporting and build step.
  • Refactor

    • Simplified not-found rendering and several UI components by removing client-only lifecycle/state logic and making active-state/formatting synchronous.

- Adjust `tsconfig.json` for improved formatting and compatibility (`jsx`, `paths`, etc.).
- Modify `package.json` scripts to use Webpack in dev and build commands.
@coderabbitai
Copy link

coderabbitai bot commented Oct 25, 2025

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Bump Node.js to 24, update Docker base image, upgrade Next.js/MDX to 16, switch MDX plugin references to string identifiers, change dev scripts, adjust pnpm workspace hoist/quoting, update tsconfig and ESLint config, extend .dockerignore, simplify several client components, and revise lint workflow.

Changes

Cohort / File(s) Summary
Node runtime & image
Dockerfile, .node-version
Bumped base Docker image and .node-version from Node 22.21.0 to Node 24.10.0.
Next.js, MDX & scripts
package.json, next.config.ts
Upgraded next and @next/mdx to 16.0.0; adjusted dev scripts to use webpack/next dev; MDX plugin entries changed from imported plugin objects to string/array identifiers (e.g., 'remark-gfm', ['remark-mdx-frontmatter', { name: 'matter' }], 'rehype-starry-night').
Package manager workspace
pnpm-workspace.yaml
Quoting adjustments in onlyBuiltDependencies and added publicHoistPattern entries 'import-in-the-middle' and 'require-in-the-middle'.
TypeScript config
tsconfig.json
Set "jsx": "react-jsx", added dev .next types to include, and reformatted lib/paths/exclude arrays to multiline.
Docker ignore rules
.dockerignore
Appended many IDE, build, secret, and Docker-related patterns to the ignore list.
ESLint config
eslint.config.mjs
Removed FlatCompat boilerplate; directly includes eslint-config-next/core-web-vitals via nextVitals, adds globalIgnores, simplifies ignores, and reorders integrations.
UI components
src/app/not-found.tsx, src/app/components/NavLink.tsx, src/app/components/client-date.tsx
Removed useState/useEffect and client-only mounting/formatting logic; now deterministic synchronous rendering (constant opacity, direct aria-current calc, raw date output).
CI lint workflow
.github/workflows/lint.yml
Added "Build markdown report" step, replaced github-script comment step with marocchino/sticky-pull-request-comment, and restored pnpm run build in the build step.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Next as Next.js (dev/build)
  participant MDX as @next/mdx
  participant Resolver as Plugin Resolver

  Dev->>Next: run dev/build (webpack/next)
  Note right of Next: Runtime now Node 24.x (Dockerfile/.node-version)
  Next->>MDX: load .mdx files
  MDX->>Resolver: request configured plugins (string IDs)
  Resolver-->>MDX: resolve plugins by name -> plugin instances
  MDX-->>Next: compiled components
  Next-->>Dev: serve/build output
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay extra attention to:
    • next.config.ts — ensure string plugin names/options match installed packages and Next 16 expectations.
    • package.json scripts and Next upgrade — bundler change implications.
    • pnpm-workspace.yaml — hoist patterns and quoting effects.
    • .github/workflows/lint.yml — PR comment behavior and build invocation.
    • Component simplifications — accessibility and rendering regressions.

Poem

🐰 I hopped from twenty-two up to twenty-four,
plugins called plainly, imports no more,
builds hum on Node, types tidy and neat,
ignores and hoists keep the workspace fleet,
a rabbit cheers these tidy little feats! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Upgrade Next 16" directly reflects the main objective of this pull request. The package.json shows Next.js was upgraded from 15.5.6 to 16.0.0, along with related dependencies like @next/mdx and eslint-config-next. While the changeset includes supporting modifications (Node.js version bump, configuration updates, component refactoring, and dependency adjustments), these are all necessary accompaniments to the primary framework upgrade. The title is concise, clear, and would allow a teammate scanning the history to immediately understand this is a major version upgrade pull request.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f985eb and cf3164b.

📒 Files selected for processing (1)
  • .github/workflows/lint.yml (1 hunks)

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

@socket-security
Copy link

socket-security bot commented Oct 25, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedeslint-config-next@​15.5.6 ⏵ 16.0.099 +110067 +398 +1100
Updatednext@​15.5.6 ⏵ 16.0.083100919870
Updated@​next/​mdx@​15.5.6 ⏵ 16.0.0100 +1100100 +199 +1100

View full report

@github-actions
Copy link

github-actions bot commented Oct 25, 2025

✅ Lint passed

Show output

> [email protected] lint /home/runner/work/adev-nextjs-blog/adev-nextjs-blog
> pnpm exec oxlint && eslint .

Found 0 warnings and 0 errors.
Finished in 116ms on 39 files using 4 threads.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@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: 1

🧹 Nitpick comments (1)
package.json (1)

9-10: Clarify dev script configuration.

The script changes appear counterintuitive:

  • dev now uses --webpack explicitly
  • dev:turbo runs plain next dev (which in Next.js 15+ would default to Turbopack in dev mode)

This naming may confuse developers expecting dev to use the default bundler. Consider either:

  1. Swapping the script names to match their actual bundler
  2. Adding comments to clarify the intentional configuration
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76f6b21 and 0a1a5a8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .node-version (1 hunks)
  • Dockerfile (1 hunks)
  • next.config.ts (1 hunks)
  • package.json (4 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • tsconfig.json (3 hunks)
🔇 Additional comments (8)
tsconfig.json (2)

4-8: LGTM on formatting changes.

The multiline formatting for lib, paths, and exclude arrays improves readability without changing functionality.

Also applies to: 27-30, 42-44


39-40: LGTM on adding development types.

Including .next/dev/types/**/*.ts provides better TypeScript support during development.

pnpm-workspace.yaml (2)

3-4: LGTM on dependency updates.

Quoting sharp and unrs-resolver improves YAML consistency. The removal of @tailwindcss/oxide aligns with the dependencies in package.json.


12-14: LGTM on OpenTelemetry hoisting fix.

Adding import-in-the-middle and require-in-the-middle to public hoist patterns addresses known instrumentation compatibility issues with Next.js/Turbopack builds.

package.json (1)

28-28: LGTM on Next.js 16 upgrade.

The coordinated upgrade of @next/mdx, next, and eslint-config-next to version 16.0.0 is consistent with the PR objective.

Also applies to: 39-39, 59-59

Dockerfile (1)

1-1: node:24-alpine image is available on Docker Hub.

Verification confirms the node:24-alpine image exists in multiple stable variants, including the base tag and versions with specific Alpine Linux versions (3.20, 3.21, 3.22). Test your project's dependencies against this image version in your environment to ensure compatibility.

next.config.ts (1)

14-19: Code is correct — string identifiers are required in @next/mdx 16.

@next/mdx v16.0.0 requires plugins to be passed as serializable module identifiers (strings) — either "name" or ["name", options] — not direct JS function imports. The configuration in next.config.ts already follows this exact format for all plugins (remark and rehype), so no changes are needed.

.node-version (1)

1-1: Node.js 24.10.0 is a "Current" release, not LTS—verify production readiness.

Node.js v24.10.0 was released on October 8, 2025. However, v24 is a "Current" release line, and for production you should prefer an Active LTS release. Confirm this version is appropriate for your production environment before committing.

Copy link

@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: 0

🧹 Nitpick comments (2)
src/app/not-found.tsx (1)

8-8: Remove redundant transition classes and template literal syntax.

Since the opacity is now hardcoded to opacity-100 and never changes, the transition-opacity duration-1000 classes serve no purpose. Additionally, the template literal syntax is unnecessary for a static string.

Apply this diff to simplify the code:

-      <div className={`opacity-100 transition-opacity duration-1000`}>
+      <div className="opacity-100">

Or remove the opacity class entirely if it's already the default:

-      <div className={`opacity-100 transition-opacity duration-1000`}>
+      <div>
.dockerignore (1)

169-191: Consider consolidating duplicate ignore patterns.

Several patterns added here duplicate existing entries earlier in the file:

  • **/node_modules (line 187) overlaps with node_modules/ (line 43)
  • **/.env (line 170) overlaps with .env (line 77)
  • **/npm-debug.log (line 188) overlaps with npm-debug.log* (line 5)
  • Coverage patterns at lines 24 and 140

While the **/ prefix makes patterns recursive, the earlier patterns already achieve similar coverage. This redundancy doesn't break functionality but increases maintenance overhead.

Consider removing the duplicate patterns or consolidating them into a single section. For example:

-node_modules/
+**/node_modules

And removing line 187, or keeping the existing patterns and removing the new duplicates.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a1a5a8 and acaf1d2.

📒 Files selected for processing (3)
  • .dockerignore (1 hunks)
  • src/app/not-found.tsx (1 hunks)
  • tsconfig.json (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tsconfig.json

Copy link

@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: 0

🧹 Nitpick comments (3)
eslint.config.mjs (3)

9-10: Document or resolve the type suppressions.

Two separate type suppressions suggest underlying compatibility issues between the ESLint config packages:

  • Line 9: ts-expect-error with unclear reasoning
  • Line 14: Disabled no-unsafe-assignment rule

While these may be necessary workarounds for package type mismatches, the comment "I have no idea what the problem here is" indicates technical debt that should be addressed.

Consider:

  1. Investigating the actual type mismatch and documenting why the suppression is needed
  2. Checking if there are updated @types packages that resolve these issues
  3. Updating the comment to explain the specific type incompatibility

Also applies to: 14-15


16-24: Verify whether the globalIgnores are redundant.

The globalIgnores() call specifies paths that are noted as "Default ignores of eslint-config-next". Since you're spreading ...nextVitals (from eslint-config-next/core-web-vitals), these ignores might already be included and could be redundant.

Verify whether these can be removed:

#!/bin/bash
# Check what ignores are already provided by eslint-config-next

echo "=== Inspecting eslint-config-next/core-web-vitals default config ==="
node -e "
const config = require('eslint-config-next/core-web-vitals');
console.log('Config structure:', JSON.stringify(config, null, 2).substring(0, 500));
if (Array.isArray(config)) {
  const ignoresConfig = config.find(c => c.ignores);
  console.log('\nIgnores found:', ignoresConfig);
}
"

8-10: Imports are valid — remove or document the @ts-expect-error.

eslint/config and eslint-config-next/core-web-vitals import successfully and npx eslint --print-config loads the config (ESLint 9.38.0). Remove the line "// @ts-expect-error I have no idea what the problem here is" (eslint.config.mjs, lines 8–10); either fix the underlying type error or replace it with a narrowly scoped suppression and a short comment explaining why it’s necessary.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acaf1d2 and 23e257e.

📒 Files selected for processing (3)
  • eslint.config.mjs (1 hunks)
  • src/app/components/NavLink.tsx (1 hunks)
  • src/app/components/client-date.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • src/app/components/client-date.tsx
🔇 Additional comments (1)
src/app/components/NavLink.tsx (1)

11-12: LGTM! Excellent simplification.

Removing the useState/useEffect pattern in favor of direct synchronous computation is the right approach here. Since usePathname() returns the current value immediately, there's no need for state management or effects to track the path.

@github-actions
Copy link

github-actions bot commented Oct 25, 2025

✅ Lint passed

Show output

> [email protected] lint /home/runner/work/adev-nextjs-blog/adev-nextjs-blog
> pnpm exec oxlint && eslint .

Found 0 warnings and 0 errors.
Finished in 113ms on 39 files using 4 threads.

@alexaka1 alexaka1 merged commit 16042fc into main Oct 25, 2025
3 of 4 checks passed
@alexaka1 alexaka1 deleted the next-16 branch October 25, 2025 12:09
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