Repository navigation
Studio: do not re-send the image generate POST after a dropped connection - #13790
Conversation
…tion The desktop fetch ladder retries a POST that rejects with a TypeError, up to 3 times. For a synchronous image generate that re-ran the whole generation, so one click produced 4 runs when the reply was lost. Pass retryNetworkErrors: false, as cancelDiffusionGeneration already does, so the dropped reply reaches GenerateResponseLostError and the caller settles it from progress and the gallery. Fixes unslothai#13781
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks @drakeo338! This adds the missing retry opt-out and brings desktop image generation in line with the browser. The history explains why it belongs here:
Validation on the tree at
If the POST never reached the backend, the user now gets an error and retries deliberately, as in the browser, instead of risking an automatic duplicate generation. |
Fixes #13781.
generateDiffusionImageposted to/api/inference/images/generatethroughauthFetch, which retries network errors. When the connection dropped after the backend had started generating, the POST was sent again and the whole generation ran a second time, instead of the dropped reply reachingGenerateResponseLostError(which the caller settles from progress and the gallery). The call now passesretryNetworkErrors: false. I added a test that a dropped generate reply is surfaced as lost and not re-sent; it fails on the parent commit and passes with the change.AI-assisted (Claude Code).