Skip to content

feat: add jump-to-file navigation for file edit operations#10145

Closed
roomote[bot] wants to merge 1 commit intomainfrom
feature/add-jump-to-file-for-edits-10144
Closed

feat: add jump-to-file navigation for file edit operations#10145
roomote[bot] wants to merge 1 commit intomainfrom
feature/add-jump-to-file-for-edits-10144

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 17, 2025

Related GitHub Issue

Closes: #10144

Roo Code Task Context (Optional)

This PR was created by Roo Code to address a feature request from the issue.

Description

This PR adds the ability to navigate to edited files directly from the chat panel, even when auto-approve is enabled.

The Problem:
When users enable auto-approve, the diff view is skipped, making it difficult to navigate to the edited file location. The user reported this in issue #10144.

The Solution:
The CodeAccordian component already supports an onJumpToFile prop that displays an external link icon to open files. However, this prop was only being passed for the newFileCreated tool case.

This PR adds the onJumpToFile prop to the following file edit operations:

  • editedExistingFile / appliedDiff
  • insertContent
  • searchAndReplace

Now users can click the external link icon in the file header to open the edited file, regardless of whether auto-approve is enabled.

Test Procedure

  1. Enable auto-approve in Roo Code settings
  2. Ask Roo Code to edit an existing file
  3. After the edit is auto-approved, observe the file entry in the chat panel
  4. Click the external link icon (🔗) in the file header
  5. Verify that the edited file opens in the editor

Automated tests:

  • Ran npx vitest run src/components/chat/__tests__/ChatRow.diff-actions.spec.tsx - all tests pass
  • TypeScript compilation passes
  • Lint passes

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: Existing tests pass and cover the changes.
  • Documentation Impact: No documentation updates required - this is a UI enhancement.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A - The UI change is minimal (external link icon already exists, now visible for more tool types).

Documentation Updates

  • No documentation updates are required.

Additional Notes

This is an attempt to address the feature request from issue #10144. Feedback and guidance are welcome.

Get in Touch

@roomote

When auto-approve is enabled, users could not easily navigate to edited
files since the diff view was skipped. This change adds the onJumpToFile
prop to CodeAccordian for editedExistingFile, appliedDiff, insertContent,
and searchAndReplace operations, allowing users to click the external link
icon to open the edited file.

Fixes #10144
@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Reviewed the changes. The PR correctly adds the onJumpToFile prop to file edit operations (editedExistingFile, appliedDiff, insertContent, searchAndReplace) following the existing pattern used for newFileCreated. No issues found.

  • No bugs or issues identified

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

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 17, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 7, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

无法查看已经更改了哪里,找不到差异化

2 participants