Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
This repository was archived by the owner on May 15, 2026. It is now read-only.

Add file-based editing mode to bypass diff view for direct writes #6001

Closed

Description

@felixAnhalt

What specific problem does this solve?

Problem Statement

Roo's current editing flow always uses diff-based views, which is helpful for traceability but often unnecessary for simple edits. Users should have the option to skip this step entirely and apply edits directly to the file on disk.

Who is affected:

Users who want faster editing cycles and simpler task execution, especially in low-stakes or non-review-heavy contexts

When:

Whenever Roo performs write/edit operations

Current vs Expected Behavior:

Current: All edits go through a visual diff view

Expected: If file-based editing is enabled, Roo writes changes directly without opening editors. If file-based editing is disabled all edits go through a visual diff view

Impact:

Greatly reduces cognitive overhead and tab churn for rapid development workflows. Also reduces editor clutter and latency.

Additional context (optional)

There is already a reference implementation inside #2955
The refence implementation was also already extracted into its own branch.
This issue is part of a series of proposed features which came to be by the discussions in said pull request.

The proposed complete feature set being:

  • Adding file based editing with the (least amount of control visually)
  • Adding option to enable/disable autofocus to follow the visual editing process (most control visually)
  • Adding option to open tabs in correct tab group if autofocus disabled
  • Adding option to open tabs at the end of the tab list in the current tab group
  • Adding settings to control tab closing behavior (opening tabs after edits, closing tabs after edits, closing all tabs of files touched

These should reside inside the FileEditingOptions proposed in Technical considerations
For a look at the complete feature set have a look into #2955

Roo Code Task Links (Optional)

No response

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear impact and context

Interested in implementing this?

  • Yes, I'd like to help implement this feature

Implementation requirements

  • I understand this needs approval before implementation begins

How should this be solved? (REQUIRED if contributing, optional otherwise)

Add a class to write based on fs instead of DiffView.
Add an interface to be able to easily switch between diff-based an file-based editing.
Add a setting to allow to switch between file-based and editor-based file edits for the user.

This will allow users to let roo edit files without having any visual impact (more cli-like feeling).
The new behavior will happen in the background.

How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)

Given I have a file to edit
When I switch file-based editing on
Then roo-code edits the file
But the edit doesn't impact UI

Technical considerations (REQUIRED if contributing, optional otherwise)

Add FileWriter class and IEditingProvider defining an interface with the smallest common denominator neccessary to easily switch between DiffViewProvider and FileWriter.
Add new FileEditingOptions options section inside webview-ui/src/components/settings/SettingsView.tsx (and move diff settings there as well because diff related features directly belong to the file editing process).
Add the setting for fileBasedEditing inside src/core/webview/webviewMessageHandler.ts etc.

Affected: DiffViewProvider and webview-ui/src/components/settings/SettingsView.tsx

Trade-offs and risks (REQUIRED if contributing, optional otherwise)

Introduces a new settings section which might be conceived as "bloating" up the settings more.
Simultaneous changes by user and roo should be handled the same way as currently handled by DiffViewProvider.

Activity

  1. felixAnhalt commented on Jul 21, 2025

    @felixAnhalt
    Author

    just wanted to say what roomote does here is wild
    here is my implementation, it looks super similar
    I will open a PR with my implementation if it is decided that roo is interested in this feature

  2. moved this from Triage to Issue [In Progress] in Roo Code Roadmapon Jul 22, 2025
  3. deleted a comment from on Jul 22, 2025
  4. deleted a comment from on Jul 22, 2025
  5. deleted a comment from on Jul 22, 2025
  6. daniel-lxs commented on Jul 22, 2025

    @daniel-lxs
    Member

    @felixAnhalt Thank you for creating this proposal, I like the idea of silent editing, we can probably introduce this as an experimental setting to test it out.

    Let me know if you have any questions

  7. added
    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.
    and removed
    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.
    on Jul 22, 2025
  8. niander commented on Aug 5, 2025

    @niander

    @daniel-lxs would be possible to add the option of opening the diff tab while Roo is waiting for confirmation on the edit?

  9. daniel-lxs commented on Aug 5, 2025

    @daniel-lxs
    Member

    This is already the case if you have auto approve disabled.

    I'll be closing this issue for now since this was already introduced in a recent update

  10. moved this from Issue [In Progress] to Done in Roo Code Roadmapon Aug 5, 2025
  11. niander commented on Aug 5, 2025

    @niander

    @daniel-lxs sorry bu how to open the diff? I have background edit enabled and auto approve disabled. Hence, no tab is opened when roo finishes editing a file. Yet, I can't figure it out how to open the diff so I can review before approval.

  12. daniel-lxs commented on Aug 5, 2025

    @daniel-lxs
    Member

    @niander
    You have to disable background edits to be able to see the diffs

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

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or requestIssue - In ProgressSomeone is actively working on this. Should link to a PR soon.proposal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions