Skip to content

Web reconnect refreshes the sidebar but leaves the open transcript stale after a missed final update #929

Closed

Description

@currentbits

Priority: P1. Reproduced at commit 6c7a6fbe on 2026-09-05.

If a run finishes while the web connection is down, reconnect can show the thread as done in the sidebar while its open transcript still says working and omits the final reply.

Reproduction

  1. Open a working thread through the web bridge.
  2. Disconnect while the run completes on the host; miss its final thread:updated push.
  3. Reconnect without sending another prompt.
  4. threads:list resync updates the sidebar, but the selected detail is not fetched again.

Evidence uses real useCoder with a mounted hook and fake host: initialize working detail with no messages, change host detail to done with a final reply, then emit the threads:changed event generated by wireClient's reconnect path. The list becomes done, detail stays working/empty, and threads.get is called zero times after the refresh. Transport source confirms auth-ok resync requests only threads:list.

Cause

src/wireClient.ts:137 resyncThreads emits threads:changed. src/useCoder.ts:1071 updates list/projects only. Sequence-gap recovery requires a later thread:updated push, which need not arrive after the run has ended.

Acceptance

  • Resync the selected detail on reconnect, including messages and pending interaction state.
  • Retain thread-selection/stale-response guards.
  • Test a lost final push with no subsequent activity: sidebar and transcript must converge.

Distinct from #83 (detail during selection changes) and #233/#620 (test timer flake).
Sources: wireClient.ts, useCoder.ts.

Runnable audit evidence

Local artifact: docs/issue-drafts/2026-09-05-recovery-reproduce.mjs.

node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs --experimental-strip-types docs/issue-drafts/2026-09-05-recovery-reproduce.mjs

Exited 0 with six CONFIRMED assertions. This is an audit harness asserting existing defects, not passing regression tests for fixes. The artifact is in the audit checkout, not yet committed; the steps above stand alone.

Requested disposition: separate Planboard issue, plan:todo.

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

    plan:doing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions