Skip to content

fix(native): retire hidden notifications and confirm delivery - #189

Merged
rynfar merged 1 commit into
nativefrom
nw/12-notify-environments
Nov 4, 2026
Merged

rynfar merged 1 commit into
nativefrom
nw/12-notify-environments

Conversation

@rynfar

@rynfar rynfar commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Native notifications could remain on screen after a tag filter hid their thread, and the dock badge counted fire-and-forget OS delivery attempts. This ports hidden-thread suppression/retirement and records macOS delivery only after authorization and request acceptance.

  • Hidden transitions are consumed without sound, toast, or OS delivery and do not replay when revealed. Hiding also closes existing toasts/OS notifications, retires missing rows while filtering, and cancels pending delivery eligibility.
  • Permission and posting callbacks cannot restore a retired badge. Eligibility is checked again after authorization. Click destinations survive focus-before-click ordering and are pruned with loaded/unread threads.
  • Core delivery state and badge keys include the environment. This PR still watches only the active environment.

Refs #12. AP-NOTIFY stays partial, with Issue #12 retained.

Verification: native workspace Clippy, workspace tests, native build, snapshot build, generated theme check, parity sync tests, client-runtime conformance check, and scoped formatting. The hidden-thread regression failed before suppression was applied; core tests cover presentation settings/focus, gate/dedupe behavior, failed/unavailable/denied/unconfirmed delivery, late callbacks, and environment-qualified badge counts. No real OS notification, audible sound, agent turn, or real window was used.

Offscreen UI evidence (local files):

  • Before hiding: /private/tmp/native12-evidence/before.png
  • After hiding: /private/tmp/native12-evidence/after.png
  • Red/green and gate logs: /private/tmp/native12-evidence/

check:changed is not run: its CI owner mapping treats apps/native as unknown and expands to all packages, which this worker is forbidden to check. Native gates and scoped formatting are used instead.

Remaining gaps:

  • All-environment watching, background-environment click navigation, and aggregate badge delivery are still unimplemented. AppState::clear_connection_state destroys the sole client/shell when switching, and start_environment owns active-only SSH/auth route handling. Follow-up: extract an environment-keyed owner around existing supervisor::start_prepared handles and route preparation; reduce each shell/config and run its notification watcher on the network runtime; let the active view attach to those existing handles; route notification targets by switching environment then opening the thread/family; stop removed/disabled environments while preserving gates across reconnects. This needs no server feature.
  • Non-macOS GPUI delivery remains unconfirmed (and never claims a confirmed badge); native sound/badges on those platforms and web favicon badges remain outside this slice.

Unverified: actual bundled macOS authorization, banner presentation/clicks, sound/dock appearance, and non-macOS compilation. The new macOS bridge is compiled; tests use only core delivery outcomes. OS request acceptance does not guarantee a visible banner under system notification settings.

Built with GPT-6.1 Sol in Codex

@rynfar
rynfar merged commit e84be5d into native Nov 4, 2026
@rynfar rynfar mentioned this pull request Nov 4, 2026
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