Skip to content

Conversation

@liwilliam2021
Copy link
Contributor

@liwilliam2021 liwilliam2021 commented Jul 14, 2025

We now make a checkpoint after every user message so when a user edits a user message. Now when a user has checkpoints enabled, upon deleting or editing a message they are asked if they would like to restore the checkpoint right before the message was sent

Feature Loom: https://www.loom.com/share/a810f38550524e079c3d8c6eb8c53ce5

Edge cases + stress testing Loom: https://www.loom.com/share/28e56e97da944cc18144b9c92594b8e5
Follow Up question editing Loom: https://www.loom.com/share/8f6da376cbb842219ba4eb9aa7956b04
Checkpoints not enabled Loom: https://www.loom.com/share/0fdfde900c494239a16ac19ad26a597f

Fixes #4703


Important

Adds checkpoint restoration feature for message edits and deletions with user confirmation dialogs and updates translations.

  • Behavior:
    • Adds checkpoint restoration option when editing or deleting messages in App.tsx, ChatRow.tsx, and ChatView.tsx.
    • Introduces CheckpointRestoreDialog component to handle user confirmation for restoring checkpoints.
  • UI Components:
    • Updates ChatRow.tsx to include edit and delete buttons that trigger checkpoint dialogs.
    • Modifies ChatView.tsx to manage dialog state and handle user interactions for checkpoint restoration.
  • Testing:
    • Adds CheckpointRestoreDialog.spec.tsx to test dialog behavior and user interactions.
  • Localization:
    • Updates translation files for multiple languages to include new dialog text for checkpoint restoration options.

This description was created by Ellipsis for 85268aa. You can customize this summary. It will automatically update as commits are pushed.

@liwilliam2021 liwilliam2021 requested review from cte, jr and mrubens as code owners July 14, 2025 22:34
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jul 14, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future consideration: The state transitions during checkpoint restoration (task running → aborting → restoring → reinitialized → processing pending edits) could benefit from a formal state machine implementation to make the flow more explicit.

LGTM.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 18, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jul 18, 2025
@mrubens
Copy link
Collaborator

mrubens commented Jul 22, 2025

There's a lot in this PR. Do you think we could break it down into smaller independent pieces, like for instance a PR to change when we do the checkpoint first? And then follow it up by using checkpoints for edit/delete?

@daniel-lxs daniel-lxs moved this from PR [Needs Review] to PR [Changes Requested] in Roo Code Roadmap Jul 30, 2025
@NaccOll
Copy link
Contributor

NaccOll commented Aug 4, 2025

@mrubens #6359 has been merged. I believe this pull request contains significant changes.

Currently, checkpoints can restore both tasks and files. However, checkpoint triggering is currently more file-dependent. Furthermore, checkpoints are currently guaranteed to be created before modifications are made. A more requested feature is #2943.

@daniel-lxs
Copy link
Member

Hey @NaccOll We are aware of the changes to checkpoints done by this PR, we are working on a version of this PR that doesn't the checkpoint logic but achieves the same result

@NaccOll
Copy link
Contributor

NaccOll commented Aug 22, 2025

I will resolve conflicts based on this PR code, and adapting the new checkpoint generation timing (#6359), and finally complete the "Enhanced User Message Deletion Dialog" and "User Message Edit Functionality" mentioned in #7285. Although this is a content that has already been completed by this PR.

@NaccOll NaccOll mentioned this pull request Aug 27, 2025
6 tasks
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Aug 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Draft / In Progress size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add message editing functionality to chat interface

6 participants