Repository navigation
FIX: reload a sending conversation after another one has loaded - #3663
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
Conversation
The reload guard skipped any conversation with a send in flight, even when the hook held another conversation's transcript, so returning through the URL kept rendering the other conversation until the send landed. The skip now applies only while the hook still holds the sending conversation's own view. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
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.
Description
Fixes #3662
The conversation reload guard skipped any conversation with a send in flight, even after the user had navigated away and the hook had loaded a different conversation. Returning to the sending conversation through the URL then kept the other conversation's transcript on screen with no loading state, because the in-flight send also suppresses the load-gap flag, and nothing replaced the view until the send completed.
The skip now applies only while the hook still holds the sending conversation's own view. When another conversation is loaded, returning loads fresh server state, and the existing send pipeline keeps layering its pending messages and loading indicator on top of the fetched transcript, so the displayed view stays correct while the send runs. Mounting straight into a sending conversation still skips the fetch exactly as before.
Tests and Documentation
Added a regression that loads a second conversation and returns to the sending one, asserting the transcript is fetched and displayed. It fails on main and passes with the change. One existing test pinned the old skip for a sending conversation while another was loaded and now expects the fetch, with a comment explaining why the fetch is required. The full hooks suite passes (323 tests) and tsc is clean.
No documentation change needed, so I did not run JupyText.