feat(ui): add ability to edit user message when reverting#2440
Draft
Githubguy132010 wants to merge 3 commits intopingdotgg:mainfrom
Draft
feat(ui): add ability to edit user message when reverting#2440Githubguy132010 wants to merge 3 commits intopingdotgg:mainfrom
Githubguy132010 wants to merge 3 commits intopingdotgg:mainfrom
Conversation
Implement `onEditUserMessage` in `ChatView` to allow users to modify a message's text and revert the conversation to that specific point. This updates the composer draft and resets the cursor state to the end of the text. - Add `onEditUserMessage` handler to `ChatView` - Update `MessagesTimeline` to include an edit button (SquarePenIcon) next to the revert button - Update corresponding types and test mocks for `MessagesTimeline`
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes #2438
What Changed
Added an edit button to eligible user messages in the chat timeline. Clicking it rolls the thread back to the checkpoint before that message’s agent work, restores the user message text into the composer, and focuses the composer so the prompt can be corrected and resent.
Why
This supports the common “fix my previous prompt and restart from there” workflow without manually copying text and reverting separately. It reuses the existing checkpoint revert mechanism instead of introducing a new rollback path, keeping the behavior consistent with current thread state handling.
UI Changes
Adds a small edit icon button next to the existing revert action on user messages that have a restorable checkpoint.
Before: user messages exposed copy/revert actions only.
After: user messages expose copy/edit/revert actions, with edit pre-filling the composer after rollback.
Checklist
Note
Add Edit button to user messages in the chat timeline to revert and prefill the composer
MessagesTimeline.tsx.📊 Macroscope summarized 914e503. 3 files reviewed, 3 issues evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues