[PR #414] [MERGED] Improve plugin source modeling and runtime dedup #336

Closed
opened 2026-03-22 21:18:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/414
Author: @gschier
Created: 3/2/2026
Status: Merged
Merged: 3/2/2026
Merged by: @gschier

Base: mainHead: plugin-source-runtime-dedup


📝 Commits (7)

  • 44e5760 Improve plugin source modeling and runtime dedup
  • 9ef4cdd Update plugin name
  • 5a072ce Update 20260301000000_plugin-source-and-unique-directory.sql
  • 31fed72 Resolve plugin set inside initialize and unload stale handles
  • 03f6f7a Simplify plugin reinitialization to clear then add resolved set
  • e6f2e48 Update AGENTS.md
  • a133efa Update Dropdown.tsx

📊 Changes

13 files changed (+210 additions, -44 deletions)

View changed files

📝 AGENTS.md (+1 -0)
📝 crates-tauri/yaak-app/src/lib.rs (+8 -2)
📝 crates-tauri/yaak-app/src/models_ext.rs (+18 -8)
📝 crates/yaak-models/bindings/gen_models.ts (+3 -1)
crates/yaak-models/migrations/20260301000000_plugin-source-and-unique-directory.sql (+33 -0)
📝 crates/yaak-models/src/models.rs (+43 -0)
📝 crates/yaak-models/src/queries/plugins.rs (+5 -1)
📝 crates/yaak-plugins/src/api.rs (+2 -2)
📝 crates/yaak-plugins/src/install.rs (+2 -1)
📝 crates/yaak-plugins/src/manager.rs (+88 -13)
📝 plugins/template-function-timestamp/package.json (+2 -0)
📝 src-web/components/Settings/SettingsPlugins.tsx (+2 -13)
📝 src-web/components/core/Dropdown.tsx (+3 -3)

📄 Description

Summary

  • add plugins.source migration/backfill and enforce unique plugins.directory
  • model plugin source as a typed PluginSource enum and expose it in TS bindings
  • make plugin upserts directory-aware by reusing existing plugin id for matching directory
  • set explicit source on bundled/filesystem/registry plugin write paths
  • dedupe runtime plugin loading by metadata name with precedence filesystem > registry > bundled
  • filter registry update checks by source == registry
  • update settings plugin tabs to use plugin.source instead of directory heuristics
  • return resolved plugin set from models_workspace_models so frontend counts match loaded plugins

Validation

  • cargo check -p yaak-models -p yaak-plugins -p yaak-cli
  • cargo check --manifest-path crates-tauri/yaak-app/Cargo.toml
  • npm run lint (existing repo warnings only)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/414 **Author:** [@gschier](https://github.com/gschier) **Created:** 3/2/2026 **Status:** ✅ Merged **Merged:** 3/2/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `plugin-source-runtime-dedup` --- ### 📝 Commits (7) - [`44e5760`](https://github.com/mountain-loop/yaak/commit/44e576001fd5d42023c6629e4e47b0fe9eb0997f) Improve plugin source modeling and runtime dedup - [`9ef4cdd`](https://github.com/mountain-loop/yaak/commit/9ef4cdd8e594c39de25d916d25a2f7415eee074f) Update plugin name - [`5a072ce`](https://github.com/mountain-loop/yaak/commit/5a072ceedbf5a1b032063b85c09ae7c340bb41e2) Update 20260301000000_plugin-source-and-unique-directory.sql - [`31fed72`](https://github.com/mountain-loop/yaak/commit/31fed723feadef5bed17a78677d01bdcf0428e01) Resolve plugin set inside initialize and unload stale handles - [`03f6f7a`](https://github.com/mountain-loop/yaak/commit/03f6f7a1de47ab69b6443fa40351ddb8dee39261) Simplify plugin reinitialization to clear then add resolved set - [`e6f2e48`](https://github.com/mountain-loop/yaak/commit/e6f2e48434f905a79121aa5b7b49b5a35fbd4a3e) Update AGENTS.md - [`a133efa`](https://github.com/mountain-loop/yaak/commit/a133efaac49d43abe6eb1ef78161e390eaf9a761) Update Dropdown.tsx ### 📊 Changes **13 files changed** (+210 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+1 -0) 📝 `crates-tauri/yaak-app/src/lib.rs` (+8 -2) 📝 `crates-tauri/yaak-app/src/models_ext.rs` (+18 -8) 📝 `crates/yaak-models/bindings/gen_models.ts` (+3 -1) ➕ `crates/yaak-models/migrations/20260301000000_plugin-source-and-unique-directory.sql` (+33 -0) 📝 `crates/yaak-models/src/models.rs` (+43 -0) 📝 `crates/yaak-models/src/queries/plugins.rs` (+5 -1) 📝 `crates/yaak-plugins/src/api.rs` (+2 -2) 📝 `crates/yaak-plugins/src/install.rs` (+2 -1) 📝 `crates/yaak-plugins/src/manager.rs` (+88 -13) 📝 `plugins/template-function-timestamp/package.json` (+2 -0) 📝 `src-web/components/Settings/SettingsPlugins.tsx` (+2 -13) 📝 `src-web/components/core/Dropdown.tsx` (+3 -3) </details> ### 📄 Description ## Summary - add `plugins.source` migration/backfill and enforce unique `plugins.directory` - model plugin source as a typed `PluginSource` enum and expose it in TS bindings - make plugin upserts directory-aware by reusing existing plugin id for matching directory - set explicit source on bundled/filesystem/registry plugin write paths - dedupe runtime plugin loading by metadata name with precedence `filesystem > registry > bundled` - filter registry update checks by `source == registry` - update settings plugin tabs to use `plugin.source` instead of directory heuristics - return resolved plugin set from `models_workspace_models` so frontend counts match loaded plugins ## Validation - `cargo check -p yaak-models -p yaak-plugins -p yaak-cli` - `cargo check --manifest-path crates-tauri/yaak-app/Cargo.toml` - `npm run lint` (existing repo warnings only) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 21:18:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#336