Skip to content

Per-account notifications, prompt unread updates, GNOME banner fix (#118 #103 #98 #119) - #137

Merged
karem505 merged 4 commits into
fix/round-0.7.1from
fix/group-d-notifications
Nov 26, 2026
Merged

karem505 merged 4 commits into
fix/round-0.7.1from
fix/group-d-notifications

Conversation

@karem505

Copy link
Copy Markdown
Owner

Covers #118 and #103 (per-account notifications switch), #98 (unread count follows WhatsApp's title promptly) and #119 (no banner on Ubuntu GNOME with the .deb).

#118 / #103: notifications on or off per account

  • New notifications field on each account in the accounts file (default on; old files read as on).
  • Settings, Accounts, account actions menu: "Turn notifications off/on for this account". Accounts with it off show a bell-off marker in the list.
  • When off: no OS notification (page notifications, Windows native toasts, visual and unread fallbacks are all suppressed in notify::from_event) and WhatsApp's own alert tones are muted in that account's page (it combines with the global Notification sound switch). The "Send test notification" button still works.
  • Choice: the unread count, tray/badge and account switcher counts still update for a muted account.
  • New command set_account_notifications: listed in build.rs, granted only to the Settings capability, added to ipc_acl_tests.rs.

#98: unread detection

  • WhatsApp Web rewrites its own page title "(n) WhatsApp" from its internal unread state, so the title is still the source. I did not hook WhatsApp's internal modules; they are unstable and I could not test them here.
  • bridge.js now watches <title> and <head> (catches a replaced <title> node), watches the chat list (#pane-side) and re-reads the title 120 ms after it changes, re-reads on visibilitychange, and polls every 500 ms (was 2 s). So "Mark all as read" and incoming or read messages update the badge in a fraction of a second instead of up to a poll later.
  • Rust parse_unread now ignores invisible direction marks (U+200E etc.) before "(" and reads grouped numbers like "(1,234)". Both were reported as 0 before.
  • Tests: new bridge.test.mjs case (title change, chat-list change clears the count, no duplicate reports), new unread.rs tests, notifications.test.mjs updated for the 500 ms poll.

#119: no banner on GNOME (.deb)

Evidence from the reporter's dbus-monitor: the Notify call has app_name "whatrust", empty hints (array [ ]), expire -1. tauri-plugin-notification 2.4.0 sends no desktop-entry, urgency or category hint. The .deb installs whatRust.desktop (named after productName; badge.rs already relies on this), so GNOME cannot match the sender "whatrust" to an installed app, lists the message but shows no banner. This is a diagnosis from the capture and the plugin source; I could not reproduce it on GNOME.

  • On Linux, notifications are now sent with notify-rust directly with: desktop-entry = whatRust (.deb/.rpm), whatrust (AppImage, as install.sh writes), or io.github.karem505.whatRust (Flatpak); urgency normal; category im.received; app name "whatRust". macOS and Windows paths are unchanged.
  • notify-rust is already in the dependency tree via the plugin with the same features; Cargo.lock only gains the dependency edge, no new crate, so flatpak/cargo-sources.json is unchanged.
  • Unit test for the desktop id per package type.

Testing

  • CI (fmt, clippy -D warnings, cargo test on Linux, Windows, macOS) and all Node tests listed in CONTRIBUTING.md are green.
  • Not tested by hand: no real GNOME .deb install, no real WhatsApp session, no Settings UI click-through. Whether the desktop-entry fix makes the banner appear on Ubuntu 26.10 needs confirming by the reporter. The rpm desktop file name is assumed to match the deb's.

@karem505
karem505 merged commit 15a8496 into fix/round-0.7.1 Nov 26, 2026
7 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.

1 participant