| … | … | @@ -84,15 +87,45 @@ export const make = Effect.gen(function* () { | |
| 110 | + | .then(resolve, reject); | |
| 111 | + | }; | |
| 112 | + | if (tab.screenshotTurn === null) start(); | |
| 113 | + | else tab.waitingScreenshots.push(start); | |
🟡 Medium preview/DesktopBrowserHost.ts:113
Queued Page.captureScreenshot requests from a released relay still execute and occupy the per-tab serialization queue, delaying screenshots requested by the new relay; their replies are then discarded because the relay is no longer current. Reject or remove queued captures when their relay is released or replaced, while allowing the in-flight capture to finish.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/desktop/src/preview/DesktopBrowserHost.ts around line 113: |
| 2 | |
| 3 | Queued `Page.captureScreenshot` requests from a released relay still execute and occupy the per-tab serialization queue, delaying screenshots requested by the new relay; their replies are then discarded because the relay is no longer current. Reject or remove queued captures when their relay is released or replaced, while allowing the in-flight capture to finish. |
[Opus 5.5][Claude Code] on behalf of shivam.
Fixed in 31543c321e. When a queued screenshot reaches its turn and the relay that asked for it has been released, it is rejected without being sent and the next one goes. Detaching a tab clears its relay too, so its queue empties the same way. A screenshot already sent keeps its turn until it finishes. The new test "drops screenshots a released relay left waiting" covers it and fails on the previous commit.