Repository navigation
web: a refused plugin shows why in the Installed pane - #368
Merged
Merged
Conversation
The web's arrival path only logged a module the page could not load, the host refused (fingerprint, SDK version, id, entry points), or whose register() failed. It now records the failure the way the desktop's recordLoadFailure does, so the store's Installed pane and Settings show a failed card with the reason. A refused update in front of which the running build stays is only noted, as a failed reload is on the desktop. A web load that lands, or a web uninstall, clears the record. pluginLoadFailureReason keys its reasons by error name so it compiles against either loader's error set, and stays exhaustive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012tKz7NTwCwAPSmfg3DjHDX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
On the web, a plugin that fails to load now shows up as failed in the store's Installed pane, with the reason, as it does on the desktop. Before, a refused build was only logged to the browser console. After #360 moved the SDK fingerprint, fizzyed.it/app refused every store plugin with
AbiMismatch. The Installed pane listed each one as an undecided build with a Load button, and pressing Load failed silently in the same way.The desktop routes every load failure through
App.recordLoadFailure, which feeds the failed card (reason, probed version, Retry/Reinstall/Uninstall) and the failed branch in Settings. The web's arrival path (WebPluginRequest.arrived) never did. It now records a failure on each of its three ways out:PluginLoader.preparerefused it (fingerprint, SDK version, declared id, missing entry points);register()was rejected.When no build of that id is running (a remembered build coming back, a first install, a repair), the failure is recorded as a failed plugin. The card's detail line ("plugin x.y.z, min SDK a.b.c") comes from the module's own version getters through a new
PluginLoader_web.versionInfo, which is the web's counterpart ofprobeVersionInfo. When a running build stays in front of a refused update, the failure is only noted for thepluginsservice, as a failed reload is on the desktop. The update window's row already turns to Retry in that case.A web load that succeeds now clears any earlier failure record, and so does a web uninstall, as both already do on the desktop.
App.pluginLoadFailureReasonnow works with either loader's error set. The two sets share names where they mean the same thing, so the reasons live in a table keyed by error name and the switch isinline else. An error that either loader gains without a reason is still a compile error.The fingerprint problem itself needs an SDK release (0.2.23) and repins. That is separate from this PR.
SDK impact
sdk/src/version.zig,sdk_versionuntouched, PR labelledsdksdk_version, lists thesdkPRs since the lastsdk-v*tagVerified
zig build check-web, so the wasm side compiles with the web loader's error set.Follow-ups
NotUnloadable. Reinstall from the store is the way back, as it is for any failed card with a store build.🤖 Generated with Claude Code
https://claude.ai/code/session_012tKz7NTwCwAPSmfg3DjHDX