Repository navigation
feat(planning): read aloud and dictation on the shared interview page - #9042
Conversation
Two per-person switches, off by default and kept as the readAloud and dictate prefs. Read aloud speaks the question, then the option labels the page shows, and stops on a second press, Escape or a question change. Dictate fills the answer or comment box at the caret and never sends; it asks for on-device recognition first where the browser offers it and discloses that the browser may send audio to its maker's speech service until on-device is confirmed. Both use the browser's own Web Speech API: no request of the page's own, CSP unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6df235841b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #9042 (head e73919e)No security findings. I read the full diff (9 files); I did not run the tests. Scope. The PR adds opt-in read-aloud (speech synthesis) and dictation (speech recognition) to the shared interview page. It has two persisted booleans, Checked and clean
No inline comments were posted. |
|
claude-review reviewed Code review of #9042 at Manifests: the diff touches no Acceptance criteria from #7694 (the issue-level criteria, then its Agent Brief checklist). Each is met by the change and covered by a test that could fail if it broke. The tests are author-claimed, not run by me:
Other checks:
Left unverified: real speech engines and microphones. The suites stub both, and the PR body says so. |
The answer and comment boxes are reused across questions, so a result arriving after a rail tap or the auto-advance countdown wrote the first question's words into the next question's draft. Dictation now ends when the current question changes, and a result from a session that is no longer current, or started on another question, is dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # plugins/planning/shared/web/app.js
Lane-Activity: pr-unblock/resolve-conflicts
…t/shared-read-aloud
Closes #7694
Summary
People on the shared interview page can now listen to a question and speak their answers. Each person gets two switches in their own card: Read questions aloud and Dictate answers and comments. Both are off until that person turns them on, and they are saved as the
readAloudanddictateprefs, the same waytoolbarandautoAdvanceare. Both features use the browser's built-in Web Speech API, so the page makes no network requests of its own for them and the CSP is unchanged.Live support check (MDN browser-compat-data, read 2026-10-22):
SpeechSynthesisis supported in Chrome 33, Edge 14, Firefox 49 and Safari 7, and on their mobile versions.SpeechRecognition:webkitSpeechRecognitionfrom 33. Edge, Opera and Chrome Android follow Chrome.webkitSpeechRecognitiononly.processLocally,available(),install()) is in Chrome 139+ and Edge on desktop only. Chrome Android and Safari do not have it.language-not-supported.service-not-allowed.language-not-supported. The page handles both.Fix
session.pyPREFSaccepts the booleansreadAloudanddictate, andstate.schema.jsondeclares both.localService) for the page's language, the page uses it.SpeechRecognitionandwebkitSpeechRecognitionare both missing; the switch is hidden there too.inputso the counter and drafts update. Nothing is ever sent.processLocallyexists, a press asks for on-device recognition first. If the device does not have the language, the page falls back at once to the browser's service.aria-describedby: "Your browser may send what you say to its maker's speech service to turn it into text."SpeechRecognition.available(). In a Chromium build without Chrome's handler for it, calling it ends the page's process. Headless Chromium did this here (Target crashed), and Electron fixed the same failure in electron#52955.install(), since that would be a language-pack download started by the page.role="switch"andaria-checked. The icon buttons have names and togglearia-pressed, and their label changes between "Read the question aloud" and "Stop reading aloud", and between "Dictate your answer" and "Stop dictating".Verification
python3 -m unittest discover -s plugins/planning/shared/tests -p 'test_*.py': 1165 tests OK (1 skipped), exit 0. The newtest_read_aloud_and_dictate_are_per_person_switches_off_until_setchecks that both prefs are absent by default, belong to each person, refuse non-booleans, clear on null, and validate against the state schema.node plugins/planning/shared/tests/ui_speech.js(new): 40 passed, 0 failed, exit 0. It stubsspeechSynthesisandSpeechRecognitionin the page and covers:/api/answer,/api/pickor/api/discussionPOST;available()is never called;Removing the negative margin made the no-shift check fail (366 → 374 px), so that check can fail.
node plugins/planning/shared/tests/align.js(full, run alone under the browser gate): PASS 542 / 542. That run includes the newspeech-choiceandspeech-answerviews, with both controls on at every tested size and theme.Left out: real speech engines and real microphones. The suites stub both, and headless Chromium has no voices and no microphone. A manual check in desktop Chrome, Safari and Android Chrome would cover what the stubs cannot.
Related
Sources read for this change:
processLocally,available(), error codes)available()kills the renderer where no binder is registered)🤖 Generated with Claude Code