Deferred from review of #6. Tracking only.
VoiceAgentSession.swift:79-90 — connect() forces phase = .connected after its await room.connect(...) / setMicrophone(...) block, regardless of what the RoomDelegate did in between.
Scenario: room.connect() resolves, then the link drops; didUpdateConnectionState(.disconnected) runs and sets phase = .idle / agentState = .offline. But connect() then proceeds and sets phase = .connected, isMicEnabled = true. UI shows "Connected · mic on" for a dead room, and send() will believe it's connected and silently drop observations.
Related lower-severity nits from the same review:
toggleMicrophone flips isMicEnabled based on the room call alone, with no connected-guard — can show "mic on" when disconnected.
- backend
/connection-details returns participantName = the random identity (inspector-xxxx), not the "Inspector" display name the token carries. Cosmetic.
Deferred from review of #6. Tracking only.
VoiceAgentSession.swift:79-90 —
connect()forcesphase = .connectedafter itsawait room.connect(...)/setMicrophone(...)block, regardless of what theRoomDelegatedid in between.Scenario:
room.connect()resolves, then the link drops;didUpdateConnectionState(.disconnected)runs and setsphase = .idle/agentState = .offline. Butconnect()then proceeds and setsphase = .connected,isMicEnabled = true. UI shows "Connected · mic on" for a dead room, andsend()will believe it's connected and silently drop observations.Related lower-severity nits from the same review:
toggleMicrophoneflipsisMicEnabledbased on the room call alone, with no connected-guard — can show "mic on" when disconnected./connection-detailsreturnsparticipantName= the random identity (inspector-xxxx), not the"Inspector"display name the token carries. Cosmetic.