Files
kandev/docs/plans/update-notification-reliability/task-03-native-permission-bridge.md
T
2026-08-24 11:09:03 +00:00

1.7 KiB

id, title, status, wave, depends_on, plan, spec
id title status wave depends_on plan spec
03-native-permission-bridge Move native notification permission to a user gesture done 1
plan.md ../../specs/platform/requirements/notifications.md

Task 03: Move Native Notification Permission to a User Gesture

Acceptance

  • The native bridge accepts semantic session, failure, and update occurrences but rejects the retired session.waiting_for_input prefix.
  • Background delivery never requests permission; narrow origin-checked commands query permission and request it only from a user action.
  • Rust permissions/schemas and the typed frontend client expose the same command contract, with tests for denied, duplicate, and failed-display behavior.

Verification

cd apps/desktop/src-tauri
cargo test --features desktop-runtime native_notifications
cargo fmt --check
cd ../../
pnpm --filter @kandev/web exec vitest run lib/desktop/native-notification-client.test.ts

Files likely touched

  • apps/desktop/src-tauri/src/native_notifications.rs
  • apps/desktop/src-tauri/src/main.rs
  • apps/desktop/src-tauri/build.rs
  • apps/desktop/src-tauri/capabilities/default.json
  • apps/desktop/src-tauri/permissions/autogenerated/*.toml
  • apps/desktop/src-tauri/gen/schemas/*.json
  • apps/web/lib/desktop/native-notification-client.ts
  • apps/web/lib/desktop/native-notification-client.test.ts

Dependencies

None.

Inputs

  • Spec Failure Modes and denied-permission scenario.
  • Desktop spec Notification contract.
  • ADR-0039 exact-origin and narrow-command boundary.

Output contract

Report command names and result types, exact-origin checks, allowlist changes, generated artifacts, Rust/frontend tests, risk tags, and task status update.