feat(webui): add completion notification sound preference

When a turn finishes while the user is watching the page there is no
audible cue; the existing browser notifications only cover the
background case. Add a `notificationSound` local preference (off by
default, next to `browserNotifications`) and play a short bundled
chime from the `turn_end` handler only while the page is visible, so
background tabs stay silent.

- webui/src/lib/notification-sound.ts: visibility- and preference-gated
  playback of the bundled /notification.wav, one reused Audio element
- Overview settings toggle with localized copy in all 10 locales
- Tests cover the default-off, visible, hidden, reuse and
  playback-rejection paths
This commit is contained in:
Li Fengmin authored and chengyongru committed 2026-09-24 17:34:33 +08:00
1 parent 3ecc3d3556
commit 7c2bf8949c
17 files changed
+156

No files matched your search

+2
View File
@@ -288,6 +288,7 @@
"currentModel": "現在の設定",
"brandLogos": "ブランドロゴ",
"browserNotifications": "タスク通知",
"notificationSound": "完了音",
"cliAppsCatalog": "カタログ",
"cliAppsFilter": "フィルター",
"engine": "エンジン",
@@ -331,6 +332,7 @@
"selectedModelValue": "選択したモデルによって設定されます。",
"brandLogos": "設定で第三者プロバイダーと CLI のロゴを表示します。",
"browserNotifications": "このページがバックグラウンドにある場合のみ通知します。既定ではオフです。",
"notificationSound": "このページがフォアグラウンドにあるときにターンが完了したら短いチャイムを再生します。既定ではオフです。",
"cliAppsCatalog": "nanobot がこのマシンで使用できるコマンドラインツールをインストールします。デスクトップアプリは変更しません。",
"cliAppsFilter": "アプリ、カテゴリ、機能で検索します。",
"logs": "デスクトップアプリのログフォルダーを開きます。",