canonical / desktop-security-center

GNU General Public License v3.0
13 stars 5 forks source link

feat: use long-polling to update the UI based on snapd's state #48

Closed d-loose closed 2 months ago

d-loose commented 2 months ago

Automatically updates the UI when

This also includes some retry logic to gracefully handle snapd errors while it's restarting when the feature flag is toggled

Screencast from 2024-08-23 13-58-16.webm

The UI change is a bit delayed when the feature is toggled externally, I'll see if I can add a loading state or at least disable the toggle button for that case.

Added a waitingForSnapd state

Screencast from 2024-08-23 14-31-18.webm

UDENG-3790 UDENG-4077

d-loose commented 2 months ago

For testing, a snap is building here. It'd be great if someone could test it in a VM with snapd from edge and the prompting-client installed. The security center should handle the following scenarios without any errors:

matthew-hagemann commented 2 months ago

I found that if you cancel out of the sudo password prompt when toggling prompting, the option remains off until you restart the security center:

Screencast from 2024-08-27 13-42-07.webm

d-loose commented 2 months ago

I found that if you cancel out of the sudo password prompt when toggling prompting, the option remains off until you restart the security center:

Very good catch, thanks a lot! I'll need to handle that case explicitly