FN-8777: scope voice dictation to selected projects
Keep voice dictation sessions and requests isolated to the active dashboard project. - Append the encoded project ID to voice status, session, transcription, and cleanup requests. - Add real-route and composer coverage for scoped sessions and project changes. - Document the project boundary and add a patch changeset. Files changed: .changeset/fn-8777-voice-entry-e2e.md | 7 + docs/dashboard-guide.md | 5 + .../__tests__/voice-dictation-composers.test.tsx | 19 ++- .../app/hooks/__tests__/useVoiceDictation.test.tsx | 149 ++++++++++++++++++++- packages/dashboard/app/hooks/useVoiceDictation.ts | 44 ++++-- .../routes/__tests__/register-voice-routes.test.ts | 28 ++++ 6 files changed, 238 insertions(+), 14 deletions(-) Fusion-Task-Id: FN-8777 Fusion-Task-Lineage: 65390f79-3e29-4759-88c6-275b1c9f17d4 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -45,6 +45,11 @@ Settings form changes save automatically after a short pause. The footer no long
|
||||
|
||||
**Settings → Voice Input** is visible in both Basic and Advanced settings. Voice mode is off by default; enabling it is an explicit project preference. The same section shows the locally managed Parakeet v3 model and lets an operator download or remove it. Its upstream `sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8.tar.bz2` archive is about 465 MB and Fusion verifies its pinned SHA-256 before installing it; an unpinned or mismatched download is refused. Download progress is polled only while the model is downloading. The toggle becomes interactive only when the model is installed and Fusion can load the optional `sherpa-onnx-node` runtime. If Settings reports a missing module, a platform runtime load failure, or an incompatible runtime, reinstall a supported Fusion package for the current platform and reopen Settings. When sherpa-onnx is unavailable, Settings preserves any saved enabled preference but presents voice mode as backend-enforced disabled with an explanation. If status cannot be determined, the section fails closed: voice mode stays disabled and model actions are not shown until status is available.
|
||||
|
||||
<!-- FNXC:VoiceInputDocs 2026-08-04-07:37: Voice dictation is a project-scoped capture session, so the operator guide must describe the selected-project boundary and teardown guarantees verified by the client-to-route regression. -->
|
||||
When Voice Input is available, every microphone capture remains scoped to the dashboard's selected project: status, session creation, PCM transcription, finalization, and cleanup all use that project identity. The mic is shown only after that project's voice preference is enabled, the Parakeet model is installed, and the browser supports microphone and AudioWorklet capture. Unsupported browsers, denied microphone permission, unavailable runtime/model, and status failures show no microphone control.
|
||||
|
||||
Start dictation with the microphone beside any supported composer. Partial speech appears at the current caret or replaces the current selection; the final transcript replaces that preview without disturbing surrounding text or another composer's selection. Stop, a project change, closing a composer, and transcription errors immediately release browser capture resources and close the project's backend session. If transcription cannot finish, already-entered text remains intact and the mic returns to a safe idle/error state.
|
||||
|
||||
## Reset Settings
|
||||
|
||||
<!-- FNXC:SettingsResetDocs 2026-07-04-00:00: Reset Settings is a DESTRUCTIVE action. Document both choices, the scope-precision guarantee, and which sections are excluded so operators understand exactly what a reset does and does not touch before they click it.
|
||||
|
||||
Reference in New Issue
Block a user