The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): remove persistent HUD gesture status chrome
brooklyn!d00c951523a2
diff --git a/apps/desktop/src/app/settings/hud-modifier-settings.test.tsx b/apps/desktop/src/app/settings/hud-modifier-settings.test.tsxindex d3963cd0d39..4de041a068e 100644--- a/apps/desktop/src/app/settings/hud-modifier-settings.test.tsx+++ b/apps/desktop/src/app/settings/hud-modifier-settings.test.tsx@@ -58,15 +58,16 @@ it('requires explicit opt-in and native readiness, with permission recovery andawait act(async () => fireEvent.click(toggle))expect(api.setEnabled).toHaveBeenLastCalledWith(true)expect(screen.getByText(copy.permission)).toBeTruthy()- expect(screen.queryByText(copy.ready)).toBeNull()await act(async () => fireEvent.click(screen.getByRole('button', { name: common.openSettings })))expect(api.openPermissionSettings).toHaveBeenCalledOnce()api.setEnabled.mockResolvedValueOnce({ enabled: true, state: 'starting' })await act(async () => fireEvent.click(screen.getByRole('button', { name: common.retry })))expect(api.setEnabled).toHaveBeenLastCalledWith(true)- expect(screen.queryByText(copy.ready)).toBeNull()+ expect(screen.queryByRole('alert')).toBeNull()await act(async () => emit({ enabled: true, state: 'ready' }))- expect(screen.getByText(copy.ready)).toBeTruthy()+ expect(toggle).toHaveProperty('ariaChecked', 'true')+ expect(view.container.textContent).toBe(`${copy.title}${copy.description}`)+ expect(screen.queryByRole('alert')).toBeNull()api.setEnabled.mockResolvedValueOnce({ enabled: false, state: 'disabled' })await act(async () => fireEvent.click(toggle))expect(toggle).toHaveProperty('ariaChecked', 'false')diff --git a/apps/desktop/src/app/settings/hud-modifier-settings.tsx b/apps/desktop/src/app/settings/hud-modifier-settings.tsxindex b1a115e4f1a..d60c5bbca4b 100644--- a/apps/desktop/src/app/settings/hud-modifier-settings.tsx+++ b/apps/desktop/src/app/settings/hud-modifier-settings.tsx@@ -1,12 +1,12 @@import { useCallback, useEffect, useRef, useState } from 'react'import { Button } from '@/components/ui/button'-import { Loader } from '@/components/ui/loader'+import { ErrorBanner } from '@/components/ui/error-state'import { useI18n } from '@/i18n'import type { HudModifierStatus } from '../../../electron/hud-modifier-types'-import { ListRow, ToggleRow } from './primitives'+import { ToggleRow } from './primitives'import { useDeepLinkHighlight } from './use-deep-link-highlight'const isHudModifierSetting = (target: string) => target === 'hud-modifier'@@ -86,15 +86,10 @@ export function HudModifierSettings() {}}- const descriptions: Record<HudModifierStatus['state'], string> = {- disabled: '',- starting: common.starting,- ready: copy.ready,- 'input-permission': copy.permission,- unavailable: copy.unavailable- }-- const canRetry = error || status?.state === 'input-permission' || status?.state === 'unavailable'+ const notice =+ error ??+ (status?.enabled && status.state === 'input-permission' ? copy.permission : null) ??+ (status?.enabled && status.state === 'unavailable' ? copy.unavailable : null)return (<div id={hudModifierElementId()}>@@ -105,33 +100,25 @@ export function HudModifierSettings() {label={copy.title}onChange={enabled => void refresh(enabled)}/>- {(busy || error || (status?.enabled && status.state !== 'disabled')) && (- <ListRow- action={- busy ? (- <Loader className="size-5" />- ) : (- <div className="flex flex-wrap items-center gap-2">- {status?.state === 'input-permission' && (- <Button onClick={() => void openPermissionSettings()} size="sm" variant="secondary">- {common.openSettings}- </Button>- )}- {canRetry && (- <Button- onClick={() => void refresh(error ? undefined : status?.enabled)}- size="sm"- variant="secondary"- >- {common.retry}- </Button>- )}- </div>- )- }- description={<span aria-live="polite">{error ?? descriptions[status?.state ?? 'disabled']}</span>}- title={copy.statusTitle}- />+ {notice && (+ <div className="space-y-2" role="alert">+ <ErrorBanner>{notice}</ErrorBanner>+ <div className="flex flex-wrap items-center gap-2">+ {status?.state === 'input-permission' && (+ <Button disabled={busy} onClick={() => void openPermissionSettings()} size="sm" variant="secondary">+ {common.openSettings}+ </Button>+ )}+ <Button+ disabled={busy}+ onClick={() => void refresh(error ? undefined : status?.enabled)}+ size="sm"+ variant="secondary"+ >+ {common.retry}+ </Button>+ </div>+ </div>)}</div>)diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.tsindex 6973d3e2fb0..5b7b462c48e 100644--- a/apps/desktop/src/i18n/ar.ts+++ b/apps/desktop/src/i18n/ar.ts@@ -407,6 +407,7 @@ export const ar = defineLocale({gatewayManagedUpdatesUnavailable: 'تتطلب التحديثات البعيدة إصدار سطح مكتب يدعم تحديثات SSH المُدارة.',gatewayManagedUpdatesEmpty: 'أضف اتصال SSH في الاتصالات المحفوظة لإدارة تحديثاته هنا.',keyboardShortcuts: 'تعيينات المفاتيح',+ hudGesture: 'إيماءة HUD',screenCapture: 'التقاط الشاشة',notificationAlerts: 'تنبيهات سطح المكتب',notificationSounds: 'الأصوات',@@ -903,9 +904,6 @@ export const ar = defineLocale({title: 'استدعاء HUD بضغطة',description:'اضغط ثم حرّر ⌘ + Option على Mac، أو Ctrl + Alt على Windows/Linux، لإظهار HUD من أي تطبيق. معطّل افتراضيًا ويُطبّق على هذا الجهاز فقط.',- statusTitle: 'حالة إيماءة HUD',- ready:- 'جاهزة. حرّر المفتاحين خلال نصف ثانية دون الضغط على مفتاح آخر أو استخدام الفأرة. تبقى الاختصارات الأخرى كما هي.',permission:'اسمح لـ Hermes في إعدادات النظام ← الخصوصية والأمان ← مراقبة الإدخال، ثم أعد المحاولة. لا تسجّل هذه الإيماءة ضغطات المفاتيح ولا تلتقط الشاشة.',unavailable:diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex d08f9ca65a0..a6652173a4f 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -531,6 +531,7 @@ export const en: Translations = {gatewayManagedUpdatesUnavailable: 'Remote updates need a desktop version with managed SSH update support.',gatewayManagedUpdatesEmpty: 'Add an SSH connection in Saved connections to manage its updates here.',keyboardShortcuts: 'Key bindings',+ hudGesture: 'HUD gesture',screenCapture: 'Screen capture',notificationAlerts: 'Desktop alerts',notificationSounds: 'Sounds',@@ -1033,9 +1034,6 @@ export const en: Translations = {title: 'Tap to summon HUD',description:'Tap and release ⌘ + Option on Mac, or Ctrl + Alt on Windows/Linux, to bring the HUD forward from any app. Off by default; applies only to this device.',- statusTitle: 'HUD gesture status',- ready:- 'Ready. Release both keys within half a second, without another key or mouse action. Other shortcuts stay unchanged.',permission:'Allow Hermes in System Settings → Privacy & Security → Input Monitoring, then retry. This gesture does not record keystrokes or capture your screen.',unavailable:diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex cccba8ce753..7353bd4b640 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -343,6 +343,7 @@ export const ja = defineLocale({gatewayManagedUpdatesUnavailable: 'リモート更新には、管理対象 SSH の更新に対応したデスクトップ版が必要です。',gatewayManagedUpdatesEmpty: '保存済みの接続に SSH 接続を追加すると、ここで更新を管理できます。',keyboardShortcuts: 'キー割り当て',+ hudGesture: 'HUDジェスチャー',screenCapture: '画面キャプチャ',notificationAlerts: 'デスクトップ通知',notificationSounds: 'サウンド',@@ -987,9 +988,6 @@ export const ja = defineLocale({title: 'キーをタップして HUD を呼び出す',description:'Mac では ⌘ + Option、Windows/Linux では Ctrl + Alt を押して離すと、どのアプリからでも HUD を前面に表示できます。初期設定はオフで、このデバイスにのみ適用されます。',- statusTitle: 'HUD ジェスチャーの状態',- ready:- '使用できます。他のキーやマウスを操作せず、0.5 秒以内に両方のキーを離してください。他のショートカットは変わりません。',permission:'システム設定 → プライバシーとセキュリティ → 入力監視で Hermes を許可し、再試行してください。このジェスチャーはキー入力の記録や画面の撮影を行いません。',unavailable:diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex 79e41ad338d..0eba92f4b9a 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -446,6 +446,7 @@ export const ru = defineLocale({gatewayManagedUpdatesUnavailable: 'Нужна версия приложения с поддержкой управляемых обновлений SSH.',gatewayManagedUpdatesEmpty: 'Добавьте SSH в сохранённые подключения, чтобы управлять его обновлениями здесь.',keyboardShortcuts: 'Назначения клавиш',+ hudGesture: 'Жест HUD',screenCapture: 'Захват экрана',notificationAlerts: 'Системные уведомления',notificationSounds: 'Звуки',@@ -1083,9 +1084,6 @@ export const ru = defineLocale({title: 'Вызов HUD коротким нажатием',description:'Нажмите и отпустите ⌘ + Option на Mac или Ctrl + Alt на Windows/Linux, чтобы вызвать HUD из любого приложения. По умолчанию выключено; действует только на этом устройстве.',- statusTitle: 'Состояние жеста HUD',- ready:- 'Готово. Отпустите обе клавиши в течение полусекунды, не нажимая другие клавиши и не используя мышь. Остальные сочетания не меняются.',permission:'Разрешите Hermes в Системных настройках → Конфиденциальность и безопасность → Мониторинг ввода, затем повторите попытку. Жест не записывает нажатия клавиш и не снимает экран.',unavailable:diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex 6344f981775..5e9d9249ec1 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -847,8 +847,6 @@ export interface Translations {hudModifier: {title: stringdescription: string- statusTitle: string- ready: stringpermission: stringunavailable: string}diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.tsindex 44bf30c6468..63e0f1b3508 100644--- a/apps/desktop/src/i18n/zh-hant.ts+++ b/apps/desktop/src/i18n/zh-hant.ts@@ -334,6 +334,7 @@ export const zhHant = defineLocale({gatewayManagedUpdatesUnavailable: '遠端更新需要支援受管理 SSH 更新的桌面版本。',gatewayManagedUpdatesEmpty: '請在已儲存的連線中新增 SSH 連線,即可在此管理更新。',keyboardShortcuts: '按鍵繫結',+ hudGesture: 'HUD 手勢',screenCapture: '螢幕擷取',notificationAlerts: '桌面通知',notificationSounds: '聲音',@@ -1025,8 +1026,6 @@ export const zhHant = defineLocale({title: '輕按叫出 HUD',description:'在 Mac 上按下並放開 ⌘ + Option,在 Windows/Linux 上按下並放開 Ctrl + Alt,即可從任何應用程式將 HUD 帶到前景。預設關閉,僅適用於此裝置。',- statusTitle: 'HUD 手勢狀態',- ready: '已就緒。請在半秒內放開兩個按鍵,期間不要按其他鍵或操作滑鼠。其他快速鍵不受影響。',permission: '請在系統設定 → 隱私權與安全性 → 輸入監控中允許 Hermes,然後重試。此手勢不會記錄按鍵或擷取畫面。',unavailable:'此處無法使用這個手勢。Linux 需要 X11 工作階段;Wayland 不提供全域修飾鍵輕按事件。Hermes 內原有的 HUD 快速鍵仍可使用。'diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex 457981e64d2..06c26deca15 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -486,6 +486,7 @@ export const zh = defineLocale({gatewayManagedUpdatesUnavailable: '远程更新需要支持托管 SSH 更新的桌面版本。',gatewayManagedUpdatesEmpty: '请在已保存的连接中添加 SSH 连接,即可在此管理更新。',keyboardShortcuts: '按键绑定',+ hudGesture: 'HUD 手势',screenCapture: '屏幕捕获',notificationAlerts: '桌面通知',notificationSounds: '声音',@@ -1244,8 +1245,6 @@ export const zh = defineLocale({title: '轻按唤出 HUD',description:'在 Mac 上按下并松开 ⌘ + Option,在 Windows/Linux 上按下并松开 Ctrl + Alt,即可从任意应用将 HUD 置于前台。默认关闭,仅适用于此设备。',- statusTitle: 'HUD 手势状态',- ready: '已就绪。请在半秒内松开两个键,期间不要按其他键或操作鼠标。其他快捷键不受影响。',permission: '请在系统设置 → 隐私与安全性 → 输入监控中允许 Hermes,然后重试。此手势不会记录按键或截取屏幕。',unavailable:'此处无法使用该手势。Linux 需要 X11 会话;Wayland 不提供全局修饰键轻按事件。Hermes 内原有的 HUD 快捷键仍可使用。'