Skip to content

Refresh active thread lists after read-state events - #5403

Merged
SawyerHood merged 1 commit into
mainfrom
slopcop/issue-5399
Oct 13, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
slopcop/issue-5399

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Read-state events reached the app cache owner, but it invalidated observed sidebar and thread-list queries with refetching disabled and did not patch cached timestamps. Observers continued rendering the previous read state. The reproduction fails twice on trusted main in separate clean clones.

Report: https://get-bb.github.io/reports/issues/5399.html

What changed

  • Route read-state events through the existing active-thread-list refresh handler.
  • Preserve project scoping, stale-only thread detail, and archived-list no-refetch behavior; refresh sidebar and search consumers through the shared existing path.
  • Remove the unused stale-only list handler and replace its old no-refetch test with observed read/unread transitions, with and without project metadata.
  • No new event fields, public protocol, SDK/CLI surface, dependency, migration, or stored-data change. A client-only refresh avoids a protocol expansion.
  • Changed text lines: 208 total (95 additions + 113 deletions), across 2 files in the app realtime-cache subsystem.

How you verified

  • Before the production fix, the focused regression fails in both clean clones at trusted main 406c009502ad0f961fc6ce9c75c1d262cb3e3e7c: observed lastReadAt remains 200 instead of changing to 0 (two metadata cases).
  • After the fix, 13 relevant files / 185 tests pass, including both read directions, project isolation, archived-list behavior, and no thread-detail refetch.
  • pnpm exec turbo run test --filter=@bb/app -- src/hooks/realtime-cache-effects.test.ts src/hooks/realtime-cache-effects.coarse-pointer.test.ts src/hooks/cache-owners src/hooks/queries/thread-queries.test.tsx src/hooks/queries/query-helpers.test.ts
  • pnpm exec turbo run lint typecheck --filter=@bb/app passes. Both baseline and fixed lint report 248 warnings and zero errors.
  • git diff --check passes; git diff --numstat origin/main reports only text changes within the simple-fix limits.
  • Visual browser verification was attempted in an isolated fresh-store source app but blocked by missing Chrome. Native macOS and real cross-device journeys were not run; the reproducible proof exercises real QueryObservers and the app realtime cache owner. All launched processes and the synthetic store are cleaned up.

Fixes #5399

AGENT GENERATED

@SawyerHood
SawyerHood merged commit 164648c into main Oct 13, 2026
28 checks passed
@SawyerHood
SawyerHood deleted the slopcop/issue-5399 branch October 13, 2026 21:41
rchen-cape added a commit to rchen-cape/bb that referenced this pull request Oct 13, 2026
The awaiting-reply-changed realtime entry still referenced
markThreadListQueriesStale, which upstream get-bb#5403 removed. The merge
applied cleanly, so the app bundle threw a ReferenceError on load and
rendered nothing. Route it through dirtyActiveThreadListQueries like
read-state-changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

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

1 participant