Fixes three issues identified by bugbot: 1. **TTL cache memory leak (Medium)**: Cache only evicted expired entries on get(), causing unread keys to accumulate indefinitely. Added periodic cleanup via setInterval (runs every TTL period) with unref() to prevent blocking process exit. 2. **PR skip condition never triggers (Low)**: Check for merged/closed PRs was using sessions[i].pr.state which is always "open" (default from basicPRToDashboard). Fixed by checking cache for merged/closed state before enrichment, avoiding unnecessary API calls. 3. **SessionCard "0 CI check failing" bug**: When GitHub API fails, ciStatus is "failing" but ciChecks is empty, showing nonsensical "0 CI check failing" alert. Fixed to show "CI status unknown" instead when failCount is 0. **Tests Added:** - Cache cleanup interval test (async real timer) - SessionCard CI status unknown test (verifies no "0 failing" or "ask to fix") Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| e2e | ||
| screenshots | ||
| src | ||
| next-env.d.ts | ||
| next.config.js | ||
| package.json | ||
| postcss.config.mjs | ||
| tsconfig.json | ||
| vitest.config.ts | ||