Skip to content

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

chore(voice): remove notch window and always-on voice settings

Steven Enamakel5cb335b80753
diff --git a/app/src/components/settings/panels/VoicePanel.tsx b/app/src/components/settings/panels/VoicePanel.tsx
index e62ba9004b..678b9cc764 100644
--- a/app/src/components/settings/panels/VoicePanel.tsx
+++ b/app/src/components/settings/panels/VoicePanel.tsx
@@ -1,8 +1,7 @@
import debug from 'debug';
-import { ArrowRight, AudioLines } from 'lucide-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 {
@@ -20,7 +19,7 @@ import {
type VoiceStatus,
} from '../../../utils/tauriCommands';
import PanelPage from '../../layout/PanelPage';
-import { Button, Card, Field, StatusLine, Switch } from '../../ui';
+import { Button, Card, Field, StatusLine } from '../../ui';
import SettingsBackButton from '../components/SettingsBackButton';
import { useSettingsNavigation } from '../hooks/useSettingsNavigation';
import VoicePanelKeyModal from './VoicePanelKeyModal';
diff --git a/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx b/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
index 6e8d9d2e55..debd5d3fde 100644
--- a/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/VoicePanel.test.tsx
@@ -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 () => {
@@ -81,7 +74,6 @@ const makeVoiceSettings = (overrides: Partial<VoiceSettings> = {}): VoiceSetting
});
type RuntimeHarness = {
- settings: VoiceServerSettings;
voiceStatus: VoiceStatus;
voiceSettings: VoiceSettings;
};
@@ -93,17 +85,6 @@ describe('VoicePanel', () => {
vi.clearAllMocks();
runtime = {
- settings: {
- auto_start: false,
- hotkey: 'Fn',
- activation_mode: 'push',
- skip_cleanup: true,
- min_duration_secs: 0.3,
- silence_threshold: 0.002,
- custom_dictionary: [],
- always_on_enabled: false,
- stt_engine: 'backend',
- },
voiceStatus: {
stt_available: true,
tts_available: true,
@@ -119,18 +100,7 @@ describe('VoicePanel', () => {
voiceSettings: makeVoiceSettings(),
};
- vi.mocked(openhumanGetVoiceServerSettings).mockImplementation(async () => ({
- result: { ...runtime.settings },
- logs: [],
- }));
vi.mocked(openhumanVoiceStatus).mockImplementation(async () => ({ ...runtime.voiceStatus }));
- // The toggle handler ignores the resolved value (it updates React state
- // optimistically before awaiting), so a minimal cast is enough here.
- vi.mocked(openhumanUpdateVoiceServerSettings).mockResolvedValue({
- result: {},
- logs: [],
- } as never);
- vi.mocked(syncNotchVisibility).mockResolvedValue(undefined);
vi.mocked(openhumanVoiceSetProviders).mockImplementation(async update => {
if (update.stt_provider) runtime.voiceStatus.stt_engine = update.stt_provider;
if (update.tts_provider) runtime.voiceStatus.tts_provider = update.tts_provider;
@@ -155,33 +125,14 @@ describe('VoicePanel', () => {
vi.useRealTimers();
});
- it('persists always-on listening and syncs the notch indicator', async () => {
+ it('does not render always-on controls or send always_on_enabled', 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 })
- );
- 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')
+ expect(screen.queryByTestId('voice-always-on-card')).not.toBeInTheDocument();
+ await waitFor(() => expect(openhumanVoiceStatus).toHaveBeenCalled());
+ expect(openhumanVoiceSetProviders).not.toHaveBeenCalledWith(
+ expect.objectContaining({ always_on_enabled: expect.anything() })
);
- 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 ──────────────────────────────────────────────
@@ -324,13 +275,6 @@ describe('VoicePanel', () => {
const sttSelect = (await screen.findByTestId('stt-provider-select')) as HTMLSelectElement;
await waitFor(() => expect(sttSelect.value).toBe('elevenlabs'));
- // Freeze subsequent loadData calls so the error set by persistProviders is
- // not cleared by the automatic reload that fires in saveRouting after
- // persistProviders() returns (without re-throwing).
- vi.mocked(openhumanGetVoiceServerSettings).mockImplementation(
- () => new Promise(() => {}) // hang — prevents error being wiped by reload
- );
-
// Change provider and click save to trigger the RPC error.
fireEvent.change(sttSelect, { target: { value: 'cloud' } });
const saveBtn = screen.getByTestId('save-voice-routing');
@@ -474,8 +418,8 @@ describe('VoicePanel', () => {
// ─── Error / notice display ─────────────────────────────────────────────
- it('shows an error banner when openhumanGetVoiceServerSettings rejects', async () => {
- vi.mocked(openhumanGetVoiceServerSettings).mockRejectedValueOnce(new Error('core offline'));
+ it('shows an error banner when voice status cannot be loaded', async () => {
+ vi.mocked(openhumanVoiceStatus).mockRejectedValueOnce(new Error('core offline'));
renderWithProviders(<VoicePanel />, { initialEntries: ['/settings/voice'] });
diff --git a/app/src/index.css b/app/src/index.css
index 489eabee95..fb3f0124b8 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -684,51 +684,12 @@
html[data-window='overlay'] #root,
html[data-window='mascot'],
html[data-window='mascot'] body,
- html[data-window='mascot'] #root,
- html[data-window='notch'],
- html[data-window='notch'] body,
- html[data-window='notch'] #root {
+ html[data-window='mascot'] #root {
background: transparent;
overflow: hidden;
user-select: none;
}
- @keyframes notch-pill-in {
- from {
- opacity: 0;
- transform: scaleX(0.4) scaleY(0.7);
- }
- to {
- opacity: 1;
- transform: scaleX(1) scaleY(1);
- }
- }
-
- @keyframes notch-bar {
- 0%,
- 100% {
- transform: scaleY(0.5);
- opacity: 0.6;
- }
- 50% {
- transform: scaleY(1.2);
- opacity: 1;
- }
- }
-
- @keyframes notch-dot {
- 0%,
- 80%,
- 100% {
- transform: scale(0.6);
- opacity: 0.4;
- }
- 40% {
- transform: scale(1);
- opacity: 1;
- }
- }
-
@keyframes overlay-bubble-in {
from {
opacity: 0;
diff --git a/app/src/services/__tests__/coreRpcClient.test.ts b/app/src/services/__tests__/coreRpcClient.test.ts
index e97c080c1f..2d8f45df55 100644
--- a/app/src/services/__tests__/coreRpcClient.test.ts
+++ b/app/src/services/__tests__/coreRpcClient.test.ts
@@ -1319,14 +1319,24 @@ describe('getCoreRpcToken (cloud-mode persistence)', () => {
expect(headers.Authorization).toBe('Bearer cloud-token-abc');
});
- test('honours the host-injected notch core token before the cache/store', async () => {
- // The notch / overlay WKWebViews have no Tauri IPC; the Rust host injects
- // the bearer as a global, which must win ahead of the resolution cache.
+ test('uses the normal sidecar token even when a legacy notch token global exists', async () => {
(globalThis as { __OPENHUMAN_NOTCH_CORE_TOKEN__?: string }).__OPENHUMAN_NOTCH_CORE_TOKEN__ =
- 'notch-bearer-xyz';
+ 'stale-notch-token';
+ vi.doMock('../../utils/configPersistence', () => ({
+ peekStoredRpcUrl: () => null,
+ getStoredCoreToken: () => null,
+ normalizeRpcUrl: normalizeMockRpcUrl,
+ }));
+ vi.mocked(isTauri).mockReturnValue(true);
+ vi.mocked(invoke).mockImplementation(async (cmd: string) => {
+ if (cmd === 'core_rpc_endpoint') {
+ return { url: 'http://127.0.0.1:7788/rpc', token: 'normal-sidecar-token' };
+ }
+ throw new Error(`unexpected invoke: ${cmd}`);
+ });
try {
const { getCoreRpcToken } = await import('../coreRpcClient');
- await expect(getCoreRpcToken()).resolves.toBe('notch-bearer-xyz');
+ await expect(getCoreRpcToken()).resolves.toBe('normal-sidecar-token');
} finally {
delete (globalThis as { __OPENHUMAN_NOTCH_CORE_TOKEN__?: string })
.__OPENHUMAN_NOTCH_CORE_TOKEN__;
diff --git a/app/src/utils/tauriCommands/voice.ts b/app/src/utils/tauriCommands/voice.ts
index bce9781e92..bbc30aabc7 100644
--- a/app/src/utils/tauriCommands/voice.ts
+++ b/app/src/utils/tauriCommands/voice.ts
@@ -46,22 +46,6 @@ export interface VoiceServerStatus {
last_error: string | null;
}
-export interface VoiceServerSettings {
- auto_start: boolean;
- hotkey: string;
- activation_mode: 'tap' | 'push';
- 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[];
- /** 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';
@@ -94,15 +78,6 @@ export async function openhumanVoiceServerStop(): Promise<VoiceServerStatus> {
});
}
-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;
diff --git a/crates/openhuman-app/src/lib.rs b/crates/openhuman-app/src/lib.rs
index 17168f0449..0b2f8acf05 100644
--- a/crates/openhuman-app/src/lib.rs
+++ b/crates/openhuman-app/src/lib.rs
@@ -100,7 +100,6 @@ mod mascot_native_window;
mod mcp_commands;
mod native_notifications;
#[cfg(target_os = "macos")]
-mod notch_window;
mod process_kill;
mod process_recovery;
mod ptt_hotkeys;
@@ -1367,61 +1366,6 @@ fn mascot_native_window_is_open() -> bool {
false
}
-/// Dispatch a notch-panel mutation onto the app main thread.
-///
-/// The notch is a native NSPanel + WKWebView; AppKit requires it to be built
-/// and torn down on the main thread (and its `thread_local` storage lives
-/// there). Tauri runs these IPC command handlers on a worker thread, so we hop
-/// to the main thread via `run_on_main_thread`. Fire-and-forget: notch
-/// visibility is cosmetic (the frontend swallows errors), so we log the result
-/// on the main thread rather than blocking the command to propagate it back.
-#[cfg(target_os = "macos")]
-fn dispatch_notch_on_main(
- app: AppHandle<AppRuntime>,
- op: impl FnOnce(&AppHandle<AppRuntime>) + Send + 'static,
-) -> Result<(), String> {
- app.clone()
- .run_on_main_thread(move || op(&app))
- .map_err(|e| format!("run_on_main_thread dispatch failed: {e}"))
-}
-
-/// Show the notch activity indicator. macOS only — transparent NSPanel + WKWebView
-/// anchored to the top-centre of the primary screen. Displays live voice and
-/// agent status (listening, thinking, executing) in a pill that emerges from
-/// the physical notch on supported MacBook Pros.
-#[tauri::command]
-fn notch_window_show(app: AppHandle<AppRuntime>) -> Result<(), String> {
- log::info!("[notch-window] show requested");
- #[cfg(target_os = "macos")]
- {
- dispatch_notch_on_main(app, |app| {
- if let Err(e) = notch_window::show(app) {
- log::warn!("[notch-window] show failed: {e}");
- }
- })
- }
- #[cfg(not(target_os = "macos"))]
- {
- let _ = app;
- Ok(()) // No-op on non-macOS
- }
-}
-
-/// Hide the notch activity indicator.
-#[tauri::command]
-fn notch_window_hide(app: AppHandle<AppRuntime>) -> Result<(), String> {
- log::info!("[notch-window] hide requested");
- #[cfg(target_os = "macos")]
- {
- dispatch_notch_on_main(app, |_app| notch_window::hide())
- }
- #[cfg(not(target_os = "macos"))]
- {
- let _ = app;
- Ok(())
- }
-}
-
/// Hide or show the OS top-level main-window frame on Windows by enumerating
/// this process's top-level windows and matching the visible
/// `Chrome_WidgetWin_1` host. `WebviewWindow::hwnd()` from the vendored CEF