Claude ce3a4a7322 fix: handle all relays disconnecting before EOSE (stuck in LOADING bug)
Critical Edge Case Fix:
Previously, when all relays disconnected before sending EOSE, the state
remained stuck in LOADING because overallEoseReceived stayed false.

Solution: Check if all relays are in terminal states
- Terminal states: eose, error, or disconnected
- If all terminal AND no overall EOSE yet, derive state from events:
  * No events → FAILED
  * Has events, all disconnected, streaming → OFFLINE
  * Has events, all disconnected, non-streaming → CLOSED
  * Some active, some terminal → PARTIAL

New Test Coverage (5 tests):
1. All relays disconnect before EOSE, no events → FAILED
2. All relays disconnect before EOSE, with events (streaming) → OFFLINE
3. All relays disconnect before EOSE, with events (non-streaming) → CLOSED
4. Some EOSE, others disconnect before EOSE → PARTIAL
5. Mix of EOSE and errors, all terminal → PARTIAL

This fixes the user-reported issue where disconnected relays show LOADING
instead of transitioning to appropriate terminal state.

Tests: 639/639 passing (added 5 new edge case tests)
2025-12-22 17:38:31 +00:00
2025-12-18 15:46:02 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-19 12:49:29 +01:00
2025-12-13 15:06:05 +01:00
2025-12-10 13:00:39 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-20 14:25:40 +01:00
2025-12-15 22:19:28 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-21 22:39:07 +01:00
2025-12-14 16:50:16 +01:00
Description
No description provided
MIT 14 MiB
Languages
TypeScript 98.9%
CSS 0.8%
JavaScript 0.3%