-
-
Notifications
You must be signed in to change notification settings - Fork 448
Fix Program plugin to not show dialog when unable to resolve Lnk shortcuts #3658
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
@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 ...
|
🥷 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: 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 prevents UI dialogs when resolving Windows shortcuts by using the SLR_NO_UI
flag and exposes the helper class for broader use.
- Made
ShellLinkHelper
public - Added
SLR_NO_UI
toIShellLinkW.Resolve
to suppress UI - Included MSDN reference comment for the flag
Comments suppressed due to low confidence (3)
Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs:11
- Since
ShellLinkHelper
is now a public class, add an XML doc comment summarizing its purpose and usage.
public class ShellLinkHelper
Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs:27
- Public methods should use PascalCase. Rename
retrieveTargetPath
toRetrieveTargetPath
for consistency.
public unsafe string retrieveTargetPath(string path)
Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs:32
- Consider adding a unit test to confirm that using
SLR_NO_UI
suppresses UI dialogs when resolution fails.
((IShellLinkW)link).Resolve(hwnd, (uint)SLR_FLAGS.SLR_NO_UI);
📝 WalkthroughWalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant Indexer
participant ShellLinkHelper
participant IShellLinkW
Indexer->>ShellLinkHelper: retrieveTargetPath(shortcut)
ShellLinkHelper->>IShellLinkW: Resolve(shortcut, SLR_NO_UI)
IShellLinkW-->>ShellLinkHelper: Return resolved path or error (no UI)
ShellLinkHelper-->>Indexer: Return target path
Assessment against linked issues
Suggested labels
Suggested reviewers
Poem
✨ 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 (
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (2)
Plugins/Flow.Launcher.Plugin.Program/Programs/ShellLinkHelper.cs (2)
30-32
: Excellent implementation of the core PR objective.The addition of the
SLR_NO_UI
flag with comprehensive documentation comments perfectly addresses the PR objective of preventing UI dialogs during shortcut resolution. The Microsoft documentation reference is a great addition for context and maintainability.
83-83
: Good housekeeping with the whitespace cleanup.Minor formatting improvement with no functional impact.
Already tested by users and good to go. |
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.
👍
Use
SLR_NO_UI
to avoid showing any UI during link resolving, like Problem with Shortcut dialogsFrom: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-resolve
Resolve #3386.