Repository navigation
Description
Summary
Improve the accuracy of unread message count detection by reliably syncing with WhatsApp Web's native unread state—ensuring counts stay accurate across incoming/read messages and update immediately when using WhatsApp's "Mark all as read" option.
Current Behavior
The unread message count displayed in the tray icon and in-app UI frequently drifts out of sync with the actual unread chats inside WhatsApp Web, and does not reliably clear or update when triggering "Mark all as read" in WhatsApp.
Summary
Improve the accuracy of unread message count detection by reliably syncing with WhatsApp Web's native unread state—ensuring counts stay accurate across incoming/read messages and update immediately when using WhatsApp's "Mark all as read" option.
Current Behavior
The unread message count displayed in the tray icon and in-app UI frequently drifts out of sync with the actual unread chats inside WhatsApp Web, and does not reliably clear or update when triggering "Mark all as read" in WhatsApp.
Proposed Solution
Synchronize whatRust's unread badge state directly with WhatsApp Web's authoritative unread indicators using safe, read-only observation:
- Accurate Unread State Sync: Read the authoritative unread count/state directly from WhatsApp Web's native UI/title indicators (or passive DOM observation) rather than relying on fragile incremental message counting that can drift on sync, muted chats, or multi-device reads.
- "Mark all as read" Compatibility: Ensure bulk read actions—specifically WhatsApp's "Mark all as read" option, as well as messages read on linked mobile/desktop devices—immediately trigger a change without refresh
- Multi-Account Aggregation: Ensure each isolated account instance reports its exact synced unread count cleanly so the combined system tray badge reflects the true total.
Requirements & Constraints
- Zero WhatsApp Web code tampering: Use strictly passive/read-only state inspection (e.g., observing WhatsApp's native document title count or read-only badge elements) without modifying WhatsApp Web's internal scripts, DOM, or network requests.
- Respect badge visibility settings: Ensure synced unread updates integrate cleanly with any user preference to hide unread count badges.
Benefits
- Eliminates ghost or inaccurate unread counters in the tray and account tabs.
- Seamless synchronization when using "Mark all as read" or reading messages on another linked device.
- Reliable multi-account unread totals without requiring manual app restarts or refreshes.
Benefits
- Eliminates ghost or inaccurate unread counters in the tray and account tabs.
- Seamless synchronization when using "Mark all as read" or reading messages on another linked device.
- Reliable multi-account unread totals without requiring manual app restarts or refreshes.
Activity
karem505 commentedon Nov 26, 2026
Thanks @schoolerani-spec. Fixed in v0.7.1 (#137): the count is re-read within about 120 ms of a title or chat-list change instead of on a 2 s poll, so Mark all as read clears the badge at once, and titles like
(1,234)or ones with direction marks are no longer read as 0. If it still drifts for you, please reopen with the steps.Per-account notifications, prompt unread updates, GNOME banner fix (k…