Skip to content

fix(web): a pending approval no longer discards an ongoing dictation - #39638

Open
harijoe wants to merge 3 commits into
pingdotgg:mainfrom
harijoe:julien/approval-stops-audio-transcription
Open

harijoe wants to merge 3 commits into
pingdotgg:mainfrom
harijoe:julien/approval-stops-audio-transcription

Conversation

@harijoe

@harijoe harijoe commented Nov 20, 2026 •

Copy link
Copy Markdown

Problem

When the agent asks for an approval while you are dictating, the recording stops and everything said so far is discarded. Fixes #39634.

Change

dictationDisabled in ChatComposer no longer includes the pending approval state. When disabled flips to true, useEnvironmentSpeechInput cancels the session, which drops the audio. Excluding dictation during an approval was inconsistent anyway: the editor stays enabled while an approval is pending, and typed text declines or redirects it. Dictated text now follows the same path, since dictation commits into the same draft and submits through the same handler.

Scope

Bug fix for #39634. The change is limited to the web composer. Mobile does not disable dictation on approvals.

Verification

  • Hit the bug in daily use: an approval arriving mid-dictation threw the recording away.
  • Traced it in code: isComposerApprovalState in dictationDisabled makes the useEnvironmentSpeechInput owner effect call session.cancel().
  • vp run check:changed passes, useEnvironmentSpeechInput.browser.test.tsx passes (42/42), and the web build succeeds.
  • No new test: no existing test renders the composer with a pending approval, and covering a one-condition removal would need a new ChatComposer harness.

Written with Claude Opus 5.5 in Claude Code, run from T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The composer no longer disables dictation solely because an approval is pending. Other dictation disable conditions remain.

Changes: Approval-state dictation

Layer / File(s) Summary
Dictation disable condition
apps/web/src/components/chat/ChatComposer.tsx
The dictation disable checks no longer include the composer approval state. Existing checks remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: bugfix

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · up to b21bf

Dictation will now keep recording when an approval request appears, and the transcript will land in the editable draft as typed text does. This is a small, localized web-composer change, and no concrete risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a pending approval no longer cancels an ongoing dictation in the web ChatComposer. It follows the conventional commit format and matches the raw summary, which says sp…
Description check Passed The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. It states the bug, links issue #39634, explains the one-condition removal…
Linked Issues check Passed Issue #39634 requires dictation to keep recording when an approval appears, so dictated text reaches the composer draft as typed text does. Per the prior review, the PR removes isComposerApprovalState…
Out of Scope Changes check Passed The whole-PR summary reports one changed code file, apps/web/src/components/chat/ChatComposer.tsx, with a single removed condition from dictationDisabled. That condition is the direct cause named in #…
Full details: Title check

Explanation

The title names the main change: a pending approval no longer cancels an ongoing dictation in the web ChatComposer. It follows the conventional commit format and matches the raw summary, which says speech input is no longer disabled by an active approval.

Full details: Description check

Explanation

The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. It states the bug, links issue #39634, explains the one-condition removal in dictationDisabled, limits scope to the web composer, and lists the checks run. It also explains why no new test was added. The Verification section gives a manual reproduction and test results, which meets the template's requirement beyond a bare 'tests pass'. The template's agent-model line is present with the model and harness named. Minor gap: no before/after evidence is needed because this is not a UI-layout change, so the omission is acceptable.

Full details: Linked Issues check

Explanation

Issue #39634 requires dictation to keep recording when an approval appears, so dictated text reaches the composer draft as typed text does. Per the prior review, the PR removes isComposerApprovalState from dictationDisabled in apps/web/src/components/chat/ChatComposer.tsx. Without that condition, disabled does not turn true on approval, so the useEnvironmentSpeechInput owner effect does not call session.cancel(). The raw summary for the whole PR at the current head reports +0/-1 in this file, which matches that change. The remaining dictationDisabled conditions are unchanged and do not relate to the issue. The head moved to b21bfe4 (a merge of origin/main). Repository diff for changed blobs was unavailable, and the file read was truncated before dictationDisabled, so I could not re-read the code at the current head. The conclusion rests on the prior review and the whole-PR summary. No automated test covers the approval-during-dictation path. The issue has no non-coding requirements that affect this verdict.

Full details: Out of Scope Changes check

Explanation

The whole-PR summary reports one changed code file, apps/web/src/components/chat/ChatComposer.tsx, with a single removed condition from dictationDisabled. That condition is the direct cause named in #39634. The PR does not touch mobile code or other composer behavior. Commit history at the current head shows a merge of origin/main with unrelated server, desktop, and shared-package commits. These commits are not described as PR changes, and the diff tool could not confirm their content. The assessment treats them as base-branch content. This leaves minor uncertainty about the merge content.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a2678a6 and b21bfe4.

Files selected for processing: 1

  • apps/web/src/components/chat/ChatComposer.tsx
Files with no reviewable changes: 1

  • apps/web/src/components/chat/ChatComposer.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 20, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the fix is written and reviewed, but proving it needs something no worker has:

  • Permanent blocker: the reported reproduction requires macOS desktop outside the iOS device pool, which is unavailable to this worker. The brief prohibits substituting another environment for that requirement. Recording continuity when approval arrives and transcript insertion after finishing dictation were not observed on either commit.

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 20, 2026
@harijoe

harijoe commented Nov 20, 2026

Copy link
Copy Markdown
Author

The blocker was my issue's environment field, not a real requirement: the bug is in apps/web and reproduces in a plain browser with any provider that asks for approvals. I updated #39634 to say so.

@juliusmarminge juliusmarminge added takeover:in-progress A takeover lead is working on this PR and removed takeover:blocked Takeover blocked; reason in the PR body labels Nov 23, 2026
@juliusmarminge
juliusmarminge force-pushed the julien/approval-stops-audio-transcription branch from 11a2dcd to b21bfe4 Compare November 23, 2026 10:20
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium at 1280×800, light theme, fresh synthetic state on both commits. Replay supplied the approval in Supervised mode; recorded speech passed through a browser MediaStream and the real local transcription engine.

Start dictation, send a command while recording, keep speech running as approval arrives, then finish dictation with approval still pending. Base cancels recording and loses the transcript. Head continues recording and inserts the transcript into the draft.

Before — d63b9c4c76 After — b21bfe447b
Recording before approval Before: recording started After: recording started
Approval arrives Before: recording cancelled After: recording continues
Dictation finished, approval pending Before: empty draft After: transcript in draft
Interaction recording Before video After video

Scenario driver · Speech fixture

scenarios:prove exited 0: fails on base, passes on head.

Not shown:

  • Desktop shell and physical microphone hardware were not exercised; this proof covers the shared web composer with recorded speech.
  • Submitting the resulting draft as approval feedback was not exercised; verification ended with the transcript visible and approval still pending.

@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 23, 2026

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

size:XS 0-9 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: A pending approval discards an ongoing dictation

2 participants