Bug 491482 - Add-ons button is missing from Flatpak apps' pages in Plasma 6
Summary: Add-ons button is missing from Flatpak apps' pages in Plasma 6
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-08-09 12:20 UTC by Ali
Modified: 2024-08-20 02:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Messy image showing Steam, VLC and OBS' addon buttons and page, alongside comparison of the OBS page between 5.27 and Plasma 6.1 (1.05 MB, image/png)
2024-08-09 12:20 UTC, Ali
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ali 2024-08-09 12:20:23 UTC
Created attachment 172436 [details]
Messy image showing Steam, VLC and OBS' addon buttons and page, alongside comparison of the OBS page between 5.27 and Plasma 6.1

SUMMARY
Flatpak app pages in Discover post Plasma 6 seem to be missing the Add-ons button that would take you to the Add-ons page, if the listed app has any available add-ons, this button used to previously exist in Plasma 5.27. (image for reference)

Add-ons are also listed on said app's flathub page, apps with flatpak add-ons listed below:
https://flathub.org/apps/org.videolan.VLC
https://flathub.org/apps/com.obsproject.Studio
https://flathub.org/apps/com.valvesoftware.Steam

STEPS TO REPRODUCE
1. In Discover, search for a flatpak app that'd have Add-ons (VLC, OBS, Steam, etc)
2. Look at the buttons below the app description.

OBSERVED RESULT
The Add-ons button is completely missing on (seemingly) any version of Discover post Plasma 6 (including 6.2 Dev as of August 9th)

EXPECTED RESULT
The Add-ons button should be present and available for apps that have them.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.6.44-3-lts (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Every screenshot within the messy image with exception to the comparison screenshot to Plasma 6.1.4 Discover is discover ran with `plasma-discover --backends flatpak` so this doesn't seem to be a PackageKit issue. (the arch install doesn't have PackageKit installed either), also was able to reproduce on Fedora 40 KDE with 6.1.3, and Neon Unstable Edition with 6.2 Dev.
Comment 1 Harald Sitter 2024-08-19 10:31:02 UTC
According to the code we never provided an addons list for flatpak. It may have come from packagekit/appstream but we definitely don't have code for flatpak addons.

https://invent.kde.org/plasma/discover/-/blob/6254dd2e71c6ee847817ca05eedc5801f837548a/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp#L136
Comment 2 Harald Sitter 2024-08-19 10:54:48 UTC
Found where we extend the data set and I think I see the bug. Should be an easy fix.
Comment 3 Harald Sitter 2024-08-20 02:19:47 UTC
Git commit 9b6f98b63d4ef5a680cf9043c183b831ff4598f1 by Harald Sitter.
Committed on 20/08/2024 at 02:15.
Pushed by sitter into branch 'master'.

flatpak: report extensions when there is NO lastError

the condition here was the wrong way around it'd confirm an extends when
there was an error.

M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/-/commit/9b6f98b63d4ef5a680cf9043c183b831ff4598f1
Comment 4 Harald Sitter 2024-08-20 02:24:09 UTC
Git commit e13b4a8536524a21a80913a2c5e1346999815755 by Harald Sitter.
Committed on 20/08/2024 at 02:20.
Pushed by sitter into branch 'Plasma/6.1'.

flatpak: report extensions when there is NO lastError

the condition here was the wrong way around it'd confirm an extends when
there was an error.


(cherry picked from commit 9b6f98b63d4ef5a680cf9043c183b831ff4598f1)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +1    -1    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp

https://invent.kde.org/plasma/discover/-/commit/e13b4a8536524a21a80913a2c5e1346999815755