feat(voice): in-place STT model download + retry in Voice Dictation panel#771
feat(voice): in-place STT model download + retry in Voice Dictation panel#771jwalin-shah wants to merge 1 commit into
Conversation
…anel When the local STT asset is missing, the Voice Dictation settings panel previously displayed a dead-end amber warning with an "Open Local AI Model" button that redirected users out of the flow. Issue tinyhumansai#632 called this out: setup should be resolvable in place, with progress and a working retry path. This change replaces that redirect with an inline setup block that: - Shows a "Download STT model" CTA that calls openhuman.local_ai_download_asset({ capability: "stt" }) directly. - Switches to a live progress card (percent, MB/total, speed, ETA) driven by the existing openhuman.local_ai_downloads_progress poll. - Renders a clear, actionable error state with a "Retry download" button if the trigger RPC rejects or core reports a failed/degraded download (including the stt.warning string from core). - Keeps "Advanced (Local AI)" as a soft secondary link rather than a forced handoff, so power users can still open the full Local Model panel if they want to. Panel readiness still derives from the same source of truth (assets.stt.state === "ready" && voiceStatus.stt_available), so as soon as the core finishes the download the form enables itself on the next 2s poll — no manual refresh, no redirect. All changes are frontend-only. No new Rust commands, no new plugins, no schema changes. Tests cover the idle CTA, progress transition, and failure -> retry path via the existing Vitest harness. Addresses tinyhumansai#632
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 39 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Withdrawn for human review + second-opinion pass. Will reopen once reviewed. |
Summary
Replace the "Open Local AI Model" redirect in the Voice Dictation settings panel with an inline, in-place STT model setup: download CTA → live progress → actionable error with retry. Frontend-only, surgical, reuses existing core RPCs (
openhuman.local_ai_download_assetandopenhuman.local_ai_downloads_progress).Problem
Issue #632: when the local STT model is missing, the Voice Dictation panel shows an amber warning and a single Open Local AI Model button. That redirect drops the user out of the Voice Intelligence flow into a much larger debug/admin panel. There is no in-panel progress, no error copy, no recovery path if a download fails, and the user has to manually navigate back to verify Voice is ready.
Solution
In
app/src/components/settings/panels/VoicePanel.tsxthe disabled-state block is replaced with a newSttSetupBlockthat renders one of three states from the same data sources the panel already polls (openhuman.local_ai_assets_status+openhuman.local_ai_downloads_progress):installingphase.stt.warning/stt.statefrom core) with a Retry download button that calls the same trigger RPC again — downloads resume because the core already supports resume.Panel readiness still derives from the same source of truth (
assets.stt.state === "ready" && voiceStatus.stt_available), so as soon as core finishes the download the voice form enables itself on the next 2s poll. No manual refresh, no redirect.Three new Vitest cases added alongside the existing three:
openhumanLocalAiDownloadAsset('stt')and transitions to the progress card when core starts reporting an active download.Out of scope (intentionally deferred)
Submission Checklist
yarn compile(tsc --noEmit) cleanyarn lintcleanyarn test:unit— 466 passed, 2 skipped (5 inVoicePanel.test.tsx, all green)[voice-intel]/[VoicePanel:stt], no secrets/PII.appbundle with a missing STT model — not performed in this subagent run; please verify before merging.Addresses #632
cc @Al629176 — auto-drafted by a subagent, please review carefully.