Files
amethyst/commons
Claude 05e7e57c4b refactor(audio-rooms): VM uses connectReconnectingNestsListener (T4 #2)
Switch the production NestsListenerConnector default to wrap each
session in connectReconnectingNestsListener, then retire the VM's
own scheduleAutoRetry / autoRetryAttempts / connectInternal /
retryPending state machine.

A single retry policy now lives in the transport layer (the
wrapper's NestsReconnectPolicy) rather than racing two of them —
the VM's previous retry would tear down + recreate subscriptions
on every attempt, dropping audio. With the wrapper:

  * transport drops auto-retry with exponential backoff,
  * existing SubscribeHandle objects keep emitting via the
    MutableSharedFlow re-issuance pump (already shipped in T4 #2's
    earlier commit),
  * the existing speaker set survives through Reconnecting →
    Connected without per-attempt re-subscription.

UI side: new ConnectionUiState.Reconnecting(attempt, delayMs)
surfaces the wait. AudioRoomFullScreen shows a "Reconnecting…"
chip during the transient window — the user typically doesn't
need to act, the wrapper recovers on its own.

Existing AudioRoomViewModelTest covers connect/disconnect/teardown
unchanged; ReconnectingNestsListenerTest in :nestsClient owns the
retry-policy contract.
2026-04-27 01:09:01 +00:00
..