Skip to content

Notifications: tell the user when a session is waiting and when a background job finishes #1582

Description

@backnotprop

Provenance stamp: This issue was triaged on September 20, 2026 as part of the older-than-90-days GitHub issue triage exercise.

Source issues: #874, #915

Summary

Plannotator opens a browser tab, then goes quiet. Two old issues report the two halves of that silence: the agent host never says a review is waiting, and the browser never says a background job is done. Both leave the user watching a window that gives no signal, and in the Pi case the host itself looks frozen.

The common requirement is a notification contract: every time Plannotator either needs the user or has finished work the user asked for, it says so through the best channel available — the agent host's own notification surface, or the browser's, never neither.

What the source issues requested

Triage determination

These were filed a week apart by different users about different surfaces, but they are one gap. Fixing only the host side leaves long agent jobs silent; fixing only the browser side leaves the "is it frozen?" moment intact. A single issue can define when Plannotator notifies, through which channel, and how the user turns it off — and keep the two halves consistent instead of growing two unrelated mechanisms.

Current state verified on main (2026-09-20):

  • Zero Web Notification usage repo-wide; no completion toast for agent jobs. Tours auto-open and guides auto-switch on completion (packages/review-editor/App.tsx:1647-1684), which only helps a user already watching the tab.
  • Pi notifies only for remote sessions and failed opens (apps/pi-extension/plannotator-browser.ts:196-203). The explicit commands gained an in-turn notice (sessionOpenedMessage, apps/pi-extension/index.ts:184-196), but the plan-review path did not (apps/pi-extension/index.ts:1353-1371) — exactly the case Notify user in TUI when browser review is waiting for input #915 reported.

Acceptance criteria

  • Every host that opens a session emits one "review waiting" notice on the successful local path, not only on remote sessions or failures. Pi plan review is the named gap.
  • The notice names what is waiting and carries the URL, so it doubles as a recovery path when the tab is closed.
  • Background agent jobs (review agents, Code Tour, Guided Review) notify on completion and on failure, from the browser, when the tab is not focused.
  • Browser notifications are permission-gated, requested on an explicit user action rather than at load, and never requested in read-only or shared sessions.
  • Notification behavior is user-disableable, and off by default wherever requesting permission would be intrusive.
  • A focused tab does not double-notify alongside the existing auto-open/auto-switch behavior.
  • Host notification channels are documented per runtime (Claude Code, OpenCode, Pi, Codex, Amp, Droid), including which ones have no usable channel.
  • Notify user when a code review or code tour has finished processing #874 and Notify user in TUI when browser review is waiting for input #915 can be closed once their requirements are represented here.

Notes

Adjacent but deliberately separate: #1134 (always surface the review URL; stable port across resubmissions) and #1406 (Pi Web RPC sessions show no URL) are about reachability, i.e. where the URL is printed. This issue is about attention, i.e. being told at all. They should stay consistent but they are not the same change. The smallest useful first step is #915's one-line host notice on the Pi plan path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageIssue created from backlog triage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions