Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 30, 2025

This PR implements a "Hard Reset" feature that addresses issue #8419 - corrupted Electron files persisting in system-level caches.

Problem

Users experiencing corrupted Electron runtime files cannot fully resolve the issue by simply deleting the VS Code Application Support folder. The corruption persists in system-level Electron caches.

Solution

Adds a new "Hard Reset" button in the About settings section that:

  • Clears all VS Code cache directories
  • Clears Electron cache directories
  • Removes IndexedDB, Local Storage, and Session Storage data
  • Handles platform-specific cache locations for macOS, Windows, and Linux
  • Performs a regular state reset alongside cache clearing
  • Provides user feedback with success/failure counts
  • Offers to restart VS Code after completion

Implementation

  • Added hardResetElectronCache() method to ClineProvider class
  • Added message handling for the new command
  • Updated WebviewMessage type
  • Added "Hard Reset" button to the UI
  • Added comprehensive JSDoc documentation
  • Included all necessary translations

Testing

  • TypeScript compilation passes
  • All existing tests pass
  • Linting passes
  • Code review confidence: 85% (High)

Fixes #8419


Important

Adds a 'Hard Reset' button to clear Electron caches in VS Code, with platform-specific handling and UI updates.

  • Behavior:
    • Adds "Hard Reset" button in About.tsx to clear Electron and VS Code caches.
    • Clears IndexedDB, Local Storage, and Session Storage.
    • Handles platform-specific cache paths for macOS, Windows, and Linux.
    • Offers to restart VS Code after completion.
  • Implementation:
    • Adds hardResetElectronCache() method to ClineProvider class.
    • Updates webviewMessageHandler to handle hardResetElectronCache command.
    • Updates WebviewMessage type to include hardResetElectronCache.
  • Translations:
    • Adds related strings to common.json and settings.json.

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

- Implements a new hardResetElectronCache method in ClineProvider
- Adds 'Hard Reset' button to the About settings section
- Clears platform-specific Electron and VS Code cache directories
- Handles macOS, Windows, and Linux cache locations
- Includes comprehensive user confirmation and feedback
- Adds JSDoc documentation for the new functionality
- Includes all necessary translations

Fixes #8419
@roomote roomote bot requested review from cte, jr and mrubens as code owners September 30, 2025 18:10
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Sep 30, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 30, 2025
@daniel-lxs
Copy link
Member

Hi there! Thank you for the PR and the thoughtful proposal. However, completely resetting the Electron cache falls outside the intended scope of this extension, so this feature isn't planned. We appreciate your contribution and understanding.

@daniel-lxs daniel-lxs closed this Oct 24, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 24, 2025
@github-project-automation github-project-automation bot moved this from New 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 Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG] Add "Hard Reset" button to clear Electron cache and global storage

4 participants