Skip to content

feat: add completion sound notification / 添加完成提示音#809

Open
WenhuaXia wants to merge 2 commits into
siteboon:mainfrom
WenhuaXia:feat/completion-sound-pr
Open

feat: add completion sound notification / 添加完成提示音#809
WenhuaXia wants to merge 2 commits into
siteboon:mainfrom
WenhuaXia:feat/completion-sound-pr

Conversation

@WenhuaXia
Copy link
Copy Markdown

@WenhuaXia WenhuaXia commented May 30, 2026

Summary / 摘要

  • Add a short audio notification when a chat run finishes — 聊天完成时播放简短提示音
  • Users can toggle the sound via the Notifications settings tab — 可在设置 → 通知中开关
  • Uses Web Audio API to generate tones, no external assets required — 使用 Web Audio API 生成音效,无需外部资源
  • Sound is enabled by default — 默认开启
  • Includes a "Test sound" button for preview — 包含"试听"按钮

Test plan / 测试

  • Start a new chat session and wait for AI response to complete — should hear a two-tone sound
  • Navigate to Settings → Notifications → toggle sound off — sound should stop
  • Click "Test sound" button — should hear sound without starting a chat

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Notification sound settings to control audio alerts when runs complete
    • New sound settings card with enable/disable toggle and a Test button
    • Playing a completion sound when enabled and when testing
    • Sound preference persisted locally across sessions
    • Multi-language support for sound settings across included locales

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a644c50b-3aca-4cdd-bc3c-cd36571a6904

📥 Commits

Reviewing files that changed from the base of the PR and between 8836660 and d2df322.

📒 Files selected for processing (11)
  • src/components/chat/hooks/useChatRealtimeHandlers.ts
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/i18n/locales/de/settings.json
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/it/settings.json
  • src/i18n/locales/ja/settings.json
  • src/i18n/locales/ko/settings.json
  • src/i18n/locales/ru/settings.json
  • src/i18n/locales/tr/settings.json
  • src/i18n/locales/zh-CN/settings.json
  • src/utils/notification-sound.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/ja/settings.json
  • src/i18n/locales/it/settings.json
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/components/chat/hooks/useChatRealtimeHandlers.ts
  • src/i18n/locales/zh-CN/settings.json
  • src/utils/notification-sound.ts

📝 Walkthrough

Walkthrough

Adds a notification sound feature: Web Audio utilities (read/save/play), settings UI with toggle and test button, chat completion playback when enabled, and locale strings for the new settings across multiple locales.

Changes

Completion Sound Notification

Layer / File(s) Summary
Notification Sound Utilities
src/utils/notification-sound.ts
Core module exports isNotificationSoundEnabled() (localStorage with SSR fallback), setNotificationSoundEnabled() (persist preference), and playCompletionSound() (synthesizes two-tone completion sound via Web Audio).
Settings UI and State Management
src/components/settings/view/tabs/NotificationsSettingsTab.tsx
Adds soundEnabled state initialized from preference, handleToggleSound to persist and toggle, a test button that calls playCompletionSound(), and a new settings card with accessible toggle UI.
Chat Completion Trigger
src/components/chat/hooks/useChatRealtimeHandlers.ts
Imports notification sound utilities and conditionally calls playCompletionSound() when a complete chat event is handled if sound is enabled.
Internationalization Strings
src/i18n/locales/en/settings.json, src/i18n/locales/zh-CN/settings.json, src/i18n/locales/de/settings.json, src/i18n/locales/it/settings.json, src/i18n/locales/ja/settings.json, src/i18n/locales/ko/settings.json, src/i18n/locales/ru/settings.json, src/i18n/locales/tr/settings.json
Add notifications.sound translation keys (title, enabled/completion label, description, test) required by the new settings UI across locales.
sequenceDiagram
  participant User
  participant SettingsTab
  participant ChatHandler
  participant SoundUtils
  participant Storage
  participant WebAudio
  User->>SettingsTab: Toggle switch / Click test
  SettingsTab->>SoundUtils: setNotificationSoundEnabled(enabled) / playCompletionSound()
  SoundUtils->>Storage: persist preference
  SoundUtils->>WebAudio: synthesize and play tones
  User->>ChatHandler: Run completes
  ChatHandler->>SoundUtils: isNotificationSoundEnabled() -> playCompletionSound()
  SoundUtils->>WebAudio: play completion tones
Loading

"I hopped in with a jingle and a grin,
Toggle the switch, let the tones begin,
A tiny two-tone cheer when runs are done,
Click test, hear the finish — hooray, fun! 🔔🐇"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a completion sound notification feature. It directly reflects the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/settings/view/tabs/NotificationsSettingsTab.tsx`:
- Around line 179-198: The aria-label on the switch in
NotificationsSettingsTab.tsx currently uses t('notifications.sound.enabled')
which describes state; update it to a label that describes the control's purpose
(e.g., use t('notifications.sound.toggleLabel') or
t('notifications.sound.title') like "Completion sound") so the switch's purpose
is announced while leaving aria-checked to convey on/off state; add a new
translation key if needed and replace aria-label on the button element
accordingly.

In `@src/i18n/locales/en/settings.json`:
- Around line 119-124: The new notifications.sound key group (keys: "title",
"enabled", "description", "test") was added to en/settings.json but is missing
in other locale files; update each supported locale (de, it, ja, ko, ru, tr)
settings.json to include a notifications.sound object with equivalent localized
strings (or sensible placeholders) to avoid fallback/missing text, ensuring the
object keys match exactly ("title", "enabled", "description", "test") so the UI
lookup for notifications.sound works consistently across locales.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 543a0eb9-ff53-49e0-b1ea-bf987d62d458

📥 Commits

Reviewing files that changed from the base of the PR and between 38bf21d and 98f863f.

📒 Files selected for processing (5)
  • src/components/chat/hooks/useChatRealtimeHandlers.ts
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/zh-CN/settings.json
  • src/utils/notification-sound.ts

Comment thread src/components/settings/view/tabs/NotificationsSettingsTab.tsx
Comment thread src/i18n/locales/en/settings.json
@WenhuaXia WenhuaXia changed the title feat: add completion sound notification feat: add completion sound notification / 添加完成提示音 May 30, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/i18n/locales/de/settings.json`:
- Around line 463-487: Replace the English notification strings with German
translations in the "notifications" section: set "title" to
"Benachrichtigungen", "description" to "Steuere, welche
Benachrichtigungsereignisse du erhältst.", under "webPush" set "title" to
"Web-Push-Benachrichtigungen", "enable" to "Push-Benachrichtigungen aktivieren",
"disable" to "Push-Benachrichtigungen deaktivieren", "enabled" to
"Push-Benachrichtigungen sind aktiviert", "loading" to "Aktualisiere…",
"unsupported" to "Push-Benachrichtigungen werden in diesem Browser nicht
unterstützt.", and "denied" to "Push-Benachrichtigungen sind blockiert. Bitte
erlaube sie in den Browsereinstellungen.", under "events" set "title" to
"Ereignistypen", "actionRequired" to "Handlung erforderlich", "stop" to
"Ausführung gestoppt", "error" to "Ausführung fehlgeschlagen", and under "sound"
set "title" to "Ton", "enabled" to "Abschluss-Ton", "description" to "Ton
abspielen, wenn eine Ausführung beendet ist", and "test" to "Test".

In `@src/i18n/locales/it/settings.json`:
- Around line 119-124: The sound notification entries under the "sound" key are
still in English; update the values for "title", "enabled", "description", and
"test" to Italian equivalents (e.g., translate "Sound", "Completion Sound",
"Play a sound when a run finishes", "Test") so the "sound" object matches the
rest of the locale; locate the "sound" JSON object and replace each English
string with the appropriate Italian translation.

In `@src/i18n/locales/ja/settings.json`:
- Around line 119-124: Update the English strings under the "sound" object to
Japanese: replace "title", "enabled", "description", and "test" values with
appropriate Japanese translations (e.g., "サウンド" for title, "完了音" for enabled,
"実行が終了したときに音を再生する" for description, and "テスト再生" or similar for test) so the
"sound" block ("sound" -> "title","enabled","description","test") matches the
rest of the notifications translations.

In `@src/i18n/locales/ru/settings.json`:
- Around line 463-487: The notifications section currently contains English
strings; update the localization keys under "notifications" to Russian by
replacing values for notifications.title and notifications.description and all
nested keys: webPush (title, enable, disable, enabled, loading, unsupported,
denied), events (title, actionRequired, stop, error) and sound (title, enabled,
description, test) with appropriate Russian translations so the UI is fully
localized (ensure you only change the string values for those keys and keep the
key names intact).

In `@src/i18n/locales/tr/settings.json`:
- Around line 119-124: Replace the English strings in the "sound" object in
settings.json with Turkish equivalents: update the "sound" key's children
("title", "enabled", "description", "test") to localized Turkish values (e.g.
title -> "Ses", enabled -> "Tamamlama Sesi", description -> "Bir çalışmanın sona
ermesi durumunda ses çal", test -> "Test Et") so the notifications section is
consistently translated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9afb59b2-0460-44bf-bcf7-34a97dfc77ec

📥 Commits

Reviewing files that changed from the base of the PR and between 98f863f and 07c5d79.

📒 Files selected for processing (7)
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/i18n/locales/de/settings.json
  • src/i18n/locales/it/settings.json
  • src/i18n/locales/ja/settings.json
  • src/i18n/locales/ko/settings.json
  • src/i18n/locales/ru/settings.json
  • src/i18n/locales/tr/settings.json
✅ Files skipped from review due to trivial changes (1)
  • src/i18n/locales/ko/settings.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx

Comment on lines +463 to +487
},
"notifications": {
"title": "Notifications",
"description": "Control which notification events you receive.",
"webPush": {
"title": "Web Push Notifications",
"enable": "Enable Push Notifications",
"disable": "Disable Push Notifications",
"enabled": "Push notifications are enabled",
"loading": "Updating...",
"unsupported": "Push notifications are not supported in this browser.",
"denied": "Push notifications are blocked. Please allow them in your browser settings."
},
"events": {
"title": "Event Types",
"actionRequired": "Action required",
"stop": "Run stopped",
"error": "Run failed"
},
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing German translations for notifications section.

All notification strings are in English instead of German, breaking the user experience for German speakers. The rest of the file is properly localized, so this is inconsistent.

🌐 Suggested German translations
   },
   "notifications": {
-    "title": "Notifications",
-    "description": "Control which notification events you receive.",
+    "title": "Benachrichtigungen",
+    "description": "Wähle aus, welche Benachrichtigungen du erhalten möchtest.",
     "webPush": {
-      "title": "Web Push Notifications",
-      "enable": "Enable Push Notifications",
-      "disable": "Disable Push Notifications",
-      "enabled": "Push notifications are enabled",
-      "loading": "Updating...",
-      "unsupported": "Push notifications are not supported in this browser.",
-      "denied": "Push notifications are blocked. Please allow them in your browser settings."
+      "title": "Web-Push-Benachrichtigungen",
+      "enable": "Push-Benachrichtigungen aktivieren",
+      "disable": "Push-Benachrichtigungen deaktivieren",
+      "enabled": "Push-Benachrichtigungen sind aktiviert",
+      "loading": "Wird aktualisiert...",
+      "unsupported": "Push-Benachrichtigungen werden in diesem Browser nicht unterstützt.",
+      "denied": "Push-Benachrichtigungen wurden blockiert. Bitte erlaube sie in deinen Browsereinstellungen."
     },
     "events": {
-      "title": "Event Types",
-      "actionRequired": "Action required",
-      "stop": "Run stopped",
-      "error": "Run failed"
+      "title": "Ereignistypen",
+      "actionRequired": "Aktion erforderlich",
+      "stop": "Ausführung gestoppt",
+      "error": "Ausführung fehlgeschlagen"
     },
     "sound": {
-      "title": "Sound",
-      "enabled": "Completion Sound",
-      "description": "Play a sound when a run finishes",
-      "test": "Test"
+      "title": "Ton",
+      "enabled": "Abschlusston",
+      "description": "Einen Ton abspielen, wenn eine Ausführung abgeschlossen ist",
+      "test": "Testen"
     }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
},
"notifications": {
"title": "Notifications",
"description": "Control which notification events you receive.",
"webPush": {
"title": "Web Push Notifications",
"enable": "Enable Push Notifications",
"disable": "Disable Push Notifications",
"enabled": "Push notifications are enabled",
"loading": "Updating...",
"unsupported": "Push notifications are not supported in this browser.",
"denied": "Push notifications are blocked. Please allow them in your browser settings."
},
"events": {
"title": "Event Types",
"actionRequired": "Action required",
"stop": "Run stopped",
"error": "Run failed"
},
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
},
"notifications": {
"title": "Benachrichtigungen",
"description": "Wähle aus, welche Benachrichtigungen du erhalten möchtest.",
"webPush": {
"title": "Web-Push-Benachrichtigungen",
"enable": "Push-Benachrichtigungen aktivieren",
"disable": "Push-Benachrichtigungen deaktivieren",
"enabled": "Push-Benachrichtigungen sind aktiviert",
"loading": "Wird aktualisiert...",
"unsupported": "Push-Benachrichtigungen werden in diesem Browser nicht unterstützt.",
"denied": "Push-Benachrichtigungen wurden blockiert. Bitte erlaube sie in deinen Browsereinstellungen."
},
"events": {
"title": "Ereignistypen",
"actionRequired": "Aktion erforderlich",
"stop": "Ausführung gestoppt",
"error": "Ausführung fehlgeschlagen"
},
"sound": {
"title": "Ton",
"enabled": "Abschlusston",
"description": "Einen Ton abspielen, wenn eine Ausführung abgeschlossen ist",
"test": "Testen"
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/de/settings.json` around lines 463 - 487, Replace the
English notification strings with German translations in the "notifications"
section: set "title" to "Benachrichtigungen", "description" to "Steuere, welche
Benachrichtigungsereignisse du erhältst.", under "webPush" set "title" to
"Web-Push-Benachrichtigungen", "enable" to "Push-Benachrichtigungen aktivieren",
"disable" to "Push-Benachrichtigungen deaktivieren", "enabled" to
"Push-Benachrichtigungen sind aktiviert", "loading" to "Aktualisiere…",
"unsupported" to "Push-Benachrichtigungen werden in diesem Browser nicht
unterstützt.", and "denied" to "Push-Benachrichtigungen sind blockiert. Bitte
erlaube sie in den Browsereinstellungen.", under "events" set "title" to
"Ereignistypen", "actionRequired" to "Handlung erforderlich", "stop" to
"Ausführung gestoppt", "error" to "Ausführung fehlgeschlagen", and under "sound"
set "title" to "Ton", "enabled" to "Abschluss-Ton", "description" to "Ton
abspielen, wenn eine Ausführung beendet ist", and "test" to "Test".

Comment on lines +119 to 124
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing Italian translations for sound notification strings.

The sound notification strings are in English instead of Italian, while the rest of the notifications section is properly translated. This creates an inconsistent user experience.

🌐 Suggested Italian translations
     },
     "sound": {
-      "title": "Sound",
-      "enabled": "Completion Sound",
-      "description": "Play a sound when a run finishes",
-      "test": "Test"
+      "title": "Audio",
+      "enabled": "Suono di completamento",
+      "description": "Riproduci un suono quando un'esecuzione termina",
+      "test": "Prova"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
"sound": {
"title": "Audio",
"enabled": "Suono di completamento",
"description": "Riproduci un suono quando un'esecuzione termina",
"test": "Prova"
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/it/settings.json` around lines 119 - 124, The sound
notification entries under the "sound" key are still in English; update the
values for "title", "enabled", "description", and "test" to Italian equivalents
(e.g., translate "Sound", "Completion Sound", "Play a sound when a run
finishes", "Test") so the "sound" object matches the rest of the locale; locate
the "sound" JSON object and replace each English string with the appropriate
Italian translation.

Comment on lines +119 to 124
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing Japanese translations for sound notification strings.

The sound notification strings are in English instead of Japanese, while the rest of the notifications section is properly translated. This creates an inconsistent user experience.

🌐 Suggested Japanese translations
     },
     "sound": {
-      "title": "Sound",
-      "enabled": "Completion Sound",
-      "description": "Play a sound when a run finishes",
-      "test": "Test"
+      "title": "サウンド",
+      "enabled": "完了サウンド",
+      "description": "実行が完了したときにサウンドを再生",
+      "test": "テスト"
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/ja/settings.json` around lines 119 - 124, Update the English
strings under the "sound" object to Japanese: replace "title", "enabled",
"description", and "test" values with appropriate Japanese translations (e.g.,
"サウンド" for title, "完了音" for enabled, "実行が終了したときに音を再生する" for description, and
"テスト再生" or similar for test) so the "sound" block ("sound" ->
"title","enabled","description","test") matches the rest of the notifications
translations.

Comment on lines +463 to +487
},
"notifications": {
"title": "Notifications",
"description": "Control which notification events you receive.",
"webPush": {
"title": "Web Push Notifications",
"enable": "Enable Push Notifications",
"disable": "Disable Push Notifications",
"enabled": "Push notifications are enabled",
"loading": "Updating...",
"unsupported": "Push notifications are not supported in this browser.",
"denied": "Push notifications are blocked. Please allow them in your browser settings."
},
"events": {
"title": "Event Types",
"actionRequired": "Action required",
"stop": "Run stopped",
"error": "Run failed"
},
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing Russian translations for notifications section.

All notification strings are in English instead of Russian, breaking the user experience for Russian speakers. The rest of the file is properly localized, so this is inconsistent.

🌐 Suggested Russian translations
   },
   "notifications": {
-    "title": "Notifications",
-    "description": "Control which notification events you receive.",
+    "title": "Уведомления",
+    "description": "Управляйте типами получаемых уведомлений.",
     "webPush": {
-      "title": "Web Push Notifications",
-      "enable": "Enable Push Notifications",
-      "disable": "Disable Push Notifications",
-      "enabled": "Push notifications are enabled",
-      "loading": "Updating...",
-      "unsupported": "Push notifications are not supported in this browser.",
-      "denied": "Push notifications are blocked. Please allow them in your browser settings."
+      "title": "Web Push уведомления",
+      "enable": "Включить Push уведомления",
+      "disable": "Отключить Push уведомления",
+      "enabled": "Push уведомления включены",
+      "loading": "Обновление...",
+      "unsupported": "Push уведомления не поддерживаются в этом браузере.",
+      "denied": "Push уведомления заблокированы. Пожалуйста, разрешите их в настройках браузера."
     },
     "events": {
-      "title": "Event Types",
-      "actionRequired": "Action required",
-      "stop": "Run stopped",
-      "error": "Run failed"
+      "title": "Типы событий",
+      "actionRequired": "Требуется действие",
+      "stop": "Выполнение остановлено",
+      "error": "Выполнение завершилось с ошибкой"
     },
     "sound": {
-      "title": "Sound",
-      "enabled": "Completion Sound",
-      "description": "Play a sound when a run finishes",
-      "test": "Test"
+      "title": "Звук",
+      "enabled": "Звук завершения",
+      "description": "Воспроизводить звук при завершении выполнения",
+      "test": "Тест"
     }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
},
"notifications": {
"title": "Notifications",
"description": "Control which notification events you receive.",
"webPush": {
"title": "Web Push Notifications",
"enable": "Enable Push Notifications",
"disable": "Disable Push Notifications",
"enabled": "Push notifications are enabled",
"loading": "Updating...",
"unsupported": "Push notifications are not supported in this browser.",
"denied": "Push notifications are blocked. Please allow them in your browser settings."
},
"events": {
"title": "Event Types",
"actionRequired": "Action required",
"stop": "Run stopped",
"error": "Run failed"
},
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
},
"notifications": {
"title": "Уведомления",
"description": "Управляйте типами получаемых уведомлений.",
"webPush": {
"title": "Web Push уведомления",
"enable": "Включить Push уведомления",
"disable": "Отключить Push уведомления",
"enabled": "Push уведомления включены",
"loading": "Обновление...",
"unsupported": "Push уведомления не поддерживаются в этом браузере.",
"denied": "Push уведомления заблокированы. Пожалуйста, разрешите их в настройках браузера."
},
"events": {
"title": "Типы событий",
"actionRequired": "Требуется действие",
"stop": "Выполнение остановлено",
"error": "Выполнение завершилось с ошибкой"
},
"sound": {
"title": "Звук",
"enabled": "Звук завершения",
"description": "Воспроизводить звук при завершении выполнения",
"test": "Тест"
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/ru/settings.json` around lines 463 - 487, The notifications
section currently contains English strings; update the localization keys under
"notifications" to Russian by replacing values for notifications.title and
notifications.description and all nested keys: webPush (title, enable, disable,
enabled, loading, unsupported, denied), events (title, actionRequired, stop,
error) and sound (title, enabled, description, test) with appropriate Russian
translations so the UI is fully localized (ensure you only change the string
values for those keys and keep the key names intact).

Comment on lines +119 to 124
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Missing Turkish translations for sound notification strings.

The sound notification strings are in English instead of Turkish, while the rest of the notifications section is properly translated. This creates an inconsistent user experience.

🌐 Suggested Turkish translations
     },
     "sound": {
-      "title": "Sound",
-      "enabled": "Completion Sound",
-      "description": "Play a sound when a run finishes",
-      "test": "Test"
+      "title": "Ses",
+      "enabled": "Tamamlanma Sesi",
+      "description": "Çalıştırma bittiğinde ses çal",
+      "test": "Test"
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
}
"sound": {
"title": "Ses",
"enabled": "Tamamlanma Sesi",
"description": "Çalıştırma bittiğinde ses çal",
"test": "Test"
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/tr/settings.json` around lines 119 - 124, Replace the
English strings in the "sound" object in settings.json with Turkish equivalents:
update the "sound" key's children ("title", "enabled", "description", "test") to
localized Turkish values (e.g. title -> "Ses", enabled -> "Tamamlama Sesi",
description -> "Bir çalışmanın sona ermesi durumunda ses çal", test -> "Test
Et") so the notifications section is consistently translated.

@WenhuaXia WenhuaXia force-pushed the feat/completion-sound-pr branch from 07c5d79 to 8836660 Compare May 30, 2026 14:11
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/i18n/locales/ko/settings.json`:
- Around line 119-123: Translate the English strings under the "sound" object in
src/i18n/locales/ko/settings.json to Korean: update the values for keys "title",
"enabled", "description", and "test" so the Korean locale no longer contains
English labels (e.g., replace "Sound", "Completion Sound", "Play a sound when a
run finishes", "Test" with appropriate Korean translations).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f55bff2d-b841-489f-88b1-48aa6736b1bc

📥 Commits

Reviewing files that changed from the base of the PR and between 07c5d79 and 8836660.

📒 Files selected for processing (11)
  • src/components/chat/hooks/useChatRealtimeHandlers.ts
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/i18n/locales/de/settings.json
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/it/settings.json
  • src/i18n/locales/ja/settings.json
  • src/i18n/locales/ko/settings.json
  • src/i18n/locales/ru/settings.json
  • src/i18n/locales/tr/settings.json
  • src/i18n/locales/zh-CN/settings.json
  • src/utils/notification-sound.ts
✅ Files skipped from review due to trivial changes (4)
  • src/i18n/locales/zh-CN/settings.json
  • src/i18n/locales/de/settings.json
  • src/components/chat/hooks/useChatRealtimeHandlers.ts
  • src/i18n/locales/en/settings.json
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/i18n/locales/tr/settings.json
  • src/i18n/locales/it/settings.json
  • src/i18n/locales/ja/settings.json
  • src/components/settings/view/tabs/NotificationsSettingsTab.tsx
  • src/i18n/locales/ru/settings.json
  • src/utils/notification-sound.ts

Comment on lines +119 to +123
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Translate new notifications.sound labels to Korean for locale consistency.

These strings are still English in the Korean locale file, so Korean users will see mixed-language UI.

Suggested translation update
   "sound": {
-    "title": "Sound",
-    "enabled": "Completion Sound",
-    "description": "Play a sound when a run finishes",
-    "test": "Test"
+    "title": "사운드",
+    "enabled": "완료 알림음",
+    "description": "실행이 완료되면 알림음을 재생합니다",
+    "test": "테스트"
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"sound": {
"title": "Sound",
"enabled": "Completion Sound",
"description": "Play a sound when a run finishes",
"test": "Test"
"sound": {
"title": "사운드",
"enabled": "완료 알림음",
"description": "실행이 완료되면 알림음을 재생합니다",
"test": "테스트"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/i18n/locales/ko/settings.json` around lines 119 - 123, Translate the
English strings under the "sound" object in src/i18n/locales/ko/settings.json to
Korean: update the values for keys "title", "enabled", "description", and "test"
so the Korean locale no longer contains English labels (e.g., replace "Sound",
"Completion Sound", "Play a sound when a run finishes", "Test" with appropriate
Korean translations).

WenhuaXia and others added 2 commits June 3, 2026 18:04
Play a short audio notification when a chat run finishes. Users can
toggle this via the Notifications settings tab. Uses Web Audio API
to generate tones — no external assets required. Sound is enabled
by default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use aria-label to describe switch purpose instead of state
- Add notifications.sound i18n keys to all supported locales

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@WenhuaXia WenhuaXia force-pushed the feat/completion-sound-pr branch from 8836660 to d2df322 Compare June 3, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant