-
-
Notifications
You must be signed in to change notification settings - Fork 392
Fix separation of Plugin Store and Plugins Manager plugin #3572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
🥷 Code experts: onesounds onesounds has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an internal model for plugin management to remove the dependency on the external Plugin Manager plugin, thereby preventing Flow Launcher from entering a bad state when that plugin is deleted.
- Refactored the deletion command in PluginViewModel to use an internal uninstall method.
- Updated PluginStoreItemViewModel with new async methods for installing, uninstalling, and updating plugins, and refactored plugin properties.
- Added a new user setting with corresponding UI and language translation keys for automatically restarting Flow Launcher after plugin changes.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Flow.Launcher/ViewModel/PluginViewModel.cs | Removed PluginManagerActionKeyword and updated delete plugin command to use the internal model. |
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs | Refactored plugin data handling and introduced async plugin management methods (install, uninstall, update). |
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | Added a card to toggle the new auto restart setting. |
Flow.Launcher/Languages/en.xaml | Added new translation keys for plugin management messages and auto restart functionality. |
Flow.Launcher/Infrastructure/UserSettings/Settings.cs | Introduced a new AutoRestartAfterChanging setting. |
Comments suppressed due to low confidence (1)
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs:26
- [nitpick] Consider renaming '_newPlugin' to 'currentPlugin' and '_oldPluginPair' to 'installedPluginPair' for clearer understanding.
_newPlugin = plugin;
Co-authored-by: Copilot <[email protected]>
📝 Walkthrough## Walkthrough
This update introduces a new static `PluginInstaller` class to handle plugin installation, updating, and uninstallation with user prompts, error handling, and restart logic. It adds related UI toggles and localization strings, refactors plugin store and view models for improved async handling and null safety, and enhances plugin ZIP validation and source checking.
## Changes
| File(s) | Change Summary |
|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| Flow.Launcher.Core/Plugin/PluginInstaller.cs | Introduced `PluginInstaller` static class for unified, async plugin lifecycle management with user prompts and error handling. |
| Flow.Launcher.Infrastructure/UserSettings/Settings.cs | Added `AutoRestartAfterChanging` and `ShowUnknownSourceWarning` boolean settings with defaults. |
| Flow.Launcher/Languages/en.xaml | Added localization strings for plugin management actions, warnings, confirmations, and tooltips. |
| Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml | Added UI toggle switches for new plugin management settings. |
| Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml | Added button for local plugin installation with tooltip. |
| Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs| Added `InstallPluginAsync` command for local plugin installation via file dialog. |
| Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs | Refactored for null safety, async command handling, and use of `PluginInstaller`. |
| Flow.Launcher/ViewModel/PluginViewModel.cs | Refactored delete plugin method to async, removed unused property/imports, now uses `PluginInstaller`. |
| Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs | Improved plugin ZIP validation, added error result for invalid ZIPs, enhanced source URL checking. |
| Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs | Simplified plugin.json extraction from ZIP archives. |
| Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml | Added localized error messages for invalid ZIP installer files. |
| Flow.Launcher/ViewModel/SelectBrowserViewModel.cs | Removed unused using directive. |
| Flow.Launcher.Core/Plugin/PluginManager.cs | Changed plugin install/uninstall methods to return success flags and show error messages instead of throwing exceptions. |
| Flow.Launcher/App.xaml.cs | Added async call to update plugin manifest before plugin initialization on app startup. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant UI (Settings/Plugin Store)
participant PluginInstaller
participant API
participant PluginManager
User->>UI (Settings/Plugin Store): Initiates plugin install/update/uninstall
UI (Settings/Plugin Store)->>PluginInstaller: Calls async method (Install/Update/Uninstall)
PluginInstaller->>API: Show confirmation dialog (if needed)
API-->>PluginInstaller: User response
PluginInstaller->>PluginManager: Perform operation (install/update/uninstall)
PluginManager-->>PluginInstaller: Operation result
PluginInstaller->>API: Show result, prompt for restart (if needed)
API-->>User: Displays message and/or triggers restart Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Possibly related PRs
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (1)
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs (1)
160-197
: Mirror the ‘restart-on-error’ fix in Uninstall flowSame unconditional restart occurs here. Insert an early
return
insidecatch
, or capture asuccess
flag shared with the final block.
🧹 Nitpick comments (3)
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs (3)
119-137
: Partial download artefact not cleaned when user cancelsWhen the user presses “Cancel” in the progress box the temp zip (possibly half-written) is left on disk, and the next install run deletes only if
deleteFile
is true and the filename collides. Consider explicit cleanup on cancellation:if (cts.IsCancellationRequested) { - return; + if (!newPlugin.IsFromLocalInstallPath && File.Exists(filePath)) + File.Delete(filePath); + return; }
199-254
: Update flow: stale zip file not deleted after successful update
UpdatePluginAsync
downloads to%TEMP%
but never deletes the zip afterwards (unlike install). This can quickly clutter%TEMP%
with large archives.@@ else { await App.API.UpdatePluginAsync(oldPlugin, newPlugin, filePath); + if (!newPlugin.IsFromLocalInstallPath && File.Exists(filePath)) + File.Delete(filePath); }
256-289
: Download helper: typo and double-download logic
- Comment line 269 spells “expcetion”.
- When the progress box fails, we silently fall back to a background download without progress or user feedback. Confirm this is desired UX; otherwise surface the error.
Consider surfacing the original exception to the caller instead of a silent retry.
🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 264-264:
prg
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 264-264: Spell check warning:
prg
is not a recognized word. (unrecognized-spelling)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs
(1 hunks)Flow.Launcher/Languages/en.xaml
(2 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
(1 hunks)Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
(3 hunks)Flow.Launcher/ViewModel/PluginViewModel.cs
(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check Spelling
Flow.Launcher/ViewModel/PluginViewModel.cs
[warning] 17-17: Spell check warning: Ioc
is not a recognized word. (unrecognized-spelling)
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
[warning] 19-19: Spell check warning: Ioc
is not a recognized word. (unrecognized-spelling)
[warning] 264-264: Spell check warning: prg
is not a recognized word. (unrecognized-spelling)
🪛 GitHub Check: Check Spelling
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
[warning] 19-19:
Ioc
is not a recognized word. (unrecognized-spelling)
[warning] 264-264:
prg
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (7)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
179-179
: Good addition of the auto-restart settingThe new
AutoRestartAfterChanging
property with a default value offalse
is a good addition that will help control the application's restart behavior after plugin changes.Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)
205-214
: Well-structured UI control for auto-restart settingThe toggle switch for the auto-restart setting is properly implemented with:
- Appropriate binding to the Settings.AutoRestartAfterChanging property
- Localized title and tooltip
- Consistent styling with other toggle switches
- Good positioning in the settings hierarchy
This follows the established pattern for settings controls in the application.
Flow.Launcher/ViewModel/PluginViewModel.cs (2)
1-1
: Appropriate addition of Task namespaceThe addition of the System.Threading.Tasks namespace is necessary for the async implementation.
173-175
: Good conversion to async uninstall methodConverting the plugin uninstall operation to an asynchronous method is a good improvement that:
- Properly uses async/await pattern
- Leverages the centralized uninstall method from PluginStoreItemViewModel
- Supports the PR objective of creating an internal model for plugin management
This change will make the plugin uninstallation process more robust.
Flow.Launcher/Languages/en.xaml (2)
134-135
: Well-defined localization strings for auto-restart settingThe localization strings for the auto-restart feature are clear and descriptive, explaining both the purpose of the setting and its effects.
189-204
: Comprehensive localization for plugin managementThis set of localization strings provides thorough coverage for the plugin management workflow:
- Error messages for installation/uninstallation/updating failures
- Success messages with restart instructions
- Confirmation prompts with plugin details
- Settings preservation options
- Download progress indicators
These strings will ensure a good user experience with appropriate feedback throughout the plugin management process.
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs (1)
98-106
: Generated filename may contain invalid path characters
newPlugin.Name
can legally contain:
or other characters invalid on Windows, makingPath.Combine
throw.
Sanitise the name (usePath.GetInvalidFileNameChars()
) before composing the filename.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs (1)
32-33
: Version parsing remains a potential exception source.This addresses a previous review concern about
new Version(string)
throwing exceptions on malformed version strings. The issue persists in the current implementation.Consider using safe version parsing to prevent UI crashes:
- public bool LabelUpdate => LabelInstalled && new Version(_newPlugin.Version) > new Version(_oldPluginPair.Metadata.Version); + public bool LabelUpdate => LabelInstalled && TryParseVersionComparison(_newPlugin.Version, _oldPluginPair.Metadata.Version); + + private static bool TryParseVersionComparison(string newVersion, string oldVersion) + { + return Version.TryParse(newVersion, out var newVer) && + Version.TryParse(oldVersion, out var oldVer) && + newVer > oldVer; + }
🧹 Nitpick comments (1)
Flow.Launcher.Core/Plugin/PluginManager.cs (1)
871-904
: Fix spelling issues in parameter name and comment.The download helper method is well-designed with progress reporting and retry logic, but has spelling issues flagged by static analysis.
Apply this diff to fix the spelling issues:
- internal static async Task DownloadFileAsync(string prgBoxTitle, string downloadUrl, string filePath, CancellationTokenSource cts, bool deleteFile = true, bool showProgress = true) + internal static async Task DownloadFileAsync(string progressBoxTitle, string downloadUrl, string filePath, CancellationTokenSource cts, bool deleteFile = true, bool showProgress = true) { if (deleteFile && File.Exists(filePath)) File.Delete(filePath); if (showProgress) { var exceptionHappened = false; - await API.ShowProgressBoxAsync(prgBoxTitle, + await API.ShowProgressBoxAsync(progressBoxTitle, async (reportProgress) => { if (reportProgress == null) { - // when reportProgress is null, it means there is expcetion with the progress box + // when reportProgress is null, it means there is exception with the progress box // so we record it with exceptionHappened and return so that progress box will close instantly exceptionHappened = true; return;🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 879-879:
prg
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 879-883:
prg
is not a recognized word. (unrecognized-spelling)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
Flow.Launcher.Core/Plugin/PluginManager.cs
(4 hunks)Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
(4 hunks)Flow.Launcher/ViewModel/PluginViewModel.cs
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- Flow.Launcher/ViewModel/PluginViewModel.cs
🧰 Additional context used
🧬 Code Graph Analysis (1)
Flow.Launcher.Core/Plugin/PluginManager.cs (5)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
Settings
(16-478)Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs (1)
UserPlugin
(62-80)Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs (8)
GetTranslation
(136-136)MessageBoxResult
(366-366)InstallPlugin
(511-511)LogException
(276-276)ShowMsgError
(85-85)RestartApp
(34-34)ShowMsg
(114-114)ShowMsg
(123-123)Flow.Launcher.Core/Resource/Internationalization.cs (1)
GetTranslation
(247-259)Flow.Launcher.Plugin/PluginMetadata.cs (1)
PluginMetadata
(10-163)
🪛 GitHub Check: Check Spelling
Flow.Launcher.Core/Plugin/PluginManager.cs
[warning] 879-879:
prg
is not a recognized word. (unrecognized-spelling)
🪛 GitHub Actions: Check Spelling
Flow.Launcher.Core/Plugin/PluginManager.cs
[warning] 39-53: Ioc
is not a recognized word. (unrecognized-spelling)
[warning] 117-133: Reloadable
is not a recognized word. (unrecognized-spelling)
[warning] 179-183: metadatas
is not a recognized word. (unrecognized-spelling)
[warning] 181-185: metadatas
is not a recognized word. (unrecognized-spelling)
[warning] 182-186: metadatas
is not a recognized word. (unrecognized-spelling)
[warning] 184-188: metadatas
is not a recognized word. (unrecognized-spelling)
[warning] 879-883: prg
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (6)
Flow.Launcher.Core/Plugin/PluginManager.cs (4)
28-28
: LGTM: FlowSettings integration looks good.The static field retrieval of Settings via IoC is appropriate here since PluginManager is a static class and the settings are used for runtime behavior control.
553-624
: Excellent async plugin installation with comprehensive user experience.The method provides:
- User confirmation before proceeding
- Progress reporting during download with cancellation support
- Proper error handling with early return on failure (prevents unwanted restart)
- Conditional restart based on user settings
- Clean file management for temporary downloads
626-664
: Well-implemented uninstall flow with proper user choices.The method correctly:
- Confirms the uninstall action with the user
- Provides choice for keeping/removing plugin settings
- Handles errors gracefully without restarting on failure
- Follows consistent UX pattern with other plugin operations
666-722
: Robust update implementation following established patterns.The update flow properly handles the two-plugin scenario (old and new) and maintains consistency with install/uninstall operations regarding user confirmation, error handling, and restart behavior.
Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs (2)
12-18
: Excellent refactoring improves code clarity and separation of concerns.The split into
_newPlugin
and_oldPluginPair
fields makes the code more readable and eliminates repeated lookups. The constructor properly initializes both fields for consistent state.
63-79
: Async conversion successfully integrates with new plugin management workflow.The method correctly dispatches to the appropriate async PluginManager methods based on the action. The developer has chosen to keep the default case minimal as noted in past reviews.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
Flow.Launcher.Core/Plugin/PluginInstaller.cs (2)
52-54
: Consider using a more descriptive filename for versionless plugins.The Guid-based filename works but makes debugging harder. Consider using a timestamp or plugin ID instead.
var downloadFilename = string.IsNullOrEmpty(newPlugin.Version) - ? $"{newPlugin.Name}-{Guid.NewGuid()}.zip" + ? $"{newPlugin.Name}-{DateTime.Now:yyyyMMdd-HHmmss}.zip" : $"{newPlugin.Name}-{newPlugin.Version}.zip";
335-351
: Improve URL parsing robustness.The URL parsing logic assumes a specific GitHub URL format and may fail with variations like trailing slashes, different protocols, or query parameters.
Consider using Uri parsing for better robustness:
-var pieces = url.Split('/'); - -if (pieces.Length < 4) - return false; - -var author = pieces[3]; -var acceptedHost = "github.com"; -var acceptedSource = "https://github.com"; -var constructedUrlPart = string.Format("{0}/{1}/", acceptedSource, author); - -if (!Uri.TryCreate(url, UriKind.Absolute, out var uri) || uri.Host != acceptedHost) +if (!Uri.TryCreate(url, UriKind.Absolute, out var uri) || uri.Host != "github.com") return false; +var pathSegments = uri.AbsolutePath.Trim('/').Split('/'); +if (pathSegments.Length < 2) + return false; + +var author = pathSegments[0]; +var constructedUrlPart = $"https://github.com/{author}/";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/actions/spelling/expect.txt
(1 hunks).github/actions/spelling/patterns.txt
(1 hunks)Flow.Launcher.Core/Plugin/PluginInstaller.cs
(1 hunks)Flow.Launcher.Core/Plugin/PluginManager.cs
(5 hunks)Flow.Launcher/ProgressBoxEx.xaml.cs
(2 hunks)Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
(18 hunks)
✅ Files skipped from review due to trivial changes (3)
- .github/actions/spelling/expect.txt
- .github/actions/spelling/patterns.txt
- Flow.Launcher/ProgressBoxEx.xaml.cs
🚧 Files skipped from review as they are similar to previous changes (2)
- Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs
- Flow.Launcher.Core/Plugin/PluginManager.cs
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3572
File: Flow.Launcher/App.xaml.cs:214-216
Timestamp: 2025-07-06T12:21:37.927Z
Learning: In Flow Launcher, the UpdatePluginManifestAsync method in PluginsManifest.cs already has comprehensive internal try-catch handling that logs exceptions and returns false on failure rather than throwing, making external try-catch wrappers unnecessary.
Flow.Launcher.Core/Plugin/PluginInstaller.cs (7)
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3572
File: Flow.Launcher/App.xaml.cs:214-216
Timestamp: 2025-07-06T12:21:37.927Z
Learning: In Flow Launcher, the UpdatePluginManifestAsync method in PluginsManifest.cs already has comprehensive internal try-catch handling that logs exceptions and returns false on failure rather than throwing, making external try-catch wrappers unnecessary.
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3791
File: Flow.Launcher.Core/Plugin/PluginManager.cs:293-295
Timestamp: 2025-07-01T05:46:13.251Z
Learning: In Flow.Launcher.Core/Plugin/PluginManager.cs, when checking if a plugin is modified within the PluginManager class itself, prefer using the internal static PluginModified(string id) method directly rather than going through API.PluginModified() for better performance and architectural design.
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3572
File: Flow.Launcher/Helper/PluginInstallationHelper.cs:251-252
Timestamp: 2025-06-29T08:31:07.816Z
Learning: In Flow Launcher's PluginInstallationHelper, when the progress box encounters an exception during download (indicated by reportProgress becoming null), the retry logic intentionally downloads without a progress handler to avoid repeating the same progress reporting failure. This prevents cascading exceptions in the progress reporting mechanism.
Learnt from: Yusyuriv
PR: Flow-Launcher/Flow.Launcher#3057
File: Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:0-0
Timestamp: 2024-11-03T07:40:11.014Z
Learning: In Flow Launcher, when using Windows Forms dialogs (e.g., in `JsonRPCPluginSettings.cs`), path validation is enabled by default in `OpenFileDialog` and `FolderBrowserDialog`, preventing users from selecting invalid paths, but it's possible to opt out of this validation on individual dialogs.
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
Learnt from: jjw24
PR: Flow-Launcher/Flow.Launcher#2448
File: Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs:16-20
Timestamp: 2025-01-18T10:10:18.414Z
Learning: In Flow Launcher's plugin system, the PluginInitContext parameter passed to plugin constructors is guaranteed to be non-null by the plugin initialization system, making null checks unnecessary.
Learnt from: jjw24
PR: Flow-Launcher/Flow.Launcher#3081
File: Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs:136-145
Timestamp: 2025-02-22T23:51:54.010Z
Learning: In Flow.Launcher JsonRPCV2 plugins, the `reload_data` method is optional for plugins to implement. When the method is not found (RemoteMethodNotFoundException), it should be silently caught without logging as this is an expected scenario.
🧬 Code Graph Analysis (1)
Flow.Launcher.Core/Plugin/PluginInstaller.cs (3)
Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs (3)
Task
(90-206)Task
(208-241)Task
(825-842)Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs (11)
Task
(73-73)Task
(237-237)PluginModified
(539-539)ShowMsgError
(85-85)GetTranslation
(171-171)MessageBoxResult
(416-416)InstallPlugin
(566-566)LogException
(311-311)RestartApp
(34-34)ShowMsg
(128-128)ShowMsg
(137-137)Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs (1)
UserPlugin
(62-78)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (5)
Flow.Launcher.Core/Plugin/PluginInstaller.cs (5)
15-27
: Well-structured class initialization.The lazy initialization pattern for the API and the explanatory comment about avoiding static constructor initialization is excellent. This prevents potential circular dependency issues.
119-158
: Robust zip validation and security checking.The zip file validation, plugin.json extraction, and unknown source warning implementation are well-designed. The existing try-catch properly handles all deserialization failures.
160-213
: Well-implemented uninstall workflow.The method properly handles user confirmations, plugin settings removal choice, and restart logic. The error handling is comprehensive.
215-278
: Consistent update workflow implementation.The update method maintains the same high-quality patterns as the install method, with proper confirmation dialogs, error handling, and restart logic.
295-317
: Sophisticated progress reporting with appropriate retry logic.The progress reporting failure handling and retry mechanism is well-designed. The retry without progress handler prevents cascading exceptions when progress reporting fails, which aligns with the established pattern in the codebase.
…_item_vm_null Fix separation of Plugin Store and Plugins Manager plugin
Fix separation of Plugin Store and Plugins Manager plugin
…_vm_null" This reverts commit dc34a38.
Fix separation of Plugin Store and Plugins Manager plugin
Add internal model for plugin management
Let us do not rely
Plugin Manager
plugin for plugin management in Flow Launcher. Flow Launcher will get into a very bad state if this plugin is deleted (plugin store page will lose ability to install/uninstall/update plugins).Resolve #3555, #3236.
Flow supports to select local zip file to install in Plugin Store page.
API functions related to plugin management have return value to check if installation / uninstallation / update is successful.
Test