Task 23: Native notifications #23

Closed
opened 2026-11-11 08:01:27 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-platform/src/notify/{mod.rs,linux.rs,windows.rs}, crates/fluxer-core/src/notifications.rs
  • Test: crates/fluxer-core/tests/notifications.rs

Interfaces:

  • Core: on MessageCreate that mentions the current user (mentions contains self, or mention_everyone and channel allows) or arrives in a DM, when the channel is not selected or the window is unfocused (UiState.window_focused, set by UserAction::WindowFocus(bool)), emit Effect::Notify(Notification { title: "<author> in #channel" | "<author>", body: plaintext(content) truncated 200, icon: AvatarSource, channel_id, message_id }); respect LocalSettings.notifications_enabled.
  • Platform: trait Notifier { fn notify(&self, n: &Notification) -> Result<()> }; Linux impl via the fork crate fluxer_linux_notifications (git dep; falls back to notify-rust if its API is napi-only — check fork:fluxer_desktop/native/linux-notifications/src first and record the finding in the README), Windows impl via notify-rust/tauri-winrt-notification. Clicking a notification → UserAction::SelectChannel (where the backend supports actions).

Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 23")

**Files:** - Create: `crates/fluxer-platform/src/notify/{mod.rs,linux.rs,windows.rs}`, `crates/fluxer-core/src/notifications.rs` - Test: `crates/fluxer-core/tests/notifications.rs` **Interfaces:** - Core: on `MessageCreate` that mentions the current user (`mentions` contains self, or `mention_everyone` and channel allows) or arrives in a DM, when the channel is not selected **or** the window is unfocused (`UiState.window_focused`, set by `UserAction::WindowFocus(bool)`), emit `Effect::Notify(Notification { title: "<author> in #channel" | "<author>", body: plaintext(content) truncated 200, icon: AvatarSource, channel_id, message_id })`; respect `LocalSettings.notifications_enabled`. - Platform: `trait Notifier { fn notify(&self, n: &Notification) -> Result<()> }`; Linux impl via the fork crate `fluxer_linux_notifications` (git dep; falls back to `notify-rust` if its API is napi-only — check `fork:fluxer_desktop/native/linux-notifications/src` first and record the finding in the README), Windows impl via `notify-rust`/`tauri-winrt-notification`. Clicking a notification → `UserAction::SelectChannel` (where the backend supports actions). --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 23")
charles added this to the Foundation milestone 2026-11-11 08:01:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#23
No description provided.