Skip to content

Fix installed plugin version display#410

Merged
datlechin merged 1 commit intomainfrom
fix/installed-plugin-version-display
Mar 21, 2026
Merged

Fix installed plugin version display#410
datlechin merged 1 commit intomainfrom
fix/installed-plugin-version-display

Conversation

@datlechin
Copy link
Collaborator

@datlechin datlechin commented Mar 21, 2026

Summary

  • Installed plugins tab showed "1.0.0" for all plugins because version was read from principalClass.pluginVersion (hardcoded in plugin source)
  • Now saves a .metadata.json sidecar file when installing from registry, containing the actual registry version
  • On load, prefers the metadata version over the hardcoded one
  • Metadata is cleaned up on uninstall

Test plan

  • Install a plugin from registry — verify Installed tab shows correct version (e.g., "1.0.6" not "1.0.0")
  • Relaunch app — verify version persists
  • Uninstall plugin — verify metadata file is removed
  • Built-in plugins still show "1.0" (no metadata file, uses hardcoded version)

Summary by CodeRabbit

  • New Features
    • Plugins installed from the registry now automatically track and synchronize version information, ensuring accurate version management and updates.

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cd173719-fb70-482e-a7af-2f4594bafff9

📥 Commits

Reviewing files that changed from the base of the PR and between a2d2bee and cfa3682.

📒 Files selected for processing (3)
  • TablePro/Core/Plugins/PluginManager.swift
  • TablePro/Core/Plugins/PluginModels.swift
  • TablePro/Core/Plugins/Registry/PluginManager+Registry.swift

📝 Walkthrough

Walkthrough

Added registry metadata support to the plugin manager with persistent storage for plugin versions. The system now captures metadata during installation from the registry, stores it atomically, and prefers registry-stored versions during plugin loading, while the PluginEntry version property is now mutable for in-memory updates.

Changes

Cohort / File(s) Summary
Registry Metadata Infrastructure
TablePro/Core/Plugins/PluginManager.swift
Added RegistryMetadata codable type with methods to compute metadata file URLs, read/persist metadata, and delete metadata during uninstallation. Updated plugin loading paths to prefer registry-stored versions with fallback to principalClass.pluginVersion.
Data Model Updates
TablePro/Core/Plugins/PluginModels.swift
Changed PluginEntry.version property from immutable (let) to mutable (var) to allow version updates after initialization.
Registry Integration Flow
TablePro/Core/Plugins/Registry/PluginManager+Registry.swift
Enhanced install-from-registry to capture installation result, persist registry metadata, and synchronize the entry's version with the registry plugin version before returning.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant PluginManager
    participant Registry as Registry Source
    participant FileSystem as File Storage
    participant PluginEntry as Plugin Entry

    Caller->>PluginManager: installFromRegistry(registryPlugin)
    PluginManager->>PluginManager: installPlugin(from: url)
    PluginManager->>PluginEntry: create entry with initial version
    PluginManager->>FileSystem: saveRegistryMetadata(version, id, url)
    FileSystem-->>PluginManager: metadata saved
    PluginManager->>PluginEntry: update version to registry version
    PluginManager->>Caller: return updated entry
    
    Note over PluginManager,FileSystem: Later: Plugin Loading
    Caller->>PluginManager: loadBundlesOffMain()
    PluginManager->>FileSystem: read metadata (.metadata.json)
    FileSystem-->>PluginManager: stored version (if exists)
    PluginManager->>PluginEntry: use metadata version or fallback
    PluginManager-->>Caller: loaded plugins with correct versions
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop, skip, and a metadata jump!
Versions now persist through the plugin dump,
From registry down to storage so deep,
Registry metadata, we safely keep! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main objective: fixing the display of installed plugin versions, which is exactly what the changeset accomplishes by adding registry metadata support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/installed-plugin-version-display

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

@datlechin datlechin merged commit 9e675a9 into main Mar 21, 2026
3 checks passed
@datlechin datlechin deleted the fix/installed-plugin-version-display branch March 21, 2026 19:03
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