Bug 519204 - Discover hides option to switch installed packed when the snap package is selected
Summary: Discover hides option to switch installed packed when the snap package is sel...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Snap Backend (other bugs)
Version First Reported In: 6.6.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-21 07:29 UTC by BOF
Modified: 2026-09-10 22:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.7
Sentry Crash Report:


Attachments
bug demo video (2.86 MB, video/webm)
2026-04-21 07:31 UTC, BOF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BOF 2026-04-21 07:29:32 UTC
SUMMARY
Discover shows the package installation source for the repo and flathub. When snap is selected you can only install, but not change the package source anymore

STEPS TO REPRODUCE
1. Open discover and select an app that has more than one package source, one of them being snap (eg. Krita)
2. At the top right you can select different package sources -> select snap

OBSERVED RESULT
The button to select a different source is gone. The only option is to install the package.

EXPECTED RESULT
The button to select a different source stays as it is for the repo and flathub option. 

SOFTWARE/OS VERSIONS
Discover:
- Version 6.6.4

System:
- Operating System: KDE neon User Edition
- KDE Plasma Version: 6.6.4
- KDE Frameworks Version: 6.25.0
- Qt Version: 6.10.2
- Kernel Version: 6.17.0-20-generic (64-bit)
- Graphics Platform: Wayland
Comment 1 BOF 2026-04-21 07:31:53 UTC
Created attachment 191676 [details]
bug demo video

Demo video of the bug testing with Krita
Comment 2 Gabriel 2026-08-29 22:37:30 UTC
AbstractResource::url() generally returns appstream:// URLs which all Discover backends understand. SnapResource::url() instead returns https://snapcraft.io/<app name> which nothing (not even itself) can parse, effectively nuking the source dropdown.

Fix options:
 -  remove SnapResource::url(), let it use appstream as well
 -  store all query results as long as the store page is open
 -  try to use the snap backend and revert the name into an appstream id?
 -  parse https://snapcraft.io/<name> URLs and search by name, probably leads to mismatches
 -  add an ?alt=appstream-id query or similar and let all other backends parse https://snapcraft.io/ URLs. AppStreamUtils::appstreamIds already looks at the alt parameter, but is used only for appstream URLs
Comment 3 Nate Graham 2026-09-09 20:44:17 UTC
Git commit 782c38d08c7ef4cbbd0d8cf970eae9944faa0caf by Nate Graham, on behalf of Gabriel Kuznik.
Committed on 09/09/2026 at 20:44.
Pushed by ngraham into branch 'master'.

Snap: fix app source selector

Remove special snap URL and use inherited appstreamUrl to make source
selection work again.

M  +0    -6    libdiscover/backends/SnapBackend/SnapResource.cpp
M  +0    -1    libdiscover/backends/SnapBackend/SnapResource.h

https://invent.kde.org/plasma/discover/-/commit/782c38d08c7ef4cbbd0d8cf970eae9944faa0caf