Bug 504523

Summary: Updated app is somewhat inappropriately marked as "New"
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Application Launcher (Kickoff) widgetAssignee: Oliver Beard <olib141>
Status: RESOLVED FIXED    
Severity: minor CC: kde, mikel5764, nate, noahadvs, olib141
Priority: NOR Keywords: regression
Version First Reported In: 6.3.90   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2025-05-19 13:06:39 UTC
SUMMARY
A few minutes ago Vivaldi browser was updated to version 7.4.x from 7.3.x on my system, now it is marked as "New" in Kickoff.

OBSERVED RESULT
updated app is marked as "New"

EXPECTED RESULT
only newly installed apps should be marked as "New"

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.90
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2025-05-19 14:43:00 UTC
Technically the implementation is doing what it's supposed to, but, yeah, "New" is not really accurate here.

We should either update the label to say "Updated" or hide it in this case.
Comment 2 Oliver Beard 2025-05-20 14:40:27 UTC
It might be that the .desktop filename was changed, which is what is used to track new-ness in ~/.local/state/kickerstaterc.

Was Vivaldi acquired from Arch's extra repo?

7.3.3635.2-1 installs the file /usr/share/applications/vivaldi-stable.desktop
7.3.3635.9-1 installs the file /usr/share/applications/vivaldi-stable.desktop
7.3.3635.14-1 installs the file /usr/share/applications/vivaldi-stable.desktop
7.4.3684.38-1 installs the file /usr/share/applications/vivaldi-stable.desktop

So at least, the package as in Arch's extra repo does not indicate a change in .desktop filename from 7.3.x to 7.4.x.
Comment 3 Patrick Silva 2025-05-20 14:55:23 UTC
I use Vivaldi from Arch repos.

$ pacman -Qi vivaldi
Name            : vivaldi
Version         : 7.4.3684.38-1
Description     : An advanced browser made with the power user in mind.
Architecture    : x86_64
URL             : https://vivaldi.com
Licenses        : custom
Groups          : None
Provides        : None
Depends On      : alsa-lib  at-spi2-core  cairo  libcups  libxss  nss  pango  ttf-font  desktop-file-utils
                  shared-mime-info  hicolor-icon-theme
Optional Deps   : vivaldi-ffmpeg-codecs: playback of proprietary video/audio [installed]
                  org.freedesktop.secrets: better secret storage in gnome-keyring or kwallet [installed]
                  libnotify: native notifications [installed]
                  pipewire: WebRTC desktop sharing under Wayland [installed]
                  gtk3: gtk3 integration [installed]
                  gtk4: for use with --gtk-version=4 [installed]
                  qt5-base: qt5 integration [installed]
                  qt6-base: qt6 integration [installed]
                  upower: Battery Status API support [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 409,02 MiB
Packager        : Ike Devolder <ike.devolder@archlinux.org>
Build Date      : seg 19 mai 2025 06:08:11
Install Date    : seg 19 mai 2025 09:35:20
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
Comment 4 Oliver Beard 2025-05-20 21:15:57 UTC
It looks like the .desktop file is very quickly deleted and re-installed during the update, so we consider it as uninstalled and drop any information about new-ness immediately, and it becomes new again.

I have some ideas about a solution. Fixing it in the still-new case is easy by deferring cleanup is easy with a timer, but after it has stopped being new, it would just become new again as the list of installed apps is immediately updated too.

I think we'll need to forget about installed apps on a delay similar to how we remember whether apps are new, which I'll work on.
Comment 5 Bug Janitor Service 2025-05-21 22:07:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5509
Comment 6 Patrick Silva 2025-05-31 13:21:34 UTC
Created attachment 181931 [details]
screenshot

Plasma Global Theme Explorer is marked as "New" after update to 6.4 beta2.
Comment 7 Oliver Beard 2025-06-02 20:50:30 UTC
Git commit 81150ec1a1318f2213ad21566a443a432132f8c6 by Oliver Beard.
Committed on 02/06/2025 at 20:49.
Pushed by olib into branch 'master'.

applets/kicker: Remember uninstalled apps for a short period
When an installed .desktop file is updated, it might be removed and immediately re-added, which causes it to be inappropriately marked New! as the model is updated for both changes.

To resolve this, when an application is uninstalled, we remember it for three days. If it is still new, we also remember the date it became new. If the application is re-installed within 3 days, it will be restored with its previous new-ness. After that, as before, it would be new again.

This fixes both cases when an application is updated (as in the bug), as well as the case where a user might renege on a decision to uninstall an application.

M  +63   -18   applets/kicker/rootmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/81150ec1a1318f2213ad21566a443a432132f8c6
Comment 8 Nate Graham 2025-06-03 14:37:48 UTC
Git commit 6c729ba219b21e9c1cc253b953ddc8ac8daa3526 by Nate Graham.
Committed on 03/06/2025 at 14:10.
Pushed by ngraham into branch 'Plasma/6.4'.

applets/kicker: Remember uninstalled apps for a short period
When an installed .desktop file is updated, it might be removed and immediately re-added, which causes it to be inappropriately marked New! as the model is updated for both changes.

To resolve this, when an application is uninstalled, we remember it for three days. If it is still new, we also remember the date it became new. If the application is re-installed within 3 days, it will be restored with its previous new-ness. After that, as before, it would be new again.

This fixes both cases when an application is updated (as in the bug), as well as the case where a user might renege on a decision to uninstall an application.


(cherry picked from commit 81150ec1a1318f2213ad21566a443a432132f8c6)

Co-authored-by: Oliver Beard <olib141@outlook.com>

M  +63   -18   applets/kicker/rootmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/6c729ba219b21e9c1cc253b953ddc8ac8daa3526