Skip to content

fix(plugins): keep ui_extensions driver filter when parsing plugin manifests#424

Merged
debba merged 2 commits into
mainfrom
fix/ui-extension-driver-filter
Jul 3, 2026
Merged

fix(plugins): keep ui_extensions driver filter when parsing plugin manifests#424
debba merged 2 commits into
mainfrom
fix/ui-extension-driver-filter

Conversation

@debba

@debba debba commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

When two plugins both contribute to the connection-modal.connection_content slot, their UI renders at the same time regardless of which driver is selected. Worse, since custom connection fields are encoded into the shared database value, one plugin ends up overwriting the other's connection state as soon as the modal mounts (e.g. the WordPress fields showing up — and injecting their config — under a Google Sheets connection).

Cause

Plugin manifests can already scope a UI extension to a driver:

{ "slot": "connection-modal.connection_content", "module": "ui/dist/index.js", "driver": "wordpress" }

and the frontend honors it via the when predicate in PluginSlotProvider. But UIExtensionEntry on the Rust side only declared slot, module and order, so serde silently dropped driver while deserializing the manifest. By the time the entries reached the frontend the filter was gone, and every contribution rendered for every driver.

Fix

Add the missing driver: Option<String> field to UIExtensionEntry so the filter survives the manifest round-trip. No frontend changes needed — the whole chain (manifest.jsonget_plugin_manifestwhen predicate) already supported it.

Also adds a regression test covering manifests with and without the driver field.

Testing

  • cargo test --lib plugins::tests — 3 passed
  • Reproduced with the WordPress and Google Sheets plugins installed side by side; both plugins already declare the driver filter in their manifests, so no plugin changes are needed.

debba added 2 commits July 3, 2026 17:32
…nifests

UIExtensionEntry was missing the driver field, so serde silently dropped
it while deserializing plugin manifests. The frontend then received
entries without a driver filter and rendered every connection_content
contribution for every driver, letting plugins overwrite each other's
connection state in the new-connection modal.
@debba debba merged commit 2d144d3 into main Jul 3, 2026
1 check passed
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