[Fix] In-session replies disappear after a network failure - #3094
Draft
roomote-roomote[bot] wants to merge 1 commit into
Draft
roomote-roomote[bot] wants to merge 1 commit into
roomote-roomote[bot] wants to merge 1 commit into
Conversation
Contributor
| const sent = await sendFailure.onRetry(); | ||
| // Retry replays the captured failure payload. Keep a newer draft instead | ||
| // of clearing text the user edited while the failed reply was visible. | ||
| if (sent && prompt === sendFailure.draftText) setPrompt(''); |
Contributor
There was a problem hiding this comment.
A successful retry clears only the draft text. PromptInput keeps its attachment context because this button runs outside its submit lifecycle, so any failed reply with files leaves those files staged after Retry. The now-empty composer still has an enabled submit control, and a later send repeats the attachments as a new message. Clear the attachment context when this retry succeeds (and add coverage for an attachment retry).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why this change was made
Transient client-network failures can make an in-session task submission look lost even when the original request may have reached the server. New-session start and initial Session-load recovery are already handled separately; this closes the remaining in-session reply gap without changing model-picker or route-recovery behavior.
Impact
Users can retry a failed Session reply without re-uploading attachments or risking a duplicate turn, while validation failures keep the existing composer dialog. Targeted client coverage (99 tests), web type checking, lint, formatting, oxlint, and the full pre-push gates pass. The server test suite could not start because this sandbox has no Postgres service at
127.0.0.1:15432and its Docker daemon is unavailable.Screenshots
These are representative DOM-rendered simulations captured after authentication was unavailable. They show the intended visual states only; they do not prove the live React, backend, authorization, network, or end-to-end behavior.