You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed Mark All as Read discards read intent under thread sync #166
Reproduced with synthetic regression tests against current main (69ca3ab)
Omarchy 4.5.0-3; Quickshell 0.3.2
Gateway: macOS 27.2, Python 3.9; push_read=thread
What happened
The badge repeatedly returned to 15 unread conversations after choosing Mark All as Read. The badge cleared immediately, then the same old unread conversations returned on a later refresh. The Mac gateway was locked. Read-sync diagnostics showed timeouts and repeated Messages is busy with another Blip action failures.
The locked Mac is an expected limitation of the Messages UI automation. The issue is losing the user's local read intent when that automation cannot complete.
Reproduction
Use push_read=thread with a complete read-state snapshot containing unread conversations.
Make imsg-read --all fail, for example by locking the gateway Mac. The regression fixture uses an injected bridge failure and does not require a real conversation.
Choose Mark All as Read.
Allow a subsequent collector run to load the same remote unread snapshot.
Actual: the bulk intent is deleted on failure, and the unchanged Mac snapshot restores the unread counts.
Expected: retain the click's read boundary locally and retry only work bounded by that boundary. A message arriving after the click must remain unread, and an unbounded --all must not be repeated after a failure or interruption.
Cause and related work
collect() explicitly deletes pendingReads["*"] when a bulk action fails. Under push_read=thread, the next complete Mac snapshot replaces local read marks, so the old unread counts return.
#133 fixed retained intent for individual conversations but intentionally left failed --all requests out because repeating an unbounded bulk action is unsafe. #125 also tracks blocking read calls in the collector. #164 describes a different way a bulk read can fail when Messages has no usable window.
Regression evidence
Four new cases fail against unmodified 69ca3ab: retained bulk intent, failure without a snapshot, persisting an attempt before invoking the bridge, and recovery after an interrupted bulk action. They pass with a timestamp-bounded per-chat fallback. Additional tests cover newer inbound messages, subsequent explicit unread gestures, aliases, and service identifiers that cannot be opened individually.
A separate small bridge guard rejects a known locked screen before acquiring the Messages UI lock or starting AppleScript.
No message text, names, phone numbers, or raw state files are included. No messages were sent during validation.
Thank you for the detailed report and the regression fixtures. The fix is in #167; review notes are on the PR (one blocker for the default push_read=all, which is a one-line gate). This stays open until it lands.
Activity
nixfred commentedon Nov 13, 2026
Thank you for the detailed report and the regression fixtures. The fix is in #167; review notes are on the PR (one blocker for the default
push_read=all, which is a one-line gate). This stays open until it lands.Merge #167: failed Mark All as Read retries as bounded per-chat reads