-
-
Notifications
You must be signed in to change notification settings - Fork 448
Fix Derive Class Save Method Calling Issue #3668
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
…ng the new version of Save method
🥷 Code experts: no user but you matched threshold 10 Jack251970 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. |
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.
Pull Request Overview
This PR refactors plugin storage to use a unified ISavable interface, ensuring all Save
calls use the error-handling version and improving type safety.
- Expose
ISavable
on derived storage classes andJsonRPCPluginSettings
- Switch
PublicAPIInstance
plugin storage dictionaries fromobject
toISavable
and update save loops - Resolve issues #3043 and #3130 by guaranteeing the new
Save
method is invoked
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Flow.Launcher/PublicAPIInstance.cs | Changed plugin storage dictionaries to ISavable and updated save loops |
Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs | Implemented ISavable on JSON storage |
Flow.Launcher.Infrastructure/Storage/PluginBinaryStorage.cs | Implemented ISavable on binary storage |
Flow.Launcher.Infrastructure/Storage/FlowLauncherJsonStorage.cs | Implemented ISavable on launcher JSON storage |
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs | Added ISavable to plugin settings class |
Comments suppressed due to low confidence (2)
Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs:11
- [nitpick] Public classes implementing ISavable should include XML documentation summarizing their behavior. Consider adding a
<summary>
comment for clarity.
public class PluginJsonStorage<T> : JsonStorage<T>, ISavable where T : new()
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:15
- JsonRPCPluginSettings declares ISavable but does not implement the required Save method, causing a compile error. Add a Save implementation or remove the interface.
public class JsonRPCPluginSettings : ISavable
📝 WalkthroughWalkthroughThe changes update several storage-related classes and a plugin settings class to explicitly implement the Changes
Sequence Diagram(s)sequenceDiagram
participant PublicAPIInstance
participant ISavable
loop For each plugin storage
PublicAPIInstance->>ISavable: Save()
end
Assessment against linked issues
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Is there a way to test this? |
|
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
Fix Derive Class Save Method Calling Issue
Changes
ISavable
interface in derived class to make sure we are calling the new version ofSave
method. This can make sure we are calling the version ofSave
with error handling.ISavable
instead ofobject
for code qualitySince all
Save
methods are called with error handling, we can resolve #3043, #3130.