Commit graph

6 commits

Author SHA1 Message Date
jedarden
47c3396e0c fix(bf-27e4): unify stuck detection metric with beadsCompleted
Some checks are pending
CI / test (18.x) (push) Waiting to run
CI / test (20.x) (push) Waiting to run
CI / test (22.x) (push) Waiting to run
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>
2026-06-07 11:11:50 -04:00
jedarden
9b5e740a92 test(bf-7x4z): fix 13 TypeScript type errors in test files
Some checks are pending
CI / test (18.x) (push) Waiting to run
CI / test (20.x) (push) Waiting to run
CI / test (22.x) (push) Waiting to run
- 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
2026-05-26 17:11:47 -04:00
jeda
18c7f94ddb feat(bd-3ih): Improve color scheme contrast in TUI panels
- 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>
2026-03-05 03:54:06 +00:00
jeda
a8c8828446 feat(bd-2x9): E2E test: WorkerGrid renders workers with status colors
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>
2026-03-05 03:48:17 +00:00
jeda
9a015ffa42 fix: ESM/CommonJS blessed import compatibility
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>
2026-03-04 23:47:19 +00:00
jeda
8c025b74f5 feat(bd-3bt): Add blessed TUI tests for WorkerGrid component
- 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>
2026-03-03 14:32:20 +00:00