Skip to content

Resume sidebar refreshes interrupted by thread read updates - #4079

Merged
ymichael merged 1 commit into
mainfrom
bb/update-sidebar-for-thread-children-thr_aut5tc5icr
Sep 22, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/update-sidebar-for-thread-children-thr_aut5tc5icr

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Read/unread mutations cancel in-flight sidebar and thread-list queries before applying their optimistic update. If child creation has just triggered a sidebar refresh, marking the parent read can cancel that refresh permanently, leaving the children absent until reload. Related symptom: #3029; this does not establish the cause of that older report.

What changed

Record the queries interrupted by a read/unread mutation and invalidate those exact queries when it settles, on success or failure. Preserve a newer fetch already in progress. Ordinary read updates without interrupted fetches do not trigger additional requests.

How you verified

  • Regression failed before the fix; 26 focused tests pass, including read/unread success, failure, and no-refresh cases: pnpm exec turbo run test --filter=@bb/app -- thread-read-sidebar-refresh.integration.test.tsx useThreadReadTracking.integration.test.tsx thread-state-cache-owner.test.ts.
  • pnpm exec turbo run typecheck --filter=@bb/app passed.
  • pnpm exec turbo run lint --filter=@bb/app passed with existing warnings and no errors.
  • Isolated browser: three CLI-created children appeared without reload. With a 3-second sidebar fetch delay, opening an unread parent interrupted the refresh; the replacement request completed and the new child appeared without reload.

AGENT GENERATED

@ymichael
ymichael merged commit 9ee3821 into main Sep 22, 2026
16 checks passed
@ymichael
ymichael deleted the bb/update-sidebar-for-thread-children-thr_aut5tc5icr branch September 22, 2026 18:06
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.

1 participant