Skip to content

[codex] Remove retired Windsurf plugin on startup#552

Merged
robinebers merged 1 commit into
mainfrom
codex/remove-retired-windsurf-plugin
Jun 6, 2026
Merged

[codex] Remove retired Windsurf plugin on startup#552
robinebers merged 1 commit into
mainfrom
codex/remove-retired-windsurf-plugin

Conversation

@robinebers
Copy link
Copy Markdown
Owner

@robinebers robinebers commented Jun 4, 2026

Summary

  • Remove the retired bundled windsurf plugin folder from the app-data plugin install directory during startup.
  • Filter retired bundled plugin IDs out of plugin loading as a defensive backstop.
  • Add regression coverage for upgraded installs that still have a stale app_data/plugins/windsurf directory.

Root Cause

Auto-updated installs keep the persisted app-data plugin directory. The new release stopped bundling Windsurf, but startup only copied bundled plugins into app data and never pruned plugin folders removed from later bundles, so stale Windsurf code could still be discovered and loaded.

Impact

After the next release, upgraded users should no longer see the old Windsurf plugin. The cleanup only removes the retired bundled-code folder when its manifest ID is windsurf; plugin data and unrelated/custom plugin folders are left alone.

Validation

  • cargo test --lib
  • bun run test -- src/lib/settings.test.ts src/hooks/app/use-settings-bootstrap.test.ts --run

Summary by cubic

Remove the retired bundled Windsurf plugin on startup and block it from loading. Prevents stale windsurf code from old installs from being discovered and run; custom plugins are untouched.

  • Bug Fixes
    • On startup, delete app_data/plugins/windsurf only if its manifest id is windsurf.
    • Filter retired bundled plugin IDs from loading as a safety net.
    • Added regression tests for upgraded installs and legacy/mismatched directories.

Written for commit ad4e69a. Summary will update on new commits.

Review in cubic


Note

Low Risk
Scoped filesystem cleanup and load-time filtering for one retired bundled ID with manifest checks; custom plugins are preserved by design.

Overview
Fixes upgraded installs still loading a retired bundled Windsurf plugin from persisted app_data/plugins, even after Windsurf was removed from new bundles.

Startup now prunes install_dir/windsurf after bundled copy, but only when plugin.json’s id is windsurf, so unrelated or custom plugin folders are not deleted by folder name alone. Plugin discovery goes through load_active_plugins_from_dir, which drops IDs in RETIRED_BUNDLED_PLUGIN_IDS (windsurf) as a backstop if cleanup misses a legacy layout (e.g. manifest under a non-windsurf directory name).

Regression tests cover removal alongside other plugins and the filter-only path when the directory is not removed.

Reviewed by Cursor Bugbot for commit ad4e69a. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Improved plugin loading to exclude and clean up retired bundled plugins
    • Preserved custom plugins while removing obsolete system plugins from the installation directory
  • Tests

    • Added test coverage for plugin management and cleanup operations

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Too much diff to scan? Review this PR in Change Stack to start with the highest-impact changes.

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cce221e5-a7f6-422f-a05d-a71a48941f76

📥 Commits

Reviewing files that changed from the base of the PR and between 8a5b337 and ad4e69a.

📒 Files selected for processing (1)
  • src-tauri/src/plugin_engine/mod.rs

📝 Walkthrough

Walkthrough

Plugin engine initialization now filters and removes retired bundled plugins. A constant defines retired plugin IDs (starting with "windsurf"). New helpers load and filter plugins by excluding retired manifests. Cleanup iterates retired IDs and removes matching install directories. Unit tests verify cleanup removes retired plugins while preserving custom plugins and filtering retired plugins even if cleanup does not remove them.

Changes

Retired Plugin Cleanup and Filtering

Layer / File(s) Summary
Plugin retirement filtering setup
src-tauri/src/plugin_engine/mod.rs
Introduces RETIRED_BUNDLED_PLUGIN_IDS constant for retired plugin allowlist and adds internal helpers to load plugins from a directory and filter out manifests whose id matches retired IDs.
Retired plugin cleanup mechanism
src-tauri/src/plugin_engine/mod.rs
Implements cleanup that iterates retired plugin IDs, reads plugin.json from each install subdirectory, and removes directories whose id matches a retired ID. Handles JSON parsing failures gracefully by treating unparseable manifests as non-matching.
Retirement and cleanup tests
src-tauri/src/plugin_engine/mod.rs
Unit tests create temporary filesystem structures, generate plugin manifests, run initialize_plugins, and verify that retired bundled plugins are removed from disk and filtered from loading results while custom plugins are preserved.

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-retired-windsurf-plugin

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the rust Pull requests that update rust code label Jun 4, 2026
@robinebers robinebers marked this pull request as ready for review June 6, 2026 07:49
@robinebers robinebers merged commit cad8468 into main Jun 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant