microsoft / devhome

The new Dev Home experience for Windows!
https://aka.ms/devhomedocs
MIT License
3.47k stars 302 forks source link

Ironside does not disable startup task when disabled in experimental features #3207

Open crutkas opened 3 weeks ago

crutkas commented 3 weeks ago

Dev Home version

0.1501.522.0

Windows build number

10.0.22631.3737

Other software

OS Build Version: 10.0.22631.3737.amd64fre.ni_release.220506-1250 .NET Version: .NET 8.0.5

Steps to reproduce the bug

  1. go to settings->apps->startup. See hotkey for PI is enabled
  2. Go to dev home and disable PI
  3. Go back to Start up in settings, PI is still there.

image

Expected result

Start up task fully removed

Actual result

Remains

Included System Information

CPU: Intel(R) Core(TM) Ultra 7 165H Physical Memory: 31.64GB (14.2GB free) Processor Architecture: x64

Included Extensions Information

Extensions: Microsoft.Windows.DevHome_0.1401.505.0_x648wekyb3d8bbwe (Core Widget Extension) Microsoft.Windows.DevHome_0.1401.505.0_x648wekyb3d8bbwe (Hyper-V Extension) Microsoft.Windows.DevHomeGitHubExtension_0.1400.505.0_x648wekyb3d8bbwe (Dev Home GitHub Extension (Preview)) Microsoft.Windows.DevHome.Canary_0.1501.522.0_x648wekyb3d8bbwe (Core Widget Extension) Microsoft.Windows.DevHome.Canary_0.1501.522.0_x648wekyb3d8bbwe (Hyper-V Extension) Microsoft.Windows.DevHome.Canary_0.1501.522.0_x648wekyb3d8bbwe (Windows Sandbox Extension) Microsoft.Windows.DevHomeAzureExtension.Canary_0.1000.522.0_x648wekyb3d8bbwe (Dev Home Azure Extension (Canary)) Microsoft.Windows.DevHomeGitHubExtension.Canary_0.1500.522.0_x648wekyb3d8bbwe (Dev Home GitHub Extension (Canary))

Widget Service: MicrosoftWindows.Client.WebExperience_524.15600.0.0_x64__cw5n1h2txyewy

andreww-msft commented 3 weeks ago

Seems the right thing to do if the user disables the feature is to disable the startup task (rather than remove it altogether). Equally, if they later re-enable the feature, this should re-enable the startup task.

jaholme commented 3 weeks ago

Startup tasks are in the AppxManifest so they can't be removed at runtime. They can be disabled, but we need the Dev Home Experimental feature infrastructure to provide callbacks when experimental features are toggled off/on.

Eventually we will probably want to have a setting within PI itself to allow the user to disable registering for the hotkey entirely.

jaholme commented 3 weeks ago

Until callbacks are available PI is handling the functionality within the startup task. PI is checking to see if the experimental feature is enabled and if it's not it exits the process immediately.

crutkas commented 3 weeks ago

PI shouldn't not be executed if the feature is disabled. the hot key shouldn't not start anything