🫱 fix: Keep Polling Through Queued Run Handoffs (#15509)
Queue a message during a run — queue, not steer — and the row is server-owned: `useQueueDrain` deliberately declines the boundary (`serverOwnsBoundary`) and the backend admits the successor itself. So the client has to hear about that run through the active-job list, exactly like a background-tool continuation. It cannot. Finishing a run empties the list — the client removes its own job optimistically the moment FINAL lands — and the poll is disabled on an empty list, so it goes quiet at precisely the moment the successor is admitted. With the tab already focused there is no focus refetch either, which is why this reproduces on desktop and not only on mobile. The announcement never arrives, so the re-arm never runs and the pane sits on the previous turn until a reload. Keep asking for a bounded window after the last known job ends. The window is module-scoped rather than per-observer because this is one shared query and a component mounting mid-handover should inherit the grace, not restart it. This is the other half of the previous commits: without the re-arm the announcement lands on a pane that still reads its finished submission as an attachment, and without this the announcement never lands at all. Neither half is observable alone.
D
Danny Avila committed
a20048ab2d8cea49b327d0d652f039352bfc4789
Parent: 519e647
Committed by GitHub <noreply@github.com>
on 9/2/2026, 1:38:42 PM