Notifications for messages, replies and mentions #132

Merged
littlefox merged 2 commits from issue-103-notifications into main 2026-10-18 22:09:04 +00:00
Owner

Closes #103

  • Chat messages to me, new replies to my posts (parent is mine) and new posts that mention me (#102) notify, only while NeoKOM isn't in front (hidden or unfocused).
  • Settings (our user-area block, so they follow the person): each kind on/off, quiet hours "22:00-07:00" (wraps midnight). Permission is per device: the settings show its state and a "Tillåt aviseringar" button; without HTTPS they say so (DOCKER.md's HTTPS mode).
  • Browser: shown through the service worker's registration (Chrome on Android has no page new Notification()), else a page notification. A tap focuses NeoKOM and opens the post (the service worker posts the number to the page).
  • Desktop (Linux): org.freedesktop.Notifications over D-Bus with zbus 4.4, already in the tree via the keyring (Cargo.lock unchanged apart from the app's own entry).
  • Not here: push while NeoKOM is closed (needs an always-on session; open roadmap question).

Verified: unit tests for quiet hours; new notifications.spec.ts on desktop/Android/iPhone with a stand-in Notification API (permission button; message, reply and mention notifications with title, body and text; a tap opens the post; nothing while in front, with the kind off, or in quiet hours). Headless Chromium denies notification permission even when granted, so the real API wasn't exercised: to try on the Android phone over https://192.168.0.11:8443/ (Inställningar → Aviseringar → Tillåt, then have someone message you while NeoKOM is in the background). Full e2e 207 passed, 1 flaky (a login timeout in theme.spec, 4/4 on repeat); clippy native/wasm/desktop clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #103 - Chat messages to me, new replies to my posts (parent is mine) and new posts that mention me (#102) notify, only while NeoKOM isn't in front (hidden or unfocused). - Settings (our user-area block, so they follow the person): each kind on/off, quiet hours "22:00-07:00" (wraps midnight). Permission is per device: the settings show its state and a "Tillåt aviseringar" button; without HTTPS they say so (DOCKER.md's HTTPS mode). - Browser: shown through the service worker's registration (Chrome on Android has no page `new Notification()`), else a page notification. A tap focuses NeoKOM and opens the post (the service worker posts the number to the page). - Desktop (Linux): org.freedesktop.Notifications over D-Bus with zbus 4.4, already in the tree via the keyring (Cargo.lock unchanged apart from the app's own entry). - Not here: push while NeoKOM is closed (needs an always-on session; open roadmap question). Verified: unit tests for quiet hours; new `notifications.spec.ts` on desktop/Android/iPhone with a stand-in Notification API (permission button; message, reply and mention notifications with title, body and text; a tap opens the post; nothing while in front, with the kind off, or in quiet hours). Headless Chromium denies notification permission even when granted, so the real API wasn't exercised: **to try on the Android phone over https://192.168.0.11:8443/** (Inställningar → Aviseringar → Tillåt, then have someone message you while NeoKOM is in the background). Full e2e 207 passed, 1 flaky (a login timeout in theme.spec, 4/4 on repeat); clippy native/wasm/desktop clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Chat messages to you, new replies to your posts and posts that mention
you now notify while NeoKOM isn't in front. Each kind can be turned off
and quiet hours silence them (user area, so they follow you). Browser:
the Notification API through the service worker (Chrome on Android
needs that), HTTPS only, with a permission button in the settings; a
tap opens the post. Desktop: the freedesktop service over D-Bus, with
the zbus the keyring already brings in.

Refs #103

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge remote-tracking branch 'origin/main' into issue-103-notifications
All checks were successful
ci / check (push) Successful in 9m54s
packaging / arch (pull_request) Successful in 12m38s
ci / desktop (push) Successful in 17m35s
packaging / debian (pull_request) Successful in 21m30s
packaging / nix (pull_request) Successful in 23m49s
packaging / fedora (pull_request) Successful in 27m40s
ci / e2e (push) Successful in 27m50s
packaging / release (pull_request) Has been skipped
6d4b216f69
littlefox referenced this pull request from a commit 2026-10-19 05:23:04 +00:00
Sign in to join this conversation.
No description provided.