Bug 423242 - The "restart system" tray item opens Discover rather than rebooting
Summary: The "restart system" tray item opens Discover rather than rebooting
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Notifier (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-06-19 20:23 UTC by Riccardo Robecchi
Modified: 2020-06-23 16:48 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2020-06-19 20:23:44 UTC
SUMMARY
After installing certain updates, e.g. a new kernel version, Discover's Notifier icon turns into a notification that the system needs to be restarted as critical updates were delivered.

STEPS TO REPRODUCE
1. install an update to a package that requires a restart (e.g. kernel)
2. the notifier turns into a "system requires restart"
3. click on the notification icon

OBSERVED RESULT
Clicking on the icon opens Discover's "update" page.

EXPECTED RESULT
A dialogue about restarting the system should be shown instead.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 5.19.1
KDE Frameworks Version: 5.71
Qt Version: 5.14.2
Comment 1 Nate Graham 2020-06-19 20:48:25 UTC
Looks like we need to make the notification background also call DiscoverNotifier::reboot(), to match the behavior of clicking on the button.
Comment 2 Nate Graham 2020-06-19 21:10:57 UTC
Ah you were referring to the system tray item, not the desktop notification.
Comment 3 Bug Janitor Service 2020-06-19 21:23:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/12
Comment 4 Nate Graham 2020-06-23 13:33:45 UTC
Git commit dbef6113851cef53218e4ceccef44346605a3c70 by Nate Graham.
Committed on 23/06/2020 at 13:33.
Pushed by ngraham into branch 'master'.

When the system needs a reboot, reboot when clicking notifier

Otherwise it opens Discover's updates page which is blank, because the
user has already performed all the updates. That's a bit silly. Let's
instead make it reboot, and change the notifier's icon and text to
reflect this.
FIXED-IN: 5.20.0

M  +8    -1    notifier/NotifierItem.cpp

https://invent.kde.org/plasma/discover/commit/dbef6113851cef53218e4ceccef44346605a3c70
Comment 5 Riccardo Robecchi 2020-06-23 14:06:24 UTC
Nate, does your patch make the computer reboot if I click on the icon? If that's the case, I don't think it is a good way of addressing this. Say I don't want to reboot, but I accidentally click on the icon when trying to click on an adjacent one (e.g. I want to open Plasma Vaults and instead I click on the reboot icon). In that case, I could possibly face loss of data as I did not intend to reboot when clicking on the icon.
A dialogue that says something like "your system has installed updates that require a reboot, would you like to do it now?" and a "reboot" button would be much better and would avoid unintended reboots and loss of data.
Comment 6 Nate Graham 2020-06-23 14:44:59 UTC
Yes, but you're asked to confirm first, just like you originally requested. :)
Comment 7 Riccardo Robecchi 2020-06-23 16:48:52 UTC
(In reply to Nate Graham from comment #6)
> Yes, but you're asked to confirm first, just like you originally requested.
> :)

Okay, thanks for clarifying that! :)