You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows 10 — Tauri desktop app connecting to a remote CodeNomad Server CLI (v0.18.0) over an SSH tunnel
Issue Summary
When using a remote server window (Remote Servers → connect → remote window), OS notifications never fire: the Notifications settings show "Permission: Not granted", the toast "Notification permission has not yet been granted." appears, and clicking "Request" has no effect. Local (non-remote) windows notify normally.
Steps to Reproduce
Open the CodeNomad Tauri desktop app on Windows. Local-mode notifications work (local settings show permission granted).
Add a remote server profile (Settings → Remote Servers, e.g. name "BUAA lhx", baseUrl https://localhost:19898, skip TLS verify) and open the remote window.
In the remote window, open Settings → Notifications. The page shows "Permission: Not granted" and a toast "Notification permission has not yet been granted." appears.
Click the "Request" button → nothing happens; Windows never shows a permission prompt (no permission acquisition is ever visible).
Run a remote session that goes idle or needs input → no OS notification is shown in Windows.
Expected Behavior
Remote windows are windows of the same desktop app and should use the same Tauri notification path as the local window, so OS notifications (idle / needs-input / permission requests) fire while connected to a remote server. This matches the maintainer's statement in #323 that connecting to a remote CodeNomad server from the app should bring app benefits, including notifications.
Logs & Screenshots
Additional Context
Observed facts (verified)
All notification preferences are enabled: osNotificationsEnabled, notifyOnNeedsInput, notifyOnIdle, osNotificationsAllowWhenVisible — all true.
Local main window: notifications work (Tauri notifier path).
Remote window (Tauri second window): settings page reports permission "Not granted"; the "Request" button has no visible effect; Windows never prompts.
Connection chain: Tauri UI → local server (port 9898) → remote-proxy session → SSH tunnel (localhost:19898) → remote CodeNomad Server v0.18.0 → opencode 1.18.11. The SSE event stream is proxied without filtering (packages/server/src/server/routes/events.ts broadcasts all events to every subscriber), so idle/permission events do reach the UI handlers — this is not an event-delivery problem.
In packages/ui/src/lib/os-notifications.ts, getOsNotificationCapability() falls through to the Web Notification API branch (permission default/denied) in the remote window, i.e. detectHost() (packages/ui/src/lib/runtime-env.ts) does not identify the remote Tauri window as a Tauri host — it checks window.__TAURI__ and a tauri substring in the user agent; the WebView2 second window appears to have neither.
WebView2 does not surface a Web Notification permission prompt, so "Request" is a no-op and the permission stays "Not granted".
sendOsNotification() then throws inside fireOsNotification() (packages/ui/src/stores/session-events.ts) and the error is silently swallowed (catch → warn log), so no notification is ever shown.
Suggested fix direction: ensure remote windows are detected as Tauri host (inject __TAURI__ / set window.__CODENOMAD_WINDOW_CONTEXT__ correctly in the Tauri open_remote_window implementation), or force the Tauri notifier path for remote windows.
App Variant
Tauri (desktop app, codenomad-tauri.exe)
Operating System & Version
Windows 10 — Tauri desktop app connecting to a remote CodeNomad Server CLI (v0.18.0) over an SSH tunnel
Issue Summary
When using a remote server window (Remote Servers → connect → remote window), OS notifications never fire: the Notifications settings show "Permission: Not granted", the toast "Notification permission has not yet been granted." appears, and clicking "Request" has no effect. Local (non-remote) windows notify normally.
Steps to Reproduce
https://localhost:19898, skip TLS verify) and open the remote window.Expected Behavior
Remote windows are windows of the same desktop app and should use the same Tauri notification path as the local window, so OS notifications (idle / needs-input / permission requests) fire while connected to a remote server. This matches the maintainer's statement in #323 that connecting to a remote CodeNomad server from the app should bring app benefits, including notifications.
Logs & Screenshots
Additional Context
Observed facts (verified)
osNotificationsEnabled,notifyOnNeedsInput,notifyOnIdle,osNotificationsAllowWhenVisible— alltrue.packages/server/src/server/routes/events.tsbroadcasts all events to every subscriber), so idle/permission events do reach the UI handlers — this is not an event-delivery problem.detectHost()fallback); [Bug]: Not getting notifications in web browser #378 / fix: session.idle web notifications not firing in browsers #456 fixed browser notifications.Analysis (inference — please verify)
packages/ui/src/lib/os-notifications.ts,getOsNotificationCapability()falls through to the Web Notification API branch (permissiondefault/denied) in the remote window, i.e.detectHost()(packages/ui/src/lib/runtime-env.ts) does not identify the remote Tauri window as a Tauri host — it checkswindow.__TAURI__and ataurisubstring in the user agent; the WebView2 second window appears to have neither.sendOsNotification()then throws insidefireOsNotification()(packages/ui/src/stores/session-events.ts) and the error is silently swallowed (catch → warn log), so no notification is ever shown.__TAURI__/ setwindow.__CODENOMAD_WINDOW_CONTEXT__correctly in the Tauriopen_remote_windowimplementation), or force the Tauri notifier path for remote windows.