feat: add "View Diff" button to task actions#12149
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
feat: add "View Diff" button to task actions#12149roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
…since task started
2 tasks
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.
Related GitHub Issue
Closes: #10976
Description
This PR attempts to address Issue #10976 by adding a "View Diff" button to the task actions toolbar. The button shows all file changes made since the task started by leveraging the existing checkpoint diff infrastructure.
Key implementation details:
DiffIconbutton toTaskActions.tsxthat appears when checkpoints are enabled and at least one checkpoint existscheckpointDiffmessage withmode: "full"to diff from the first checkpoint to the current working stateclineMessagesmay be undefinedFiles changed:
webview-ui/src/components/chat/TaskActions.tsx-- Added View Diff button with checkpoint detection logicwebview-ui/src/i18n/locales/en/chat.json-- Added translation string for the button tooltipwebview-ui/src/components/chat/__tests__/TaskActions.spec.tsx-- Added 4 test cases covering rendering and click behaviorFeedback and guidance are welcome.
Test Procedure
Pre-Submission Checklist
Documentation Updates
No documentation updates are required.
Additional Notes
The button is only visible when checkpoints are enabled and at least one checkpoint has been saved during the task. It uses the
"full"diff mode which compares the first checkpoint (initial state) against the current working directory state.Interactively review PR in Roo Code Cloud