Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review: disable undownloaded Piper voices in VoicePicker
[._.]/ Adam Eivy086a8365b6d7
diff --git a/client/src/components/voice/VoicePicker.jsx b/client/src/components/voice/VoicePicker.jsxindex 2dcf8abba6..b479c6b6b7 100644--- a/client/src/components/voice/VoicePicker.jsx+++ b/client/src/components/voice/VoicePicker.jsx@@ -143,9 +143,20 @@ export default function VoicePicker({) : null}{engineKeys.map((engine) => (<optgroup key={engine} label={engine.charAt(0).toUpperCase() + engine.slice(1)}>- {byEngine[engine].map((v) => (- <option key={v.id} value={v.id}>{formatVoiceLabel(v)}</option>- ))}+ {byEngine[engine].map((v) => {+ // Piper voices with `downloaded: false` are catalog stubs —+ // selecting one would persist a `piper:<name>` voiceId that+ // `synthesizePiper` rejects at preview/render time. Keep them+ // visible (so the user sees what the catalog offers) but+ // unbindable from this picker — the user downloads them via+ // settings → Voice (`fetchPiperVoice`) before binding here.+ const undownloaded = v.engine === 'piper' && v.downloaded === false;+ return (+ <option key={v.id} value={v.id} disabled={undownloaded}>+ {formatVoiceLabel(v)}+ </option>+ );+ })}</optgroup>))}</select>diff --git a/client/src/components/voice/VoicePicker.test.jsx b/client/src/components/voice/VoicePicker.test.jsxindex 9d3c30170a..564ce580c5 100644--- a/client/src/components/voice/VoicePicker.test.jsx+++ b/client/src/components/voice/VoicePicker.test.jsx@@ -63,6 +63,24 @@ describe('VoicePicker', () => {expect(onChange).toHaveBeenCalledWith(null);});+ it('renders undownloaded Piper voices as disabled options (visible but unbindable)', async () => {+ listPipelineTtsVoices.mockResolvedValue({+ voices: [+ ...SAMPLE_VOICES,+ { id: 'piper:glados', engine: 'piper', voice: 'glados', name: 'glados', downloaded: false },+ ],+ });+ render(<VoicePicker value={null} onChange={() => {}} />);+ await waitFor(() => {+ expect(document.querySelector('option[value="piper:glados"]')).toBeInTheDocument();+ });+ const stub = document.querySelector('option[value="piper:glados"]');+ expect(stub.disabled).toBe(true);+ // Downloaded Piper voices stay enabled.+ const downloaded = document.querySelector('option[value="piper:lessac-medium"]');+ expect(downloaded.disabled).toBe(false);+ });+it('preserves an unavailable saved voiceId so the user sees what was bound', async () => {listPipelineTtsVoices.mockResolvedValue({ voices: SAMPLE_VOICES });render(<VoicePicker value="kokoro:retired-voice" onChange={() => {}} />);