Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 21, 2025

This PR implements the auto-close Roo tabs feature requested in issue #6003.

Summary

This feature adds two new settings that allow users to automatically close tabs that were opened by Roo during file editing operations:

  1. Auto-close tabs opened during current task - Closes only the tabs that were opened by Roo during the current editing session
  2. Auto-close all Roo tabs - Closes all tabs that were opened or edited by Roo, regardless of when they were opened

Changes

  • Added autoCloseRooTabs and autoCloseAllRooTabs settings to the global settings schema
  • Created PostEditBehaviorUtils class to handle the tab closing logic
  • Implemented tab tracking in DiffViewProvider to keep track of files opened by Roo
  • Added FileEditingOptions component to the settings UI for configuring the new feature
  • Added message handlers in webviewMessageHandler to handle settings updates
  • Updated ExtensionState and WebviewMessage types to support the new settings
  • Added translation keys for the new UI section
  • Added comprehensive tests for both PostEditBehaviorUtils and FileEditingOptions

Testing

  • Unit tests have been added for the PostEditBehaviorUtils class
  • Component tests have been added for the FileEditingOptions React component
  • All tests are passing
  • Manual testing can be done by:
    1. Opening the Roo settings
    2. Navigating to the "File Editing" section
    3. Enabling either of the auto-close options
    4. Using Roo to edit files and observing that tabs are closed after saving

Screenshots

The new settings appear in the Roo settings panel under a "File Editing" section with clear descriptions of what each option does.

Closes #6003


Important

Adds auto-close Roo tabs feature with new settings, UI components, and tests.

  • Behavior:
    • Adds autoCloseRooTabs and autoCloseAllRooTabs settings to globalSettingsSchema in global-settings.ts.
    • Implements tab closing logic in PostEditBehaviorUtils class in PostEditBehaviorUtils.ts.
    • Tracks opened tabs in DiffViewProvider class in DiffViewProvider.ts.
    • Updates webviewMessageHandler in webviewMessageHandler.ts to handle new settings.
  • UI:
    • Adds FileEditingOptions component to settings UI in FileEditingOptions.tsx.
    • Updates SettingsView in SettingsView.tsx to include file editing options.
    • Adds translation keys for new settings in settings.json.
  • Testing:
    • Adds unit tests for PostEditBehaviorUtils in PostEditBehaviorUtils.spec.ts.
    • Adds component tests for FileEditingOptions in FileEditingOptions.spec.tsx.

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

- Add autoCloseRooTabs and autoCloseAllRooTabs settings to global settings schema
- Create PostEditBehaviorUtils class to handle tab closing logic
- Implement tab tracking in DiffViewProvider to track opened files
- Add FileEditingOptions component to settings UI
- Add message handlers for the new settings
- Update ExtensionState and WebviewMessage types
- Add translation keys for the new UI section
- Add comprehensive tests for PostEditBehaviorUtils and FileEditingOptions

Closes #6003
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 21, 2025 13:22
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request UI/UX UI/UX related or focused labels Jul 21, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 21, 2025
@daniel-lxs
Copy link
Member

To be implemented by @felixAnhalt, closing

@daniel-lxs daniel-lxs closed this Jul 22, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Auto-close Roo Tabs

4 participants