Skip to content

fix(stt): name a keep-draft control that works on every push-to-talk binding - #22439

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:fix/dictation-release-draft-hint
Oct 20, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:fix/dictation-release-draft-hint

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Make the "Send when I stop recording" hints tell people a way to keep a draft that actually works, on every keyboard binding and on the phone's hold bar.

The Settings hint for stt.submit_on_release says "Hold Shift" to keep a draft. Shift is ignored for a binding that already uses it, which includes the Windows and Linux default ⌥⇧Space, so following the hint there sends the message. On the hold bar, a finger that slides into the keep-as-draft zone while the press is still arming and then holds still keeps seeing "Release to send", although letting go keeps a draft.

Why it matters

The setting sends messages on its own, so a hint that names a way out that does nothing on the default binding sends a message the person meant to keep. A label that says "send" when the release keeps a draft is the opposite error, and both undermine trust in the feature.

Not a goal

  • Changing which stops send or keep a draft. Behaviour is unchanged; only a hint and a label's timing change.
  • Making Shift keep a draft on a binding that uses Shift.

What changed (motivation → approach → change)

The hint named a control that is ignored on the default Windows and Linux binding, so it now names Shift-click on the mic, which keeps a draft on every binding: "Stopping sends the message. Shift-click the mic, or slide sideways on the phone, to keep a draft." It is updated in every catalog under i18n/locales/, with translator context in en.context.json, and the config help in config/sections_stt.py and configuration.md adds that Shift at release works for a binding without Shift. The settings registry (components/commandPalette/settingsRegistry.gen.ts and its JSON twin) and config-baseline.json are regenerated.

The hold bar armed its keep-as-draft cue only on a pointer move, and the move that entered the zone happened before the hold began. hooks/useTouchPushToTalk.ts now remembers the zone of the latest move and arms the cue when the hold timer fires.

Backwards compatibility

Compatible: copy and a label's timing change; no key, setting or behaviour changes.

Removes nothing: no key, route, function or setting is removed or renamed.

Tests

  • website/src/hooks/useTouchPushToTalk.draftZone.test.ts: a finger that enters the draft zone while arming and then holds still reads armed-draft once the hold begins, and the release keeps a draft.
  • The i18n catalog, style and parity tests cover the reworded hint in every locale.

Manual verification

Checked in a disposable pod (never the live gateway): Settings > Voice > Fine-tuning shows the new hint, and the existing pod gesture run with Chromium's fake microphone passed 16 of 16. No physical phone was reachable; the touch path is covered by synthetic PointerEvents.

Screenshots / video

The reworded hint in Settings > Voice > Fine-tuning:

hint: Stopping sends the message. Shift-click the mic, or slide sideways on the phone, to keep a draft.

The phone hold bar after sliding into the keep-as-draft zone while the press is still arming, then holding still past the hold threshold. The bar and the strip above it both read "Release to keep as draft", and the release kept the transcript unsent. Captured in the pod at a 390 px touch viewport with synthetic PointerEvents; before the hold began the bar read "Hold to talk".

hold bar reading Release to keep as draft after the hold begins with the finger already in the zone

Related Issues

Fixes #22438

Pattern harvest

Not generalizable: a single hint named a modifier that one binding family reserves; the copy now names a control that works on every binding.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners October 20, 2026 07:07
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of ef8b088d5b9cab7eb80eef8880b85d8145656bf8 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the hold bar's release path decides "keep draft" from the same zone state that now arms the cue at hold start. Otherwise the label and the behaviour could disagree again.

[DESIGN-REVIEWED] ef8b088

Description read

[DESCRIPTION-READ] 5e8f74ce74eb86e478584b82c5a609d9b953de754404d661f64adc6e4bab2491

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

UX-level review of ef8b088d5b9cab7eb80eef8880b85d8145656bf8 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No first-time reader has checked the reworded keep-draft hint or the hold bar's draft cue; both screenshots show them, so only this lane's cap applies.

Watch

  • The way to keep a draft is still only in a tooltip. The new text "Stopping sends the message. Shift-click the mic, or slide sideways on the phone, to keep a draft." appears only on hover over the ⓘ (attachment-01). This toggle sends messages on its own, so the way out is decision-critical: anyone who never hovers turns it on without learning how to keep a draft. This happens once per user and the cost is a message sent by mistake, so it is medium severity. Smallest fix: show the hint as always-visible helper text under the toggle, like "Tidy up transcripts with AI" a few rows above, instead of hiding it behind ⓘ.

[UX-REVIEWED] ef8b088

Description read

[DESCRIPTION-READ] 9e01133ee44159440db192a58285995b2642d2e09e888085d270788737a053c7

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of ef8b088d5b9cab7eb80eef8880b85d8145656bf8 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: make the "Send when I stop recording" hints name a way to keep a draft that actually works on every push-to-talk binding, and make the phone hold bar show the draft label when a release will keep a draft. FIX (#22438).

  1. The Settings hint, in every locale, now says "Shift-click the mic" instead of "Hold Shift". On the default ⌥⇧Space binding, shiftKeepsDraft (website/src/lib/pushToTalk.ts:168) ignores Shift, while toggleVoice (useComposerVoice.ts:867) keeps a draft on Shift-click for any binding — justified
  2. The config help and the configuration.md row now name Shift-click first, and keep Shift at release only for bindings that don't use Shift; regenerated registry and baseline files follow — justified
  3. The phone hold bar now shows "Release to keep as draft" when a finger is already in the draft zone at the moment the press becomes a hold, without waiting for another move (base onPointerMove only arms the cue in holding) — justified

[FIRST-PRINCIPLES-REVIEWED] ef8b088

Description read

[DESCRIPTION-READ] 45fdea9729b1329a8d7b45113a7d894619363a22d7f0eead3d6d38626c006df7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed ef8b088d5b9cab7eb80eef8880b85d8145656bf8 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ef8b088

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed ef8b088d5b9cab7eb80eef8880b85d8145656bf8 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ef8b088

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): the hold-bar label change appeared in no screenshot, and no blind reader has read the hint

evidence added. The description now has a 390 px touch frame from the pod of the exact case this PR changes: the finger slides into the keep-as-draft zone while the press is still arming, then holds still past the hold threshold. The bar and the strip above it both read "Release to keep as draft" (before the hold began the bar read "Hold to talk"), and the release kept the transcript unsent. A first-time reader is not something this PR can supply.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): check that Shift-clicking the mic keeps a draft on the Windows and Linux default binding

covered. Shift-click is read from the mic button's own click event in useComposerVoice.toggleVoice, not from the push-to-talk binding, so the binding cannot change it. The existing test in useComposerVoiceSubmitOnRelease.test.tsx ("a mic click finishes, a Shift-click keeps a draft, and a bare call never sends") pins it, and the pod run on the parent PR checked Shift-click keeping a draft in a real browser.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): can a keyboard-only push-to-talk user still see a way to keep a draft?

yes. Shift-click on the mic is available to a keyboard user too, and it works on every binding, which is why the Settings hint now names it. The keyboard-only Shift-at-release path is described in the setting's config help (sections_stt.py, configuration.md), with the condition that the binding must not use Shift; naming it in the one-line hint would reintroduce the instruction that fails on the default Windows and Linux binding.

@Pearcekieser
Pearcekieser force-pushed the fix/dictation-release-draft-hint branch from bda8884 to f87befc Compare October 20, 2026 07:46
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Pushed f87befc, an identical-tree, timestamp-only amend of bda8884, so the UX Review lane reads the updated description and its new hold-bar frame. No code change.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to ship. Approval waits for PR Readiness on this head.

Head reviewed: f87befc. No must-fix or should-fix findings.

What I checked:

  • Hint copy: "Shift-click the mic" keeps a draft on every binding. The mic click handler reads Shift from its own click event, and useComposerVoiceSubmitOnRelease.test.tsx pins that case. The new copy also matches the existing mic tooltip strings.
  • Config help, configuration.md, the settings registry pair and config-baseline.json carry the same text. All 13 locale catalogs and en.context.json change only submit_on_release_desc.
  • useTouchPushToTalk.ts: the release decision still reads the release position, so behaviour does not change. Only the cue timing changes. lastZoneRef resets on each press, and a cancel or null zone arms nothing. When the draft zone is off, holdZone never returns draft.
  • The new test goes red if the setArmedDraft line in the hold timer is removed. It also checks that the cue stays off while the press is still arming.
  • Category fix matches the diff. The linked issue is T1. No file is on a security-sensitive path. No other open PR touches these files.

Remaining before merge: CI and the AI review lanes are still running on this head. The UX lane verdict on the previous head was BLOCK for missing hold-bar evidence. The description now has that frame, and the lane must re-read it on this head. I will approve when PR Readiness reports passed.

@Pearcekieser

Pearcekieser commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

thought (non-blocking): the Settings hint offers keyboard push-to-talk users only a mouse action

keeping the one-line hint as is. "Shift as you release" works only for a binding that does not use Shift, and the Windows and Linux default ⌥⇧Space does, so naming it in the one-line hint brings back the instruction this PR exists to remove: on those systems it does nothing and the message sends. Shift-click works for every binding, so it is the one control the hint can name for everyone. The keyboard path, with its condition, is in the setting's config help in sections_stt.py and configuration.md. A hint that names the keyboard path only when the saved binding allows it would need the binding read into the Settings row, which is a separate change.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Backend Tests (3.12, 3) is red on main, not on this diff. test_chat_follow_default_slot_kinds.py::TestSlotCreatorRegistry fails the same two cases on a clean origin/main checkout (754421e), after #22079 moved _import_thread_to_slot into slack/interactions_options.py. It is tracked in #22432 and fixed by #22433. I'll rebase onto main once that lands.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@Pearcekieser
Pearcekieser force-pushed the fix/dictation-release-draft-hint branch from f87befc to a11412c Compare October 20, 2026 08:41
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased on main after #22433 fixed the red TestSlotCreatorRegistry; no behaviour change. New head a11412c.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): does the timer-armed draft cue match the release if draftZoneRef flips between the last move and the hold timer?

the release always decides correctly, and the cue can only be stale in a case that needs a settings change during one press. onPointerUp in useTouchPushToTalk.ts does not read lastZoneRef or armedDraft. It recomputes holdZone(dx, dy, !!draftZoneRef.current) from the release position, so a flip is honoured at release. The timer callback reuses lastZoneRef, which was computed under the value at the last move. draftZone is stt.submit_on_release, so a flip inside the hold window (holdMs, a few hundred ms) means the setting changed in another tab while the finger was down and still. In that case the bar shows the old cue until the next pointermove, which recomputes it. Not changing this: recomputing in the timer would need the last pointer coordinates stored as well, to cover a case no one can reach on purpose.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

thought (non-blocking): the keep-draft hint gives push-to-talk key users no keyboard way out

keeping the hint as is. This is the finding answered on f87befc under span 36ec5f740e5b. The head changed only by a rebase onto main, with no change to the hint. "Shift as you release" works only on a binding that does not use Shift. The Windows and Linux default ⌥⇧Space uses Shift, so putting that instruction in the one-line hint brings back the advice this PR removes: on those systems it does nothing and the message sends. Shift-click works on every binding, so it is the one control the hint can name for all users. The keyboard path and its condition are in the setting's config help (sections_stt.py) and configuration.md.

…binding

The submit-on-release Settings hint said "Hold Shift" to keep a draft. Shift is
ignored for a binding that already uses it, which includes the Windows and Linux
default, so that instruction did nothing there. The hint now names Shift-click
on the mic, which works everywhere, in all 12 catalogs and the config help.

On the phone's hold bar, a finger that slid into the keep-as-draft zone while
the press was still arming, then held still, kept reading "Release to send".
The hold timer now arms the cue from the last zone seen, so the label matches
what the release will do.
@Pearcekieser
Pearcekieser force-pushed the fix/dictation-release-draft-hint branch from a11412c to ef8b088 Compare October 20, 2026 13:01
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Same-tree retrigger as ef8b088, no code change. The reds on a11412c were the known flakes: Frontend Tests shard 3 on CrewDynamicDashboard.remint (#22458) and Backend shard 2 on the facade_mirror_guards 120 s timeout (#22004). Frontend Coverage Merge and Coverage Gate failed only because the frontend shard did.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 20, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold at ef8b088d5b9cab7eb80eef8880b85d8145656bf8.

The code looks sound. The hold timer now arms the draft cue from the zone of the latest move (useTouchPushToTalk.ts#L426-L444), the release still recomputes the zone from its own position (#L465), and the new test covers the arming-then-hold case. The copy changes are consistent across config help, docs, the registry pair and all locale catalogs. Checks on this head are green.

Blocker: the UX Review on this head raises a new CONCERNS item with no reply: the keep-draft instruction is only reachable by hovering the info icon, so someone can turn on auto-send without ever seeing how to keep a draft. The earlier UX dispositions answer different items (the hold-bar screenshot and the keyboard-only path). To clear: post a target=ux disposition for this item at ef8b088d5b, either moving the hint to always-visible helper text or explaining why the tooltip is enough.

— crew-pr-reviewer (r115)

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): the way to keep a draft is still only in a tooltip

not changing this. The ⓘ text in Settings is where the setting is explained, and like every other setting hint it is a tooltip. It is not the only place the control is named. While a recording runs with the setting on, the panel above the waveform shows "Esc to cancel, Shift-click keeps a draft, click the mic to send" as visible text in both transports (esc_to_cancel_click_mic_to_send). That is the moment the choice is made, and the parent PR's settings screenshot shows the panel. On the phone hold bar, the label changes to "Release to keep as draft" once the finger is in the draft zone. Moving the hint out of the tooltip would change how the Settings page presents every setting, which is outside this fix.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): does the release decide "keep draft" from the same zone state that arms the cue at hold start?

both use the same function, holdZone(dx, dy, draftZone) in useTouchPushToTalk.ts. The timer that arms the cue at hold start reads lastZoneRef, which the last pointermove set from holdZone. onPointerUp calls holdZone again on the release coordinates and keeps a draft when it returns 'draft' during a hold. A finger that held still since the last move gives the same coordinates, so the label and the release agree. A finger that moved gets a fresh pointermove first, which updates the label. The release reads its own position on purpose, because a fast flick can fold the last move into the pointerup.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving head ef8b088.

This head is a pure rebase of the head I reviewed earlier. The range-diff is identical, and I found no must-fix or should-fix items.

Gates checked on this head:

  • Label readiness: passed is set.
  • PR Readiness is green, and no required check is red or pending.
  • The AI review lanes show no BLOCK verdict on this head.
  • The linked issue is tier T1.
  • No other change request is open.
  • No file is on the security path denylist.

Auto-merge is set to squash.

@bolichen97
bolichen97 merged commit a5c1e85 into kirodotdev:main Oct 20, 2026
100 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voice: the send-on-stop hint names a draft control that does nothing on the default binding

3 participants