PR Summary #1

Merged
sonderau merged 6 commits from dev into main 2025-10-10 08:49:20 +08:00
Owner

This PR fixes critical server-side rendering issues in admin pages and improves error handling across the application. The main changes address Next.js 15 compatibility issues and server-side API connection problems that were causing "AggregateError" failures when loading admin pages. Key Fixes:
Server-side API connection: Fixed axiosServer.ts to use the correct environment variable (API_BASE_URL instead of NEXT_PUBLIC_API_BASE_URL) and added SSL certificate handling with an HTTPS agent to properly connect to the backend API from server components
Next.js 15 compatibility: Removed outdated cookies() usage from admin pages (devices and users) that was causing issues after the Next.js 15 upgrade, as the token is already available through requireAuthOrRedirect()
Error handling: Added comprehensive try-catch blocks to both admin pages with proper error logging and meaningful error messages, replacing cryptic "AggregateError" messages with actionable diagnostics
CVE verification: Added new "Verify CVE Count" button in AdminControlsPanel that uses the GitHub API to cross-check CVE data
Impact: Admin pages (devices and users) now load correctly without connection errors, and any failures provide clear error messages for debugging.

This PR fixes critical server-side rendering issues in admin pages and improves error handling across the application. The main changes address Next.js 15 compatibility issues and server-side API connection problems that were causing "AggregateError" failures when loading admin pages. Key Fixes: Server-side API connection: Fixed axiosServer.ts to use the correct environment variable (API_BASE_URL instead of NEXT_PUBLIC_API_BASE_URL) and added SSL certificate handling with an HTTPS agent to properly connect to the backend API from server components Next.js 15 compatibility: Removed outdated cookies() usage from admin pages (devices and users) that was causing issues after the Next.js 15 upgrade, as the token is already available through requireAuthOrRedirect() Error handling: Added comprehensive try-catch blocks to both admin pages with proper error logging and meaningful error messages, replacing cryptic "AggregateError" messages with actionable diagnostics CVE verification: Added new "Verify CVE Count" button in AdminControlsPanel that uses the GitHub API to cross-check CVE data Impact: Admin pages (devices and users) now load correctly without connection errors, and any failures provide clear error messages for debugging.
sonderau added 6 commits 2025-10-10 08:48:52 +08:00
New Github API support for verifying CVE counts.
Some checks failed
Deploy Frontend / deploy (push) Failing after 33s
7cbe4e4b7b
Trigger dev deployment - test ownership fix
All checks were successful
Deploy Frontend / deploy (push) Successful in 20s
ad6fb4082d
Changes to DeviceManagementPage section.
All checks were successful
Deploy Frontend / deploy (push) Successful in 22s
c404331918
Adjustments to DeviceManagement.
Some checks failed
Deploy Frontend / deploy (push) Failing after 13s
4e73ccb60b
devices/page.tsx
All checks were successful
Deploy Frontend / deploy (push) Successful in 24s
12c9e75743
 Added try-catch block around the API call
 Proper error logging and meaningful error messages
users/page.tsx
 Removed unused cookies() import and call (it was already being called inside requireAuthOrRedirect())
 Added try-catch block around the API call
 Proper error logging and meaningful error messages
Changed axiosServer to use process.env.API_BASE_URL (not NEXT_PUBLIC_)
All checks were successful
Deploy Frontend / deploy (push) Successful in 20s
cc044aca17
 Reverted .env.local to use https://sys.psg.net.au:8443/api
 Added httpsAgent with rejectUnauthorized: false to accept the SSL certificate
sonderau merged commit 3e007c07f4 into main 2025-10-10 08:49:20 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sonderau/ld-sysinfo-frontend#1