Skip to content

fix(notification): prevent replayed task notifications - #948

Merged
vastsa merged 15 commits into
vastsa:mainfrom
yg2224:fix/issue911-notification-duplicate
Sep 23, 2026
Merged

vastsa merged 15 commits into
vastsa:mainfrom
yg2224:fix/issue911-notification-duplicate

Conversation

@yg2224

@yg2224 yg2224 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

session: issue911-notification-duplicate

Fixes #911

Summary

  • make task-native notifications exactly-once by durable notification id
  • close native task objects after successful read, mark-all-read, and clear actions
  • retain bounded tombstones and request-time acknowledgement watermarks so delayed renderer events cannot replay dismissed rows
  • guard renderer notification refreshes against stale async responses and preserve host unread totals/session outcome state
  • keep interactive prompt notifications on their independent lifecycle

Validation

  • node --test apps/desktop/test/notification-contract.test.mjs apps/desktop/test/notification-ipc-dismissal.test.mjs — 14 passed
  • pnpm --filter @pi-desktop/desktop typecheck — passed
  • pnpm --filter @pi-desktop/desktop test — passed
  • pnpm build:js — passed
  • pnpm lint — passed
  • pnpm docs:check — passed
  • cargo fmt --check — passed
  • cargo test -p host-core --locked — 643 passed
  • cargo clippy -p host-core --all-targets — passed with 4 pre-existing warnings
  • integrated-main candidate f58c6d8d7: pnpm test:e2e — 23 passed, 2 expected skips (no PI_DESKTOP_TEST_API_KEY)
  • integrated-main candidate f58c6d8d7: pnpm test:e2e:boot — passed

Remaining environment limitation

E2E: NOT RUN
Suite: packaged Windows Action Center native-notification activation
Reason: the provided Windows Tailscale SSH endpoint timed out, and this Mac environment has no Windows GUI automation session.
Alternative validation: native IPC contract tests, desktop test suite, host tests, and integrated smoke/boot E2E passed.
Remaining risk: Windows-specific Action Center attribution and click activation still need a Windows runner.

Copilot AI lite review requested due to automatic review settings September 23, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yg2224 yg2224 mentioned this pull request Sep 23, 2026
@vastsa
vastsa merged commit bc5a1c4 into vastsa:main Sep 23, 2026
4 checks passed
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.

[Bug] 错误弹出通知

3 participants