Skip to content

feat: auto-update outdated plugins at launch and add update UI in Settings#891

Merged
datlechin merged 2 commits into
mainfrom
feat/plugin-auto-update
Apr 26, 2026
Merged

feat: auto-update outdated plugins at launch and add update UI in Settings#891
datlechin merged 2 commits into
mainfrom
feat/plugin-auto-update

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

  • Outdated user-installed plugins are silently auto-updated from the registry at launch, eliminating the recurring "plugin(s) could not be loaded" error dialog
  • When auto-update fails (no internet, plugin not in registry), the alert now has an actionable "Open Plugin Settings" button instead of just "OK"
  • Settings > Plugins > Installed shows update badges and one-click "Update" button for plugins with newer registry versions
  • Settings > Plugins > Browse shows "Update" button instead of "Installed" for outdated plugins

Test plan

  • Place a .tableplugin with old TableProPluginKitVersion (e.g. 2) in ~/Library/Application Support/TablePro/Plugins/, launch app, verify no error dialog appears and plugin loads
  • Disconnect internet, place old plugin, launch app, verify alert shows "Open Plugin Settings" + "Dismiss", clicking first button opens Settings at Plugins tab
  • With an outdated user-installed plugin loaded, open Settings > Plugins > Installed, verify blue update badge in row and "Update" button in detail pane
  • Open Settings > Plugins > Browse, verify outdated installed plugins show "Update" button instead of "Installed" text
  • Launch with all plugins up to date, verify no change in behavior

Copy link
Copy Markdown

@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: 56c38f91f0

ℹ️ 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 +100 to +102
replaceExistingPlugin(bundleId: registryPlugin.id)

let entry = try await installFromRegistry(registryPlugin, progress: progress)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve existing plugin until registry update succeeds

updateFromRegistry unloads/removes the currently loaded plugin before any download/verification/install work is attempted. If installFromRegistry then fails (for example, no network, non-2xx response, or checksum mismatch), the user is left without the previously working plugin in the current session because it has already been removed from plugins and capabilities were unregistered.

Useful? React with 👍 / 👎.

Comment on lines +249 to +251
private func hasUpdate(for plugin: RegistryPlugin) -> Bool {
guard let installed = pluginManager.plugins.first(where: { $0.id == plugin.id }) else { return false }
return plugin.version.compare(installed.version, options: .numeric) == .orderedDescending
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Detect updates for installed theme plugins

hasUpdate(for:) only compares versions against pluginManager.plugins, but installed themes are not stored there (they are tracked by ThemeRegistryInstaller). As a result, outdated installed themes always evaluate as having no update, so Browse keeps showing "Installed" and never exposes the new update action for theme plugins.

Useful? React with 👍 / 👎.

@datlechin datlechin merged commit 5245b3e into main Apr 26, 2026
1 check passed
@datlechin datlechin deleted the feat/plugin-auto-update branch April 26, 2026 18:32
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