Skip to content

fix(talk): cancel obsolete speech before playback begins - #4449

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-talk-speech-ownership-20260912
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-talk-speech-ownership-20260912

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

Turning spoken replies off does not cancel synthesis, and leaving Talk while the iOS blob is downloading can start audible playback after unmount. Own each synthesis request with an AbortController, reject responses/blobs after cancellation, and consult the live speaker preference before starting speech from an older reply closure. Existing playback is stopped when the toggle is turned off.

Overlap check

Searched open and closed upstream PRs by semantic title and the changed production files using a complete GitHub PR file inventory (through #4443, 2026-09-12). Inspected #3177: it cleans resources already registered in activeSpeechRef but cannot cancel fetch/blob work before that registration. #2959 handles microphone capture and #3175 handles backend TTS HTTP errors. This change owns pre-playback synthesis and the speaker toggle; it does not replace their active-resource cleanup.

Validation

  • ODSTalk.speech-ownership.test.jsx plus ODSTalk.test.jsx: 17 passed. Both late-response and late-blob regressions failed before the fix; request abortion and absence of playback/object URLs are asserted.
  • Regression tested against unchanged public-beta before the fix; focused suite passes after the fix.
  • git diff --check and pre-commit checks on all changed files: passed.
  • Candidate: 590fce0822142fae7da1442c2bb5f9f7e2765f11. Base: 9fc9f610 (public-beta).
  • Combined validation and known baseline failures are recorded below.

Scope and rollback

This browser change applies to the same dashboard bundle on Linux, macOS and Windows. Tests exercise the production component/hook with controlled browser events and I/O; no live-device or hardware behavior is claimed. No host/service configuration or persisted format changes. Revert this commit to restore the previous behavior.

Batch integration receipt (2026-09-12)

  • Published integration head: a945f8a1, combining all 20 candidate branches from public-beta 9fc9f610.
  • Dashboard: npm test -- --maxWorkers=4 939 tests passed in 118 files; npm run lint 0 errors, 577 warnings; npm run build passed.
  • Talk API: python -m pytest tests/test_talk.py tests/test_talk_attachment_encoding.py -q 45 passed.
  • Linux validation at integration predecessor 2a35c1e5: make lint, all four platform dispatch/smoke scripts, and installer simulation passed. Later changes add tests and adjust two progress labels only.
  • Full make gate is not green locally: the installer noninteractive-sudo test has two failures reproduced unchanged on base 9fc9f610. BATS has 416/421 passing, with five WSL/root-environment failures also reproduced on that base. These are recorded limits, not passing gates. Full-repository private-key scanning also flags pre-existing test fixtures; changed-file pre-commit checks pass.
  • Browser tests use DOM/I/O fixtures; no live inference, physical GPU, microphone, Safari/native-dialog interaction or hardware deployment is claimed.

Merge coordination

Suggested sequence: #4444, #4445, #4446, #4447, #4448, #4449, #4450, #4451, #4453, #4454, #4455, #4456, #4457, #4458, #4459, #4460, #4461, #4462, #4463, #4464. Each PR is independently based on public-beta; the sequence is for applying and verifying the combined batch, not a claim of stacked base branches.
Three textual reconciliations are preserved in the integration head: #4459 retains #4447 reader cleanup/terminal framing plus stop-abort guards; #4461 combines the GFM and copy-component imports; #4463 retains both the caption-limit notice and jump-to-latest action. Other merges applied automatically. Rerun the focused suites and combined dashboard checks after upstream integration; revert the relevant PR commit to roll back its behavior. No upstream PR has been merged by this batch.

Current PR candidate: 590fce0822142fae7da1442c2bb5f9f7e2765f11.

@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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.

2 participants