Skip to content

Fix Unicode shortcut crashes, extract clean PWA icons, and optimize popup performance - #94

Merged
iandiv merged 1 commit into
iandiv:dev-testfrom
MosabSoft:fix/shortcuts-icons-performance
Sep 22, 2026
Merged

iandiv merged 1 commit into
iandiv:dev-testfrom
MosabSoft:fix/shortcuts-icons-performance

Conversation

@MosabSoft

Copy link
Copy Markdown
Contributor

Summary of Changes

This Pull Request addresses three major issues regarding Windows shortcut handling, web app icon fidelity, and popup load performance in AppGroup:

1. Unicode & Localized Shortcut Support (ShellInterop.cs)

  • Problem: When shortcuts (.lnk) contain Unicode / non-ASCII characters (e.g., Arabic names or localized user paths), standard COM shell interfaces throw exceptions or fail to resolve the target path.
  • Fix: Implemented robust Unicode string extraction and fallback decoding for Shell links, preventing crashes and allowing shortcuts in any language to resolve smoothly.

2. Clean High-Resolution PWA & Browser App Icons (IconHelper.cs)

  • Problem: Shortcuts created by Chrome/Edge for Progressive Web Apps (--app-id=...) often extracted blurry icons or rendered with the Windows shortcut overlay arrow.
  • Fix: Added direct extraction logic that parses the browser user data profile to retrieve the original high-resolution PWA icon without any shortcut overlay arrows, rendering crisp and clean icons.

3. Instant Popup Load Performance & Caching (PopupWindow.xaml.cs & ShellInterop.cs)

  • Problem: Opening groups containing UWP, Store, or PWA shortcuts (like Social Media groups) suffered from noticeable lag (several seconds) due to repeated recursive Start Menu and filesystem scans.
  • Fix:
    • Prioritized checking pre-cached icons in LoadIconAsync to bypass redundant disk and shell lookups when custom icons are already cached, dropping load time to under 1ms.
    • Added thread-safe memory caching (ConcurrentDictionary) in ShellInterop for resolved runnable paths and Start Menu shortcuts to eliminate redundant filesystem traversal.

Verification

  • Tested and verified on Windows 11 with Win32 apps, Microsoft Store (UWP) apps, and Chrome/Edge PWAs.
  • Fully backward-compatible with existing group configurations.

…, and optimize popup performance" -m "- Fix COM exceptions when resolving .lnk shortcuts containing Unicode/Arabic characters in Windows Shell." -m "- Extract crisp PWA and browser web app icons directly without Windows shortcut arrow overlays." -m "- Implement thread-safe memory caching for ShellInterop to prevent heavy recursive disk scans." -m "- Restore instant popup window loading by prioritizing pre-cached icons."
@iandiv
iandiv changed the base branch from master to dev-test September 22, 2026 14:19
@iandiv
iandiv merged commit 416709d into iandiv:dev-test Sep 22, 2026
@iandiv
iandiv self-requested a review September 26, 2026 05:24

@iandiv iandiv left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eng-Mosab-Alhopishi Thanks for this but before merging into dev-master, I found a few issues:

  1. Dragged items can resolve to the wrong shortcut

    • Dragging Windows 11 Media Player resolves to the legacy Windows Media Player shortcut instead of the actual item dragged.
    • Other dragged items sometimes appear as A.lnk after dropping.
  2. .lnk extension is missing from the display name

    • Unlike master, dragged shortcuts are shown without the .lnk extension.
  3. UWP icons render smaller than master

    • The icon looks the same, but the PR's icon renders visibly smaller. This looks like a sizing/scaling difference rather than a resolution/quality issue.

      image

I also haven't tested the other parts of the changes yet, so there may be additional issues to address.

I've manually reverted this on my end for now to keep dev-test stable for other testing. Happy to review a follow-up PR once these are addressed, feel free to open a new one with the fixes.

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.

2 participants