Skip to content

feat(ui): dictate into a composer that already has text, and in the dashboard - #477

Merged
iamnbutler merged 2 commits into
mainfrom
dictation-2
Oct 16, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
dictation-2

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Part of #38. Follows #473.

  • Dashboard: the new-channel composer enables dictation (mic instead of mic={false}).
  • Composer with text: the submit button stays the mic only while there's nothing to send. Once there's text or an attachment, or an agent is running, a mic button appears in the composer's options toolbar, next to the existing "Show tools" button. It uses the same Toolbar.Button/Button/IconMicMicro/Tooltip pattern as that button. While you dictate, the existing waveform takes that slot and the submit button becomes Stop, as before.
  • Insert logic: dictation goes in at the cursor and replaces any selection, like macOS dictation. It adds a space before the dictated words when the text before them isn't whitespace, and a space after them when a word follows. Only the range captured when recording started is rewritten, so text around it is untouched.

Product calls: no new component and no shortcut. When the composer is empty the submit button is still the only mic, so there are never two mic buttons.

Smoke-tested with bun ace serve --loopback, an isolated ACE_HOME/ACE_CONFIG_HOME, and the built app in headless Playwright WebKit. The Mac screen was locked, so I couldn't drive the desktop WKWebView.

  • In WebKit, webkitSpeechRecognition exists, but headless it never starts or errors. Clicking the dashboard's mic does switch the composer into recording (Stop button).
  • A scripted stand-in recognizer, used only by the smoke script, fed transcripts into the dashboard composer:
    • "Fix the" + dictation gives "Fix the login bug", with interim results updating in place.
    • A late result after Stop is ignored.
    • Dictating with the cursor after "Fix" gives "Fix quickly the login bug".
    • Selecting "bug" and dictating gives "... login issue".
    • The empty composer still uses the submit mic.

Still open on #38: end-to-end check in the desktop app (first-run mic/speech prompts, glow during real recognition).

Built in Ace

Built with Claude Code outside Ace, in a session already running there; no Ace gap involved.

…ashboard

The options toolbar carries the mic whenever the submit button is Send, and dictation
replaces the selection with spaces kept on either side. The dashboard's new-channel
composer enables dictation.

Why: packages/ui/src/components/composer/chat-composer.tsx#function useComposer | dictation writes only between the range captured at record time, so existing text around it is never rewritten
@iamnbutler iamnbutler mentioned this pull request Oct 16, 2026
3 of 4 tasks
@iamnbutler
iamnbutler merged commit 2c81149 into main Oct 16, 2026
1 check passed
@iamnbutler iamnbutler mentioned this pull request Oct 17, 2026
2 of 7 tasks
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.

1 participant