diff --git a/CHANGELOG.md b/CHANGELOG.md index cbfa2938..8df5ac27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ ## [Unreleased] +## [v0.51.346] — 2026-06-09 — Release LJ (PWA notification controls) + +### Added + +- **PWA notifications now use the service worker for reliable delivery, with explicit controls in Settings.** Browser notifications prefer `ServiceWorkerRegistration.showNotification()` (falling back to a direct `Notification` when no service worker is registered), which is the only notification path that works in an installed standalone PWA — notably iOS, where `new Notification()` is unavailable. Notification payloads now carry the originating session's deep link, icon, badge, and a stable per-session tag, and clicking a notification focuses an already-open tab for that session (or opens a new window) instead of yanking an unrelated tab away from what you were reading. Settings → Preferences gains **Enable notifications**, **Send test**, and a live permission-status readout. (#3196, #3229) + ## [v0.51.345] — 2026-06-09 — Release LI (model override picker for scheduled jobs) ### Added diff --git a/static/i18n.js b/static/i18n.js index 053aa52e..bc17289d 100644 --- a/static/i18n.js +++ b/static/i18n.js @@ -908,6 +908,12 @@ const LOCALES = { settings_desc_tts_engine: 'Choose speech engine. Edge TTS uses Microsoft neural voices via the server.', settings_label_notifications: 'Browser notifications', settings_desc_notifications: 'Show a system notification when a response completes while the app is in the background.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Displays input/output token count below each assistant reply. Also toggled with /usage.', settings_label_api_redact: 'Redact sensitive data in API responses', settings_desc_api_redact: 'Self-hosted users can disable for transparency (not recommended for shared instances).', @@ -2298,6 +2304,12 @@ const LOCALES = { settings_desc_tts_engine: 'Scegli il motore vocale. Edge TTS utilizza le voci neurali Microsoft tramite il server.', settings_label_notifications: 'Notifiche browser', settings_desc_notifications: 'Mostra una notifica di sistema quando una risposta termina mentre l\'app è in background.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Mostra il conteggio token input/output sotto ogni risposta dell\'assistente. Attivabile anche con /usage.', settings_label_api_redact: 'Oscura dati sensibili nelle risposte API', settings_desc_api_redact: 'Gli utenti self-hosted possono disabilitare per trasparenza (sconsigliato per istanze condivise).', @@ -3693,6 +3705,12 @@ const LOCALES = { settings_desc_tts_engine: '音声エンジンを選択してください。Edge TTSはサーバー経由でMicrosoftのニューラル音声を使用します。', settings_label_notifications: 'ブラウザ通知', settings_desc_notifications: 'アプリがバックグラウンドの間に応答が完了したらシステム通知を表示します。', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'アシスタント応答の下に入力/出力トークン数を表示します。/usage でも切替可能。', settings_label_api_redact: 'API 応答内の機密データをマスク', settings_desc_api_redact: 'セルフホスト利用者は透明性のため無効化できます (共有インスタンスでは非推奨)。', @@ -4808,6 +4826,12 @@ const LOCALES = { settings_desc_sound: 'Проигрывать звук, когда помощник завершает ответ.', settings_label_notifications: 'Уведомления браузера', settings_desc_notifications: 'Показывать системное уведомление, когда ответ готов, а вкладка находится в фоне.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Показывает количество входных и выходных токенов под каждым ответом помощника. Также переключается через /usage.', settings_sidebar_density_compact: 'Компактно', settings_sidebar_density_detailed: 'Подробно', @@ -6136,6 +6160,12 @@ const LOCALES = { settings_desc_sound: 'Reproduce un sonido cuando el asistente termina una respuesta.', settings_label_notifications: 'Notificaciones del navegador', settings_desc_notifications: 'Muestra una notificación del sistema cuando una respuesta termina mientras la pestaña está en segundo plano.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Muestra el conteo de tokens de entrada/salida debajo de cada respuesta del asistente. También se puede alternar con /usage.', settings_sidebar_density_compact: 'Compacta', settings_sidebar_density_detailed: 'Detallada', @@ -7437,6 +7467,12 @@ const LOCALES = { settings_desc_sound: 'Spielt einen Ton ab, wenn der Assistent eine Antwort beendet.', settings_label_notifications: 'Browser-Benachrichtigungen', settings_desc_notifications: 'Zeigt eine Systembenachrichtigung an, wenn eine Antwort fertiggestellt wird, während der Tab im Hintergrund ist.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Zeigt die Anzahl der Input/Output-Token unter jeder Antwort des Assistenten an. Auch umschaltbar mit /usage.', settings_sidebar_density_compact: 'Kompakt', settings_sidebar_density_detailed: 'Detailliert', @@ -8884,6 +8920,12 @@ const LOCALES = { settings_label_notifications: '浏览器通知', settings_desc_sound: '助手完成回复时播放提示音。', settings_desc_notifications: '当标签页在后台时,回复完成后显示系统通知。', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: '在助手每次回复下方显示输入/输出 token 数量。也可以用 /usage 切换。', settings_sidebar_density_compact: '紧凑', settings_sidebar_density_detailed: '详细', @@ -10395,6 +10437,12 @@ const LOCALES = { settings_desc_tts_engine: '選擇語音引擎。Edge TTS 會透過伺服器使用 Microsoft 神經語音。', settings_label_notifications: '瀏覽器通知', settings_desc_notifications: '分頁在背景中時,回覆完成後顯示系統通知。', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: '在每則助理回覆下方顯示輸入/輸出 token 數量。也可以使用 /usage 切換。', settings_label_api_redact: '在 API 回應中遮蔽敏感資料', settings_desc_api_redact: '自行託管使用者可以為了透明度停用此功能(不建議在共用執行個體中停用)。', @@ -11609,6 +11657,12 @@ const LOCALES = { settings_desc_sound: 'Tocar som quando assistente finalizar resposta.', settings_label_notifications: 'Notificações do navegador', settings_desc_notifications: 'Mostrar notificação quando resposta completar com app em background.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Exibe contagem de tokens abaixo de cada resposta. Também com /usage.', settings_sidebar_density_compact: 'Compacto', settings_sidebar_density_detailed: 'Detalhado', @@ -12899,6 +12953,12 @@ const LOCALES = { settings_desc_sound: 'Assistant 응답이 끝나면 소리를 재생합니다.', settings_label_notifications: '브라우저 알림', settings_desc_notifications: '앱이 백그라운드에 있을 때 응답이 완료되면 시스템 알림을 표시합니다.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: '각 Assistant 응답 아래에 입력/출력 토큰 수를 표시합니다. /usage로도 전환할 수 있습니다.', settings_sidebar_density_compact: '간결', settings_sidebar_density_detailed: '자세히', @@ -14233,6 +14293,12 @@ const LOCALES = { settings_desc_tts_engine: 'Choisissez le moteur de synthèse vocale. Edge TTS utilise les voix neuronales Microsoft via le serveur.', settings_label_notifications: 'Notifications du navigateur', settings_desc_notifications: 'Afficher une notification système lorsqu\'une réponse est terminée alors que l\'application est en arrière-plan.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Affiche le nombre de jetons d’entrée/sortie sous chaque réponse de l’assistant. Également basculé avec /usage.', settings_label_api_redact: 'Expurger les données sensibles dans les réponses API', settings_desc_api_redact: 'Les utilisateurs auto-hébergés peuvent désactiver pour des raisons de transparence (non recommandé pour les instances partagées).', @@ -15615,6 +15681,12 @@ const LOCALES = { settings_desc_sound: 'Asistan bir yanıtı bitirdiğinde bir ses çalın.', settings_label_notifications: 'Tarayıcı bildirimleri', settings_desc_notifications: 'Uygulama arka plandayken bir yanıt tamamlandığında bir sistem bildirimi gösterin.', + notifications_enable_btn: 'Enable notifications', + notifications_test_btn: 'Send test', + notifications_permission_status: (status) => `Permission: ${status}`, + notifications_enabled_toast: 'Notifications enabled.', + notifications_denied: 'Notifications are blocked in this browser. Enable them in browser settings.', + notifications_unsupported: 'Notifications are not supported in this browser.', settings_desc_token_usage: 'Her Asistan yanıtının altında giriş/çıkış jeton sayılarını gösterir. /usage ile de değiştirilebilir.', settings_sidebar_density_compact: 'Kompakt', settings_sidebar_density_detailed: 'Ayrıntılı', @@ -17073,6 +17145,12 @@ const LOCALES = { settings_desc_tts_engine: 'Wybierz silnik mowy. Edge TTS korzysta z głosów neuronowych Microsoft za pośrednictwem serwera.', settings_label_notifications: 'Powiadomienia przeglądarki', settings_desc_notifications: 'Pokaż powiadomienie systemowe, gdy odpowiedź zostanie ukończona, podczas gdy aplikacja działa w tle.', + notifications_enable_btn: 'Włącz powiadomienia', + notifications_test_btn: 'Wyślij test', + notifications_permission_status: (status) => `Uprawnienie: ${status}`, + notifications_enabled_toast: 'Powiadomienia włączone.', + notifications_denied: 'Powiadomienia są zablokowane w tej przeglądarce. Włącz je w ustawieniach przeglądarki.', + notifications_unsupported: 'Powiadomienia nie są obsługiwane w tej przeglądarce.', settings_desc_token_usage: 'Wyświetla liczbę tokenów wejściowych/wyjściowych pod każdą odpowiedzią asystenta. Można też przełączyć za pomocą /usage.', settings_label_api_redact: 'Ukrywaj poufne dane w odpowiedziach API', settings_desc_api_redact: 'Użytkownicy korzystający z hostingu własnego mogą wyłączyć to dla przejrzystości (niezalecane dla współdzielonych instancji).', diff --git a/static/index.html b/static/index.html index 302c9fa3..0a5a6812 100644 --- a/static/index.html +++ b/static/index.html @@ -1125,7 +1125,12 @@ Browser notifications -
Show a system notification when a response completes while the tab is in the background.
+
Show a system notification when a response completes while the app is in the background.
+
+ + + +