Files
correx/apps
kami 2e11b7c0d0 feat(tui-02): replace SharedFlow + tryEmit with Channel(UNLIMITED) in TuiWsClient to eliminate silent message drops
Replace MutableSharedFlow + tryEmit pattern in _messages field with Channel(UNLIMITED) + receiveAsFlow() to guarantee no message loss under high throughput. The extraBufferCapacity-based SharedFlow silently dropped messages when subscribers were slow; Channel(UNLIMITED) provides deterministic FIFO behavior with no drops.

Updated public messages property type from SharedFlow to Flow for compatibility.
Changed both message emission sites (connect() and connectSession()) from tryEmit() to send().
Added TuiWsClientChannelTest with 10k message no-drop verification.

Acceptance criteria:
- Channel(UNLIMITED) used for _messages instead of SharedFlow
- receiveAsFlow() converts channel to Flow
- send() replaces tryEmit() for message emission
- connectSession/disconnectSession/sessionStreamJob/sessionWsSession intact
- 10k message test verifies no-drop guarantee
2026-05-25 01:02:18 +04:00
..