Skip to content

Thread list keeps the old read/unread state when a thread is read elsewhere #5399

Closed

Description

@duizabojul

Summary

When a thread is marked read or unread from somewhere other than the window you are looking at (another window, another device, or bb thread read), that window's thread list does not update. The unread dot stays, or never appears, until something unrelated reloads the list. Status changes (running, idle) do update right away; read state does not.

Versions and environment

  • bb 0.46.0 (desktop app), macOS 27.0.1
  • Code checked on main at d011a88

Steps to reproduce

  1. Open bb and keep the window focused on any page with the thread list visible. Pick a thread that is currently read.
  2. In a terminal: bb thread unread thr_<id>
  3. Wait 10 seconds. The thread does not show as unread.
  4. bb thread read thr_<id>, then click anything that reloads the list (in my test, a sidebar tab). The list now shows the right state.

The same happens when another bb window or device opens the thread: the first window keeps showing it as unread.

Expected vs actual

Expected: the list updates within a second or so, like it does for status changes.

Actual: the server sends the change, the app receives it, and nothing reloads until step 4. Log from the window (WebSocket messages received, HTTP requests sent):

23:21:25.291 CLI marked unread
23:21:25.292 WS< {"type":"changed","entity":"thread","id":"thr_8sg6uktwb4","metadata":{"projectId":"proj_xubf46gc6m"},"changes":["read-state-changed"]}
23:21:29.292 thread still shown as read
23:21:29.487 CLI marked read
23:21:29.488 WS< {"type":"changed","entity":"thread","id":"thr_8sg6uktwb4","metadata":{"projectId":"proj_xubf46gc6m"},"changes":["read-state-changed"]}
23:21:39.497 no request for the list so far
23:21:39.519 HTTP> GET /api/v1/sidebar-bootstrap   <- only after I clicked a sidebar tab

Evidence

Why it happens: on read-state-changed, the app only marks its copy of the list as out of date and does not reload it or update the row (realtime-cache-registry.ts#L428-L431, #L997-L1004, refetchType: "none"). The message itself carries no read time, so the app cannot update the row either (threads.ts#L1874-L1878).

The window that does the reading updates itself right away, so this only shows when bb is open in more than one place, or when the CLI or an agent changes the read state.

What you ruled out

Suggested priority and effort

Low to medium. Anyone with bb open in two places, or using bb thread read / unread. Nothing is lost, and clicking around fixes it. Effort low: send the new read time with the message and write it into the list, like #2169 does for status. I am preparing a fix on my fork and will open a PR once approved.

AGENT GENERATED

Activity

  1. added theissue type on Oct 12, 2026
  2. added
    ui
    on Oct 12, 2026
  3. duizabojul commented on Oct 12, 2026

    @duizabojul
    Author

    Fix ready on my fork, waiting for contributor approval before opening the PR: main...duizabojul:bb:fix/read-state-list-patch

    The read-state message now carries the new read time, and the app writes it into the cached lists instead of only marking them stale (same approach as #2169). Tests included; each fails on main and passes with the change.

    AGENT GENERATED

  4. added
    confirmed-repro
    on Oct 12, 2026
  5. bb-slop-cop commented on Oct 12, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low · Labels: ui, confirmed-repro.
    • Report: Reproduction and root-cause evidence — REPRODUCED, high root-cause confidence. The regression fails on trusted main in two clean checkouts.
    • Root cause: Read-state notifications mark observed sidebar and thread-list queries stale without refetching or patching cached read timestamps, leaving their rows unchanged.
    • Fix: Ready PR #5403 reuses the existing active-list refresh handler; thread detail and archived lists retain stale-only behavior. No protocol change. Not merged.
    • Verification: 185 relevant tests pass, including both read directions and project scoping; lint/typecheck and diff checks pass. The fix changes 208 text lines across two files. Browser verification was blocked by missing Chrome; native macOS and real cross-device UI journeys are not claimed.
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

    confirmed-reproui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions