Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Merge remote-tracking branch 'origin/epic/8096-voice-cut' into epic-8096-396-notch

Steven Enamakelb52d330e2fa1
diff --cc app/src/components/settings/panels/VoicePanel.tsx
index ffb2241d84,d18c8ab713..5201c94a57
--- a/app/src/components/settings/panels/VoicePanel.tsx
+++ b/app/src/components/settings/panels/VoicePanel.tsx
@@@ -1,9 -1,9 +1,8 @@@
import debug from 'debug';
-import { ArrowRight, AudioLines } from 'lucide-react';
-import { useCallback, useEffect, useRef, useState } from 'react';
+import { ArrowRight } from 'lucide-react';
+import { useCallback, useEffect, useState } from 'react';
-import { cn } from '../../../lib/cn';
import { useT } from '../../../lib/i18n/I18nContext';
- import PttSettingsPanel from '../../../pages/settings/voice/PttSettingsPanel';
import {
clearVoiceProviderKey,
loadVoiceSettings,
diff --cc app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
index 35aa17fc51,8c63f2911a..217d809107
--- a/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
@@@ -11,17 -11,22 +11,15 @@@ import
} from '../../../../services/api/voiceSettingsApi';
import { renderWithProviders } from '../../../../test/test-utils';
import {
- openhumanGetVoiceServerSettings,
-- openhumanUpdateVoiceServerSettings,
openhumanVoiceSetProviders,
openhumanVoiceStatus,
- syncNotchVisibility,
- type VoiceServerSettings,
type VoiceStatus,
} from '../../../../utils/tauriCommands';
import VoicePanel from '../VoicePanel';
vi.mock('../../../../utils/tauriCommands', () => ({
- openhumanGetVoiceServerSettings: vi.fn(),
-- openhumanUpdateVoiceServerSettings: vi.fn(),
openhumanVoiceSetProviders: vi.fn(),
openhumanVoiceStatus: vi.fn(),
- syncNotchVisibility: vi.fn(),
}));
vi.mock('../../../../services/api/voiceSettingsApi', async () => {
@@@ -127,16 -152,33 +125,15 @@@ describe('VoicePanel', () =>
vi.useRealTimers();
});
- it('persists always-on listening and syncs the notch indicator', async () => {
+ it('does not render ambient listening controls or send removed settings', async () => {
renderWithProviders(<VoicePanel />);
- const toggle = await screen.findByTestId('voice-always-on-toggle');
- expect(toggle).toHaveAttribute('aria-checked', 'false');
-
- fireEvent.click(toggle);
-
- await waitFor(() =>
- expect(openhumanUpdateVoiceServerSettings).toHaveBeenCalledWith({ always_on_enabled: true })
+ expect(screen.queryByTestId('voice-always-on-card')).not.toBeInTheDocument();
+ await waitFor(() => expect(openhumanVoiceStatus).toHaveBeenCalled());
+ const removedSettingParam = ['always', 'on', 'enabled'].join('_');
+ expect(openhumanVoiceSetProviders).not.toHaveBeenCalledWith(
+ expect.objectContaining({ [removedSettingParam]: expect.anything() })
);
- expect(openhumanUpdateVoiceServerSettings).not.toHaveBeenCalled();
- await waitFor(() => expect(syncNotchVisibility).toHaveBeenCalledWith(true));
- expect(toggle).toHaveAttribute('aria-checked', 'true');
- });
-
- it('restores the always-on toggle when persistence fails', async () => {
- vi.mocked(openhumanUpdateVoiceServerSettings).mockRejectedValueOnce(
- new Error('settings unavailable')
- );
- renderWithProviders(<VoicePanel />);
-
- const toggle = await screen.findByTestId('voice-always-on-toggle');
- fireEvent.click(toggle);
-
- await screen.findByText('settings unavailable');
- expect(toggle).toHaveAttribute('aria-checked', 'false');
- expect(syncNotchVisibility).not.toHaveBeenCalled();
});
// ─── Voice Routing Section ──────────────────────────────────────────────
diff --cc app/src/main.tsx
index 47894b3bea,0c33325c5d..aeb4312776
--- a/app/src/main.tsx
+++ b/app/src/main.tsx
@@@ -9,7 -9,7 +9,6 @@@ import './index.css'
import { installAutoHideScrollbars } from './lib/autoHideScrollbars';
import { getCoreStateSnapshot } from './lib/coreState/store';
import MascotWindowApp from './mascot/MascotWindowApp';
- import OverlayApp from './overlay/OverlayApp';
-import NotchApp from './notch/NotchApp';
import './polyfills';
import { initGA, initSentry, startUiInteractionTracking, trackEvent } from './services/analytics';
import { setStoreForApiClient } from './services/apiClient';
@@@ -41,13 -41,15 +40,12 @@@ const urlWindowParam = (() =>
}
})();
const isMascotWindow = urlWindowParam === 'mascot';
-const isNotchWindow = urlWindowParam === 'notch';
const currentWindowLabel = isMascotWindow
? 'mascot'
- : isNotchWindow
- ? 'notch'
- : tauriRuntimeAvailable()
- ? getCurrentWindow().label
- : 'main';
-const isStandaloneWindow = isMascotWindow || isNotchWindow;
+ : tauriRuntimeAvailable()
+ ? getCurrentWindow().label
+ : 'main';
- const isOverlayWindow = currentWindowLabel === 'overlay';
- const isStandaloneWindow = isOverlayWindow || isMascotWindow;
++const isStandaloneWindow = isMascotWindow;
const ensureDefaultHashRoute = () => {
const hash = window.location.hash;
@@@ -90,18 -92,12 +88,12 @@@ if (!isStandaloneWindow)
function bootRender() {
// Reveal scrollbars only while a pane is actually scrolling. Installed here
// rather than in a component so it covers every window entry (main, mascot,
- // overlay) with one document-level capture listener, and so panes
- // notch) with one document-level capture listener, and so panes
++ // with one document-level capture listener, and so panes
// mounted later need no wiring. Lives for the document's lifetime.
installAutoHideScrollbars();
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
- const tree = isMascotWindow ? (
- <MascotWindowApp />
- ) : isOverlayWindow ? (
- <OverlayApp />
- ) : (
- <App />
- );
- const tree = isMascotWindow ? <MascotWindowApp /> : isNotchWindow ? <NotchApp /> : <App />;
++ const tree = isMascotWindow ? <MascotWindowApp /> : <App />;
root.render(<React.StrictMode>{tree}</React.StrictMode>);
}
diff --cc app/src/utils/tauriCommands/voice.ts
index bbc30aabc7,b7d05165ad..8457ea90a9
--- a/app/src/utils/tauriCommands/voice.ts
+++ b/app/src/utils/tauriCommands/voice.ts
@@@ -1,11 -1,9 +1,7 @@@
/**
* Voice and dictation commands.
*/
- import { invoke } from '@tauri-apps/api/core';
-
import { callCoreRpc } from '../../services/coreRpcClient';
- import { CommandResponse, isTauri } from './common';
-import { CommandResponse } from './common';
--import { ConfigSnapshot } from './config';
export interface VoiceSpeechResult {
/** Final text — cleaned by LLM post-processing when available. */
@@@ -38,14 -36,21 +34,6 @@@ export interface VoiceStatus
tts_provider: string;
}
- export interface VoiceServerStatus {
- state: 'stopped' | 'idle' | 'recording' | 'transcribing';
- hotkey: string;
- activation_mode: 'tap' | 'push';
- transcription_count: number;
- last_error: string | null;
-export interface VoiceServerSettings {
- skip_cleanup: boolean;
- min_duration_secs: number;
- /** RMS energy threshold for silence detection. Recordings below this are
- * treated as silence and skipped to prevent STT hallucinations. */
- silence_threshold: number;
- /** Custom vocabulary words to bias the STT engine toward (names, technical terms). */
- custom_dictionary: string[];
- /** Phase 2: continuous always-on listening (no hotkey). Opt-in. */
- always_on_enabled: boolean;
- /** Hosted speech-to-text engine. There is no local option — the bundled
- * whisper.cpp engine was removed. */
- stt_engine: SttEngine;
--}
--
/** Hosted speech-to-text engines, mirroring `config::schema::SttEngine`. */
export type SttEngine = 'backend' | 'elevenlabs' | 'openai';
@@@ -53,47 -58,29 +41,6 @@@ export async function openhumanVoiceSta
return await callCoreRpc<VoiceStatus>({ method: 'openhuman.voice_status', params: {} });
}
- export async function openhumanVoiceServerStatus(): Promise<VoiceServerStatus> {
- return await callCoreRpc<VoiceServerStatus>({
- method: 'openhuman.voice_server_status',
- params: {},
- });
- }
-
- export async function openhumanVoiceServerStart(params?: {
- hotkey?: string;
- activation_mode?: 'tap' | 'push';
- skip_cleanup?: boolean;
- }): Promise<VoiceServerStatus> {
- return await callCoreRpc<VoiceServerStatus>({
- method: 'openhuman.voice_server_start',
- params: params ?? {},
- });
- }
-
- export async function openhumanVoiceServerStop(): Promise<VoiceServerStatus> {
- return await callCoreRpc<VoiceServerStatus>({
- method: 'openhuman.voice_server_stop',
-export async function openhumanGetVoiceServerSettings(): Promise<
- CommandResponse<VoiceServerSettings>
-> {
- return await callCoreRpc<CommandResponse<VoiceServerSettings>>({
- method: 'openhuman.config_get_voice_server_settings',
-- params: {},
-- });
--}
--
--export async function openhumanUpdateVoiceServerSettings(update: {
- auto_start?: boolean;
- hotkey?: string;
- activation_mode?: 'tap' | 'push';
-- skip_cleanup?: boolean;
-- min_duration_secs?: number;
-- silence_threshold?: number;
-- custom_dictionary?: string[];
- always_on_enabled?: boolean;
-- stt_engine?: SttEngine;
--}): Promise<CommandResponse<ConfigSnapshot>> {
-- return await callCoreRpc<CommandResponse<ConfigSnapshot>>({
-- method: 'openhuman.config_update_voice_server_settings',
-- params: update,
-- });
--}
--
export interface VoiceProvidersUpdate {
/** STT provider string: 'cloud' or '<slug>:<model>'. */
stt_provider?: string;
@@@ -156,62 -143,3 +103,4 @@@ export async function openhumanVoiceTts
params: { text, output_path: outputPath },
});
}
+
- /**
- * Register (or re-register) the global dictation toggle hotkey.
- */
- export async function registerDictationHotkey(shortcut: string): Promise<void> {
- if (!isTauri()) {
- console.debug('[dictation] registerDictationHotkey: skipped — not running in Tauri');
- return;
- }
- const normalizedShortcut = shortcut
- .trim()
- .replace(/\bCommandOrControl\b/gi, 'CmdOrCtrl')
- .replace(/\bCommand\b/gi, 'Cmd')
- .replace(/\bControl\b/gi, 'Ctrl')
- .replace(/\bOption\b/gi, 'Alt');
-
- console.debug(
- '[dictation] registerDictationHotkey: shortcut=%s normalized=%s',
- shortcut,
- normalizedShortcut
- );
- try {
- await invoke<void>('register_dictation_hotkey', { shortcut: normalizedShortcut });
- } catch (err) {
- console.warn('[dictation] registerDictationHotkey normalized registration failed', err);
- throw err;
- }
- console.debug('[dictation] registerDictationHotkey: done');
- }
-
- /**
- * Notify the overlay of a voice/STT state change from the chat prompt button.
- * Fire-and-forget — errors are logged but never propagated.
- */
- export const notifyOverlaySttState = (
- state: 'recording_started' | 'transcription_done' | 'cancelled' | 'error',
- text?: string
- ): void => {
- void (async () => {
- try {
- await callCoreRpc({ method: 'openhuman.overlay_stt_notify', params: { state, text } });
- } catch (err: unknown) {
- console.debug('[overlay_stt_notify] fire-and-forget error:', err);
- }
- })();
- };
-
- /**
- * Unregister the global dictation hotkey if one is active.
- */
- export async function unregisterDictationHotkey(): Promise<void> {
- if (!isTauri()) {
- console.debug('[dictation] unregisterDictationHotkey: skipped — not running in Tauri');
- return;
- }
- console.debug('[dictation] unregisterDictationHotkey: invoking');
- await invoke<void>('unregister_dictation_hotkey');
- console.debug('[dictation] unregisterDictationHotkey: done');
- }