Bug 461165

Summary: App Chooser dialog inappropriately shows all apps when called from a non-sandboxed app
Product: [Plasma] xdg-desktop-portal-kde Reporter: Nate Graham <nate>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, bharadwaj.raju777, bizyaev, jgrulich, nate, sitter
Priority: NOR    
Version: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.27
Sentry Crash Report:

Description Nate Graham 2022-10-29 16:15:09 UTC
When the app chooser dialog is shown by a non-sandboxed app via plasma-integration (see https://invent.kde.org/plasma/plasma-integration/-/merge_requests/47), it shows all apps in a flat ungrouped grid view, which makes it very difficult to find anything by browsing.

This is a worse UX than what happens when it's opened from a sandboxed app: it shows only the default app for that mimetype as well as other apps that can open it, with a button to show all if you really want to see them.
Comment 1 Aleix Pol 2022-11-03 01:36:05 UTC
Can you be more specific here? Which non-sandboxed app? how is it calling XDP?
Comment 2 Nate Graham 2022-11-03 03:14:35 UTC
> Which non-sandboxed app?
Plasma

> how is it calling XDP?
With https://invent.kde.org/plasma/plasma-integration/-/merge_requests/47 merged for Plasma 5.27, all non-sandboxed apps that ask for the app chooser now get the XDP version, not the one in KIO.
Comment 3 Bharadwaj Raju 2022-11-07 13:18:55 UTC
For testing, do you have any example of a sandboxed app which calls this dialog?
Comment 4 Nate Graham 2022-11-07 14:17:33 UTC
I'm testing using `xdg-portal-test-kde`, which lives at https://invent.kde.org/libraries/xdg-portal-test-kde.
Comment 5 Bug Janitor Service 2022-11-14 05:44:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/137
Comment 6 Bharadwaj Raju 2022-11-24 13:52:31 UTC
Git commit 451e6061d58f86e267194d9f398c588646f4f94e by Bharadwaj Raju.
Committed on 24/11/2022 at 13:52.
Pushed by bharadwaj-raju into branch 'master'.

AppChooserDialog: Try to find preferred apps if the caller doesn't do it for us
FIXED-IN: 5.27

M  +94   -11   src/appchooserdialog.cpp
M  +11   -1    src/appchooserdialog.h

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/451e6061d58f86e267194d9f398c588646f4f94e