Files
homarr/.cursor/goal/scratchpad.md
T
Thomas Camlong 345a4be4b0 fix: CI build errors + simplify cache handler and data cache
- 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
2026-08-08 00:19:27 +02:00

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 const on svgSanitizeOptions
  • 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)

  1. _layout-creator.tsx — HomarrLogoWithTitle in Suspense fallback (was throwing without BoardProvider)
  2. integration-data-cache.ts — guard cache.set with placeholder identity check + test
  3. next-cache-handler/index.ts — memoize the Promise, not resolved handler
  4. redis-handler.ts — tee ReadableStream before consuming + try/catch in get() pending path
  5. redis-handler.ts — base64 encode body instead of number array
  6. svg-purify.ts — removed as const to 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

Success Criteria Status

  1. pnpm typecheck passes — 38/38
  2. [~] pnpm test passes — 143/144 (1 pre-existing)
  3. pnpm lint passes — 0 errors
  4. pnpm format passes
  5. All changed files reviewed (via 30 Bugbot/Security rounds + CodeRabbit)
  6. No dead code or unused imports (lint clean)
  7. Mutation router cache invalidation (30+ mutations wired)
  8. Redis cache handler correct and tested (stream tee, base64, promise memo)
  9. Integration dynamic imports complete and typed
  10. SVG sanitization secure (13 XSS vectors + guard test)
  11. Translation memoization correct
  12. Memory channel fallback works
  13. Redis client consolidation correct
  14. Next.js config optimal (cacheComponents, cacheLife, cacheMaxMemorySize)
  15. Board routes have Suspense boundaries
  16. No auth/permissions regressions
  17. Benchmark script exists (.bench/ gitignored)
  18. All review rounds zero critical issues
  19. Code simplified where possible
  20. Documentation accurate (env vars, CLI)