Skip to content

feat: WebSocket heartbeat, multi-vault subscription, and connection s… - #357

Open
Iceeyyou2 wants to merge 1 commit into
ethos-protocol:mainfrom
Iceeyyou2:feature/ws-252-253-254-255-heartbeat-multivault-backoff-status
Open

feat: WebSocket heartbeat, multi-vault subscription, and connection s…#357
Iceeyyou2 wants to merge 1 commit into
ethos-protocol:mainfrom
Iceeyyou2:feature/ws-252-253-254-255-heartbeat-multivault-backoff-status

Conversation

@Iceeyyou2

Copy link
Copy Markdown

What was done per issue

closes #252 — Heartbeat/ping-pong

  • Both VaultEventSocket implementations now reply to server ping frames with a pong text frame
  • Client sends a heartbeat ping every 30 s; a failed send immediately triggers the reconnect-with-backoff path
    instead of waiting for the OS to surface the dead connection
  • Tests: test_pingMessage_sendsPongReply, test_silentConnectionDeath_detectedViaHeartbeatFailure on both
    platforms

closes #253 — Multi-vault subscription

  • New subscribe / subscribed message types in api-contract.md
  • iOS: new connect(vaultIDs:) overload sends a subscribe message post-connect for IDs beyond the first
  • Android: VaultEventSocket.events(List) overload; VaultViewModel.subscribeToEvents() uses the
    multiplexed path automatically
  • Tests: subscribe message content, event routing to correct vault when multiplexed

closes #254 — Backoff jitter

  • Already fully implemented on both platforms — no code changes needed
  • Documented the formula in shared/api-contract.md §Backoff/Jitter Formula

closes #255 — Connection status indicator

  • iOS: VaultStore.socketConnectionState (@published), wired via onStateChange; ConnectionStatusBadge added to
    VaultDetailView's Overview section
  • Android: VaultEventSocket.ConnectionState enum + StateFlow; VaultUiState.socketConnectionState;
    ConnectionStatusBadge chip in VaultDetailScreen
  • Tests: all four states verified through VaultStore/VaultViewModel

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Iceeyyou2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant