Repository navigation
feat(stt): play a sound when dictation stops on its own - #17923
Conversation
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS No first-time reader has seen the new "Interrupted dictation" row; this lane can't judge whether a newcomer understands it. Watch
[UX-REVIEWED] 6475e95 Description read[DESCRIPTION-READ] 8cf5fb27d0a615d48e9c28966427864b0cf53e50331c86b321af8260c7a0f91c That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the 300 ms throttle in [DESIGN-REVIEWED] 6475e95 Description read[DESCRIPTION-READ] 611f4ede9d3af89038157dd965d27709593cb7690c5d933ddf333cf77b168194 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The new dictation sound is on by default: every dictation user hears the all-categories chime ( What this change shipsInventory (6 items) — 6 justifiedIntent: let someone dictating without watching the screen know, by sound, that dictation stopped without them, so they stop talking. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 6475e95 Description read[DESCRIPTION-READ] e1b98a945591d69b5a2a5ac971554e21b6bc10e9e70fe17032d309f56a239ebc That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
602d5ed to
65c922a
Compare
|
self-added: no
|
|
self-added: no
|
|
The workflow runs for the current head are waiting for maintainer approval (fork PR, all at |
|
Status for head
A fork author cannot rerun jobs. Once the rate limit has reset, could a maintainer run: |
65c922a to
d92a713
Compare
|
Pushed
The fork runs for the new head will need approval again. |
d92a713 to
0460f45
Compare
|
|
|
Ready for maintainer review and merge on This head is a rebase onto main |
0460f45 to
1b4bd13
Compare
A dictation can end without the user stopping it: the stream fails, reaches its length cap, or loses its connection. The composer clears the Listening state and shows an error, but someone reading from another screen while dictating does not see it and keeps talking. useStreamingStt now raises a new "dictation" sound kind whenever capture ends while the user is still dictating. A stop or cancel the user makes stays silent. The kind is sound-only, like "turn", and gets its own "Interrupted dictation" row in Settings > Notifications, with "ding" as its built-in default. Part of kirodotdev#17842
1b4bd13 to
6475e95
Compare
|
iamwhatever
left a comment
There was a problem hiding this comment.
This plays the notification sound, under a new dictation category, when dictation stops without the user ending it. The three cases are an error frame, a dropped socket, and a full readiness buffer, and they map directly onto the three places the hook already knew capture had ended unexpectedly. I read the hook diff to check it plays only once. The error-frame path calls cleanup(), and the buffer path calls stop(), before the close handler runs, so the !captureStoppedRef.current check stops a second sound. The two new tests ("once, even when the close follows") pin that, and user stop, cancel and a superseded session stay silent. The settings row, registry and 12 catalogs are consistent. Design, First Principles, Opus and GPT pass, every UX item has a disposition, and CI is green. The screenshots are committed from a fork, which is allowed. — crew-pr-reviewer
|
This PR appears to have left The new Failing job: https://github.com/kirodotdev/KiroCrew/actions/runs/38036318549/job/114167446391 Fix is to run |
|
Thanks for catching this. Fix is up in #18803: it regenerates |
Problem / Motivation
Goal: A dictation that stops before the user ends it plays a short sound, so someone not looking at the screen knows to stop talking.
When dictation stops on its own (the stream fails, the 5-minute cap is reached, the connection drops), the composer clears the Listening state and shows an error. People often dictate while reading from another screen and never see that. They keep talking, and everything after the stop is lost.
Why it matters
The failure is silent exactly when the user is not watching the screen, which is a common way to dictate. The first they hear of it is after minutes of lost speech.
Not a goal
notificationcue on every notification sound.What changed (motivation → approach → change)
hooks/useStreamingStt.tsdictationsound when capture ends without the userhooks/notificationEvent.ts,hooks/useNotificationSound.tsDICTATION_STOPPED_KINDand its sound categorypages/settings/NotificationsPanel.tsxi18n/locales/en.manual.jsonand the 11 translationsi18n/locales/en-XA.jsonregeneratedcomponents/commandPalette/settingsManual.ts,settingsRegistry.gen.ts,src/kiro_crew/docs/settings-registry.generated.jsonnpm run gen:settingsdocs/system-specs/modules/app-notifications.mdThe dashboard already has a sound system with one setting per kind of event, and two kinds the frontend raises itself (
turn,approval). This adds a third,dictation, raised byuseStreamingSttwhen capture ends while the user is still dictating: anerrorframe or a socket close during capture, or the 60-second readiness buffer filling up. A stop, a cancel, an unmount and a superseded session stay silent, and the sound plays once per stop.Like
turn, the kind is sound-only: no feed entry, toast or badge. It gets its own Interrupted dictation row in Settings > Notifications > Per-category sounds. With no override it plays the all-categories sound, like every other row except the existing approval one, so "Use default" means the same thing on it as on its neighbours; it can be given its own sound or silenced, andall = nonesilences it too. Its description says it plays a sound, so a settings-search hit explains itself.Backwards compatibility
Compatible: a new sound category and settings row. Stored settings without a
dictationkey resolve to the built-in default, and every existing category resolves as before.Removes nothing: no setting, kind, key or reader goes away.
Tests
useStreamingStt.stopBeforeReady.test.tsx, new block: the sound fires once for an error frame followed by a close, a dropped connection, a socket error followed by a close, and a full readiness buffer; it does not fire after a user stop (even when the drain then fails) or on cancel.useNotificationSound.test.ts:dictationresolves to the all-categories sound with no override, honours its own override andnone, and is silenced byall = none.NotificationsPanel.test.tsx: with the all-categories sound set to Blip, the new row reads "Use default" and its Test button plays Blip. The approval row's position-based lookup is updated for the inserted row, and the two override checks read their own row instead of matching "Ding" anywhere on the page.Four of the new hook tests fail with the hook change reverted. The related frontend set passes, plus
tsc,eslint,npm run i18n:checkand every locale'ssrc/i18n/style/register tests withI18N_BASE_REFset, so the changed-value checks run on the new strings.Manual verification
Ran the branch's own build on an isolated gateway (fresh data home,
minimalseed) and opened Settings > Notifications > Per-category sounds in light and dark mode. The Interrupted dictation row renders between Conversation handoffs and Proactive agent messages, with its info tooltip and Test button, and reads "Use default" like its neighbours.Screenshots / video
Light:
Dark:
recorded from the branch head · isolated gateway,
minimalseed · real server, no fixturesRelated Issues
Part of #17842
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)