Skip to content

Plugin api#163

Closed
Jordonbc wants to merge 98 commits intoDevfrom
PluginAPI
Closed

Plugin api#163
Jordonbc wants to merge 98 commits intoDevfrom
PluginAPI

Conversation

@Jordonbc
Copy link
Collaborator

No description provided.

@github-actions
Copy link

Issues

  • resolve_plugin_settings_defaults launches state.plugin_runtime().start_plugin(plugin_id) whenever runtime_for_workspace_with_config returns None (which happens when the plugin is disabled via settings). That call never checks cfg.is_plugin_enabled, so merely opening the “Plugin Settings” pane for a disabled/denied plugin will start its runtime, leave it running, and give the plugin another chance to execute even though the user explicitly disabled it. Please gate the start_plugin call (and keep the runtime stopped) unless the plugin is actually enabled/approved in the config. Backend/src/tauri_commands/plugins.rs:575
  • The global save button is put into the “Saved!” state before the async TAURI.invoke('save_plugin_settings' | 'set_global_settings') completes, but there is no finally that clears that state when the save fails, so a failure leaves the button permanently showing “Saved!” (and still carrying the saved-state class) even though nothing was saved. Reset the button text/class in the error path (or move the “Saved!” UI toggle into the success branch) so the user isn’t misled when saving fails. Frontend/src/scripts/features/settings.ts:587

New%20session%20-%202026-03-15T11%3A49%3A53.552Z
opencode session  |  github run

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbc69b607a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +585 to +587
if runtime.is_none() {
let _ = state.plugin_runtime().start_plugin(plugin_id);
runtime = state

Choose a reason for hiding this comment

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

P1 Badge Avoid starting disabled plugins while resolving settings

resolve_plugin_settings_defaults drops errors from runtime_for_workspace_with_config and then unconditionally calls start_plugin, so a plugin that is disabled in config still gets executed when settings are loaded. Since get_plugin_settings is invoked during settings rendering, opening the Settings modal can run disabled plugins in the background, defeating the disable gate and unexpectedly executing plugin code.

Useful? React with 👍 / 👎.

Comment on lines +406 to +409
let _ = self
.runtime
.vcs_stash_push(message, include_untracked)
.map_err(|e| self.map_runtime_error(e))?;

Choose a reason for hiding this comment

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

P2 Badge Preserve path-scoped stash behavior for plugin backends

PluginVcsProxy::stash_push no longer forwards the paths argument to the runtime call, so path-limited stash requests are widened to whole-repo stashes for plugin backends. git_stash_push still accepts and passes path subsets, which means users selecting specific files can get a full working-tree stash instead of the intended scoped stash.

Useful? React with 👍 / 👎.

@Jordonbc Jordonbc closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant