Skip to content

[ENG-439] Bump Summit Nextjs Version - #32

Merged
geraldakbar merged 2 commits into
mainfrom
eng-439-bump-summit-open-source-next-version-secvul-cve
Jan 7, 2026
Merged

geraldakbar merged 2 commits into
mainfrom
eng-439-bump-summit-open-source-next-version-secvul-cve

Conversation

@setasena

@setasena setasena commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Upgraded core framework and supporting libraries (Next.js, React, React DOM), typings, and dev tooling to recent stable releases.
  • Bug Fixes
    • Fixed a theme-related rendering glitch that could cause a logo/theme flicker on initial load.
  • Improvements
    • Unified calendar navigation icons for more consistent appearance.

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

@coderabbitai

coderabbitai Bot commented Jan 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updated project dependencies (Next.js, React, typings, linting), TypeScript/Next typing imports, minor Next config and tsconfig adjustments, UI component tweaks (sidebar theme guard, DayPicker chevron consolidation), and renamed/modified proxy middleware export and config. No public API surface behavior besides the proxy export name change.

Changes

Cohort / File(s) Summary
Dependencies / package manifest
package.json
Upgraded next to 16.1.1, react/react-dom to 19.2.3, React typings to 19.2.x, react-day-picker to 9.13.0, eslint-config-next to 16.1.1; added precise resolutions entries and adjusted devDependencies.
Next ambient types
next-env.d.ts
Added import "./.next/types/routes.d.ts"; to include generated Next route types in the ambient type surface.
Next config
next.config.ts
Removed experimental.nodeMiddleware from NextConfig; output: "standalone" remains unchanged.
Proxy middleware / runtime
src/proxy.ts
Renamed exported function from middlewareproxy; removed config.runtime = 'nodejs' from file-level export. (Attention: callers/route binding expecting middleware export must be updated.)
Sidebar theme mount guard
src/components/layout/Sidebar.tsx
Added mount guard state/effect to defer theme-dependent logo selection until client mount to avoid SSR/content mismatch.
Calendar navigation icons
src/components/ui/calendar.tsx
Replaced separate IconLeft/IconRight with a single Chevron component that renders left/right chevrons based on orientation; preserves props forwarding.
TypeScript config formatting & JSX runtime
tsconfig.json
Reformatted arrays to multiline, changed jsx from preservereact-jsx, added .next/dev/types/**/*.ts to include.

Sequence Diagram(s)

(omitted — changes are not a single new multi-component control flow requiring sequence visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through deps and typed new scenes,
Swapped chevrons, guarded themes in greens,
A proxy renamed, a runtime gone—
Small tweaks, fresh starts at early dawn. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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 accurately reflects the main change: upgrading Next.js from 15.4.0-canary.31 to 16.1.1 along with related dependency updates. The title is clear, concise, and specific about the primary objective.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown

PR Check Results

✅ Tests Passed

Test Output
  NewAgingReceivablesChart.tsx                          |       0 |        0 |       0 |       0 | 3-150                                                                           
  NewProfitLossChart.tsx                                |       0 |        0 |       0 |       0 | 3-153                                                                           
  ProfitLossChart.tsx                                   |       0 |        0 |       0 |       0 | 3-104                                                                           
  RecurringTransactionsButton.tsx                       |       0 |        0 |       0 |       0 | 3-50                                                                            
  StatCard.tsx                                          |       0 |        0 |       0 |       0 | 3-20                                                                            
  VisitorsChart.tsx                                     |       0 |        0 |       0 |       0 | 3-66                                                                            
 src/components/expenses                                |   22.67 |    18.01 |   18.51 |   23.03 |                                                                                 
  ExpenseCategoriesPage.tsx                             |       0 |        0 |       0 |       0 | 3-338                                                                           
  ExpenseForm.tsx                                       |   56.93 |     35.8 |   66.66 |   58.01 | 29,104-105,128-146,158-179,192-194,220-242,435-492                              
  ExpensesPage.tsx                                      |       0 |        0 |       0 |       0 | 3-365                                                                           
 src/components/income                                  |       0 |        0 |       0 |       0 |                                                                                 
  IncomeCategoriesPage.tsx                              |       0 |        0 |       0 |       0 | 3-338                                                                           
  IncomeForm.tsx                                        |       0 |        0 |       0 |       0 | 3-462                                                                           
  IncomePage.tsx                                        |       0 |        0 |       0 |       0 | 3-331                                                                           
 src/components/invoices                                |    75.9 |    61.58 |   58.49 |   76.11 |                                                                                 
  InvoiceForm.tsx                                       |      80 |    74.68 |   66.66 |   79.85 | 154,160-161,230-232,236-238,251-253,265-267,324-326,334-335,341,361,440-486,537 
  InvoiceItemForm.tsx                                   |     100 |    83.33 |     100 |     100 | 171-172                                                                         
  InvoiceList.tsx                                       |   73.91 |    45.23 |      50 |   73.91 | 90-94,99,113-119,134,177-222,275-286                                            
  InvoicePDF.tsx                                        |       0 |        0 |       0 |       0 | 1-279                                                                           
 src/components/layout                                  |       0 |        0 |       0 |       0 |                                                                                 
  Header.tsx                                            |       0 |        0 |       0 |       0 | 3-63                                                                            
  Sidebar.tsx                                           |       0 |        0 |       0 |       0 | 3-72                                                                            
 src/components/pdf                                     |       0 |        0 |       0 |       0 |                                                                                 
  InvoicePDF.tsx                                        |       0 |        0 |       0 |       0 | 1-377                                                                           
  QuotePDF.tsx                                          |       0 |        0 |       0 |       0 | 1-374                                                                           
 src/components/quotes                                  |    9.41 |     8.62 |    7.57 |    9.48 |                                                                                 
  QuoteForm.tsx                                         |       0 |        0 |       0 |       0 | 3-531                                                                           
  QuoteItemForm.tsx                                     |     100 |       75 |     100 |     100 | 98-119,173-174                                                                  
  QuoteList.tsx                                         |       0 |        0 |       0 |       0 | 3-358                                                                           
  QuotePDF.tsx                                          |       0 |        0 |       0 |       0 | 1-289                                                                           
 src/components/settings                                |       0 |        0 |       0 |       0 |                                                                                 
  ApiTokenSettings.tsx                                  |       0 |        0 |       0 |       0 | 3-255                                                                           
  CompanySettings.tsx                                   |       0 |        0 |       0 |       0 | 1-515                                                                           
 src/components/ui                                      |   33.33 |    11.57 |      29 |   34.85 |                                                                                 
  alert-dialog.tsx                                      |       0 |      100 |       0 |       0 | 3-156                                                                           
  alert.tsx                                             |       0 |      100 |       0 |       0 | 1-66                                                                            
  badge.tsx                                             |    87.5 |    66.66 |     100 |     100 | 35                                                                              
  button.tsx                                            |    87.5 |      100 |     100 |     100 |                                                                                 
  calendar.tsx                                          |       0 |        0 |       0 |       0 | 3-76                                                                            
  card.tsx                                              |   77.77 |      100 |   71.42 |   77.77 | 87,89                                                                           
  chart.tsx                                             |       0 |        0 |       0 |       0 | 3-352                                                                           
  dialog.tsx                                            |       0 |      100 |       0 |       0 | 3-134                                                                           
  dropdown-menu.tsx                                     |       0 |        0 |       0 |       0 | 3-256                                                                           
  form.tsx                                              |   94.28 |     37.5 |     100 |   94.28 | 53,159                                                                          
  input.tsx                                             |     100 |      100 |     100 |     100 |                                                                                 
  label.tsx                                             |     100 |      100 |     100 |     100 |                                                                                 
  popover.tsx                                           |       0 |        0 |       0 |       0 | 3-48                                                                            
  radio-group.tsx                                       |       0 |      100 |       0 |       0 | 3-45                                                                            
  select.tsx                                            |   64.28 |      100 |      70 |   64.28 | 177,179-182                                                                     
  separator.tsx                                         |       0 |        0 |     100 |       0 | 3-31                                                                            
  sonner.tsx                                            |       0 |        0 |       0 |       0 | 3-25                                                                            
  switch.tsx                                            |       0 |      100 |       0 |       0 | 3-31                                                                            
  table.tsx                                             |      80 |      100 |      75 |      80 | 111,115                                                                         
  tabs.tsx                                              |       0 |      100 |       0 |       0 | 3-66                                                                            
  textarea.tsx                                          |     100 |      100 |     100 |     100 |                                                                                 
 src/components/vendors                                 |       0 |        0 |       0 |       0 |                                                                                 
  VendorForm.tsx                                        |       0 |        0 |       0 |       0 | 3-326                                                                           
  VendorsList.tsx                                       |       0 |        0 |       0 |       0 | 3-219                                                                           
 src/lib                                                |   27.41 |    16.66 |   41.66 |   27.86 |                                                                                 
  config.ts                                             |       0 |        0 |     100 |       0 | 4                                                                               
  minio.ts                                              |       0 |        0 |       0 |       0 | 1-88                                                                            
  pdf.ts                                                |       0 |      100 |       0 |       0 | 1-20                                                                            
  utils.ts                                              |     100 |       80 |     100 |     100 | 14                                                                              
 src/lib/auth                                           |   15.94 |        0 |       0 |   16.41 |                                                                                 
  apiTokenUtils.ts                                      |       0 |      100 |       0 |       0 | 1-26                                                                            
  getAuthInfo.ts                                        |   16.66 |        0 |       0 |   16.66 | 16-61                                                                           
  options.ts                                            |   24.24 |        0 |       0 |      25 | 27-88                                                                           
 src/lib/auth/client                                    |       0 |        0 |       0 |       0 |                                                                                 
  utils.ts                                              |       0 |        0 |       0 |       0 | 1-165                                                                           
 src/lib/auth/permissions                               |    1.03 |        0 |       0 |    1.08 |                                                                                 
  roles.ts                                              |       0 |        0 |       0 |       0 | 20-119                                                                          
  server.ts                                             |       0 |        0 |       0 |       0 | 1-93                                                                            
  utils.ts                                              |   14.28 |        0 |       0 |   16.66 | 135-147                                                                         
 src/lib/cron                                           |       0 |        0 |       0 |       0 |                                                                                 
  recurring-items.ts                                    |       0 |        0 |       0 |       0 | 1-311                                                                           
 src/lib/jobs                                           |       0 |        0 |       0 |       0 |                                                                                 
  cron-config.ts                                        |       0 |      100 |     100 |       0 | 1-20                                                                            
  recurring-transactions.ts                             |       0 |        0 |       0 |       0 | 1-197                                                                           
 src/lib/reports                                        |       0 |        0 |       0 |       0 |                                                                                 
  cash-flow.ts                                          |       0 |        0 |       0 |       0 | 1-399                                                                           
  invoice-reports.ts                                    |       0 |        0 |       0 |       0 | 1-365                                                                           
  profit-loss.ts                                        |       0 |        0 |       0 |       0 | 1-198                                                                           
 src/lib/validations                                    |   30.58 |        0 |       0 |    37.5 |                                                                                 
  account.ts                                            |       0 |        0 |       0 |       0 | 1-25                                                                            
  client.ts                                             |     100 |      100 |     100 |     100 |                                                                                 
  expense.ts                                            |   53.33 |        0 |       0 |   77.77 | 29-38                                                                           
  income.ts                                             |       0 |      100 |       0 |       0 | 1-39                                                                            
  invoice.ts                                            |      75 |      100 |     100 |     100 |                                                                                 
  payment.ts                                            |       0 |        0 |       0 |       0 | 1-29                                                                            
  quote.ts                                              |   63.63 |      100 |     100 |     100 |                                                                                 
  transaction.ts                                        |       0 |        0 |       0 |       0 | 1-30                                                                            
 src/lib/xendit                                         |       0 |        0 |       0 |       0 |                                                                                 
  index.ts                                              |       0 |        0 |       0 |       0 | 1-71                                                                            
--------------------------------------------------------|---------|----------|---------|---------|---------------------------------------------------------------------------------

Test Suites: 9 passed, 9 total
Tests:       50 passed, 50 total
Snapshots:   0 total
Time:        7.917 s
Ran all test suites.

✅ Build Passed

Build Output
├ ○ /income-categories
├ ƒ /income/[incomeId]/edit
├ ○ /income/new
├ ○ /invoices
├ ƒ /invoices/[invoiceId]
├ ƒ /invoices/[invoiceId]/edit
├ ƒ /invoices/[invoiceId]/print
├ ○ /invoices/new
├ ○ /payment/failure
├ ○ /payment/success
├ ƒ /portal/dashboard
├ ƒ /portal/invoices
├ ƒ /portal/invoices/[invoiceId]
├ ƒ /portal/login
├ ƒ /portal/quotes
├ ƒ /portal/verify
├ ○ /quotes
├ ƒ /quotes/[quoteId]
├ ○ /quotes/new
├ ○ /recurring-transactions
├ ○ /reports
├ ○ /settings
└ ○ /vendors


ƒ Proxy (Middleware)

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @package.json:
- Line 44: The package.json currently pins the Next.js dependency to a canary
version; update the "next" entry to the released secure version "15.4.8"
(replace the existing "next" value), then regenerate lockfiles by running your
package manager (npm install / yarn install / pnpm install), run test suite and
build to verify compatibility, run npm audit or your vulnerability scanner to
confirm the CVE is resolved, and deploy the updated build; ensure any CI caching
of node_modules or lockfiles is refreshed so the new version is used in
production.
🧹 Nitpick comments (1)
package.json (1)

76-76: Update eslint-config-next to match Next.js.

eslint-config-next is at version 15.3.0 while Next.js is at 15.4.8. Update eslint-config-next to 15.4.8 (or 15.5.9 for the latest compatible patch) to ensure linting rules align with the current Next.js version.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33586a8 and 7479d2b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Comment thread package.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
src/proxy.ts (1)

178-190: Critical: Add runtime: 'nodejs' to middleware config.

This middleware performs database operations using Drizzle ORM with the pg driver (lines 103–138), which requires Node.js runtime. Without explicitly setting runtime: 'nodejs', this middleware defaults to Edge runtime where the pg driver is incompatible.

The fix is to restore the runtime configuration:

Suggested fix
export const config = {
  matcher: [
    '/((?!_next/static|_next/image|favicon.ico|images|public).*)',
  ],
  runtime: 'nodejs',
};

Next.js 15 provides stable support for Node.js middleware, so this is the correct approach for your use case.

🤖 Fix all issues with AI agents
In @src/components/ui/calendar.tsx:
- Around line 63-69: The Chevron component only handles "left"/"right" and
incorrectly spreads v9 props to icon components; update the Chevron
implementation to accept and destructure { orientation, className, disabled,
size, ...props } and handle four orientations ("left","right","up","down") by
selecting the correct icon (use ChevronLeft, ChevronRight, ChevronUp,
ChevronDown or rotate an existing icon) and wrapping the icon in a container
element that receives className, disabled state, and size-based classes instead
of passing those props to the icon; ensure the container forwards remaining
props and that the icon itself only receives presentational props (e.g.,
className for sizing/rotation) so react-day-picker v9 props are properly mapped.

In @src/proxy.ts:
- Line 26: The middleware file is misnamed and the exported function is called
proxy, so Next.js never runs it; rename src/proxy.ts to middleware.ts and change
the export to a named export called middleware (export async function
middleware(request: NextRequest) { ... }) OR create a new src/middleware.ts that
imports { proxy } from './proxy' and re-exports it as export { proxy as
middleware }, ensuring the function signature and NextRequest import match
Next.js middleware requirements.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7479d2b and 36fa953.

⛔ Files ignored due to path filters (3)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • public/images/logomark.png is excluded by !**/*.png
  • public/images/logomark_dark.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • next-env.d.ts
  • next.config.ts
  • package.json
  • src/components/layout/Sidebar.tsx
  • src/components/ui/calendar.tsx
  • src/proxy.ts
  • tsconfig.json
💤 Files with no reviewable changes (1)
  • next.config.ts
✅ Files skipped from review due to trivial changes (1)
  • tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/ui/calendar.tsx (1)
src/lib/utils.ts (1)
  • cn (7-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-and-build
🔇 Additional comments (2)
next-env.d.ts (1)

3-3: LGTM! Typed routes support added.

This import is automatically generated by Next.js 15.5+ when typed routes are enabled and provides type-safe route navigation.

src/components/layout/Sidebar.tsx (1)

42-50: LGTM! Proper SSR hydration guard implemented.

The mounting guard correctly prevents hydration mismatches by ensuring theme-dependent content (the logo) only renders with the correct theme after client-side mount. This follows the recommended pattern for using next-themes with server-side rendering.

Comment thread src/components/ui/calendar.tsx
Comment thread src/proxy.ts
@setasena setasena changed the title [eng-439] Bump Summit Nextjs Version [ENG-439] Bump Summit Nextjs Version Jan 7, 2026
@geraldakbar
geraldakbar merged commit 91af6fe into main Jan 7, 2026
2 checks passed
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