diff --git a/src/chatbots/PiVoiceMenu.ts b/src/chatbots/PiVoiceMenu.ts index 956ebda86c..7bbe7ac08a 100644 --- a/src/chatbots/PiVoiceMenu.ts +++ b/src/chatbots/PiVoiceMenu.ts @@ -1,5 +1,7 @@ import { Observation } from "../dom/Observation"; import EventBus from "../events/EventBus"; +import getMessage from "../i18n"; +import { openSettings } from "../popup/popupopener"; import { audioProviders } from "../tts/SpeechModel"; import { GridVoiceSelector } from "../tts/GridVoiceSelector"; import { PI_MENU_CAP } from "../tts/VoiceCuration"; @@ -16,8 +18,7 @@ export class PiVoiceMenu extends GridVoiceSelector { this.addIdVoiceMenu(element); this.restyleVoiceMenuControls(element); - this.addVoiceMenuExpansionListener(); - this.addVoiceButtonAdditionListener(element); + this.observeForMoreVoicesDoor(); } getId(): string { @@ -103,64 +104,103 @@ export class PiVoiceMenu extends GridVoiceSelector { return Observation.foundAndDecorated(obs); } - addVoiceMenuExpansionListener(): Observation { + /** + * Keep a "More voices" door present in Pi's live in-chat voice menu (#491, + * door-first). Pi redesigned the menu into a popover it LAZILY BUILDS on + * expand and tears down on collapse (verified live 2026-07-04, Layer-4 CDP): + * collapsed there is only a pill; expanded, Pi swaps in a `rounded-xl` card + * holding the voice list (`div.flex.flex-col.gap-1` of `div.cursor-pointer` + * rows — no longer `