Skip to content

bug(platform): sending while dictating drops the words not yet transcribed #5034

Closed

Description

@yannickmonney

Summary

When someone dictates a prompt and presses Send (or Enter) while still dictating, only the part that was already transcribed is sent. The rest of what they said is lost. A pilot reported this as "dictated prompts are cut off: only the part already transcribed is sent, not everything said before sending".

Why

Observed at main a71d0d92e9.

submit() stops the microphone and sends the field's current text in the same tick (services/platform/app/features/chat/components/composer.tsx:370, :379):

dictationRef.current?.stop();
// …
onSend(message);
setText('');

Both dictation paths deliver text after stop(). Web Speech finalizes its interim results in onresult / onend (app/features/chat/hooks/use-speech-to-text.ts). The recorder fallback transcribes on the server in a post-stop round-trip (app/features/chat/components/dictation-button.tsx:62). Whatever arrives after stop() misses the sent message and can land in the field that was just emptied.

Expected

Sending while dictating does the following:

  1. It stops the microphone.
  2. It waits for the final transcript, showing a brief "Finishing transcription…" state and giving up after a timeout.
  3. It appends that transcript and sends the whole text.

If the final transcription fails, nothing is sent. The field keeps what was transcribed, and an error says what happened.

Done when

  • Unit tests for both paths: text that arrives after stop() is part of the sent message, and a failed post-stop transcription never silently sends a truncated message.
  • Manual check in Chrome (Web Speech) and in Firefox or Safari (recorder fallback).

Scope for parallel work

This touches the composer's submit path, dictation-button.tsx and use-speech-to-text.ts. The composer height issue from the same pilot touches the composer's sizing only.

Activity

  1. added
    priority: medium
    bug
    service: platform
    on Oct 23, 2026
  2. added
    agent-ready
    on Oct 29, 2026
  3. added a commit that references this issue on Oct 30, 2026
    ca13e45
  4. added a commit that references this issue on Oct 30, 2026
    760c20c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions