Skip to content

Notify on pending requests #1708

Backlog
0 of 4 issues completed
Backlog

Description

@smart-ssh-planner

Goal

When a request is waiting for the user (an AI or MCP action that needs approval, an AI question, a note suggestion, a host key or login prompt) and the app is not in the foreground, the operating system tells the user with its own native mechanisms: a system notification on every platform, plus the bouncing Dock icon on macOS, the flashing taskbar button on Windows and the urgency hint on Linux. When the request is answered or the user comes back to the app, the notification disappears.

Scope

In scope:

  • macOS, Windows, Linux and Android.
  • Pending-request kinds: action confirmations from the AI chat and from MCP clients (commands, file read/write, note updates, document generation, including second-opinion escalation), AI questions with answer options, provider-requested confirmations (Provider activity notices and provider-requested confirmations in the chat turn #1639), note update and note shrink suggestions, host key verification, password and one-time-code prompts.
  • Two settings: system notifications, and Dock/taskbar attention.
  • Clicking a notification brings the app to the front and switches to the tab of the request.
  • Removing a notification when its request ends or the app comes to the foreground, where the platform allows it.

Out of scope:

  • Approve or deny buttons in the notification. A notification never decides anything.
  • iOS (no build exists).
  • Notifications for anything that is not waiting for the user (finished commands, chat answers).

Shared decisions

These were decided by the maintainer, and all parts keep them the same:

  • When: only while the main window is not in the foreground (not focused, minimized or hidden; on Android the activity is not resumed). A request that becomes pending while the app is in the foreground produces no notification and no attention request. If the app is left in the background later, the request does not notify again.
  • Attention: on desktop, request_user_attention(Critical). The Dock icon bounces until the app is activated; the taskbar button flashes until the window gets focus. It is cleared when the window gets focus, or when the last pending request ends.
  • One notification per pending request. Its identifier is derived from the request id. When the request ends on any path, its notification is removed. When the main window gets focus, all pending-request notifications are removed.
  • Click: focuses the main window and calls the shared activation path from the first sub-issue (activate_pending_request(id)). The frontend switches to the tab of the request; a request without a tab (note suggestion) only focuses the window.
  • Content: the kind of request, the server name and the source (AI chat, or the MCP client name). Never the command text, file path, file content, note text, question text or prompt text. Notifications show on the lock screen and stay in the OS history. The MCP client name is untrusted: it is normalized, shortened, and stripped of control characters.
  • Text: localized in the UI language through the backend (crates/app-shell/src/ui_language.rs), in all 25 frontend locales.
  • Settings: two toggles, both on by default:
    • "Notify on pending requests" (system notification)
    • "Bounce/flash the app icon on pending requests" (Dock/taskbar attention; hidden on Android)
  • Failures (permission denied, platform API unavailable) are logged without content and never affect the request itself.
  • The existing MCP-only notification (crates/app-shell/src/mcp_backend.rs:124) is replaced by this mechanism.

Sub-issues

Sub-issues

Sub-issues

0 of 4 Issues completed
Loading 4 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementepic

    Fields

    Priority

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions