- Updated NeedleEventType union to reflect actual event types emitted by NEEDLE
- Fixed outdated event type names (e.g., bead.claimed → bead.claim.succeeded)
- Added missing event types (worker.errored, worker.exhausted, peer.stale, etc.)
- Updated parser test to use correct event types
- Verified parser compatibility with 86,545 actual NEEDLE log events (100% success rate)
The parser's normalizeJsonl function accepts any string for event_type,
ensuring forward compatibility with new NEEDLE versions. The type
definition update is primarily for documentation and IDE support.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Tighten parseNeedleEvent signature to accept string (JSON line) and
preserve all canonical fields (timestamp, event_type, worker_id,
session_id, sequence, bead_id, data)
- Make parseLogLine a thin adapter that calls parseNeedleEvent then
projects to legacy LogEvent via needleEventToLogEvent
- Add comprehensive parseNeedleEvent unit tests covering canonical format,
session_id/sequence/data round-trip, all 47 NeedleEventType values,
schema version validation, and legacy format conversion
- Rewrite parser.real-logs.integration.test.ts to assert NeedleEvent
shape against real ~/.needle/logs/*.jsonl fixtures
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Accept ISO timestamp strings, convert to Unix milliseconds for internal use
- Use 'event' field as event type (map to 'msg' for internal use)
- Flatten worker object to string: ${runner}-${identifier}
- Infer log level from event name (error/warn/info/debug)
- Extract bead_id, duration_ms from data payload
- Add session, provider, model fields from NEEDLE format
- Maintain backward compatibility with legacy format
- Add comprehensive NEEDLE format test cases
Verified with actual NEEDLE log files:
- 146/146 lines parsed successfully
- Correctly identifies error-level events (claim_exhausted)
- Correctly identifies warn-level events (claim_retry)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude Worker <noreply@anthropic.com>
FileHeatmap component is fully integrated into main TUI app:
- Keyboard shortcut 'H' toggles heatmap view
- Real-time file access aggregation from event store
- Shows most-touched files with multiple sort modes
- All tests passing (943 tests, including 130 FileHeatmap tests)
Additional fixes:
- Fixed ErrorGroupPanel options to support bottom property
- Added vitest globals configuration for proper TypeScript support
- Fixed type assertions in server.test.ts
- Created comprehensive integration documentation
Co-Authored-By: Claude Worker <noreply@anthropic.com>
Added extensive test coverage including:
- Edge cases with optional field type validation
- Unicode and special character handling
- Very long messages and timestamps
- Custom field preservation (arrays, objects, nested data)
- Performance tests with large batches (1000, 5000, 10000 lines)
- Mixed valid/invalid line handling
- Empty string handling for optional fields
- Duration formatting edge cases
- Worker ID edge cases
All 67 tests passing, performance target met (<1s for 1000 lines, <5s for 10000 lines).
Co-Authored-By: Claude Worker <noreply@anthropic.com>