Skip to content

feat(notifications): combine native desktop and upstream alerts - #583

Merged
rynfar merged 15 commits into
pylonfrom
upstream/2026-09-16-notifications
Sep 17, 2026
Merged

rynfar merged 15 commits into
pylonfrom
upstream/2026-09-16-notifications

Conversation

@rynfar

@rynfar rynfar commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Pylon needs one notification system across desktop and browser clients. This combines the native desktop work from #424 with upstream's browser alerts, sounds, in-app notices and badges, while preserving Pylon's desktop defaults and completion semantics.

Credit

ALGORITHM-0's work in #424 is a substantial foundation of this implementation. The native Electron delivery layer, per-event preferences, settings, notification lifetime handling and tests are retained and extended. All ten original commits preserve ALGORITHM-0's authorship, and the integration commit also includes a Co-authored-by trailer. This work complements upstream's additions rather than replacing that contribution.

Upstream contributions are preserved with author attribution and source trailers:

  • 0e0ddaeedf30698bec131caf040a8e8d7b2e3f37 — maria / maria-rcks, #11481.
  • 42b6bcc6f59bd0369377746b0f2ef370c275b624 — Bilal Bakr, #11570.
  • 6e5e986f15b3cbec3588646ddf216f00b4301785 — Bilal Bakr and maria-rcks, #11569.

Comparative review

Area #424 Upstream Integration
Native desktop Native transport, retained lifetime, category controls Renderer browser transport Preserve and extend #424 native work
Browser features Desktop only Browser alerts, sounds, toasts, badges Adopt upstream additions
Event correctness Phase-only comparison; cached reconnect gap Live-state fence and completion timestamps Turn-aware pure reconciliation plus live-state fence
Pylon compatibility Interrupted/session-only completion supported Needs adaptation Preserve Pylon completion semantics
Click/lifetime Renderer readiness gap; retained objects Keyed pending notifications Acknowledged navigation; replaced and bounded native objects

The recommendation is a combined implementation: each source contributes capabilities the other lacks. Neither should land unchanged. #424 remains an open draft and has never been merged.

Behavior and fixes

A single reconciler prevents duplicate delivery, silently re-primes after reconnect, detects successive completed turns without an intermediate running snapshot, and preserves interrupted/session-only completion states. Archived threads and older rollback completions remain silent. Native notifications are replaced per thread and capped at 128 retained objects. Click targets remain in main until a ready renderer acknowledges navigation, including window recreation.

Desktop alerts and category preferences remain on by default; custom sounds, browser alerts and in-app notices are opt-in. Preferences reset correctly. Native desktop, browser permission handling, sound, toasts and badges share the same event decisions. No mobile push or closed-client background delivery is added.

Validation

  • 311 focused tests passed across 11 files, including renderer handoff, retained-object lifetime, reconnect, repeated completion, compatibility, settings and badge regressions.
  • Web, desktop and contracts typechecks passed; scoped lint and formatting passed.
  • Browser verification passed against isolated task-owned state: notification mode and in-app preferences persist across reload; a real provider completion produces a toast in Settings; Open thread navigates to the completed conversation. Before/after images and the 23-second delivery video are attached to this PR.
  • All active CI checks passed at 34b45525070f46cf811e32ba776e807d7286a98f, including general/server tests and Windows/Linux packaged smoke. Codesmith is inactive/skipped; no automated review findings were posted.
  • Scoped unused-export check passed. Native macOS/Windows/Linux presentation and remote HTTPS permission prompts were not exercised manually.

Bounded upstream head: 6d1d549441be84f19696ab59ed7e2fbf305280d4. Only the three notification sources above are included; the global upstream review cursor is unchanged.

Completes the implementation work proposed in #424. It remains open until this replacement integration is approved and merged. No release or installation performed.

Implemented with GPT-6 in Codex.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

ALGORITHM-0 and others added 14 commits September 16, 2026 22:49
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit c8be74b)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit ad44aad)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit f830a8c)
…ions

Update the desktop settings fixture for the new preference fields.

Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit 6f8a3d4)
…k-through

Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit 06bfa08)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit 65326a1)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit ab8d6bd)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit 72e2c11)
Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit 4801ea1)
Keep pending notification objects alive until handled and release them when the desktop scope closes. Add collection-based lifetime regression coverage.

Implemented with GPT-6 Astra in Codex App.

(cherry picked from commit a39c56a)
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
(cherry picked from commit 0e0ddaeedf30698bec131caf040a8e8d7b2e3f37)
(cherry picked from commit 42b6bcc6f59bd0369377746b0f2ef370c275b624)
Co-authored-by: maria-rcks <maria@kuuro.net>
(cherry picked from commit 6e5e986f15b3cbec3588646ddf216f00b4301785)
… delivery

Build on ALGORITHM-0's Pylon PR #424 native delivery, category preferences,
settings and tests, complementing upstream #11481, #11570 and #11569.
Preserve the ten original #424 commits and their authorship.

Use one event reconciler with Pylon completion semantics, live-state fencing,
turn-aware deduplication, bounded native lifetime, and acknowledged navigation
for a recreated renderer. Add upstream browser alerts, sounds, in-app notices
and badges while retaining Pylon desktop defaults.

Co-authored-by: ALGORITHM-0 <luke.t.walker.10@gmail.com>
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 17, 2026 5:13am UTC

@github-actions github-actions Bot added size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.0 KiB 14.1 KiB +27 B (+0.2%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +2 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.9 KiB +25 B (+0.4%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.8 KiB 58.8 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 14.0 KiB 13.9 KiB −134 B (−0.9%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB +4 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.8 KiB 6.7 KiB −138 B (−2.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 59.7 KiB 58.8 KiB −884 B (−1.4%) 66.4 KiB ✅
Claude Live turn messages 9 8 −1 (−11.1%) 21 ✅

Baseline: 877b9d7 · PR result: 34b4552 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar

rynfar commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

Browser verification evidence, captured against isolated task-owned state at 34b4552. Notification preferences persist across reload. A real provider completion produces an in-app toast while Settings is open; clicking Open thread navigates to the completed conversation. Native OS presentation was not manually exercised.

Before

Before: baseline settings

After

After: notification settings

Completion delivery

Completion toast

23-second recording of completion delivery and click-through:

delivery.mp4

@rynfar
rynfar merged commit 00b2ffc into pylon Sep 17, 2026
25 checks passed
@rynfar
rynfar deleted the upstream/2026-09-16-notifications branch September 17, 2026 05:27

This branch was successfully deployed

1 active deployment
Preview — 34b45525 Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants