Fix discrepancy where /api/workers returned contradictory data:
- beadsCompleted: 285 (counts bead.released events including timed-out)
- stuck: true, stuckReason: 'Running for 2311m with only 1 completion(s)'
The stuck detection now correctly uses:
- beadsCompleted: all beads processed (including timed-out/deferred)
- beadsSucceeded: only successful completions (bead.completed events)
- beadsTimedOut: new counter for timed-out/deferred beads
Changes:
- Add beadsTimedOut counter to WorkerInfo type
- Increment beadsTimedOut on bead.released with TimedOut/Deferred outcome
- Update stuck detection to show clear reason text:
- 'X processed but 0 successful completions (all timed out/deferred)'
- 'X processed but only Y successful completion(s) (Z timed out/deferred)'
- Add beadsTimedOut to evidence array
Fix acceptance criteria:
- Worker processing 100 timed-out beads shows clearly in UI:
- 100 beads completed
- 0 beads succeeded
- Stuck reason: '100 processed but 0 successful completions'
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add currentBead: null to all WorkerInfo test fixtures (8 files)
- Add missing required fields to SemanticNarrative test fixtures
- accomplishments, challenges, sentiment, stats, generatedAt, isLive
- Add missing workerId and events to NarrativeSegment fixtures
- Fix onSelectCallback mock type assertion
- Add Record<string, string> index signature to mockBeadsData
All npx tsc --noEmit errors resolved. Test failures (6) remain
and are tracked in separate bead bf-40cu.
Closes: bf-7x4z
- Replaced basic terminal colors with light/bright variants for better visibility
- Changed gray to light-black for consistent muting across terminal themes
- Changed backgrounds from black to 'default' for light theme compatibility
- Updated text colors to light-white, light-cyan, etc. for better contrast
- All status indicators (active, idle, error) now use light variants
- Heat levels use progressive light colors for better differentiation
- Updated tests to expect new light-green-fg, light-yellow-fg, light-red-fg tags
The new color scheme provides better contrast and readability in both
light and dark terminal themes by using blessed's light color variants
and avoiding hard-coded black/white backgrounds.
Co-Authored-By: Claude Worker <noreply@anthropic.com>
Added vitest test to verify WorkerGrid component renders worker entries with correct status colors (green for active, yellow for idle, red for error). Test verifies blessed color tags are present in rendered content.
Co-Authored-By: Claude Worker <noreply@anthropic.com>
Changed all blessed imports from namespace import (import * as blessed)
to default import (import blessed from 'blessed') in 28 files.
This fixes "blessed.screen is not a function" runtime error that occurs
when ESM modules import CommonJS blessed package with namespace syntax.
Also includes WorkerAnalyticsPanel property additions for type compliance.
Fixes: bd-31x
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive unit tests for WorkerGrid component
- Mock blessed box and screen elements
- Test constructor, updateWorkers, selection navigation
- Test render output (status icons, collision indicators)
- Test key bindings (up/down/k/j/g/G)
- Cover edge cases (no workers, empty events, long descriptions)
All 29 tests pass. Total test suite: 183 tests passing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>