Repository navigation
PDChat: the voice picker shows the running mode, a Mic off badge, and an optional Alt shortcut that cycles the modes - #363
Merged
Conversation
… an optional Alt shortcut that cycles the modes MS-28499: the picker set each option's selected attribute, which the browser stops following once the user has chosen, so after Mic off the ear button resumed listening while the picker still read Mic off. It now sets the select's value from the voice state. MS-28498: while the microphone is off the voice button keeps its mode icon and carries a badge, PDChatIcons.MicOff (fas fa-microphone-slash by default; empty shows none). MS-28518: new VoiceModeShortcutKey parameter (a KeyboardEvent.code, null by default). Alt with that key, while focus is in the chat, cycles Mic off, HAL, Dictate and the wake phrase mode; the picker's tooltip names it. The demo sets KeyM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 47 |
| Duplication | 1 |
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (f7e330b) 19379 19248 99.32% Head commit (8965969) 19397 (+18) 19266 (+18) 99.32% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#363) 18 18 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small changes to PDChat's voice controls, delivered together because they share one surface (Magic Suite MS-28499, MS-28498 and MS-28518).
What changes
selectedattribute. Once the user has picked an option, the browser stops moving the selection when that attribute changes, so after Mic off the ear button resumed listening while the picker still read "Mic off". The select's value is now set from the voice state: Mic off while the microphone is off, otherwise the running mode.PDChatIcons.MicOff,fas fa-microphone-slashby default. Set it to an empty string and no badge is shown.VoiceModeShortcutKeyparameter, aKeyboardEvent.codesuch as"KeyM",nullby default, so existing hosts get no new keyboard behaviour. With it set, Alt and that key, while focus is in the chat, cycles Mic off, HAL, Dictate and the wake phrase mode (when offered). Ctrl with Alt (AltGr) is ignored, read aloud is untouched, nothing happens while the chat is minimised, and the picker's tooltip names the shortcut. The demo setsKeyM.The PDChat documentation page covers the new parameter, the badge and the shortcut.
No change to the toolbar's width: the badge sits inside the existing button, and in a corner-docked chat the picker is already reduced to its arrow.
Tests
PanoramicData.Blazor.Test/Components/PDChatTests.VoicePickerAndShortcut.cs: 26 component tests. All 284 PDChat tests pass.tests/pdchat-voice-controls.spec.ts: 3 Playwright tests. They cover the picker after Mic off and the ear button, and after a reload. They cover Alt+M inside the chat and in a text box outside it. They also check the badge appears only while the mic is off. All pass in Edge.selectedmarkup fails the first Playwright test at the exact step (expectedHal, receivedMicOff).Magic Suite will set
VoiceModeShortcutKey="KeyM"on its PDChat when it takes this release on 4.8.🤖 Generated with Claude Code