Skip to content

Add file changes panel per conversation#11494

Merged
hannesrudolph merged 3 commits intoRooCodeInc:mainfrom
saneroen:feature/file-diff-per-conversation
Feb 19, 2026
Merged

Add file changes panel per conversation#11494
hannesrudolph merged 3 commits intoRooCodeInc:mainfrom
saneroen:feature/file-diff-per-conversation

Conversation

@saneroen
Copy link
Contributor

@saneroen saneroen commented Feb 17, 2026

Closes: #11493

Description

This PR adds a per-conversation file diff feature: for each task, users can see a single list of all files changed in that conversation and expand to view the diff for each file (similar to Cursor's file diff per chat).

Implementation:

  • Derivation (webview-ui/src/components/chat/utils/fileChangesFromMessages.ts): New utility that, given clineMessages, returns a list of file-change entries (path, diff, diffStats). It considers both type === "say" + say === "tool" and type === "ask" + ask === "tool" (file edits are stored as ask messages after approval). Partial messages are skipped. Single-file tools (editedExistingFile, appliedDiff, newFileCreated, etc.) and batchDiffs are supported.
  • UI (webview-ui/src/components/chat/FileChangesPanel.tsx): New collapsible panel that shows "X file(s) changed in this conversation" and, when expanded, one row per file (grouped by path; multiple edits to the same file are merged) with an expandable diff via existing CodeAccordian. Renders only when there is at least one file change. Placed below the scrollable chat and above the action buttons.
  • Integration (webview-ui/src/components/chat/ChatView.tsx): Renders <FileChangesPanel clineMessages={messages} /> in the task view.
  • i18n: Added fileChangesInConversation.header with {{count}} in en, de, and fr chat locales.
  • Mark tool-approval asks as isAnswered when the user (or auto-approval) approves, and in the webview only include ask "tool" file edits where msg.isAnswered === true, so the file-changes panel shows only approved diffs.
Screenshot 2026-02-17 at 11 20 00 AM Screenshot 2026-02-17 at 11 20 10 AM Screenshot 2026-02-17 at 11 20 28 AM

No new persistence or extension API; all data is derived from existing task UI messages.

Test Procedure

  1. Build & run: pnpm run vsix (or run from workspace with F5).
  2. With file edits: Start a task, have the agent create or edit a file, approve the change. In the Chat tab, scroll to the bottom: the "X file(s) changed in this conversation" row appears below the messages. Expand it, then expand a file row to see the diff.
  3. No file edits: Start a task that only reads files or runs commands. The file changes section does not appear.
  4. Multiple files: Task that edits several files (or same file twice) shows all in the panel, grouped by path.
  5. Switch tasks: Open History, switch to another task that had edits; file changes panel reflects that task's edits.

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).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: Unit tests live in webview-ui/src/__tests__/
  • Documentation Impact: No user-facing docs changes required for this feature.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required. (Describe or link.)

Additional Notes

  • Panel returns null when there are no file changes, so no empty section is shown.
  • Reuses CodeAccordian, parseUnifiedDiff, and existing diff styling for consistency with inline tool blocks.

Get in Touch

Discord: santy2509

Start a new Roo Code Cloud session on this branch

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Feb 17, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 17, 2026

Rooviewer Clock   See task

All four previously flagged issues have been resolved in this commit. No new issues found.

  • Missing i18n translation key fileChangesInConversation.header -- now added to all 18 locale files
  • Missing ChatView.tsx integration -- FileChangesPanel is now imported and rendered
  • FILE_EDIT_TOOLS contains invalid tool names -- trimmed to the three valid ClineSayTool values
  • expandedPaths state not reset on task switch -- useEffect now resets on clineMessages change
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 17, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 19, 2026
@hannesrudolph hannesrudolph merged commit d7359ff into RooCodeInc:main Feb 19, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 19, 2026
@roomote roomote bot mentioned this pull request Feb 19, 2026
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 size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Per-conversation file diff: show all file changes for a task in one place

2 participants

Comments