Skip to content

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

chore(notch): remove standalone notch window and its UI

Steven Enamakel6a19c35aac1b
diff --git a/app/src/hooks/__tests__/useNotchBootSync.test.tsx b/app/src/hooks/__tests__/useNotchBootSync.test.tsx
deleted file mode 100644
index 934f39f190..0000000000
--- a/app/src/hooks/__tests__/useNotchBootSync.test.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { renderHook, waitFor } from '@testing-library/react';
-import { beforeEach, describe, expect, it, vi } from 'vitest';
-
-import {
- openhumanGetVoiceServerSettings,
- syncNotchVisibility,
- type VoiceServerSettings,
-} from '../../utils/tauriCommands';
-import { useNotchBootSync } from '../useNotchBootSync';
-
-vi.mock('../../utils/tauriCommands', () => ({
- openhumanGetVoiceServerSettings: vi.fn(),
- syncNotchVisibility: vi.fn(),
-}));
-
-const settings = (alwaysOn: boolean) => ({
- result: { always_on_enabled: alwaysOn } as unknown as VoiceServerSettings,
- logs: [],
-});
-
-describe('useNotchBootSync', () => {
- beforeEach(() => {
- vi.clearAllMocks();
- vi.mocked(syncNotchVisibility).mockResolvedValue(undefined);
- });
-
- it('does nothing while still bootstrapping', () => {
- renderHook(() => useNotchBootSync(true));
- expect(openhumanGetVoiceServerSettings).not.toHaveBeenCalled();
- expect(syncNotchVisibility).not.toHaveBeenCalled();
- });
-
- it('syncs the notch to the persisted always-on flag once the core is ready', async () => {
- vi.mocked(openhumanGetVoiceServerSettings).mockResolvedValue(settings(true));
- renderHook(() => useNotchBootSync(false));
- await waitFor(() => expect(syncNotchVisibility).toHaveBeenCalledWith(true));
- expect(openhumanGetVoiceServerSettings).toHaveBeenCalledTimes(1);
- });
-
- it('only syncs once per boot across re-renders', async () => {
- vi.mocked(openhumanGetVoiceServerSettings).mockResolvedValue(settings(false));
- const { rerender } = renderHook(({ b }) => useNotchBootSync(b), { initialProps: { b: false } });
- await waitFor(() => expect(syncNotchVisibility).toHaveBeenCalledWith(false));
- rerender({ b: false });
- expect(openhumanGetVoiceServerSettings).toHaveBeenCalledTimes(1);
- });
-
- it('swallows failures (cosmetic) so boot is never blocked', async () => {
- vi.mocked(openhumanGetVoiceServerSettings).mockRejectedValue(new Error('core offline'));
- renderHook(() => useNotchBootSync(false));
- // The settings fetch is attempted, the rejection is caught (no throw), and
- // notch visibility is never toggled.
- await waitFor(() => expect(openhumanGetVoiceServerSettings).toHaveBeenCalled());
- expect(syncNotchVisibility).not.toHaveBeenCalled();
- });
-});
diff --git a/app/src/hooks/useNotchBootSync.ts b/app/src/hooks/useNotchBootSync.ts
deleted file mode 100644
index b920c674cd..0000000000
--- a/app/src/hooks/useNotchBootSync.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import debug from 'debug';
-import { useEffect, useRef } from 'react';
-
-import { openhumanGetVoiceServerSettings, syncNotchVisibility } from '../utils/tauriCommands';
-
-const log = debug('notch:boot');
-
-/**
- * Sync the notch indicator to the persisted always-on listening state once the
- * core is ready — runs **once per boot**.
- *
- * The notch is the always-on listening HUD, so it stays hidden unless always-on
- * listening is enabled; it is no longer auto-shown unconditionally by the Tauri
- * shell (see `notch_window` / `dispatch_notch_on_main`). Failures are swallowed
- * (debug-logged) — notch visibility is cosmetic and must never block boot.
- */
-export function useNotchBootSync(isBootstrapping: boolean): void {
- const notchSyncedRef = useRef(false);
- useEffect(() => {
- if (isBootstrapping || notchSyncedRef.current) return;
- notchSyncedRef.current = true;
- void (async () => {
- try {
- const res = await openhumanGetVoiceServerSettings();
- await syncNotchVisibility(res.result.always_on_enabled);
- } catch (err) {
- log('boot visibility sync failed: %o', err);
- }
- })();
- }, [isBootstrapping]);
-}
diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.ts
index 8549308d28..3b25d098de 100644
--- a/app/src/lib/i18n/ar.ts
+++ b/app/src/lib/i18n/ar.ts
@@ -1161,9 +1161,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'تم حفظ إعدادات الصوت.',
'voice.failedToLoadSettings': 'فشل تحميل إعدادات الصوت',
'voice.failedToSaveSettings': 'فشل في حفظ إعدادات الصوت',
- 'voice.debug.alwaysOn': 'الاستماع الدائم',
- 'voice.debug.alwaysOnDesc':
- 'أبقِ الميكروفون مفتوحًا وأرسل ما تقوله إلى الوكيل تلقائيًا دون مفتاح اختصار. يتوقف مؤقتًا عند قفل الشاشة.',
'voice.providers.saved': 'تم حفظ موفري الصوت.',
'voice.providers.failedToSave': 'فشل في حفظ موفري الصوت',
'voice.mode.start': 'بدء المحادثة الصوتية',
@@ -3470,8 +3467,6 @@ const messages: TranslationMap = {
'تم اكتشاف تجاوز OPENHUMAN_APPROVAL_GATE=0 لكنه تم تجاهله: يحافظ تطبيق سطح المكتب دائمًا على تفعيل بوابة الموافقة.',
// Run queue
- 'notch.ready': 'جاهز',
- 'notch.listening': 'أستمع…',
'orchestration.detail.stop': 'إيقاف',
diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.ts
index 78ffb3864f..e39cae5728 100644
--- a/app/src/lib/i18n/bn.ts
+++ b/app/src/lib/i18n/bn.ts
@@ -1178,9 +1178,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'ভয়েস সেটিংস সংরক্ষিত।',
'voice.failedToLoadSettings': 'ভয়েস সেটিংস লোড করতে ব্যর্থ হয়েছে',
'voice.failedToSaveSettings': 'ভয়েস সেটিংস সংরক্ষণ করতে ব্যর্থ হয়েছে',
- 'voice.debug.alwaysOn': 'সবসময় শোনা',
- 'voice.debug.alwaysOnDesc':
- 'মাইক্রোফোন খোলা রাখুন এবং আপনি যা বলেন তা হটকি ছাড়াই স্বয়ংক্রিয়ভাবে এজেন্টের কাছে পাঠান। স্ক্রিন লক হলে থেমে যায়।',
'voice.providers.saved': 'ভয়েস প্রদানকারী সংরক্ষিত।',
'voice.providers.failedToSave': 'ভয়েস প্রদানকারী সংরক্ষণ করতে ব্যর্থ',
'voice.mode.start': 'ভয়েস চ্যাট শুরু করুন',
@@ -3540,8 +3537,6 @@ const messages: TranslationMap = {
'একটি OPENHUMAN_APPROVAL_GATE=0 ওভাররাইড সনাক্ত করা হয়েছিল কিন্তু উপেক্ষা করা হয়েছে: ডেস্কটপ অ্যাপ সর্বদা অনুমোদন গেট চালু রাখে।',
// Run queue
- 'notch.ready': 'প্রস্তুত',
- 'notch.listening': 'শুনছি…',
'orchestration.detail.stop': 'থামান',
diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.ts
index 9a141f6cf6..6c7f71ffe1 100644
--- a/app/src/lib/i18n/de.ts
+++ b/app/src/lib/i18n/de.ts
@@ -1219,9 +1219,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Spracheinstellungen gespeichert.',
'voice.failedToLoadSettings': 'Spracheinstellungen konnten nicht geladen werden',
'voice.failedToSaveSettings': 'Spracheinstellungen konnten nicht gespeichert werden.',
- 'voice.debug.alwaysOn': 'Dauerhaftes Zuhören',
- 'voice.debug.alwaysOnDesc':
- 'Hält das Mikrofon offen und sendet das Gesagte automatisch an den Agenten, ohne Tastenkürzel. Pausiert, wenn der Bildschirm gesperrt ist.',
'voice.providers.saved': 'Sprachanbieter gespeichert.',
'voice.providers.failedToSave': 'Sprachanbieter konnten nicht gespeichert werden.',
'voice.mode.start': 'Sprachchat starten',
@@ -3650,8 +3647,6 @@ const messages: TranslationMap = {
'Ein OPENHUMAN_APPROVAL_GATE=0-Override wurde erkannt, aber ignoriert: Die Desktop-App lässt das Genehmigungstor immer eingeschaltet.',
// Run queue
- 'notch.ready': 'Bereit',
- 'notch.listening': 'Höre zu…',
'orchestration.detail.stop': 'Stoppen',
diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.ts
index b81a6277bf..c8e7a37fa9 100644
--- a/app/src/lib/i18n/en.ts
+++ b/app/src/lib/i18n/en.ts
@@ -1338,9 +1338,6 @@ const en: TranslationMap = {
'voice.settingsSaved': 'Voice settings saved.',
'voice.failedToLoadSettings': 'Failed to load voice settings',
'voice.failedToSaveSettings': 'Failed to save voice settings',
- 'voice.debug.alwaysOn': 'Always-on listening',
- 'voice.debug.alwaysOnDesc':
- 'Keep the microphone open and send what you say to the agent automatically, no hotkey. Pauses when the screen is locked.',
'voice.providers.saved': 'Voice providers saved.',
'voice.providers.failedToSave': 'Failed to save voice providers',
'voice.mode.start': 'Start voice chat',
@@ -4093,8 +4090,6 @@ const en: TranslationMap = {
'An OPENHUMAN_APPROVAL_GATE=0 override was detected but ignored: the desktop app always keeps the approval gate on.',
// Run queue
- 'notch.ready': 'Ready',
- 'notch.listening': 'Listening…',
// Code block chrome
'codeBlock.copy': 'Copy',
diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.ts
index c372445bf8..0b945ba58f 100644
--- a/app/src/lib/i18n/es.ts
+++ b/app/src/lib/i18n/es.ts
@@ -1209,9 +1209,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Configuración de voz guardada.',
'voice.failedToLoadSettings': 'No se pudo cargar la configuración de voz',
'voice.failedToSaveSettings': 'No se pudo guardar la configuración de voz',
- 'voice.debug.alwaysOn': 'Escucha continua',
- 'voice.debug.alwaysOnDesc':
- 'Mantén el micrófono abierto y envía lo que dices al agente automáticamente, sin atajo. Se pausa cuando la pantalla está bloqueada.',
'voice.providers.saved': 'Proveedores de voz guardados.',
'voice.providers.failedToSave': 'No se pudieron guardar los proveedores de voz',
'voice.mode.start': 'Iniciar chat de voz',
@@ -3614,8 +3611,6 @@ const messages: TranslationMap = {
'Se detectó una anulación OPENHUMAN_APPROVAL_GATE=0, pero se ignoró: la aplicación de escritorio mantiene siempre activa la puerta de aprobación.',
// Run queue
- 'notch.ready': 'Listo',
- 'notch.listening': 'Escuchando…',
'orchestration.detail.stop': 'Detener',
diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.ts
index 5c45f53b73..7fecc2b898 100644
--- a/app/src/lib/i18n/fr.ts
+++ b/app/src/lib/i18n/fr.ts
@@ -1217,9 +1217,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Paramètres vocaux enregistrés.',
'voice.failedToLoadSettings': 'Échec du chargement des paramètres vocaux',
'voice.failedToSaveSettings': 'Échec de la sauvegarde des paramètres vocaux',
- 'voice.debug.alwaysOn': 'Écoute permanente',
- 'voice.debug.alwaysOnDesc':
- 'Garde le microphone ouvert et envoie automatiquement ce que vous dites à l’agent, sans raccourci. Se met en pause lorsque l’écran est verrouillé.',
'voice.providers.saved': 'Fournisseurs de voix enregistrés.',
'voice.providers.failedToSave': 'Échec de la sauvegarde des fournisseurs vocaux',
'voice.mode.start': 'Démarrer le chat vocal',
@@ -3628,8 +3625,6 @@ const messages: TranslationMap = {
"Un contournement OPENHUMAN_APPROVAL_GATE=0 a été détecté mais ignoré : l'application de bureau garde toujours la porte d'approbation activée.",
// Run queue
- 'notch.ready': 'Prêt',
- 'notch.listening': "J'écoute…",
'orchestration.detail.stop': 'Arrêter',
diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.ts
index 3c2dcd73cc..e8e6db78bd 100644
--- a/app/src/lib/i18n/hi.ts
+++ b/app/src/lib/i18n/hi.ts
@@ -1186,9 +1186,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'वॉइस सेटिंग्स सेव हो गईं।',
'voice.failedToLoadSettings': 'ध्वनि सेटिंग लोड करने में विफल',
'voice.failedToSaveSettings': 'ध्वनि सेटिंग सहेजने में विफल',
- 'voice.debug.alwaysOn': 'हमेशा-चालू सुनना',
- 'voice.debug.alwaysOnDesc':
- 'माइक्रोफ़ोन खुला रखें और आप जो कहते हैं वह बिना हॉटकी के स्वचालित रूप से एजेंट को भेजें। स्क्रीन लॉक होने पर रुक जाता है।',
'voice.providers.saved': 'ध्वनि प्रदाता सहेजे गए.',
'voice.providers.failedToSave': 'ध्वनि प्रदाताओं को सहेजने में विफल',
'voice.mode.start': 'वॉइस चैट शुरू करें',
@@ -3542,8 +3539,6 @@ const messages: TranslationMap = {
'एक OPENHUMAN_APPROVAL_GATE=0 ओवरराइड का पता चला लेकिन अनदेखा कर दिया गया: डेस्कटॉप ऐप अनुमोदन गेट को हमेशा चालू रखता है।',
// Run queue
- 'notch.ready': 'तैयार',
- 'notch.listening': 'सुन रहा हूं…',
'orchestration.detail.stop': 'रोकें',
diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.ts
index 678c7cfb8f..1c7260ce31 100644
--- a/app/src/lib/i18n/id.ts
+++ b/app/src/lib/i18n/id.ts
@@ -1196,9 +1196,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Pengaturan suara tersimpan.',
'voice.failedToLoadSettings': 'Gagal memuat pengaturan suara',
'voice.failedToSaveSettings': 'Gagal menyimpan pengaturan suara',
- 'voice.debug.alwaysOn': 'Mendengarkan terus-menerus',
- 'voice.debug.alwaysOnDesc':
- 'Biarkan mikrofon tetap aktif dan kirim ucapan Anda ke agen secara otomatis, tanpa pintasan. Berhenti sementara saat layar terkunci.',
'voice.providers.saved': 'Penyedia suara disimpan.',
'voice.providers.failedToSave': 'Gagal menyimpan penyedia suara',
'voice.mode.start': 'Mulai obrolan suara',
@@ -3567,8 +3564,6 @@ const messages: TranslationMap = {
'Override OPENHUMAN_APPROVAL_GATE=0 terdeteksi tetapi diabaikan: aplikasi desktop selalu menjaga gerbang persetujuan tetap aktif.',
// Run queue
- 'notch.ready': 'Siap',
- 'notch.listening': 'Mendengar…',
'orchestration.detail.stop': 'Hentikan',
diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.ts
index 7d1471d799..b0720a26f4 100644
--- a/app/src/lib/i18n/it.ts
+++ b/app/src/lib/i18n/it.ts
@@ -1206,9 +1206,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Impostazioni vocali salvate.',
'voice.failedToLoadSettings': 'Impossibile caricare le impostazioni vocali',
'voice.failedToSaveSettings': 'Impossibile salvare le impostazioni vocali',
- 'voice.debug.alwaysOn': 'Ascolto sempre attivo',
- 'voice.debug.alwaysOnDesc':
- 'Mantieni il microfono aperto e invia automaticamente ciò che dici all’agente, senza scorciatoia. Si mette in pausa quando lo schermo è bloccato.',
'voice.providers.saved': 'Fornitori di servizi vocali salvati.',
'voice.providers.failedToSave': 'Impossibile salvare i provider vocali',
'voice.mode.start': 'Avvia la chat vocale',
@@ -3606,8 +3603,6 @@ const messages: TranslationMap = {
"È stato rilevato un override OPENHUMAN_APPROVAL_GATE=0 ma è stato ignorato: l'app desktop mantiene sempre attiva la porta di approvazione.",
// Run queue
- 'notch.ready': 'Pronto',
- 'notch.listening': 'Ascolto…',
'orchestration.detail.stop': 'Arresta',
diff --git a/app/src/lib/i18n/ja.ts b/app/src/lib/i18n/ja.ts
index 6035e46464..d8fe7c4f54 100644
--- a/app/src/lib/i18n/ja.ts
+++ b/app/src/lib/i18n/ja.ts
@@ -1330,9 +1330,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': '音声設定を保存しました。',
'voice.failedToLoadSettings': '音声設定の読み込みに失敗しました',
'voice.failedToSaveSettings': '音声設定の保存に失敗しました',
- 'voice.debug.alwaysOn': '常時リスニング',
- 'voice.debug.alwaysOnDesc':
- 'マイクを常時開き、ホットキーなしで発話をエージェントに自動送信します。画面ロック中は一時停止します。',
'voice.providers.saved': '音声プロバイダーを保存しました。',
'voice.providers.failedToSave': '音声プロバイダーの保存に失敗しました',
'voice.mode.start': '音声チャットを開始',
@@ -4129,8 +4126,6 @@ const messages: TranslationMap = {
'OPENHUMAN_APPROVAL_GATE=0 のオーバーライドが検出されましたが無視されました: デスクトップアプリでは承認ゲートが常に有効に保たれます。',
// Run queue
- 'notch.ready': '準備完了',
- 'notch.listening': '聞き取り中…',
// Code block chrome
'codeBlock.copy': 'コピー',
diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.ts
index 749849bbce..c833564ac9 100644
--- a/app/src/lib/i18n/ko.ts
+++ b/app/src/lib/i18n/ko.ts
@@ -1168,9 +1168,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': '음성 설정이 저장되었습니다.',
'voice.failedToLoadSettings': '음성 설정 로드 실패',
'voice.failedToSaveSettings': '음성 설정 저장 실패',
- 'voice.debug.alwaysOn': '상시 청취',
- 'voice.debug.alwaysOnDesc':
- '단축키 없이 마이크를 계속 열어 두고 말한 내용을 자동으로 에이전트에 보냅니다. 화면이 잠기면 일시 중지됩니다.',
'voice.providers.saved': '음성 제공업체가 저장되었습니다.',
'voice.providers.failedToSave': '음성 제공자를 저장하지 못했습니다.',
'voice.mode.start': '음성 채팅 시작',
@@ -3505,8 +3502,6 @@ const messages: TranslationMap = {
'OPENHUMAN_APPROVAL_GATE=0 재정의가 감지되었지만 무시되었습니다: 데스크톱 앱은 승인 게이트를 항상 켜둡니다.',
// Run queue
- 'notch.ready': '준비됨',
- 'notch.listening': '듣는 중…',
'orchestration.detail.stop': '중지',
diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.ts
index 758115c36b..65e7086377 100644
--- a/app/src/lib/i18n/pl.ts
+++ b/app/src/lib/i18n/pl.ts
@@ -1199,9 +1199,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Ustawienia głosu zapisane.',
'voice.failedToLoadSettings': 'Nie udało się załadować ustawień głosu',
'voice.failedToSaveSettings': 'Nie udało się zapisać ustawień głosu',
- 'voice.debug.alwaysOn': 'Ciągłe nasłuchiwanie',
- 'voice.debug.alwaysOnDesc':
- 'Utrzymuje mikrofon włączony i automatycznie wysyła to, co mówisz, do agenta, bez skrótu. Wstrzymuje się, gdy ekran jest zablokowany.',
'voice.providers.saved': 'Zapisano dostawców głosu.',
'voice.providers.failedToSave': 'Nie udało się zapisać dostawców głosu',
'voice.mode.start': 'Rozpocznij czat głosowy',
@@ -3592,8 +3589,6 @@ const messages: TranslationMap = {
'Wykryto nadpisanie OPENHUMAN_APPROVAL_GATE=0, ale je zignorowano: aplikacja desktopowa zawsze utrzymuje bramkę zatwierdzania włączoną.',
// Run queue
- 'notch.ready': 'Gotowe',
- 'notch.listening': 'Słucham…',
'orchestration.detail.stop': 'Zatrzymaj',
diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.ts
index 5561223724..e520450e9d 100644
--- a/app/src/lib/i18n/pt.ts
+++ b/app/src/lib/i18n/pt.ts
@@ -1205,9 +1205,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Configurações de voz salvas.',
'voice.failedToLoadSettings': 'Falha ao carregar configurações de voz',
'voice.failedToSaveSettings': 'Falha ao salvar as configurações de voz',
- 'voice.debug.alwaysOn': 'Escuta contínua',
- 'voice.debug.alwaysOnDesc':
- 'Mantém o microfone aberto e envia o que você diz ao agente automaticamente, sem atalho. Pausa quando a tela está bloqueada.',
'voice.providers.saved': 'Provedores de voz salvos.',
'voice.providers.failedToSave': 'Falha ao salvar provedores de voz',
'voice.mode.start': 'Iniciar chat de voz',
@@ -3594,8 +3591,6 @@ const messages: TranslationMap = {
'Uma substituição OPENHUMAN_APPROVAL_GATE=0 foi detetada mas ignorada: o aplicativo de desktop mantém sempre o portão de aprovação ativado.',
// Run queue
- 'notch.ready': 'Pronto',
- 'notch.listening': 'Ouvindo…',
'orchestration.detail.stop': 'Parar',
diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.ts
index a2b0c4876b..90275808b9 100644
--- a/app/src/lib/i18n/ru.ts
+++ b/app/src/lib/i18n/ru.ts
@@ -1193,9 +1193,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Настройки голоса сохранены.',
'voice.failedToLoadSettings': 'Не удалось загрузить голосовые настройки.',
'voice.failedToSaveSettings': 'Не удалось сохранить голосовые настройки.',
- 'voice.debug.alwaysOn': 'Постоянное прослушивание',
- 'voice.debug.alwaysOnDesc':
- 'Держит микрофон включённым и автоматически отправляет сказанное агенту без горячей клавиши. Приостанавливается при блокировке экрана.',
'voice.providers.saved': 'Поставщики голосовой связи сохранены.',
'voice.providers.failedToSave': 'Не удалось сохранить поставщиков голосовой связи.',
'voice.mode.start': 'Начать голосовой чат',
@@ -3582,8 +3579,6 @@ const messages: TranslationMap = {
'Обнаружено переопределение OPENHUMAN_APPROVAL_GATE=0, но оно проигнорировано: настольное приложение всегда держит шлюз одобрения включённым.',
// Run queue
- 'notch.ready': 'Готово',
- 'notch.listening': 'Слушаю…',
'orchestration.detail.stop': 'Остановить',
diff --git a/app/src/lib/i18n/tr.ts b/app/src/lib/i18n/tr.ts
index 5345ab4e44..4154ea5888 100644
--- a/app/src/lib/i18n/tr.ts
+++ b/app/src/lib/i18n/tr.ts
@@ -1214,9 +1214,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': 'Ses ayarları kaydedildi.',
'voice.failedToLoadSettings': 'Ses ayarları yüklenemedi',
'voice.failedToSaveSettings': 'Ses ayarları kaydedilemedi',
- 'voice.debug.alwaysOn': 'Sürekli dinleme',
- 'voice.debug.alwaysOnDesc':
- 'Mikrofonu açık tutar ve söylediklerinizi kısayol tuşu olmadan otomatik olarak ajana gönderir. Ekran kilitlendiğinde duraklar.',
'voice.providers.saved': 'Ses sağlayıcıları kaydedildi.',
'voice.providers.failedToSave': 'Ses sağlayıcıları kaydedilemedi',
'voice.mode.start': 'Sesli sohbeti başlat',
@@ -3744,8 +3741,6 @@ const messages: TranslationMap = {
'security.approvalGateOverrideIgnored.title': 'Geçersiz kılma engellendi',
'security.approvalGateOverrideIgnored.body':
'Bir OPENHUMAN_APPROVAL_GATE=0 geçersiz kılması algılandı ancak yok sayıldı: masaüstü uygulaması onay kapısını her zaman açık tutar.',
- 'notch.ready': 'Hazır',
- 'notch.listening': 'Dinleniyor…',
'codeBlock.copy': 'Kopyala',
'codeBlock.copied': 'Kopyalandı!',
'userErrors.dismiss': 'Kapat',
diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.ts
index 3f26156888..6f5096d836 100644
--- a/app/src/lib/i18n/zh-CN.ts
+++ b/app/src/lib/i18n/zh-CN.ts
@@ -1109,9 +1109,6 @@ const messages: TranslationMap = {
'voice.settingsSaved': '语音设置已保存。',
'voice.failedToLoadSettings': '无法加载语音设置',
'voice.failedToSaveSettings': '无法保存语音设置',
- 'voice.debug.alwaysOn': '常驻聆听',
- 'voice.debug.alwaysOnDesc':
- '保持麦克风开启,无需快捷键即可自动将你说的话发送给智能体。屏幕锁定时暂停。',
'voice.providers.saved': '语音提供商已保存。',
'voice.providers.failedToSave': '无法保存语音提供商',
'voice.mode.start': '开始语音聊天',
@@ -3344,8 +3341,6 @@ const messages: TranslationMap = {
'检测到 OPENHUMAN_APPROVAL_GATE=0 覆盖,但已忽略:桌面应用始终保持审批门开启。',
// Run queue
- 'notch.ready': '就绪',
- 'notch.listening': '聆听中…',
'orchestration.detail.stop': '停止',
diff --git a/app/src/notch/NotchApp.test.tsx b/app/src/notch/NotchApp.test.tsx
deleted file mode 100644
index 6c7aa9aba6..0000000000
--- a/app/src/notch/NotchApp.test.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import { render, screen, waitFor } from '@testing-library/react';
-import { act } from 'react';
-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
-
-import { connectCoreSocket } from '../services/coreSocket';
-import NotchApp from './NotchApp';
-
-// Key-passthrough i18n that honours the inline fallback the component passes
-// (`t('notch.listening', 'Listening…')`).
-vi.mock('../lib/i18n/I18nContext', () => ({
- useT: () => ({ t: (key: string, fallback?: string) => fallback ?? key }),
-}));
-
-vi.mock('../services/coreSocket', () => ({ connectCoreSocket: vi.fn() }));
-
-// Minimal Socket.IO stand-in: records handlers so a test can replay events.
-class MockSocket {
- static last: MockSocket | null = null;
- handlers = new Map<string, (payload: unknown) => void>();
- connected = false;
- id = 'notch-test-socket';
- connect = vi.fn(() => {
- this.connected = true;
- return this;
- });
- disconnect = vi.fn(() => {
- this.connected = false;
- return this;
- });
- on = vi.fn((event: string, handler: (payload: unknown) => void) => {
- this.handlers.set(event, handler);
- return this;
- });
- fire(event: string, payload: unknown) {
- const handler = this.handlers.get(event);
- if (!handler) throw new Error(`no handler registered for ${event}`);
- act(() => handler(payload));
- }
- constructor() {
- MockSocket.last = this;
- }
-}
-
-describe('NotchApp', () => {
- beforeEach(() => {
- vi.clearAllMocks();
- MockSocket.last = null;
- (window as { __OPENHUMAN_NOTCH_CORE_URL__?: string }).__OPENHUMAN_NOTCH_CORE_URL__ =
- 'http://127.0.0.1:9999';
- vi.mocked(connectCoreSocket).mockImplementation(
- async () => new MockSocket() as unknown as Awaited<ReturnType<typeof connectCoreSocket>>
- );
- });
-
- afterEach(() => {
- delete (window as { __OPENHUMAN_NOTCH_CORE_URL__?: string }).__OPENHUMAN_NOTCH_CORE_URL__;
- });
-
- const renderAndConnect = async () => {
- render(<NotchApp />);
- // Idle baseline pill.
- expect(screen.getByText('Ready')).toBeInTheDocument();
- // Wait for the async connect to register its socket handlers.
- await waitFor(() => expect(MockSocket.last).not.toBeNull());
- await waitFor(() =>
- expect(MockSocket.last?.on).toHaveBeenCalledWith('overlay:attention', expect.any(Function))
- );
- return MockSocket.last as MockSocket;
- };
-
- it('connects using the preloaded core URL and shows the idle pill', async () => {
- const socket = await renderAndConnect();
- expect(connectCoreSocket).toHaveBeenCalledTimes(1);
- expect(socket.connect).toHaveBeenCalled();
- });
-
- it('renders Listening on a dictation press', async () => {
- const socket = await renderAndConnect();
- socket.fire('dictation:toggle', { type: 'pressed' });
- expect(await screen.findByText('Listening…')).toBeInTheDocument();
- });
-
- it('renders the transcript text on dictation:transcription', async () => {
- const socket = await renderAndConnect();
- socket.fire('dictation:transcription', { text: 'play some music' });
- expect(await screen.findByText('play some music')).toBeInTheDocument();
- });
-
- it('renders an overlay:attention message', async () => {
- const socket = await renderAndConnect();
- socket.fire('overlay:attention', { message: 'Opening Music', ttl_ms: 5000 });
- expect(await screen.findByText('Opening Music')).toBeInTheDocument();
- });
-
- it('connects via the notch:core-url event when no URL was preloaded', async () => {
- delete (window as { __OPENHUMAN_NOTCH_CORE_URL__?: string }).__OPENHUMAN_NOTCH_CORE_URL__;
- render(<NotchApp />);
- expect(screen.getByText('Ready')).toBeInTheDocument();
- expect(connectCoreSocket).not.toHaveBeenCalled();
-
- act(() =>
- window.dispatchEvent(
- new CustomEvent('notch:core-url', { detail: { url: 'http://127.0.0.1:8888' } })
- )
- );
- await waitFor(() => expect(connectCoreSocket).toHaveBeenCalledTimes(1));
- });
-});
diff --git a/app/src/notch/NotchApp.tsx b/app/src/notch/NotchApp.tsx
deleted file mode 100644
index d28e9b6835..0000000000
--- a/app/src/notch/NotchApp.tsx
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * NotchApp
- *
- * Standalone React root rendered inside the native macOS NSPanel that floats
- * at the top-centre of the primary screen (see `crates/openhuman-app/src/notch_window.rs`).
- *
- * The panel has no Tauri IPC bridge (WKWebView outside the CEF runtime). The
- * Rust host injects the core base URL via `evaluateJavaScript` once
- * `OPENHUMAN_CORE_RPC_URL` is set by `CoreProcessHandle`, dispatching:
- * `window.__OPENHUMAN_NOTCH_CORE_URL__` (global)
- * `notch:core-url` CustomEvent (for late mounts)
- *
- * This component connects to the core over Socket.IO — identical to
- * `OverlayApp` — and renders a pill that expands from the notch area when
- * voice is active or the agent is performing an action.
- *
- * Events handled:
- * dictation:toggle voice recording started / stopped
- * dictation:transcription final transcript text
- * overlay:attention core broadcast message
- */
-import { useCallback, useEffect, useRef, useState } from 'react';
-import type { Socket } from 'socket.io-client';
-
-import { useT } from '../lib/i18n/I18nContext';
-import { connectCoreSocket } from '../services/coreSocket';
-
-// ── Types ─────────────────────────────────────────────────────────────────────
-
-// 'ready' is the always-visible idle baseline (shows "Ready"); the pill never
-// fully disappears so the user always knows the listener's status.
-type NotchMode = 'ready' | 'listening' | 'transcribing' | 'thinking' | 'speaking' | 'attention';
-
-interface NotchState {
- mode: NotchMode;
- text: string;
-}
-
-interface DictationTogglePayload {
- type?: string;
-}
-interface DictationTranscriptionPayload {
- text?: string;
-}
-interface AttentionPayload {
- message?: string;
- ttl_ms?: number;
-}
-
-// ── Constants ─────────────────────────────────────────────────────────────────
-
-const LINGER_MS = 1800;
-const DEFAULT_TTL_MS = 6000;
-
-// ── Waveform bars (voice activity animation) ──────────────────────────────────
-
-function WaveformBars() {
- return (
- <div className="flex items-center gap-[3px]" aria-hidden="true">
- {[0, 1, 2, 3, 4].map(i => (
- <span
- key={i}
- className="w-[3px] rounded-full bg-surface/90"
- style={{
- height: `${10 + (i % 3) * 4}px`,
- animation: `notch-bar 0.9s ease-in-out infinite`,
- animationDelay: `${i * 0.12}s`,
- }}
- />
- ))}
- </div>
- );
-}
-
-// ── Spinner dots ──────────────────────────────────────────────────────────────
-
-function SpinnerDots() {
- return (
- <div className="flex items-center gap-[4px]" aria-hidden="true">
- {[0, 1, 2].map(i => (
- <span
- key={i}
- className="h-[5px] w-[5px] rounded-full bg-surface/80"
- style={{
- animation: `notch-dot 1.2s ease-in-out infinite`,
- animationDelay: `${i * 0.2}s`,
- }}
- />
- ))}
- </div>
- );
-}
-
-// ── Icon glyph ────────────────────────────────────────────────────────────────
-
-function ModeIcon({ mode }: { mode: NotchMode }) {
- // Steady green dot when idle/ready — calm "I'm listening for the wake word".
- if (mode === 'ready') return <span className="h-2 w-2 rounded-full bg-emerald-400/90" />;
- if (mode === 'listening') return <WaveformBars />;
- if (mode === 'transcribing' || mode === 'thinking') return <SpinnerDots />;
- if (mode === 'speaking') {
- return (
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
- <path
- d="M8 1.5a3 3 0 0 1 3 3v4a3 3 0 0 1-6 0v-4a3 3 0 0 1 3-3z"
- fill="rgba(255,255,255,0.9)"
- />
- <path
- d="M3.5 7.5A4.5 4.5 0 0 0 8 12a4.5 4.5 0 0 0 4.5-4.5"
- stroke="rgba(255,255,255,0.9)"
- strokeWidth="1.2"
- strokeLinecap="round"
- />
- <line
- x1="8"
- y1="12"
- x2="8"
- y2="14.5"
- stroke="rgba(255,255,255,0.9)"
- strokeWidth="1.2"
- strokeLinecap="round"
- />
- </svg>
- );
- }
- // attention / fallback
- return <span className="h-2 w-2 rounded-full bg-blue-400" />;
-}
-
-// ── Main component ────────────────────────────────────────────────────────────
-
-export default function NotchApp() {
- const { t } = useT();
- const [state, setState] = useState<NotchState>({ mode: 'ready', text: '' });
- const dismissRef = useRef<number | null>(null);
- const socketRef = useRef<Socket | null>(null);
-
- const clearDismiss = useCallback(() => {
- if (dismissRef.current !== null) {
- window.clearTimeout(dismissRef.current);
- dismissRef.current = null;
- }
- }, []);
-
- const scheduleDismiss = useCallback(
- (ms: number) => {
- clearDismiss();
- dismissRef.current = window.setTimeout(() => {
- // Fall back to the always-visible "Ready" baseline, never invisible.
- setState({ mode: 'ready', text: '' });
- dismissRef.current = null;
- }, ms);
- },
- [clearDismiss]
- );
-
- // ── Socket.IO connection ────────────────────────────────────────────────────
-
- const connectSocket = useCallback(
- (baseUrl: string) => {
- if (socketRef.current?.connected) return;
- if (socketRef.current) {
- socketRef.current.disconnect();
- }
-
- let disposed = false;
- void (async () => {
- try {
- const socket = await connectCoreSocket({
- getBaseUrl: async () => baseUrl,
- isDisposed: () => disposed,
- });
- if (!socket || disposed) return;
- socketRef.current = socket;
-
- socket.on('dictation:toggle', (payload: DictationTogglePayload) => {
- const type = payload?.type ?? 'pressed';
- console.debug(`[notch] dictation:toggle type=${type}`);
- if (type === 'pressed') {
- clearDismiss();
- setState({ mode: 'listening', text: t('notch.listening', 'Listening…') });
- } else if (type === 'released') {
- scheduleDismiss(LINGER_MS);
- }
- });
-
- socket.on('dictation:transcription', (payload: DictationTranscriptionPayload) => {
- const text = payload?.text?.trim();
- if (!text) return;
- console.debug(`[notch] dictation:transcription chars=${text.length}`);
- clearDismiss();
- setState({
- mode: 'transcribing',
- text: text.length > 60 ? `${text.slice(0, 57)}…` : text,
- });
- scheduleDismiss(LINGER_MS);
- });
-
- socket.on('overlay:attention', (payload: AttentionPayload) => {
- const message = payload?.message?.trim();
- if (!message) return;
- console.debug(`[notch] overlay:attention chars=${message.length}`);
- clearDismiss();
- // The voice listener uses two reserved status words to drive the
- // pill: "Listening" (capturing speech) and "Processing" (running a
- // command). Map them to the matching icon; everything else is a
- // generic attention message.
- const lower = message.toLowerCase();
- const mode: NotchMode =
- lower === 'listening'
- ? 'listening'
- : lower === 'processing'
- ? 'thinking'
- : 'attention';
- setState({ mode, text: message.length > 60 ? `${message.slice(0, 57)}…` : message });
- scheduleDismiss(payload?.ttl_ms ?? DEFAULT_TTL_MS);
- });
-
- socket.connect();
- console.debug('[notch] socket connected', socket.id);
- } catch (err) {
- console.warn('[notch] failed to connect socket', err);
- }
- })();
-
- return () => {
- disposed = true;
- };
- },
- [t, clearDismiss, scheduleDismiss]
- );
-
- // ── Core URL bootstrap ──────────────────────────────────────────────────────
-
- useEffect(() => {
- // Track the in-flight connect's disposer so an unmount (or a new core-url)
- // cancels a still-resolving connectCoreSocket — otherwise the async branch
- // could attach listeners / setState after teardown.
- let disposePendingConnect: (() => void) | undefined;
-
- // Check if Rust already injected the URL before this component mounted.
- const preloaded = (window as { __OPENHUMAN_NOTCH_CORE_URL__?: string })
- .__OPENHUMAN_NOTCH_CORE_URL__;
- if (preloaded) {
- disposePendingConnect = connectSocket(preloaded);
- }
-
- // Also listen for the event (fires when core becomes ready after mount).
- const handler = (e: CustomEvent<{ url: string }>) => {
- if (e.detail?.url) {
- disposePendingConnect?.();
- disposePendingConnect = connectSocket(e.detail.url);
- }
- };
- window.addEventListener('notch:core-url', handler as EventListener);
-
- return () => {
- window.removeEventListener('notch:core-url', handler as EventListener);
- disposePendingConnect?.();
- socketRef.current?.disconnect();
- socketRef.current = null;
- clearDismiss();
- };
- }, [connectSocket, clearDismiss]);
-
- // ── Render ──────────────────────────────────────────────────────────────────
-
- const { mode, text } = state;
-
- // The pill is ALWAYS visible so the user can always see the listener status:
- // Ready (idle) · Listening (capturing speech) · Processing (running a command).
- const label = text || (mode === 'ready' ? t('notch.ready', 'Ready') : '');
-
- const pillBg =
- mode === 'speaking'
- ? 'bg-[rgba(10,40,10,0.92)]'
- : mode === 'ready'
- ? 'bg-[rgba(10,10,10,0.72)]' // dimmer when idle
- : 'bg-[rgba(10,10,10,0.92)]';
-
- return (
- <div className="flex h-screen w-screen items-start justify-center bg-transparent pt-[10px]">
- <div
- className={`flex select-none items-center gap-2 rounded-full px-4 py-[7px] shadow-lg ${pillBg}`}
- style={{
- animation: 'notch-pill-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1)',
- backdropFilter: 'blur(12px)',
- WebkitBackdropFilter: 'blur(12px)',
- }}>
- <ModeIcon mode={mode} />
- {label && (
- <span className="max-w-[260px] truncate text-[13px] font-medium leading-none tracking-[-0.01em] text-white/95">
- {label}
- </span>
- )}
- </div>
- </div>
- );
-}
diff --git a/app/src/utils/tauriCommands/window.test.ts b/app/src/utils/tauriCommands/window.test.ts
deleted file mode 100644
index a211ff6606..0000000000
--- a/app/src/utils/tauriCommands/window.test.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { invoke } from '@tauri-apps/api/core';
-import { beforeEach, describe, expect, test, vi } from 'vitest';
-
-import { isTauri } from './common';
-import { notchWindowHide, notchWindowShow, syncNotchVisibility } from './window';
-
-vi.mock('@tauri-apps/api/core', () => ({ invoke: vi.fn() }));
-vi.mock('./common', () => ({ isTauri: vi.fn() }));
-
-describe('tauriCommands/window — notch indicator', () => {
- beforeEach(() => {
- vi.mocked(invoke).mockReset();
- vi.mocked(isTauri).mockReset();
- vi.mocked(isTauri).mockReturnValue(true);
- vi.mocked(invoke).mockResolvedValue(undefined);
- });
-
- test('notchWindowShow invokes the notch_window_show command', async () => {
- await notchWindowShow();
- expect(invoke).toHaveBeenCalledWith('notch_window_show');
- });
-
- test('notchWindowHide invokes the notch_window_hide command', async () => {
- await notchWindowHide();
- expect(invoke).toHaveBeenCalledWith('notch_window_hide');
- });
-
- test('notch commands no-op (and never invoke) outside Tauri', async () => {
- vi.mocked(isTauri).mockReturnValue(false);
-
- await notchWindowShow();
- await notchWindowHide();
-
- expect(invoke).not.toHaveBeenCalled();
- });
-
- test('notch commands swallow invoke rejections so callers never throw', async () => {
- vi.mocked(invoke).mockRejectedValue(new Error('panel build failed'));
-
- // Must resolve, not reject — notch visibility is cosmetic and should never
- // surface as an error to the caller.
- await expect(notchWindowShow()).resolves.toBeUndefined();
- await expect(notchWindowHide()).resolves.toBeUndefined();
- });
-
- test('syncNotchVisibility(true) shows the notch', async () => {
- await syncNotchVisibility(true);
- expect(invoke).toHaveBeenCalledWith('notch_window_show');
- expect(invoke).not.toHaveBeenCalledWith('notch_window_hide');
- });
-
- test('syncNotchVisibility(false) hides the notch', async () => {
- await syncNotchVisibility(false);
- expect(invoke).toHaveBeenCalledWith('notch_window_hide');
- expect(invoke).not.toHaveBeenCalledWith('notch_window_show');
- });
-});
diff --git a/crates/openhuman-app/README.md b/crates/openhuman-app/README.md
index 355c899689..df91690089 100644
--- a/crates/openhuman-app/README.md
+++ b/crates/openhuman-app/README.md
@@ -187,7 +187,7 @@ Platform integration:
| [`src/imessage_scanner/`](src/imessage_scanner/) | macOS: reads `chat.db` and ingests conversations into memory. See [`src/imessage_scanner/`](src/imessage_scanner/README.md). |
| [`src/dictation_hotkeys.rs`](src/dictation_hotkeys.rs), [`src/ptt_hotkeys.rs`](src/ptt_hotkeys.rs) | Global shortcut parsing and state for dictation and push-to-talk. |
| [`src/ptt_overlay.rs`](src/ptt_overlay.rs) | Borderless always-on-top window for push-to-talk, rendering the `/ptt-overlay` route. |
-| [`src/mascot_native_window.rs`](src/mascot_native_window.rs), [`src/notch_window.rs`](src/notch_window.rs) | macOS: native NSPanel plus WKWebView hosts for the floating mascot and the notch activity pill. |
+| [`src/mascot_native_window.rs`](src/mascot_native_window.rs) | macOS: native NSPanel plus WKWebView host for the floating mascot. |
| [`src/window_state.rs`](src/window_state.rs) | Saves and restores main window position and size, with a DPI guard and work-area clamping. |
| [`src/directory_picker.rs`](src/directory_picker.rs) | Native folder chooser for the folder memory source. |
| [`src/workspace_paths.rs`](src/workspace_paths.rs) | Open, reveal or preview a file, only after resolving it inside the active workspace. |
@@ -234,7 +234,7 @@ The authoritative list is the `tauri::generate_handler!` call near the end of
| Gateways (feature `gateways`) | `gateway_list`, `gateway_save`, `gateway_delete`, `gateway_activate`, `gateway_active`, `gateway_status` |
| Session | `auth_login_with_token`, `auth_store_session`, `auth_logout`, `auth_state`, `auth_current_user`, `get_active_user_id` |
| Updates | `check_app_update`, `download_app_update`, `install_app_update`, `apply_app_update`, `check_core_update`, `apply_core_update` |
-| App and windows | `app_quit`, `restart_app`, `activate_main_window`, `set_titlebar_for_sidebar`, `mascot_window_show`, `mascot_window_hide`, `notch_window_show`, `notch_window_hide` |
+| App and windows | `app_quit`, `restart_app`, `activate_main_window`, `set_titlebar_for_sidebar`, `mascot_window_show`, `mascot_window_hide` |
| Hotkeys and voice | `register_dictation_hotkey`, `unregister_dictation_hotkey`, `register_ptt_hotkey`, `unregister_ptt_hotkey`, `show_ptt_overlay` |
| Notifications | `notification_permission_state`, `notification_permission_request`, `show_native_notification` |
| Files and logs | `open_workspace_path`, `reveal_workspace_path`, `preview_workspace_text`, `download_artifact_to_downloads`, `pick_directory_via_dialog`, `reveal_logs_folder`, `logs_folder_path`, `reset_local_data` |
diff --git a/crates/openhuman-app/permissions/README.md b/crates/openhuman-app/permissions/README.md
index c6592829fa..a3e2a17293 100644
--- a/crates/openhuman-app/permissions/README.md
+++ b/crates/openhuman-app/permissions/README.md
@@ -31,7 +31,7 @@ RuntimeAuthority::resolve_access
| File | Identifier | Commands |
| --- | --- | --- |
-| [`allow-core-process.toml`](allow-core-process.toml) | `allow-core-process` | Core endpoint and lifecycle (`core_rpc_*`, `relay_http_rpc`, `relay_remote_socket`, `start_core_process`, `restart_core_process`, `reset_local_data`), app control (`restart_app`, `app_quit`), session (`get_active_user_id`, `auth_*`), dictation and push-to-talk hotkeys, `show_ptt_overlay`, `activate_main_window`, notch window, native notifications, and log folder commands. |
+| [`allow-core-process.toml`](allow-core-process.toml) | `allow-core-process` | Core endpoint and lifecycle (`core_rpc_*`, `relay_http_rpc`, `relay_remote_socket`, `start_core_process`, `restart_core_process`, `reset_local_data`), app control (`restart_app`, `app_quit`), session (`get_active_user_id`, `auth_*`), dictation and push-to-talk hotkeys, `show_ptt_overlay`, `activate_main_window`, native notifications, and log folder commands. |
| [`allow-app-update.toml`](allow-app-update.toml) | `allow-app-update` | `check_app_update`, `apply_app_update`, `download_app_update`, `install_app_update`. |
| [`allow-workspace-files.toml`](allow-workspace-files.toml) | `allow-workspace-files` | `open_workspace_path`, `reveal_workspace_path`, `preview_workspace_text`. |
| [`allow-artifact-download.toml`](allow-artifact-download.toml) | `allow-artifact-download` | `download_artifact_to_downloads`, `save_artifact_as`. |
diff --git a/crates/openhuman-app/permissions/allow-core-process.toml b/crates/openhuman-app/permissions/allow-core-process.toml
index cd9ec1c0dc..c035d479ac 100644
--- a/crates/openhuman-app/permissions/allow-core-process.toml
+++ b/crates/openhuman-app/permissions/allow-core-process.toml
@@ -132,9 +132,7 @@ allow = [
# PUSH-TO-TALK (PTT)
# =========================
# Voice settings panel registers/unregisters the global PTT hotkey and shows
- # the PTT overlay via these invokes. Without these allow entries the invoke
- # is rejected with "Command <name> not allowed by ACL" and PTT (plus the
- # always-on listening flow that depends on hotkey registration) never works.
+ # the PTT overlay via these invokes. Without these allow entries, PTT never works.
"register_ptt_hotkey",
"unregister_ptt_hotkey",
"show_ptt_overlay",
@@ -148,12 +146,6 @@ allow = [
# Floating mascot window (native NSPanel on macOS; errors elsewhere).
"mascot_window_show",
"mascot_window_hide",
- # Notch activity indicator (transparent NSPanel pill, macOS). The Voice
- # settings panel + app boot call these via `syncNotchVisibility` to mirror
- # always-on listening state. Without these allow entries the invoke is
- # rejected with "Command not found" and the notch never shows/hides.
- "notch_window_show",
- "notch_window_hide",
# =========================
# NOTIFICATIONS
diff --git a/crates/openhuman-app/src/lib.rs b/crates/openhuman-app/src/lib.rs
index 0b2f8acf05..1aaeb7eb85 100644
--- a/crates/openhuman-app/src/lib.rs
+++ b/crates/openhuman-app/src/lib.rs
@@ -3184,18 +3184,6 @@ pub fn run() {
// let _ = window.show();
// }
- // Notch activity indicator: transparent pill at the top-centre of
- // the primary screen. Shows live voice / agent state. macOS only
- // (physical notch or menu-bar HUD on older hardware).
- //
- // It is NOT auto-shown here: the notch is the always-on listening
- // HUD, so its visibility is owned by the frontend, which calls
- // `notch_window_show` / `notch_window_hide` (via `syncNotchVisibility`)
- // to mirror `voice_server.always_on_enabled` — once on boot and
- // whenever the Settings toggle flips. Showing it unconditionally
- // here would flash the pill on every launch even with always-on
- // listening disabled (the default).
-
// Tray icon setup moved to RunEvent::Ready (see below) — GTK is only
// initialized after the event loop starts, so we must delay tray creation
// until the Ready event fires. Creating the tray here would panic on
@@ -3286,8 +3274,6 @@ pub fn run() {
native_notifications::show_native_notification,
mascot_window_show,
mascot_window_hide,
- notch_window_show,
- notch_window_hide,
file_logging::reveal_logs_folder,
file_logging::logs_folder_path,
workspace_paths::open_workspace_path,
diff --git a/crates/openhuman-app/src/notch_window.rs b/crates/openhuman-app/src/notch_window.rs
deleted file mode 100644
index 4fc3f7202a..0000000000
--- a/crates/openhuman-app/src/notch_window.rs
+++ /dev/null
@@ -1,388 +0,0 @@
-//! Native macOS NSPanel + WKWebView host for the notch activity indicator.
-//!
-//! A transparent, click-through floating panel anchored to the top-centre of
-//! the primary screen. On MacBook Pros with a physical notch the pill visually
-//! emerges from the notch; on older Macs it acts as a top-centre floating HUD.
-//!
-//! Architecture mirrors `mascot_native_window` — a native NSPanel avoids the
-//! CEF transparency limitation (vendored tauri-cef cannot render transparent
-//! windowed-mode browsers; only off-screen rendering supports transparency,
-//! which the runtime does not enable). The WKWebView loads the same Vite entry
-//! point at `?window=notch` so the React tree can branch in `main.tsx`.
-//!
-//! IPC strategy: no Tauri IPC bridge. The panel polls
-//! `OPENHUMAN_CORE_RPC_URL` (set by `CoreProcessHandle` once the embedded
-//! server is ready) and injects it via `evaluateJavaScript` so the React app
-//! can open a Socket.IO connection to receive live voice and agent events.
-
-use std::cell::{Cell, RefCell};
-use std::path::PathBuf;
-use std::ptr::NonNull;
-use std::rc::Rc;
-
-use block2::RcBlock;
-use objc2::rc::Retained;
-use objc2::{msg_send, MainThreadMarker, MainThreadOnly};
-use objc2_app_kit::{
- NSBackingStoreType, NSColor, NSPanel, NSScreen, NSWindowCollectionBehavior, NSWindowStyleMask,
-};
-use objc2_foundation::{NSNumber, NSPoint, NSRect, NSSize, NSString, NSTimer, NSURLRequest, NSURL};
-use objc2_web_kit::{WKWebView, WKWebViewConfiguration};
-use tauri::{AppHandle, Manager};
-
-use crate::AppRuntime;
-
-/// Logical width of the notch panel. Wide enough to display voice/action text.
-const PANEL_WIDTH: f64 = 380.0;
-/// Logical height — covers the menu-bar / notch depth with headroom for the pill.
-const PANEL_HEIGHT: f64 = 54.0;
-/// URL-inject timer interval in seconds.
-const INJECT_POLL_SECONDS: f64 = 1.0;
-/// Ticks to wait before the first inject attempt (page-load delay).
-const PAGE_LOAD_TICKS: u32 = 2;
-
-struct NotchPanel {
- panel: Retained<NSPanel>,
- #[allow(dead_code)]
- webview: Retained<WKWebView>,
- inject_timer: Retained<NSTimer>,
-}
-
-impl NotchPanel {
- fn order_out(&self) {
- self.inject_timer.invalidate();
- self.panel.orderOut(None);
- }
-}
-
-thread_local! {
- /// Accessed only from the main thread. NSPanel/WKWebView are not Send/Sync
- /// so a thread-local is the simplest safe storage.
- static NOTCH: RefCell<Option<NotchPanel>> = const { RefCell::new(None) };
-}
-
-pub(crate) fn hide() {
- NOTCH.with(|cell| {
- if let Some(existing) = cell.borrow_mut().take() {
- log::info!("[notch-window] dropping panel");
- existing.order_out();
- }
- });
-}
-
-pub(crate) fn show(app: &AppHandle<AppRuntime>) -> Result<(), String> {
- if NOTCH.with(|cell| cell.borrow().is_some()) {
- log::debug!("[notch-window] already open");
- return Ok(());
- }
-
- let mtm = MainThreadMarker::new()
- .ok_or_else(|| "notch_window::show called off the main thread".to_string())?;
-
- let source = resolve_page_source(app)?;
- // Log only the source *kind* — bundled paths contain `/Users/<login>/…`
- // (PII), so never log the absolute resource paths.
- log::info!(
- "[notch-window] loading source_kind={}",
- match &source {
- PageSource::Dev { .. } => "dev",
- PageSource::Bundled { .. } => "bundled",
- }
- );
-
- let frame = top_center_frame(mtm);
- log::debug!(
- "[notch-window] frame origin=({:.0},{:.0}) size=({:.0},{:.0})",
- frame.origin.x,
- frame.origin.y,
- frame.size.width,
- frame.size.height
- );
-
- let panel = unsafe { build_panel(mtm, frame) };
- let webview = unsafe { build_webview(mtm, &panel, &source) };
-
- panel.orderFrontRegardless();
-
- let inject_timer = unsafe { spawn_inject_timer(webview.clone()) };
-
- NOTCH.with(|cell| {
- *cell.borrow_mut() = Some(NotchPanel {
- panel,
- webview,
- inject_timer,
- });
- });
- log::info!("[notch-window] panel shown at top-center");
- Ok(())
-}
-
-// ── Page source ───────────────────────────────────────────────────────────────
-
-#[derive(Debug)]
-enum PageSource {
- Dev { url: String },
- Bundled { index_html: PathBuf, root: PathBuf },
-}
-
-fn resolve_page_source(app: &AppHandle<AppRuntime>) -> Result<PageSource, String> {
- if let Some(mut url) = app.config().build.dev_url.as_ref().cloned() {
- let query = url
- .query()
- .map(|q| format!("{q}&window=notch"))
- .unwrap_or_else(|| "window=notch".into());
- url.set_query(Some(&query));
- return Ok(PageSource::Dev {
- url: url.to_string(),
- });
- }
-
- let resource_dir = app
- .path()
- .resource_dir()
- .map_err(|e| format!("resolve resource_dir: {e}"))?;
- for candidate in [
- resource_dir.join("index.html"),
- resource_dir.join("dist").join("index.html"),
- ] {
- if candidate.is_file() {
- let root = candidate
- .parent()
- .map(|p| p.to_path_buf())
- .unwrap_or_else(|| resource_dir.clone());
- return Ok(PageSource::Bundled {
- index_html: candidate,
- root,
- });
- }
- }
- Err("notch bundled index.html not found under the app resource dir".to_string())
-}
-
-// ── Frame geometry ────────────────────────────────────────────────────────────
-
-fn primary_screen_frame(mtm: MainThreadMarker) -> NSRect {
- let screens = NSScreen::screens(mtm);
- if let Some(primary) = screens.firstObject() {
- return primary.frame();
- }
- log::warn!("[notch-window] NSScreen::screens returned empty — falling back to 1440×900");
- NSRect::new(NSPoint::new(0.0, 0.0), NSSize::new(1440.0, 900.0))
-}
-
-/// Centre the panel horizontally at the very top of the primary screen.
-///
-/// AppKit uses a bottom-left origin, so:
-/// top-y = screen.origin.y + screen.height − PANEL_HEIGHT
-/// center-x = screen.origin.x + (screen.width − PANEL_WIDTH) / 2
-fn top_center_frame(mtm: MainThreadMarker) -> NSRect {
- let screen = primary_screen_frame(mtm);
- let x = screen.origin.x + (screen.size.width - PANEL_WIDTH) / 2.0;
- let y = screen.origin.y + screen.size.height - PANEL_HEIGHT;
- NSRect::new(NSPoint::new(x, y), NSSize::new(PANEL_WIDTH, PANEL_HEIGHT))
-}
-
-// ── NSPanel construction ──────────────────────────────────────────────────────
-
-unsafe fn build_panel(mtm: MainThreadMarker, frame: NSRect) -> Retained<NSPanel> {
- let style = NSWindowStyleMask::Borderless | NSWindowStyleMask::NonactivatingPanel;
- let panel: Retained<NSPanel> = unsafe {
- let allocated = NSPanel::alloc(mtm);
- msg_send![
- allocated,
- initWithContentRect: frame,
- styleMask: style,
- backing: NSBackingStoreType::Buffered,
- defer: false,
- ]
- };
-
- unsafe {
- panel.setOpaque(false);
- let clear = NSColor::clearColor();
- panel.setBackgroundColor(Some(&clear));
- panel.setHasShadow(false);
-
- // Float above the menu bar. NSStatusWindowLevel = 25, which sits above
- // NSMainMenuWindowLevel = 24. Same recipe used by the mascot panel and
- // the `configure_overlay_window_macos` helper.
- panel.setLevel(25);
- panel.setCollectionBehavior(
- NSWindowCollectionBehavior::CanJoinAllSpaces
- | NSWindowCollectionBehavior::Transient
- | NSWindowCollectionBehavior::FullScreenAuxiliary
- | NSWindowCollectionBehavior::IgnoresCycle,
- );
- panel.setFloatingPanel(true);
- panel.setHidesOnDeactivate(false);
- panel.setBecomesKeyOnlyIfNeeded(true);
- panel.setWorksWhenModal(true);
-
- // Fully click-through: the panel never steals mouse events. Menu-bar
- // items remain clickable through the transparent regions.
- panel.setIgnoresMouseEvents(true);
-
- let _: () = msg_send![&*panel, setExcludedFromWindowsMenu: true];
- }
-
- panel
-}
-
-// ── WKWebView construction ────────────────────────────────────────────────────
-
-unsafe fn build_webview(
- mtm: MainThreadMarker,
- panel: &NSPanel,
- source: &PageSource,
-) -> Retained<WKWebView> {
- let config: Retained<WKWebViewConfiguration> = unsafe {
- let alloc = WKWebViewConfiguration::alloc(mtm);
- msg_send![alloc, init]
- };
-
- let frame = NSRect::new(
- NSPoint::new(0.0, 0.0),
- NSSize::new(PANEL_WIDTH, PANEL_HEIGHT),
- );
- let webview: Retained<WKWebView> =
- unsafe { WKWebView::initWithFrame_configuration(WKWebView::alloc(mtm), frame, &config) };
-
- unsafe {
- // Disable WKWebView's own background so CSS `background: transparent` works.
- // There is no public API for this on macOS — KVC against the private
- // `drawsBackground` property is the canonical approach (used by wry, Electron).
- let no = NSNumber::numberWithBool(false);
- let key = NSString::from_str("drawsBackground");
- let _: () = msg_send![&*webview, setValue: &*no, forKey: &*key];
-
- // Auto-resize to fill the panel content view.
- let _: () = msg_send![&*webview, setAutoresizingMask: 18u64]; // width|height
-
- let webview_ref: &objc2::runtime::AnyObject = &webview;
- let webview_view = webview_ref as *const _ as *mut objc2::runtime::AnyObject;
- let _: () = msg_send![panel, setContentView: webview_view];
-
- match source {
- PageSource::Dev { url } => {
- let ns_url_str = NSString::from_str(url);
- let ns_url = NSURL::URLWithString(&ns_url_str);
- if let Some(ns_url) = ns_url {
- let request = NSURLRequest::requestWithURL(&ns_url);
- let _ = webview.loadRequest(&request);
- } else {
- log::warn!("[notch-window] could not parse dev url={url}");
- }
- }
- PageSource::Bundled { index_html, root } => {
- let Ok(mut file_url) = url::Url::from_file_path(index_html) else {
- log::warn!(
- "[notch-window] index_html not absolute: {}",
- index_html.display()
- );
- return webview;
- };
- file_url.set_query(Some("window=notch"));
- let Ok(read_access_url) = url::Url::from_file_path(root) else {
- log::warn!(
- "[notch-window] resource root not absolute: {}",
- root.display()
- );
- return webview;
- };
- let ns_url_str = NSString::from_str(file_url.as_str());
- let read_access_str = NSString::from_str(read_access_url.as_str());
- match (
- NSURL::URLWithString(&ns_url_str),
- NSURL::URLWithString(&read_access_str),
- ) {
- (Some(ns_url), Some(read_access_ns)) => {
- let _ =
- webview.loadFileURL_allowingReadAccessToURL(&ns_url, &read_access_ns);
- log::info!(
- "[notch-window] loaded bundled page index={}",
- index_html
- .file_name()
- .and_then(|n| n.to_str())
- .unwrap_or("index.html")
- );
- }
- _ => log::warn!(
- "[notch-window] could not parse bundled file URLs (index={})",
- index_html
- .file_name()
- .and_then(|n| n.to_str())
- .unwrap_or("index.html")
- ),
- }
- }
- }
- }
-
- webview
-}
-
-// ── Core-URL injection timer ──────────────────────────────────────────────────
-
-/// Spawn a 1 Hz repeating timer that waits for the embedded core to become
-/// ready (indicated by `CoreProcessHandle` setting `OPENHUMAN_CORE_RPC_URL`
-/// in the process env), then injects the base URL into the WKWebView.
-///
-/// After the first successful inject the timer becomes a no-op until it is
-/// invalidated by `NotchPanel::order_out()` when the panel is hidden.
-unsafe fn spawn_inject_timer(webview: Retained<WKWebView>) -> Retained<NSTimer> {
- let tick_count: Rc<Cell<u32>> = Rc::new(Cell::new(0));
- let injected: Rc<Cell<bool>> = Rc::new(Cell::new(false));
-
- let block = RcBlock::new(move |_timer: NonNull<NSTimer>| {
- tick_count.set(tick_count.get() + 1);
-
- if injected.get() || tick_count.get() < PAGE_LOAD_TICKS {
- return;
- }
-
- let Ok(rpc_url) = std::env::var("OPENHUMAN_CORE_RPC_URL") else {
- return; // Core not ready yet — try again next tick.
- };
-
- // Strip `/rpc` path suffix; Socket.IO connects to the base host.
- let base_url = rpc_url.trim_end_matches("/rpc").to_string();
-
- // The core Socket.IO handshake rejects unauthenticated clients, and this
- // WKWebView has no Tauri IPC, so `getCoreRpcToken()` can't `invoke`. Hand
- // the per-process bearer in via a global the same way as the URL (our own
- // first-party webview — same trust as the renderer's `core_rpc_token`).
- // The token is published *after* the URL env is set (post embedded spawn),
- // so wait for it rather than injecting an empty token that gets rejected.
- let token = match crate::core_process::current_rpc_token() {
- Some(t) if !t.is_empty() => t,
- _ => return, // bearer not published yet — retry next tick
- };
- log::info!(
- "[notch-window] injecting core url + bearer (token_len={})",
- token.len()
- );
-
- // Set a global AND dispatch a custom event so React can pick up the URL
- // regardless of whether the component mounted before or after this fires.
- let js = format!(
- "window.__OPENHUMAN_NOTCH_CORE_TOKEN__='{token}';\
- window.__OPENHUMAN_NOTCH_CORE_URL__='{base_url}';\
- window.dispatchEvent(new CustomEvent('notch:core-url',{{detail:{{url:'{base_url}'}}}}));"
- );
- let js_str = NSString::from_str(&js);
- unsafe {
- let _: () = msg_send![
- &*webview,
- evaluateJavaScript: &*js_str,
- completionHandler: std::ptr::null::<objc2::runtime::AnyObject>()
- ];
- }
-
- injected.set(true);
- log::debug!("[notch-window] injected core URL base={base_url}");
- });
-
- unsafe {
- NSTimer::scheduledTimerWithTimeInterval_repeats_block(INJECT_POLL_SECONDS, true, &block)
- }
-}