SteamDeckHomebrew / decky-loader

A plugin loader for the Steam Deck.
https://decky.xyz
GNU General Public License v2.0
4.25k stars 154 forks source link

[Request] Better detect failed page renders and automatically disable UI modifications from plugins causing them #625

Closed BryanJacobs closed 5 days ago

BryanJacobs commented 1 month ago

Please confirm

Feature Request Description

Decky should be able to detect when a plugin causes a Steam frontend render failure, and help the user to restore decky-loader itself (not the plugin...) to a working state.

Further Description

See https://github.com/SteamDeckHomebrew/decky-loader/issues/621 , where a large number of plugins were simultaneously broken by a Steam frontend update.

Decky-loader has some code to notice when a plugin errors out, but doesn't appear to notice when the plugin breaks the Steam UI entirely. This can - and did - create a situation where users couldn't uninstall plugins via the GUI, because the decky-loader GUI was inaccessible due to modifications made by the plugins themselves.

I think a situation where all pages are throwing render errors should cause decky-loader to disable plugins until that stops being the case. Call it a "safe mode", if you will. This would ideally also be able to isolate the broken plugin(s) and inform the user.

dev0T commented 1 month ago

My suggestion would be a little different than yours but to add to it: Errors from plugins should be contained within them, with something like an error boundary. I haven't checked how the insertion is being done by Decky but this is something that if my knowledge doesn't fail me could be done wrapping each component when loading them and if they crash, it would be contained.

AAGaming00 commented 1 month ago

Better error boundaries are planned for the websocket update

dev0T commented 1 month ago

Better error boundaries are planned for the websocket update

Awesome, thank you!