Skip to content

fix(web): The mic button stays put while its transcription environment reconnects - #137

Draft
mwolson wants to merge 1 commit into
contrib/agent-activity-heartbeatfrom
contrib/steady-mic-button
Draft

mwolson wants to merge 1 commit into
contrib/agent-activity-heartbeatfrom
contrib/steady-mic-button

Conversation

@mwolson

@mwolson mwolson commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Problem

The mic button in the composer disappears and comes back on its own. Voice input is offered only while the chosen transcription environment has a connection and that connection's speech status has answered. Each time the environment reconnects, the client drops the connection, gets a new one, and probes its status again, so the button is gone for the reconnect plus the probe. Over T3 Connect that was from a quarter of a second to more than seven seconds per reconnect, and the relay socket to the transcription environment dropped eighteen times in under ninety minutes on the desktop where this was seen. Every editor with a mic (composer, text fields, Voice settings) and both local and cloud transcription are affected.

Change

The last answer for the chosen destination now holds while it is between connections or while a new connection's status is still being probed, so the button stays where it is through a reconnect. Pressing it in the disconnected window shows "Could not start voice input: The transcription environment is not connected." instead of doing nothing.

Voice input is still not offered for a destination that has not answered since the editor mounted, that loses the transcription capability or the permission to dictate, or whose status reports voice input as unsupported. Choosing another destination, or renewing consent for the same one, starts from nothing again.

Mobile is left as it is. Its mic does not wait on a status probe, which runs there when a recording starts, and it is hidden only while the destination is disconnected.

Scope

Bug fix: a control leaves and returns without the user or the destination changing anything. No upstream issue reports it yet.

Verification

Found in the desktop app's traces. Each GET /api/voice/status followed a lost connection and a reconnect of the transcription environment over the relay, and the button was missing from the moment the connection dropped until that probe returned.

The browser test "keeps voice input offered while the chosen environment reconnects" drops the destination's connection, hands back a new connection whose status probe has not answered, and checks that voice input stays offered throughout, that starting while disconnected sends no audio and explains why, and that voice input stops being offered once the environment loses the capability. With the production change reverted it fails at the first check after the connection drops (1 failed, 36 passed); with the change all 37 tests in the file pass.

Not checked in a running desktop app. No screenshots or recording: the change is the absence of a control leaving and returning during a reconnect.

Known Limitations

A destination that stays disconnected keeps its mic button until the editor remounts, and pressing it shows the message above. An editor that mounts while the destination is disconnected still shows no button until it reconnects.

@mwolson
mwolson added this pull request to stack #138 November 16, 2026 23:03
@mwolson
mwolson removed this pull request from stack #138 November 18, 2026 16:28
@mwolson
mwolson added this pull request to stack #142 November 18, 2026 16:28
@mwolson
mwolson removed this pull request from stack #142 November 19, 2026 19:30
@mwolson
mwolson added this pull request to stack #144 November 19, 2026 19:31
@mwolson
mwolson removed this pull request from stack #144 November 20, 2026 22:48
@mwolson
mwolson changed the base branch from contrib/pi-block-restart to contrib/agent-activity-heartbeat November 20, 2026 22:48
@mwolson
mwolson force-pushed the contrib/steady-mic-button branch from 89ce7d8 to d8ae479 Compare November 20, 2026 22:49
@mwolson
mwolson added this pull request to stack #145 November 20, 2026 22:50
@mwolson
mwolson removed this pull request from stack #145 November 21, 2026 02:41
@mwolson
mwolson added this pull request to stack #147 November 21, 2026 02:41
@mwolson
mwolson removed this pull request from stack #147 November 21, 2026 20:44
@mwolson
mwolson added this pull request to stack #150 November 21, 2026 20:46
@mwolson
mwolson removed this pull request from stack #150 November 21, 2026 21:02
@mwolson
mwolson added this pull request to stack #153 November 21, 2026 21:02
@mwolson
mwolson removed this pull request from stack #153 November 22, 2026 04:49
@mwolson
mwolson added this pull request to stack #155 November 22, 2026 04:50
@mwolson
mwolson removed this pull request from stack #155 November 23, 2026 15:21
@mwolson
mwolson added this pull request to stack #157 November 23, 2026 15:21
…t reconnects

The composer offers voice input only while the chosen transcription
environment has a connection and that connection's speech status has
answered. A reconnect drops the connection and hands back a new one, whose
status is probed again, so the button disappeared for the length of the
reconnect plus the probe and then came back. Over T3 Connect that is
anywhere from half a second to several seconds, each time the relay socket
drops.

The last answer for the chosen destination now holds while it is between
connections or its status is still being probed. Pressing the button in that
window says the environment is not connected. A destination that has never
answered, loses the capability or permission, or reports voice input as
unsupported is still not offered.

# Conflicts:
#	apps/web/src/speech/useEnvironmentSpeechInput.ts
@mwolson
mwolson removed this pull request from stack #157 November 23, 2026 19:20
@mwolson
mwolson force-pushed the contrib/steady-mic-button branch from d8ae479 to c3e3a8e Compare November 23, 2026 19:21
@mwolson
mwolson added this pull request to stack #159 November 23, 2026 19:22
@mwolson
mwolson removed this pull request from stack #159 November 24, 2026 17:26
@mwolson
mwolson added this pull request to stack #161 November 24, 2026 17:27

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant