Skip to content

PDChat: the voice picker shows the running mode, a Mic off badge, and an optional Alt shortcut that cycles the modes - #363

Merged
rolandbanks merged 1 commit into
mainfrom
feature/pdchat-voice-mic-off-and-shortcut
Nov 11, 2026
Merged

rolandbanks merged 1 commit into
mainfrom
feature/pdchat-voice-mic-off-and-shortcut

Conversation

@rolandbanks

Copy link
Copy Markdown
Contributor

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

  • The voice picker shows what the microphone is doing (MS-28499). It used to mark its choice with each option's selected attribute. 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.
  • A Mic off badge on the voice button (MS-28498). While the microphone is off, the button keeps its mode icon (HAL eye, microphone or ear) and carries a small badge, styled like the existing paused badge. The icon is the new PDChatIcons.MicOff, fas fa-microphone-slash by default. Set it to an empty string and no badge is shown.
  • An optional shortcut that cycles the modes (MS-28518). New VoiceModeShortcutKey parameter, a KeyboardEvent.code such as "KeyM", null by 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 sets KeyM.

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.
  • Red-checked by breaking the change 13 ways, one at a time; every break failed at least one test. Restoring the original per-option selected markup fails the first Playwright test at the exact step (expected Hal, received MicOff).

Magic Suite will set VoiceModeShortcutKey="KeyM" on its PDChat when it takes this release on 4.8.

🤖 Generated with Claude Code

… 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>
@codacy-production

codacy-production Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 47 complexity · 1 duplication

Metric Results
Complexity 47
Duplication 1

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

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.

Run reviewer

TIP This summary will be updated as you push new changes.

@rolandbanks
rolandbanks merged commit c9050c2 into main Nov 11, 2026
8 checks passed
@rolandbanks
rolandbanks deleted the feature/pdchat-voice-mic-off-and-shortcut branch November 11, 2026 09:38
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