Skip to content

fix(desktop): resume cached streaming bubbles after thread switches - #565

Merged
huichen merged 1 commit into
mainfrom
claude/desktop-reattach-stall
Sep 12, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/desktop-reattach-stall

Conversation

@huichen

@huichen huichen commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the reproducible freeze when a running conversation A is backgrounded by switching to B and then reopened.

  • Resume the cached optimistic streaming bubble using its existing UI id. Previously the reattach path always targeted stream_, so the same-run pending bubble was mistaken for a settled reply and all updates were suppressed.
  • Revalidate streaming snapshots on mount, including terminal status. A run that finished while B was open otherwise remained streaming forever because the new A instance never observed an active-to-terminal transition.
  • Preserve request-time protection for newer writes and keep the original bubble identity.

Reproduction and coverage

The new integration test uses the real message/reattach hooks, projector, cache and reconciliation with mocked storage IPC and Tauri transport. The original active-return and completed-return cases both failed on main.

  • A -> B -> A resumes background output and subsequent live events
  • A second round trip keeps one stable bubble and does not leak A into B
  • Completed, failed and cancelled runs settle correctly on return
  • Full desktop suite: 102 files, 877 tests
  • ESLint and TypeScript
  • Production build and worker startup/parsing smoke check
  • Synced with origin/main immediately before push

This is separate from the Markdown worker fixes in #564 and does not require high model throughput or buffer exhaustion. No running agent/desktop was replaced; installed WebView2 end-to-end confirmation remains a follow-up.

@huichen
huichen enabled auto-merge (squash) September 12, 2026 04:31
@huichen
huichen merged commit 14d3ee3 into main Sep 12, 2026
12 checks passed
@huichen
huichen deleted the claude/desktop-reattach-stall branch September 12, 2026 04:34
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