FR-7: Status Events
Emit real-time status updates for UI overlays and logging.
Requirement
- Broadcast status events:
Recording
,Transcribing
,Injected
,Error
(variants). - Events emitted over an internal async channel consumable by UI components and log subsystem.
- Include timestamp and optional payload (e.g. error message).
- Provide public Rust API
subscribe_status()
for other components.
Rationale
A decoupled event system lets the overlay and future extensions react without tight coupling to business logic.
Acceptance Criteria
- Overlay reflects status within 50 ms of event emission.
- Logs capture all events with accurate timestamps.
- No missed or duplicated events observed in 1-hour monkey test (500 invocations).
Test-Driven Design
Start with failing tests subscribing to the event channel and asserting delivery guarantees (latency, ordering, no duplicates). Implement until green.
References
PRD §6 Functional Requirements – FR-7