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

54 lines
2.4 KiB
Markdown

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