david-risney / WebView2Utilities

WebView2Utilities helps you develop and debug Microsoft Edge WebView2 apps.
https://david-risney.github.io/WebView2Utilities/
MIT License
25 stars 7 forks source link

Show a Toast when a new host app starts using a non-stable runtime #38

Open david-risney opened 1 year ago

david-risney commented 1 year ago

Not sure what sort of toast features are available. There's probably a third party WPF nuget package we could get? Using mojo named pipe enumeration (without looking up the corresponding browser process) it is fast enough we can run every few seconds to check for new host apps and then check if its runtime path isn't stable.

david-risney commented 1 year ago

Just searching on github for wpf toast to find popular WPF Toast libraries with nuget packages: https://github.com/Federerer/Notifications.Wpf

david-risney commented 1 year ago

Looking for mojo named pipes means we only find apps successfully using WebView2. Instead, if we just enumerate running processes and filter to those that have overrides, then we can give better warnings for cases where the override is messed up.

champnic commented 1 year ago

Curious what the intent is here. Are we looking for apps to be able to confirm that the override setting worked?

david-risney commented 1 year ago

Its for the previous times when I've set an override to debug or whatever, finished and never removed the override. Then later on I'm getting unexpected behavior from that app because I forgot the override was still applied.

The thing that's happened to me multiple times: if you pick a runtime path and pick canary for the override (rather than using the reverse runtime lookup order you explicitly pick canary as the runtime path to use) then when you stop using the app the next day canary will get updated to a new version but the override will be using the old path with the old version number in the path that no longer exists and now webview2 won't launch with that override. And I forget that the override exists and it takes me a bit to figure out why WebView2 launch is failing. I had opened a separate issue in here to try and point out to the end dev that an override has a bad path.

Do you think its too niche or too annoying for the success case?

champnic commented 1 year ago

Sounds useful, though relies on the dev opening the utilities to be able to diagnose. I wish we could point to the canary location rather than a specific version subfolder. I thought we had a scenario for that somewhere but I can't find it.

david-risney commented 4 months ago

Also would be nice to include easy way to file bug from the toast or toast links to wv2util tab that has info on filing bugs.

Potentially better toast library described here: https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/send-local-toast?tabs=uwp2