Skip to content

Conversation

@playcations
Copy link

@playcations playcations commented Sep 10, 2025

This is a rebased version of PR #5626 to resolve merge conflicts and scope.

Original PR: #5626

Original Title: Files Changed Overview (FCO)

What was done:

  • Branched off the head of main and refactored FCO to match
  • It was too far back in the commits it was causing issues with the rebasing
  • Removed checkpoint changes as they are outside the scope of this PR
  • Will now only work if checkpoints are working.

Closes Issue: #4454 when merged.
Closes PR: #5626 when merged.

Old PR Notes:

Related GitHub Issue

Closes: # 4454

Description

This adds a collapsable window in chat to show files that have been modified by agents.

Features include accepting changes, diffing and rejecting file changes outright.
This prevents you from needing to keep git open or going back to a previous checkpoint after every big modifications to the codebase. I definitely had times where some good changes have happened but then the agent decides theya ren't done! You can easily reject some of the changes instead of all of them. If you don't like this feature, you can also turn it off in the settings menu.

Checkpoints system did need modifications to get this to work properly. You can see what was done there and let me know what you think.
ShadowCheckpoints are now stored in a .roo folder in root. This prevents the need to search for all git files and turn off the system if some are found not in root. This was a real bummer when I went to use roo on larger codebases that have .gits throughout.

Test Procedure

run the following tests:
src/core/webview/tests/ClineProvider.spec.ts
src/services/checkpoints/tests/ShadowCheckpointService.spec.ts
src/services/file-changes/tests/FileChangeManager.test.ts
webview-ui/src/components/file-changes/tests/FilesChangedOverview.spec.tsx
webview-ui/src/components/settings/tests/UISettings.spec.tsx
webview-ui/src/context/tests/ExtensionStateContext.spec.tsx
check all languages exist.

open chat and ask it to modify some files, make new files, different types of tool calls, etc. accept and reject the changes
open settings menu and under interfaces, turn off the feature, go through the steps again
turn on the feature on last time and go through the steps again.

make sure checkpoints still work.
when restoring a checkpoint, fco clears and disappears.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR). <- actually true now
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Before:

image

After Checkpoint is hit:

image image image

Settings option:

image

Documentation Updates

You can add a line like, "After every checkpoint, Files changed will appear in chat. You have the option to accept or reject them on a file by file basis. to turn this feature off, find it in the settings menu" but I don't think it makes much to consider it significant.

Additional Notes

I consolidated the feature, made a new branch, pushed just feature changes, and squashed it into a single commit to only contain changes made that involve this feature.


Important

Introduces a feature to track and manage file changes between checkpoints, with UI updates, backend integration, and internationalization support.

  • Feature:
    • Adds FilesChangedOverview component to display modified files between checkpoints in TaskHeader.tsx.
    • Implements FCOMessageHandler in FCOMessageHandler.ts to handle file change messages.
    • Introduces FileChangeManager in FileChangeManager.ts for managing file changes.
  • Backend:
    • Updates checkpointRestore and getCheckpointService in index.ts to integrate file change tracking.
    • Modifies applyDiffToolLegacy, attemptCompletionTool, insertContentTool, and searchAndReplaceTool to track file edits.
  • Tests:
    • Adds tests for FCOMessageHandler and FileChangeManager in FCOMessageHandler.test.ts and FileChangeManager.test.ts.
  • Internationalization:
    • Updates settings.json for Italian, Russian, and Chinese locales to include new feature descriptions.
  • Misc:
    • Adds useDebouncedAction hook in useDebouncedAction.ts for debouncing actions.

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

playcations and others added 3 commits September 10, 2025 01:49
  - Add FilesChangedOverview UI + i18n and supporting hook (useDebouncedAction)
  - Introduce FileChangeManager and FCOMessageHandler services
  - Wire FCO into ClineProvider and webviewMessageHandler (experiment toggle)
  - Track LLM-edited files in tools (applyDiff, insertContent, searchAndReplace)
  - Add ShadowCheckpointService helpers: getContent and getCurrentCheckpoint
  - Minimal checkpoint integration: send filesChanged on checkpoint; reset baseline on restore
  - No checkpoint behavior changes; scoped to upstream/main
  - removed UseDebouncedAction since it is already implemented elsewhere.
  - added changes mentioned by roo in the review
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Sep 10, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 10, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 10, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the Files Changed Overview feature implementation and found several issues that need attention before merging. The feature looks promising but requires some critical fixes for stability and completeness.

@daniel-lxs
Copy link
Member

Hey @playcations can you take a look at the failing unit test?

@playcations
Copy link
Author

It is missing tests I have at home that I missed pushing. I will get those in when I get home in about 4 hours.

@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 10, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Sep 10, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Sep 11, 2025
@playcations
Copy link
Author

Added tests and updated language files. fixed found edge cases.

@playcations
Copy link
Author

I will be closing this branch as I am working on a refactor with better separation of concerns, less dependencies on tools, etc. Hopefully will be ready later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Changes Requested size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants