43 lines
1.4 KiB
Markdown
43 lines
1.4 KiB
Markdown
<!-- SPDX-FileCopyrightText: 2026 FocusFlow contributors -->
|
|
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
|
|
|
# V1 ADR 008: Notification Abstraction
|
|
|
|
Status: **Accepted; updated to match current app state**
|
|
|
|
Date: 2026-06-26
|
|
|
|
Last reviewed: 2026-07-07
|
|
|
|
## Decision
|
|
|
|
`NotificationAdapter` in `scheduler_notifications` is the platform-neutral
|
|
boundary for reminder delivery. It exposes:
|
|
|
|
* `schedule(NotificationRequest request)`
|
|
* `cancel(String id)`
|
|
* `Stream<NotificationFeedback> feedback`
|
|
|
|
The pure scheduler core computes reminder policy and directive values only. It
|
|
does not import desktop, OS, process, or notification APIs.
|
|
|
|
The test fake, `FakeNotificationAdapter`, stores scheduled requests,
|
|
normalizes/captures cancellations, and can emit feedback events for workflow
|
|
tests.
|
|
|
|
The desktop implementation lives in `scheduler_notifications_desktop`.
|
|
It delegates to platform backends:
|
|
|
|
* Linux: `notify-send`
|
|
* macOS: `osascript`
|
|
* Windows and unsupported platforms: stdout fallback
|
|
|
|
The current desktop adapter satisfies the feedback-stream contract with an empty
|
|
stream. OS-level click/action feedback is not implemented in V1.
|
|
|
|
## Consequences
|
|
|
|
* Reminder delivery remains replaceable at the composition boundary.
|
|
* Core tests can use the fake adapter without depending on platform APIs.
|
|
* Future OS feedback support must extend the desktop package without changing
|
|
the scheduler core boundary.
|