Skip to content

feat(voice): always-on Settings toggle + debug panel + i18n (5/8 of #3307)#3344

Merged
M3gA-Mind merged 8 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/voice-split-5-alwayson-ui
Jun 4, 2026
Merged

feat(voice): always-on Settings toggle + debug panel + i18n (5/8 of #3307)#3344
M3gA-Mind merged 8 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/voice-split-5-alwayson-ui

Conversation

@M3gA-Mind
Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind commented Jun 4, 2026

Summary

Slice 5/8 of #3307always-on frontend: Settings toggle, debug panel, i18n.

  • Surfaces the always-on toggle in the reachable Voice panel; adds VoiceDebugPanel, the voice tauri-command wrapper, and the RPC client method.
  • Adds all voice.debug.* and notch.* i18n keys across the 14 locales. (Notch keys land here as inert strings to keep locale parity valid; the notch UI that consumes them ships in slice 6.)

Files (19 — 14 are one-line locale additions)

components/settings/panels/{VoicePanel,VoiceDebugPanel}.tsx (+ test), utils/tauriCommands/voice.ts, services/coreRpcClient.ts, lib/i18n/*.ts (14).

Part of the #3307 split. PR 3307 (72 files) is being replaced by 7 small, dependency-ordered PRs (merge-train). Branches are stacked; each PR's true slice is shown once its predecessors merge and it is rebased onto main.
Stacked on slice 4 (#3343).

Summary by CodeRabbit

  • New Features

    • Added "Always-on listening" toggle in voice settings, enabling continuous microphone listening without a push-to-talk hotkey, with optimistic UI updates and automatic reversion on server errors.
  • Internationalization

    • Added voice UI and always-on listening translations across 16 languages.
  • Tests

    • Added test coverage for the always-on listening toggle with error handling validation.

M3gA-Mind added 5 commits June 4, 2026 14:09
Run enigo keyboard/mouse on the app main thread via a native-registry
executor; enigo's macOS TSMGetInputSourceProperty traps off-thread and
crashes the CEF host. Adds mouse/keyboard tools, the main_thread bridge,
and downscaled screenshots so the model can see them.

Slice 1/7 of tinyhumansai#3307 (was the 'computer control' area).
… loop

Adds the Rust-internal automate engine (poll-until-stable settle, playback
verification), the AXEnabled diagnostics field + settle primitives on
ax_interact, the Music fast-path, and the Windows UIA superset. Exposes
launch_platform as pub(crate) so the automate loop can launch apps mid-flow.

Slice 2/7 of tinyhumansai#3307 (accessibility/automate engine).
…trator

Registers the AutomateTool (multi-step UI flows in one call) and the
ax_interact denylist/opt-in plumbing; adds the catalog toggle, tool
definition, and orchestrator prompt guidance (automate + screenshot/
mouse/keyboard fallback for Electron apps with empty AX trees).

Slice 3/7 of tinyhumansai#3307 (tool wiring + prompts).
Continuous cpal mic → VAD segmenter → STT → agent with no hotkey, opt-in
via voice_server.always_on_enabled, 'Hey Tiny' wake word (English-forced
STT + fuzzy match), and screen-lock privacy pause. Adds the config schema,
live-apply on the settings RPC, start_if_enabled wiring, and a JSON-RPC
roundtrip E2E.

Slice 4/7 of tinyhumansai#3307 (always-on core).
Surfaces the always-on listening toggle in the reachable Voice panel,
adds the VoiceDebugPanel, the voice tauri-command wrapper, and the RPC
client method. Adds all voice.debug.* and notch.* i18n keys across the
14 locales (notch keys land here as inert strings; the notch UI that
consumes them ships in slice 6).

Slice 5/7 of tinyhumansai#3307 (always-on frontend).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a2e3aadd-a817-414f-8df7-efd0b53c2ca5

📥 Commits

Reviewing files that changed from the base of the PR and between 24b256c and d122b82.

📒 Files selected for processing (2)
  • app/src/components/settings/panels/__tests__/VoiceDebugPanel.test.tsx
  • app/src/components/settings/panels/__tests__/VoicePanel.test.tsx

📝 Walkthrough

Walkthrough

The PR adds an always-on listening mode to the voice settings infrastructure. It extends the VoiceServerSettings data model with an always_on_enabled boolean field, enables the RPC update function to persist this setting, and provides dual UI toggles in both VoicePanel and VoiceDebugPanel with optimistic updates and error recovery. Comprehensive tests verify toggle behavior and RPC invocation. Translations for the feature and notch status states are added across 14 languages.

Changes

Always-on listening feature

Layer / File(s) Summary
Voice settings contract extension
app/src/utils/tauriCommands/voice.ts
VoiceServerSettings interface adds always_on_enabled: boolean field; openhumanUpdateVoiceServerSettings RPC parameter type accepts optional always_on_enabled to send the setting to the backend.
VoicePanel always-on toggle with optimistic updates
app/src/components/settings/panels/VoicePanel.tsx, app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
VoicePanel imports openhumanUpdateVoiceServerSettings and adds a persistent always-on toggle that optimistically updates local state, calls the RPC, and reverts on API failure. Test harness mocks the update function and verifies toggle behavior calls the correct RPC with always_on_enabled and reverts on rejection.
VoiceDebugPanel always-on switch with save
app/src/components/settings/panels/VoiceDebugPanel.tsx, app/src/components/settings/panels/__tests__/VoiceDebugPanel.test.tsx
VoiceDebugPanel adds an advanced-settings switch for "Always-on listening (Phase 2)" bound to settings.always_on_enabled via updateSetting, and includes the field in the saveSettings payload. New test suite verifies toggle renders, updates state, and invokes the RPC with correct payload.
Multilingual translations for always-on and notch states
app/src/lib/i18n/ar.ts, app/src/lib/i18n/bn.ts, app/src/lib/i18n/de.ts, app/src/lib/i18n/en.ts, app/src/lib/i18n/es.ts, app/src/lib/i18n/fr.ts, app/src/lib/i18n/hi.ts, app/src/lib/i18n/id.ts, app/src/lib/i18n/it.ts, app/src/lib/i18n/ko.ts, app/src/lib/i18n/pl.ts, app/src/lib/i18n/pt.ts, app/src/lib/i18n/ru.ts, app/src/lib/i18n/zh-CN.ts
All 14 language files receive voice.debug.alwaysOn and voice.debug.alwaysOnDesc entries describing always-on listening behavior without a hotkey, plus complete notch.* status translations for seven voice pipeline states (ready, processing, listening, thinking, speaking, transcribing, executing).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • tinyhumansai/openhuman#3343: Complements this PR by extending the backend config and RPC to persist always_on_enabled and start the always-on voice engine when enabled.

Suggested reviewers

  • graycyrus
  • sanil-23

Poem

🐰 A toggle here, a switch right there,
Phase two listens without a care!
Fourteen tongues now speak the way,
Notch states shine through every day,
Always-on hops from start to play! 🎧

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding an always-on settings toggle, debug panel, and i18n support for voice features, and correctly identifies this as part 5/8 of a larger effort.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@M3gA-Mind
Copy link
Copy Markdown
Contributor Author

📚 Stacked PR series (8 total) — split from #3307

Merge bottom-up; each builds on the one above it:

  1. feat(computer): main-thread synthetic-input executor + CEF crash fix (1/8 of #3307) #3340 — main-thread synthetic-input executor + CEF crash fix
  2. feat(accessibility): AX/UIA perception + automate engine (2/8 of #3307) #3341 — AX/UIA perception + automate engine
  3. feat(agent): wire automate/ax_interact computer tools (3/8 of #3307) #3342 — wire automate/ax_interact computer tools
  4. feat(voice): Phase 2 always-on listening engine + RPC (4/8 of #3307) #3343 — Phase 2 always-on listening engine + RPC
  5. feat(voice): always-on Settings toggle + debug panel + i18n (5/8 of #3307) #3344 — always-on Settings toggle + debug panel + i18n
  6. feat(notch): always-visible macOS notch status pill (6/8 of #3307) #3345 — always-visible macOS notch status pill
  7. feat(voice): Phase 3 fast command router (7/8 of #3307) #3346 — Phase 3 fast command router
  8. feat(accessibility): vision-click fallback for Electron/partial-AX apps (8/8 of #3307) #3362 — vision-click fallback for Electron/partial-AX apps (Phase 1.5 complete)

Tracker: docs/voice-system-actions.md.

M3gA-Mind added 2 commits June 4, 2026 20:25
Take main's versions of already-merged slice-1..4 backend files.
It isn't on main and its 'mouse/keyboard run without an approval prompt'
text contradicts the tinyhumansai#3342 ApprovalGate fix. Keep tinyhumansai#3344 a clean UI slice;
a corrected desktop-control prompt can land as its own follow-up.
@M3gA-Mind M3gA-Mind marked this pull request as ready for review June 4, 2026 14:57
@M3gA-Mind M3gA-Mind requested a review from a team June 4, 2026 14:57
@M3gA-Mind
Copy link
Copy Markdown
Contributor Author

Independent review (beyond the CodeRabbit pass)

Reviewed the always-on UI slice — the Settings toggle (VoicePanel.tsx), the VoiceDebugPanel, the voice tauri-command wrapper, the coreRpcClient method, and the 14 i18n locale files.

Reviewed clean

  • i18n — the new strings render through useT() keys (voice.debug.alwaysOn / …Desc, and the notch.* keys shipped here for slice 6); all 14 locales carry the keys (parity gate green). The only literal in the file is the ElevenLabs voice-ID placeholder (a technical sentinel — allowed, and pre-existing).
  • Toggle wiring — the always-on switch calls the config_update_voice_server_settings RPC via coreRpcClient and reflects the snapshot; consistent with the existing voice-settings controls in the panel.
  • TestsVoicePanel.test.tsx (20) passes under the jsdom project config.
  • Note: I dropped a stale orchestrator/prompt.md "desktop control" section that had ridden along on this branch — it isn't on main and its "mouse/keyboard run without an approval prompt" wording contradicts the feat(agent): wire automate/ax_interact computer tools (3/8 of #3307) #3342 ApprovalGate fix. Tracked for a corrected follow-up rather than shipping wrong guidance here.

No correctness issues. LGTM once CI is green.

@coderabbitai coderabbitai Bot added feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team. labels Jun 4, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/components/settings/panels/__tests__/VoicePanel.test.tsx`:
- Around line 114-115: Add behavior tests to VoicePanel.test.tsx that exercise
the new always-on toggle flow: use the existing fixture (which now includes
always_on_enabled) to render the panel, simulate a user click on the DOM element
with test id "voice-always-on-toggle", and assert that the mocked
tauriCommands.openhumanUpdateVoiceServerSettings RPC is called with the expected
payload on toggle-on and toggle-off; also simulate an RPC failure to verify the
UI reverts (rollback) and that the toggle state returns to its prior value.
Update the mocked tauriCommands module in the test to include
openhumanUpdateVoiceServerSettings, and write two specs covering (1) successful
toggle persistence and RPC args, and (2) failed RPC causing a UI revert.

In `@app/src/components/settings/panels/VoicePanel.tsx`:
- Around line 508-521: The onClick handler for toggling
settings.always_on_enabled can run concurrent writes; capture the current value
into a local previous variable, bail if a pending toggle is in progress
(introduce an isTogglingAlwaysOn state flag), set isTogglingAlwaysOn=true,
optimistically update UI via setSettings, call
openhumanUpdateVoiceServerSettings with the new value, and on error rollback by
calling setSettings to restore previous and log the error; finally set
isTogglingAlwaysOn=false in a finally block and ensure the toggle control reads
isTogglingAlwaysOn to disable further clicks while the RPC is pending (refer to
the onClick handler, setSettings, settings.always_on_enabled,
openhumanUpdateVoiceServerSettings).

In `@app/src/lib/i18n/ko.ts`:
- Line 4775: The locale key 'notch.transcribing' currently maps to '변환 중…' but
should use the same STT terminology as the rest of the Korean locale; update the
value for notch.transcribing in app/src/lib/i18n/ko.ts from '변환 중…' to '전사 중…'
so it matches other voice/STT strings (search for the 'notch.transcribing' key
to locate and modify it).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9091cafc-efca-49c0-b037-62687c7947b7

📥 Commits

Reviewing files that changed from the base of the PR and between ce3ac82 and 24b256c.

📒 Files selected for processing (19)
  • app/src/components/settings/panels/VoiceDebugPanel.tsx
  • app/src/components/settings/panels/VoicePanel.tsx
  • app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/services/coreRpcClient.ts
  • app/src/utils/tauriCommands/voice.ts

Comment thread app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
Comment thread app/src/components/settings/panels/VoicePanel.tsx
Comment thread app/src/lib/i18n/ko.ts
…ove notch token

CodeRabbit tinyhumansai#3344 + coverage gate:
- VoicePanel: behavior tests for the always-on toggle — persists via
  openhumanUpdateVoiceServerSettings on click, optimistic flip, and revert
  on RPC failure.
- VoiceDebugPanel: new test covering its always-on toggle + save payload.
- Move the notch WKWebview core-token block out of this UI slice (it's
  notch/slice-6 concern) back to main; it lands with the notch PR.
@M3gA-Mind M3gA-Mind merged commit e40fec9 into tinyhumansai:main Jun 4, 2026
22 checks passed
M3gA-Mind added a commit to M3gA-Mind/openhuman that referenced this pull request Jun 4, 2026
…ch slice

Same stale 'runs without an approval prompt' section as tinyhumansai#3344 — not on main,
contradicts the tinyhumansai#3342 ApprovalGate fix. Tracked for a corrected follow-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior. working A PR that is being worked on by the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant