Skip to content

Conversation

@jqknono
Copy link

@jqknono jqknono commented Sep 17, 2025

Related GitHub Issue

Closes: #7930

Roo Code Task Context (Optional)

Description

  • Added options for importing settings from either remote or local JSON files in remote workspaces.
  • Implemented a file picker in the webview for selecting local JSON files.
  • Introduced a new message type 'requestLocalSettingsFile' to facilitate local file selection.
  • Updated the import logic to handle local file content and clean up temporary files after import.

This improves user experience by providing flexibility in settings management across different environments.

Test Procedure

Scenario: Importing settings from a local file while connected via Remote-SSH

Given I am connected to a remote development host using the Remote-SSH extension in VSCode
And I have a valid Roo Code settings .json file on my local machine
When I open the "About Roo Code" view and click the "Import" button
Then a system file dialog opens, allowing me to browse the file system of my local machine
And I can select a local .json file to import
And upon selection, the settings are successfully applied to Roo Code on the remote host

Added Unittest cases:

  • "should import settings successfully from provided fileContents"
  • "should return success: false when fileContents is not valid JSON"
  • "should return success: false when fileContents is missing required fields"
  • "should import settings successfully using importSettingsWithFeedback with fileContents"
  • "should show error message when importSettingsWithFeedback fails with invalid fileContents"

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: 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:

Code_3MP2uT1rdi

After:

Cursor_z31L8bKJBl

Documentation Updates

Additional Notes

Get in Touch

jqknono


Important

Enhances settings import for remote workspaces by adding local file import via webview file picker and updating import logic.

  • Behavior:
    • Adds options to import settings from remote or local JSON files in remote workspaces in webviewMessageHandler.
    • Implements file picker in App.tsx for selecting local JSON files.
    • Introduces requestLocalSettingsFile message type in ExtensionMessage.ts and WebviewMessage.ts.
    • Updates import logic to handle local file content and clean up temporary files in webviewMessageHandler.
  • Misc:
    • Minor changes to handle new message type in App.tsx.

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

@jqknono jqknono requested review from cte, jr and mrubens as code owners September 17, 2025 07:41
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Sep 17, 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 changes and found several issues that need attention before this can be merged.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 17, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 17, 2025
@jqknono jqknono force-pushed the feat/import-settings-from-local branch from b504c7c to a6cb450 Compare September 17, 2025 13:08
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Sep 17, 2025
  - Add importSettingsFromContent function to import settings from string content
  - Refactor importSettingsFromPath to reuse import logic
  - Improve import error handling and type validation
  - Add ImportSource type to support file path or content
  - Update related components and message handling to support new import methods
  - Enhance test cases to cover new import functionality
@jqknono jqknono force-pushed the feat/import-settings-from-local branch from a6cb450 to c383c77 Compare September 17, 2025 13:31
  - Add importSettingsFromContent function to import settings from string content
  - Refactor importSettingsFromPath to reuse import logic
  - Improve import error handling and type validation
  - Add ImportSource type to support file path or content
  - Update related components and message handling to support new import methods
  - Enhance test cases to cover new import functionality
- Replace manual file input handling with pickFileAsText utility for importing settings from local JSON files.
- Enhance error handling for file reading failures.
- Streamline code for better readability and maintainability.
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Hey @jqknono I found a couple of things that could be improved, let me know what you think.

@daniel-lxs daniel-lxs moved this from Triage to PR [Changes Requested] in Roo Code Roadmap Sep 19, 2025
@hannesrudolph hannesrudolph added PR - Changes Requested and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 19, 2025
@jqknono jqknono force-pushed the feat/import-settings-from-local branch from 1fb186d to 9c68826 Compare September 20, 2025 07:22
@jqknono
Copy link
Author

jqknono commented Sep 20, 2025

Hey @jqknono I found a couple of things that could be improved, let me know what you think.

Hi, @daniel-lxs
I have revised the content in accordance with your feedback and submitted.

@jqknono jqknono requested a review from daniel-lxs September 22, 2025 11:34
@hannesrudolph hannesrudolph moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Sep 22, 2025
@jqknono
Copy link
Author

jqknono commented Sep 30, 2025

Hi, @daniel-lxs @mrubens
This PR has been open for quite a few days. Could you please take some time to review and merge it?

@daniel-lxs
Copy link
Member

Thanks for the contribution. While the implementation is well done, this feature isn't in our current plans. Copying the settings file is straightforward enough for remote setups.

@daniel-lxs daniel-lxs closed this Oct 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 24, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Oct 24, 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 PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enable Local File Selection for Settings Import in Remote SSH Environments

3 participants