Skip to content

Failed Mark All as Read discards read intent under thread sync #166

Closed

Description

@curtisc

Versions

  • Blip 2.6.2, initially observed at 338f0e6
  • 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

  1. Use push_read=thread with a complete read-state snapshot containing unread conversations.
  2. 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.
  3. Choose Mark All as Read.
  4. 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.

Activity

  1. nixfred commented on Nov 13, 2026

    @nixfred
    Owner

    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.

  2. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions