Skip to content

[2192 by GPT-5.6 Sol] Add configurable native desktop task notifications with quiet defaults - #2197

Merged
integry merged 7 commits into
1950-epic-cross-platform-dskfrom
2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig
Sep 7, 2026
Merged

integry merged 7 commits into
1950-epic-cross-platform-dskfrom
2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #2192

Branch: 2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig
Commits: ✅ Changes committed (37123c7)


AI Processing Completed

Execution Details:

Summary:
Implemented GitHub issue #2192.

  • Added native Linux/macOS task notifications with persisted per-account/instance/device preferences.
  • Added independent Desktop notifications settings with quiet defaults and test delivery.
  • Reused the authenticated scoped task socket stream.
  • Added strict IPC validation, deduplication, backlog suppression, burst grouping, rate limiting, safe click routing, and scope/logout cleanup.
  • Kept Browser push behavior unchanged; Windows reports deferred support.
  • Added Linux settings preview evidence and macOS capability validation.

Validation passed:

  • Desktop and UI typechecks
  • Production UI build
  • 42 desktop notification/IPC/lifecycle tests
  • 21 UI and Browser push regression tests
  • Focused UI lint checks

Detailed Logs:

  • Conversation: 226 messages
  • Session: 01a07d2c-f4ce-7262-aed9-46402ac04831

Log files stored at:

  • conversation: /tmp/claude-logs/issue-2192-2026-09-07T19-13-38-361Z-conversation.json
  • output: /tmp/claude-logs/issue-2192-2026-09-07T19-13-38-361Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #2192.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Linux desktop notification settings

Linux desktop notification settings

The new native desktop notification controls with quiet event defaults and explicit device enrollment.

…otifications

Implemented by ProPR AI using gpt-5.6-sol model.

Implementation completed successfully.
@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=9 max=2

@propr-dev propr-dev Bot added the ultrafix label Sep 7, 2026
@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 9/10, max cycles: 2)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Integration correction from root: merge the latest desktop epic before final validation. #2194 is already merged; its Browser push panel currently says Native desktop notifications are not implemented yet. This PR introduces them, so update that notice to direct users to the new Desktop notifications section while preserving the custom-origin service-worker gates and browser regressions. Earlier coordination note: #2192 (comment). Keep this focused; do not restore unsupported browser push behavior.

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Root code inspection found a concrete preference race to include in the focused corrections: NativeNotificationService.update clears pending deliveries only for update.enabled === false. If taskFailed (or another event toggle) is switched off during the 750 ms batch window, #flush filters only current scope and still displays the now-disabled kind. The user requested choosing which events to show, and the issue requires disable to apply immediately. Re-check current master/event preferences when flushing (and/or remove affected pending notices on update), including grouped counts. Add regression: queue failed notice -> set taskFailed false before flush -> no notice; mixed batch retains only enabled kinds. Preserve rate limiting and scope fencing. Do not add a broad notification refactor.

@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR adds a well-structured native desktop notification pipeline, including scoped preferences, IPC mediation, event filtering, batching, rate limiting, and settings UI. It needs several targeted correctness fixes before merge.

✅ Privacy-conscious projection — The renderer forwards only task-transition fields and deliberately excludes arbitrary event metadata.

✅ Quiet, independent defaults — Desktop notifications are opt-in, with started/completed disabled by default and settings kept separate from browser push.

✅ Broad focused coverage — Tests exercise capabilities, preferences, deduplication, stale clicks, rate limits, IPC routing, and explicit user enrollment.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Malformed socket events can throw

  • Required behavior: The new socket-to-native boundary must reject malformed runtime input without throwing or disrupting other task-update consumers.
  • Evidence: propr-ui/src/desktop/scopedTaskEvents.ts:14 — the normalizer dereferences payload.eventType without establishing that payload is an object, and line 21 reads payload.repository.length without first verifying that repository is a string. Inputs such as null or { repository: null } therefore throw instead of returning null.
  • Minimum fix: Accept unknown, validate that the payload is a non-array object, and type-check every optional field before accessing it. Add cases for null, non-object payloads, and non-string repositories.

F2: 🔴 Failed writes poison future saves

  • Required behavior: Persisted notification preferences must recover from transient storage failures, and a rejected update must not remain applied in memory or leak into a later successful update.
  • Evidence: apps/desktop/src/native-notifications.ts:232 — state is mutated before persistence succeeds; at line 411, each write chains from #writeTail using only a fulfillment handler, while lines 415–418 leave that tail rejected after failure. Consequently every later save skips its write, and get() can expose a change whose update reported failure.
  • Minimum fix: Keep the internal queue recoverable after each failed operation while still rejecting the individual save, and commit or roll back the in-memory mutation according to the write result.

F3: 🔴 Old account responses overwrite new settings

  • Required behavior: Account/instance/device preferences must remain correctly isolated when the authenticated user or connection scope changes during an operation.
  • Evidence: propr-ui/src/pages/SettingsPage/DesktopNotificationSettingsSection.tsx:74 — the result of update(scope, change) is applied unconditionally, and lines 82–102 do the same for test state. Unlike the load effect, these operations have no current-scope guard. An update for account A resolving after account B loads can replace B’s displayed settings with A’s.
  • Minimum fix: Associate update/test operations with a scope generation and discard their state changes and finalizers after the scope changes; also reset scope-specific busy and test state when a new scope activates.

F4: 🔴 Writer can create an unreadable state

  • Required behavior: The preference writer must not persist a valid in-memory state that its own loader subsequently rejects, causing loss of all saved preferences.
  • Evidence: apps/desktop/src/native-notifications.ts:140 — loading rejects the entire file when it contains more than 1,000 accounts, while line 232 adds account keys without enforcing or pruning to that limit. The 1,001st key therefore produces a file that resets to defaults after restart.
  • Minimum fix: Enforce the same account limit before persistence, either rejecting a new key or deterministically pruning an older entry, so every state written by the service remains accepted by its loader.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The overall design and targeted tests are strong, and current-head status reports no failures, although all eight checks are neutral/skipped. Four localized but real boundary, persistence, and account-isolation defects prevent merge readiness.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 7m 16s
  • Tokens: 72,888 (59,487 in / 13,401 out)
  • Cost: $0.70

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c4622dd

Processed 2 comments:

  • Comment 1 by @integry (ID: 5574794108✓)
  • Comment 2 by @integry (ID: 5574810944✓)

Summary of Changes

Implemented the focused PR #2197 follow-ups without committing:

  • Integrated the desktop epic containing merged PR [2189 by GPT-5.6 Sol] Fix desktop notification settings invoking unsupported service workers #2194, resolving preload and startup-policy overlaps.
  • Revalidated native notification preferences at batch flush time, excluding newly disabled event kinds from delivery and grouped counts.
  • Added regressions for disabled queued failures and mixed grouped batches.
  • Updated Browser push guidance to direct desktop users to the Desktop notifications section while preserving custom-origin gates.
  • Generated focused visual preview evidence.

Validation passed:

  • Desktop typecheck
  • UI typecheck
  • Full desktop suite: 659 passed, 27 platform-specific skips
  • Browser push/service-worker regressions: 25 passed
  • Focused integration tests: 30 passed
  • Production desktop renderer build
  • Focused UI lint and git diff --check

Visual preview

Desktop Browser push guidance

Desktop Browser push guidance

The Browser push panel now directs desktop-app users to the native Desktop notifications section while keeping Browser Web Push unavailable on the custom desktop origin.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 22m 39s
  • Tokens: 5,980,200 (5,956,057 in / 24,143 out)
  • Cost: $4.53
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 5574794108✓, 5574810944✓

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/fix F1 F2 F3 F4

Address the four localized blockers from review 5574854007, with regression tests. There is already an active follow-up task handling epic integration, Browser push guidance, and the per-event-toggle batch race (comments 5574794108 and 5574810944); serialize this request behind that work and preserve its changes. Keep the PR targeting 1950-epic-cross-platform-dsk, not main. No optional refactoring or Windows work. Retain opt-in native delivery, started/completed off by default, failures/needs-attention on after enablement, independent event settings and burst suppression. Report exact tested head and link Closes #2192.

@integry integry mentioned this pull request Sep 7, 2026
11 of 14 tasks
…ing:

Implemented the focused PR #2197 follow-ups without committing:

- Integrated the desktop epic containing merged PR #2194, resolving preload and startup-policy overlaps.
- Revalidated native notification preferences at batch flush time, excluding newly disabled event kinds from delivery and grouped counts.
- Added regressions for disabled queued failures and mixed grouped batches.
- Updated Browser push guidance to direct desktop users to the Desktop notifications section while preserving custom-origin gates.
- Generated focused visual preview evidence.

Validation passed:

- Desktop typecheck
- UI typecheck
- Full desktop suite: 659 passed, 27 platform-specific skips
- Browser push/service-worker regressions: 25 passed
- Focused integration tests: 30 passed
- Production desktop renderer build
- Focused UI lint and `git diff --check`

PR: #2197
Comment by: @integry (ID: 5574794108)
Comment by: @integry (ID: 5574810944)
Model: gpt-5.6-sol
@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 9834920

Addressed 1 AI review comment (IDs: 5574854007)

Summary of Changes

Implemented F1–F4 with regression coverage, preserving the preceding follow-up commit and notification behavior.

  • Hardened malformed socket payload validation.
  • Made preference writes transactional and recoverable after failures.
  • Fenced update/test results by account scope generation.
  • Enforced the 1,000-account persistence limit.
  • Retained opt-in defaults, independent event toggles, and burst suppression.

Validation:

  • Desktop: 688 tests, 0 failures, 27 platform skips
  • Focused UI: 8 tests passed
  • UI Docker-context regressions: 2 passed
  • Desktop/UI typechecks passed
  • Focused UI lint and git diff --check passed

PR base confirmed: 1950-epic-cross-platform-dsk.

Exact tested HEAD: c4622dd77a5305af6caefc74a8902e39a98e8245
Uncommitted diff hash: 23256afd26a44564472e82427cabb367670ea727

Closes #2192.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 17m 55s
  • Tokens: 2,033,256 (2,009,546 in / 23,710 out)
  • Cost: $2.32
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5574889834✓

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/merge

After the active review-fix task 17209 completes, merge the current desktop epic 1950-epic-cross-platform-dsk (now includes native icon PR #2195 at 30dd65e). c4622dd integrated an earlier epic and is still CONFLICTING. Preserve its batch-toggle/Browser push corrections plus F1-F4 fixes and branded main-window configuration. Serialize behind active work and leave open for validation; never merge main.

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root independent check on c4622dd: 11 native-notification service tests passed under Node 22, including newly disabled queued event and mixed-batch filtering regressions. This validates the focused batching correction only; F1-F4 are still being handled by ProPR task 17209, and current-epic sync is queued. Not yet merge-ready or native-banner visual acceptance.

…preceding follow-up commit and notification behavior.

Implemented F1–F4 with regression coverage, preserving the preceding follow-up commit and notification behavior.

- Hardened malformed socket payload validation.
- Made preference writes transactional and recoverable after failures.
- Fenced update/test results by account scope generation.
- Enforced the 1,000-account persistence limit.
- Retained opt-in defaults, independent event toggles, and burst suppression.

Validation:

- Desktop: 688 tests, 0 failures, 27 platform skips
- Focused UI: 8 tests passed
- UI Docker-context regressions: 2 passed
- Desktop/UI typechecks passed
- Focused UI lint and `git diff --check` passed

PR base confirmed: `1950-epic-cross-platform-dsk`.

Exact tested HEAD: `c4622dd77a5305af6caefc74a8902e39a98e8245`
Uncommitted diff hash: `23256afd26a44564472e82427cabb367670ea727`

Closes [#2192](#2192).

PR: #2197
Comment by: @integry (ID: 5574889834)
Model: gpt-5.6-sol
@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 1950-epic-cross-platform-dsk into 2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig in commit f9965c2

Conflicting Files

  • apps/desktop/src/main.ts
  • apps/desktop/src/preload-bridge.ts
  • propr-ui/src/pages/SettingsPage/NotificationSettingsSection.test.tsx
  • propr-ui/src/pages/SettingsPage/NotificationSettingsSection.tsx

Resolution Summary

Resolved all merge conflicts in the four specified files. No conflict markers remain anywhere in the repository.

Conflict resolutions:

  • apps/desktop/src/main.ts

    • Conflict: Both branches changed Electron imports. The PR added Notification; the merged branch added nativeImage.
    • Resolution: Retained both imports.
    • Why: Native desktop notifications require Notification, while the new cross-platform desktop icon handling requires nativeImage.
  • apps/desktop/src/preload-bridge.ts

    • Conflict: The PR added notification-navigation listeners and IPC handling; the merged branch lacked them.
    • Resolution: Preserved the PR’s listener set, validated /tasks navigation handler, and subscription behavior.
    • Why: These are required for native notification clicks to navigate safely to internal task pages.
  • NotificationSettingsSection.tsx

    • Conflict: The merged branch stated native notifications were not implemented, while the PR directed users to the new Desktop notifications section.
    • Resolution: Kept the PR guidance.
    • Why: Native notifications are implemented by this PR, so the merged branch’s wording is obsolete.
  • NotificationSettingsSection.test.tsx

    • Conflict: Each branch asserted its corresponding guidance text.
    • Resolution: Kept the assertion for the Desktop notifications section.
    • Why: It verifies the accurate, resolved UI behavior.

Validation passed:

  • Desktop TypeScript typecheck
  • UI TypeScript typecheck
  • 28 focused desktop tests
  • 6 focused notification settings tests
  • 2 UI Docker-context post-tests
  • git diff --check
  • Repository-wide conflict-marker scan

No commit was created. Git staging could not be completed because the linked worktree’s Git metadata is owned by root, preventing creation of index.lock. Consequently, Git still reports the files as UU even though their working-tree contents are fully resolved and marker-free.


🤖 Resolution Details

  • Model: gpt-5.6-sol
  • Time: 4m 35s

View Task Execution


System-triggered merge conflict resolution

…gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- apps/desktop/src/main.ts
- apps/desktop/src/preload-bridge.ts
- propr-ui/src/pages/SettingsPage/NotificationSettingsSection.test.tsx
- propr-ui/src/pages/SettingsPage/NotificationSettingsSection.tsx

PR: #2197
Model: gpt-5.6-sol
@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root independent integrated-candidate checks at f9965c2: inspected the F1-F4 correction diff; native notification service tests pass 13/13; scoped-task normalization and Desktop/Browser notification settings tests pass 14/14 across 3 UI files, plus 2 Docker-context post-tests. UI typecheck passed; full UI lint is being checked separately. Building exact-commit runtime images for a native packaged notification test next. This is not yet proof that an OS banner was displayed or a final combined tray+notification build.

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root actual Linux native evidence at f9965c2: clean Node22 npm ci, exact-commit app/UI runtime images + manifest, DEB SHA256 49630e0d2912bef87be21bc505dabe88943901b47fefd1827bf1e4982ab01589, and 4/4 isolated packaged smoke launches passed. Relaunched only the approved propr-desktop-test account with retained user-data/keyring; real @propr-ultrafix login persists and Settings renders separate Desktop notifications with expected quiet defaults. Explicitly enabled, sent test alert, and visually captured the ACTUAL xfce4-notifyd banner (service PID 2692707, activated on test UID1001 D-Bus by app PID2692421), not merely a delivery invocation. Banner says Desktop notifications are ready / ProPR can send task status updates on this device. Its View action focuses the app and navigates to Tasks in the current authenticated instance. Restored master enabled=false afterward; test button becomes disabled. Evidence retained /tmp/propr-linux-notifications-f996.85mGKZ/{native-test-banner.png,live-settings.png,live-enabled.png,after-banner-view.png,live-restored-off.png}. This proves native test delivery/click routing, not yet real started/completed task events; no paid agent jobs were created. Current test app runs this candidate; tray is not included.

@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR adds opt-in native task notifications for Linux and macOS, with per-account/device preferences, event filtering, batching, rate limiting, scoped navigation, and separate desktop settings. The implementation is thoughtful and well tested, but two localized delivery races make it need minor changes before merge. Current checks report no failures, although 17 remain pending.

✅ Strong trust boundaries — Task events are projected without metadata, validated again at IPC, and checked against the active connection scope before delivery and navigation.

✅ Careful preference handling — Quiet defaults, atomic persistence, write rollback, account limits, and stale-account UI result protection are all implemented and tested.

✅ Focused platform UX — Desktop notifications remain independent from Browser push, while Windows and unavailable native APIs receive explicit capability messaging.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F5: 🔴 Event disable is not immediate

  • Required behavior: Disabling an individual event must suppress already queued notices of that kind during the batching window; delivery must not depend on preference-file write latency.
  • Evidence: apps/desktop/src/native-notifications.ts:232 — only enabled: false clears deliveries immediately. Individual event changes remain absent from #state until the asynchronous persistence finishes around line 427, while #flush reads that old state around lines 349–353. A write taking longer than the 750 ms batch delay can therefore display the disabled event. The regression test hides this race by awaiting update() before waiting for the flush.
  • Minimum fix: When an event preference is set to false, immediately remove matching pending notices for that scope, or maintain an effective in-memory preference state that #flush observes before persistence completes. Add a regression that holds the write/update promise unresolved until after the batch timer fires.

F6: 🔴 Test delivery can report false success

  • Required behavior: The new “Send test notification” action must accurately report whether native delivery was invoked.
  • Evidence: apps/desktop/src/native-notifications.ts:236 — test() always returns { invoked: true } after calling #display, but #display returns without calling show when the delivery rate is exhausted around lines 377–379. The UI consequently displays “Test sent” when no native notification was attempted.
  • Minimum fix: Make #display return whether show was actually invoked and propagate that result from test(), or explicitly exempt user-initiated tests from the task-delivery rate limit. Cover a test request made after saturating the delivery window.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Scope live notification handles

#clearDeliveries(scope) filters pending notices by scope but closes every live handle. Associating each handle with its originating scope would prevent a stale scoped clear from dismissing a newer account’s banner. This is optional because the current single-active-scope design and normal renderer cleanup ordering limit exposure.

S2: 🟢 Test the renderer adapter lifecycle

A focused DesktopTaskNotificationAdapter test could cover activation gating, subscription cleanup, scope changes, rejected IPC calls, and native-click navigation. Existing tests cover normalization and service behavior well, so this would be additional integration confidence rather than a merge requirement.

Score

The core design and coverage are strong, but the two localized user-visible delivery errors should be corrected before merge. No current check has failed, though the pending checks still need to complete.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 7m 28s
  • Tokens: 78,866 (65,170 in / 13,696 out)
  • Cost: $0.69

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/fix F5 F6

Apply only the two localized delivery corrections in review 5575296178. F5 must immediately suppress already queued disabled event kinds even while the preference write is unresolved; preserve transactional persistence/rollback, and use a deferred-write regression. F6 must report whether native show was actually invoked after the rate limit is saturated. Do not take optional S1/S2 or refactor the pipeline. Root has already visually verified actual native test banner delivery and View-to-Tasks routing on f9965c2 in the isolated real-account Linux app. Preserve that behavior and quiet defaults. Latest epic also contains the test-only #2199 cleanup correction at 59c7823; retain it if syncing, never main. Leave open for focused validation.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 5e6faa1

Addressed 1 AI review comment (IDs: 5575296178)

Summary of Changes

Implemented only F5 and F6 on base HEAD f9965c2:

  • F5: disabled event kinds are removed from pending batches immediately, while persisted preferences remain transactional until the deferred write succeeds.
  • F6: test delivery now returns whether native show() was actually invoked, including rate-limit saturation.
  • Added deferred-write and saturated-rate-limit regressions in native-notifications.test.ts.
  • Updated service behavior in native-notifications.ts.

Validation passed:

  • Focused notification tests: 13/13
  • Desktop typecheck
  • Full desktop suite: 671 passed, 27 skipped, 0 failed
  • git diff --check

No visual preview was generated because these are delivery semantics without UI changes. No commit or PR operation was performed.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 9m 9s
  • Tokens: 1,387,991 (1,378,251 in / 9,740 out)
  • Cost: $1.39

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5575303342✓

Implemented only F5 and F6 on base HEAD `f9965c2`:

- F5: disabled event kinds are removed from pending batches immediately, while persisted preferences remain transactional until the deferred write succeeds.
- F6: test delivery now returns whether native `show()` was actually invoked, including rate-limit saturation.
- Added deferred-write and saturated-rate-limit regressions in [native-notifications.test.ts](</tmp/git-processor/worktrees/integry/propr/pr-2197-followup-2026-09-07T20-21-27/apps/desktop/src/native-notifications.test.ts>).
- Updated service behavior in [native-notifications.ts](</tmp/git-processor/worktrees/integry/propr/pr-2197-followup-2026-09-07T20-21-27/apps/desktop/src/native-notifications.ts>).

Validation passed:

- Focused notification tests: 13/13
- Desktop typecheck
- Full desktop suite: 671 passed, 27 skipped, 0 failed
- `git diff --check`

No visual preview was generated because these are delivery semantics without UI changes. No commit or PR operation was performed.

PR: #2197
Comment by: @integry (ID: 5575303342)
Model: gpt-5.6-sol
@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root independently checked 5e6faa1 against f9965c2: localized queued-kind suppression and actual native show invocation result changes, with deferred-write and rate-limit regressions. Focused native-notification suite passes 13/13 on Node 22. Real Linux OS banner and View-to-Tasks routing were verified on the preceding f996 packaged build; that is not yet real task lifecycle delivery or final integrated-head acceptance. Fresh ProPR review is already active; no duplicate implementation request.

@propr-dev

propr-dev Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR adds opt-in, per-event native task notifications for Linux and macOS through a narrow Electron IPC bridge, with persisted preferences, batching, rate limiting, and safe task navigation. It needs minor changes before merge because two lifecycle cases can suppress valid notifications.

✅ Immediate preference enforcement — Disabling an event kind removes matching queued notices before persistence completes, while failed writes still leave stored preferences unchanged.

✅ Strong renderer boundary — Task events are projected into a metadata-free payload and validated again at the native IPC boundary.

✅ Focused regression coverage — Tests cover quiet defaults, persistence failure, stale scopes, batching, rate saturation, navigation, and the two previously requested delivery corrections.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F7: 🔴 Stale clear closes active notifications

  • Required behavior: Scope cleanup for the new notification subsystem must not interfere with notifications belonging to a different, currently active account scope.
  • Evidence: apps/desktop/src/native-notifications.ts:293 — #clearDeliveries(scope) filters pending notices by the supplied scope, but lines 300–301 close every handle in #live unconditionally. Consequently, clear(oldScope) arriving after a new scope has activated closes the new scope’s visible notifications.
  • Minimum fix: Close live handles only when clearing all delivery or when the supplied scope matches the active scope; alternatively associate each live handle with its scope. Add a regression that activates scope B, displays a B notification, then clears stale scope A and verifies B remains open.

F8: 🔴 Retry notifications are permanently deduplicated

  • Required behavior: Enabled event preferences must deliver genuine new task transitions while suppressing only duplicate events.
  • Evidence: apps/desktop/src/native-notifications.ts:272 — terminalKey contains only account, task ID, and terminal kind; lines 275–279 reject and permanently remember that key without resetting it when the task enters a new processing cycle. Thus failed → processing → failed or completed → processing → completed suppresses the second terminal notification even with a newer version.
  • Minimum fix: Reset terminal deduplication for a task when a newer transition establishes another execution cycle, even when “Task started” notifications are disabled, while retaining exact-event deduplication. Cover both failed and completed retry sequences.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Contain native API exceptions

Consider catching synchronous exceptions from the injected show and close operations in NativeNotificationService. This would keep an unusual Electron or platform notification failure from escaping a timer callback or cleanup path. It is optional because the supported Electron API and bounded payloads do not demonstrate a current failure.

Score

The implementation is well-scoped and thoroughly tested, but the two notification lifecycle defects can hide valid active-account and retry alerts. Current checks have no reported failures, though most remain pending.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 6m 32s
  • Tokens: 77,461 (65,386 in / 12,075 out)
  • Cost: $0.69

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/fix F7 F8

Apply only the two demonstrated lifecycle defects from review 5575442995. Root confirmed clear(oldScope) currently closes all live handles, and terminal dedup never resets for a retry (with preference filtering occurring before cycle tracking). Keep scope cleanup isolated and recognize genuine newer execution cycles even when started alerts are disabled; preserve exact-event duplicate and stale-event rejection. Add focused old-scope clear and failed/completed retry regressions. No optional S1, refactors, Windows work, or changes to quiet defaults. Root latest 5e6faa1 full desktop suite passes 672 tests, 26 platform skips, zero failures. Leave open against desktop epic only.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 4e48c47

Addressed 1 AI review comment (IDs: 5575442995)

Summary of Changes

Implemented F7 and F8 only.

  • Scoped cleanup now closes live notifications only for the active scope or a global clear: native-notifications.ts
  • Newer processing cycles reset terminal dedup before event-preference filtering, while exact duplicates and stale revisions remain rejected: native-notifications.ts
  • Added old-scope clear and failed/completed retry regressions: native-notifications.test.ts

Validation on base 5e6faa1d8a6fbb5c922501811bbe391c1f37910e:

  • Focused tests: 15 passed
  • Desktop typecheck: passed
  • Full desktop suite: 673 passed, 27 platform/environment skips, 0 failures

Only the two notification source/test files changed. No commit, preview, PR target, or optional work was performed.


🤖 Implementation Details

  • Model: GPT-5.6 Sol (high)
  • Requested By: @integry
  • Time: 8m 30s
  • Tokens: 953,972 (944,362 in / 9,610 out)
  • Cost: $1.13

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5575447500✓

Implemented F7 and F8 only.

- Scoped cleanup now closes live notifications only for the active scope or a global clear: [native-notifications.ts](/tmp/git-processor/worktrees/integry/propr/pr-2197-followup-2026-09-07T20-40-34/apps/desktop/src/native-notifications.ts:321)
- Newer processing cycles reset terminal dedup before event-preference filtering, while exact duplicates and stale revisions remain rejected: [native-notifications.ts](/tmp/git-processor/worktrees/integry/propr/pr-2197-followup-2026-09-07T20-40-34/apps/desktop/src/native-notifications.ts:283)
- Added old-scope clear and failed/completed retry regressions: [native-notifications.test.ts](/tmp/git-processor/worktrees/integry/propr/pr-2197-followup-2026-09-07T20-40-34/apps/desktop/src/native-notifications.test.ts:240)

Validation on base `5e6faa1d8a6fbb5c922501811bbe391c1f37910e`:

- Focused tests: 15 passed
- Desktop typecheck: passed
- Full desktop suite: 673 passed, 27 platform/environment skips, 0 failures

Only the two notification source/test files changed. No commit, preview, PR target, or optional work was performed.

PR: #2197
Comment by: @integry (ID: 5575447500)
Model: gpt-5.6-sol

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root inspected 4e48c47 against 5e6faa1 and independently ran native-notification tests: 15/15 pass. F7 now restricts live-handle cleanup to the active scope or global clear. F8 tracks bounded per-task transition cursors before per-event preference filtering, resets terminal dedup on a newer started cycle, and rejects stale/duplicate revisions. The focused tests cover old-account cleanup and failed/completed retries with started alerts disabled. No additional demonstrated blocker found in this bounded fix review. Prior build/full-suite evidence is not a claim of final integrated acceptance; Linux/macOS CI and epic composition remain pending.

@integry

integry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

/merge

Sync current desktop epic base 1950-epic-cross-platform-dsk (70d26dd) only, never main. Preserve F5-F8 notification delivery corrections and quiet defaults. Retain epic test corrections #2199 and #2201. Root focused tests on 4e48c47 pass 15/15 and bounded independent inspection found F7/F8 addressed. Leave open for final integrated validation; no optional polish.

@propr-dev

propr-dev Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Auto-merged 1950-epic-cross-platform-dsk into 2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig (clean merge) in commit 490c4ef

No conflicts were found — the merge was verified by an AI agent.


🤖 Verification Details

  • Model: gpt-5.6-sol
  • Time: 2m 8s

View Task Execution


System-triggered merge conflict resolution

…to 2192/gpt-5.6-sol-add-configurable-native-d-20260907-1840-cig

@integry integry left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration decision on 490c4ef: Ultrafix-first reviews identified F1-F8; ProPR applied the bounded fixes and root independently inspected their diffs/regressions. Latest epic sync changes only the two existing test fixtures. Root exact-head full desktop suite passes 674 tests, 26 platform skips, zero failures; desktop typecheck passes. No current non-Windows CI failure is reported, though fresh CI remains pending. Actual Linux native test banner and View navigation were verified on prior f996 build, not final-head real task events. Integrating into desktop epic only, with combined-head Linux/macOS CI and real-account acceptance still required under #1962; no claim of release readiness.

@integry
integry merged commit 5f046cc into 1950-epic-cross-platform-dsk Sep 7, 2026
26 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant