Repository navigation
Upgrade Next.js to 16.4 and enable compiler and tooling features - #137
Conversation
PR reader API performanceResult: INCONCLUSIVE 8 inconclusive. Zero request failures across all six runs. Base Three independent runs per revision, each on a fresh GitHub-hosted ARM64 runner. 16 users, 60 seconds/run, 1,000 synthetic articles, cache off, five PgBouncer slots. Latency comparisonAll latency values are in milliseconds; lower is better. Values are medians of three runs.
Additional latency and throughput metricsEach cell shows base → PR. Latencies are in milliseconds.
Individual runs
How to interpret this reportRegressed / Improved: a p95 regression needs >20% and >20 ms increase in the medians and at least two head samples versus the base median. Improvements use the inverse threshold. Within threshold means the change did not meet both thresholds. Inconclusive: a within-revision p95 range >35% of its median and >20 ms is too noisy for a confident latency verdict. Inconclusive latency comparisons are non-blocking: the check passes without claiming an improvement. Confirmed regressions and test/report errors fail the PR gate. Throughput is descriptive: paced users do not measure maximum capacity. This uncached public API test does not establish production health, browser performance or worker capacity. Separate runners can differ in hardware or host load; repetitions and noise checks reduce but cannot eliminate that uncertainty. Full HTML/CSV reports and logs · attempt 1 |
Backend unit coveragePASS · minimum combined coverage 67.60%. Tests: 3509 passed, 0 failed, 0 skipped. Source files: 276.
Unit coverage includes every backend workspace. PostgreSQL/Redis integration tests run separately. Commit: 7451938 · HTML, JSON, XML reports and job logs · attempt 1 |
Lighthouse ·
|
| Page | FCP | LCP | CLS | TBT | JS | Total |
|---|---|---|---|---|---|---|
Latest (/latest) |
1.07 s | 2.72 s | 0.001 | 96 ms | 264 KiB | 542 KiB |
Article preview (/articles/…) |
1.07 s | 2.74 s | 0.005 | 134 ms | 269 KiB | 560 KiB |
Topics (/topics) |
1.07 s | 2.42 s | 0.000 | 34 ms | 240 KiB | 371 KiB |
Sources (/sources) |
1.07 s | 2.61 s | 0.000 | 44 ms | 278 KiB | 409 KiB |
Public profile (/users/…) |
1.07 s | 2.30 s | 0.000 | 32 ms | 230 KiB | 336 KiB |
Leaderboard (/leaderboard) |
0.91 s | 2.06 s | 0.000 | 58 ms | 196 KiB | 287 KiB |
Mobile reader · Three cold loads per page · Median timings · Largest transfer size.
Needs attention
| Page | Finding | Measured | Target / limit |
|---|---|---|---|
Latest (/latest) |
2.72 s | 2.50 s | |
Article preview (/articles/…) |
2.74 s | 2.50 s | |
Sources (/sources) |
2.61 s | 2.50 s |
Full reports and logs · 7451938 · Attempt 1
Code Review ✅ Approved🟡 Medium risk · Enabling the React Compiler and worker-thread plugin execution in both apps could alter rendering or build behavior and cause regressions. Upgrades Next.js to 16.4.0 and enables Rust React Compiler, Turbopack cache garbage collection, lazy client dynamic imports, and worker-thread plugin execution. Includes CSP nonce regression checks and bundle-analysis commands; keeps Cache Components and Partial Prefetching disabled due to per-request nonce incompatibility. All builds, tests, and browser checks passed. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



What changes and why?
Upgrade the reader and admin apps from Next.js 16.3.8 to 16.4.0 and align ESLint and the shared telemetry peer dependency. React already uses 19.3.0.
Enable the Rust React Compiler, Turbopack cache garbage collection, lazy client dynamic imports, worker-thread plugin execution, and latest-release upgrade reminders in both apps. Add bundle-analysis commands with snapshot support and document the configuration.
Keep Cache Components and Partial Prefetching disabled because the apps use per-request CSP nonces, which are incompatible with static shells. Add browser regression checks for fresh nonces on successive page loads and matching nonces on executable scripts. Include the Next.js-generated agent guidance.
Lockfile regeneration exposed vulnerable browser-tooling copies of
basic-ftp; extend the existing 6.2.2 override across the workspace to keep the dependency audit clean.Release reference: https://nextjs.org/blog/next-16-4
CSP compatibility: https://nextjs.org/docs/app/guides/content-security-policy
Validation
npm ciand dependency audit: passed, zero vulnerabilities.Rollout notes
The compiler and Turbopack options are experimental and were verified locally on Node.js 22.23.2. Next.js may fall back to child processes on affected Node.js versions. Keep the per-request rendering and CSP model when deploying this upgrade.
This PR does not deploy the website or submit extension packages to either store. Container and ARM64 checks must pass in CI before merge.
Ready for review