Draft
Conversation
- Hide stale assistant responses while streaming new content after edit - Remove preceding assistant message when retrying from error - Link response versions to parent message versions (no independent navigation) - Automatically switch responses when navigating between edited message versions
Deploying routstr-chat with
|
| Latest commit: |
51aff65
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://77e27172.routstr-chat.pages.dev |
| Branch Preview URL: | https://fix-edit-message-ux-improvem.routstr-chat.pages.dev |
- Previously, optimistic messages added synchronously lacked an event ID and were not updated, leading to 'phantom threads' and duplicates when the real message arrived. - Now, 'createAndStoreChatEvent' adds the optimistic message synchronously (to prevent flash), and then UPDATES it in place when 'publishMessage' returns the real event ID. - This ensures the message has a valid ID for version grouping and deduplication.
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.
Summary
This PR fixes several UX issues when editing messages and resubmitting:
Issues Fixed
Stale responses shown during streaming - When editing a message and resubmitting, the old assistant response was still visible with the new thinking/streaming content appearing below it, causing confusion.
Retry from error kept stale response - When clicking Retry on an error message, the incomplete assistant response that preceded the error was still shown.
Independent version navigation on responses - When editing a user message, both the user message and response showed separate version navigators (e.g., both showing "2/2"), allowing them to be navigated independently. This was confusing because responses should follow their parent message's version.
Changes
ChatMessages.tsx:getFilteredVersionsto filter response versions based on the selected parent messageuseChatActions.ts:Result