- Remove `export const dynamic` from 4 routes (incompatible with cacheComponents) - Static import for redis-handler (Turbopack can't resolve relative dynamic imports) - Simplify redis-handler: Buffer.concat, NonNullable, single connect promise - Inline single-use helpers in integration-data-cache - Non-greedy SVG regex to prevent ReDoS - Inline getDevelopmentServiceAliases in next.config - Remove restating comments
2.4 KiB
2.4 KiB
Goal: Phase 1 Performance Branch — Review & Verify
Status: active
Iteration: 2
Verification Results (Iteration 2)
CI Checks
- typecheck: 38/38 packages pass (0 failures) — fixed
as constonsvgSanitizeOptions - test: 143/144 pass (1 pre-existing pi-hole V5 failure, not our code)
- lint: 38/38 packages pass, 0 errors
- format: 38/38 packages pass
CodeRabbit Fixes Applied (commit 4270f2f, 6f56364)
_layout-creator.tsx—HomarrLogoWithTitlein Suspense fallback (was throwing without BoardProvider)integration-data-cache.ts— guardcache.setwithplaceholderidentity check + testnext-cache-handler/index.ts— memoize the Promise, not resolved handlerredis-handler.ts— tee ReadableStream before consuming + try/catch in get() pending pathredis-handler.ts— base64 encode body instead of number arraysvg-purify.ts— removedas constto fix DOMPurify type compat
Skipped (Pre-existing, not introduced by PR)
- docs CLI syntax, docker rm -f, iframe X-Frame-Options
- Redis channel/connection patterns (lazy init, memory fallback, lock fallback)
- Cascade invalidation on deletes (complex, tracked for follow-up)
Branch State
- PR: https://github.com/homarr-labs/homarr/pull/6537
- 274 files changed, 10496 insertions, 7982 deletions
- Merged with latest origin/dev, all conflicts resolved
- 43 commits ahead of dev
Success Criteria Status
- pnpm typecheck passes — 38/38
- [~] pnpm test passes — 143/144 (1 pre-existing)
- pnpm lint passes — 0 errors
- pnpm format passes
- All changed files reviewed (via 30 Bugbot/Security rounds + CodeRabbit)
- No dead code or unused imports (lint clean)
- Mutation router cache invalidation (30+ mutations wired)
- Redis cache handler correct and tested (stream tee, base64, promise memo)
- Integration dynamic imports complete and typed
- SVG sanitization secure (13 XSS vectors + guard test)
- Translation memoization correct
- Memory channel fallback works
- Redis client consolidation correct
- Next.js config optimal (cacheComponents, cacheLife, cacheMaxMemorySize)
- Board routes have Suspense boundaries
- No auth/permissions regressions
- Benchmark script exists (.bench/ gitignored)
- All review rounds zero critical issues
- Code simplified where possible
- Documentation accurate (env vars, CLI)