Skip to content

web: a refused plugin shows why in the Installed pane - #368

Merged
foxnne merged 1 commit into
mainfrom
ccr-cfd175bc-wakut0
Oct 11, 2026
Merged

foxnne merged 1 commit into
mainfrom
ccr-cfd175bc-wakut0

Conversation

@foxnne

@foxnne foxnne commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • the page could not fetch or link the module (offline, hash mismatch, not a side module);
  • PluginLoader.prepare refused it (fingerprint, SDK version, declared id, missing entry points);
  • its 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 of probeVersionInfo. When a running build stays in front of a refused update, the failure is only noted for the plugins service, 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.pluginLoadFailureReason now 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 is inline 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

  • None
  • Core-only or additive: reaches plugins at the next SDK release
  • Fingerprint moved: recorded in sdk/src/version.zig, sdk_version untouched, PR labelled sdk
  • SDK release: bumps sdk_version, lists the sdk PRs since the last sdk-v* tag

Verified

  • macOS: CI tests.
  • Windows: CI tests and the cross-compiled build.
  • Linux: CI tests, integration tests and verdict run. The Linux job also runs zig build check-web, so the wasm side compiles with the web loader's error set.
  • Web: not seen in a browser. I could not build the wasm app in the cloud session that wrote this, because its network policy blocks SDL's Linux dependency hosts. Still to check: load a store plugin built against SDK 0.2.22 on this build. Its card in the Installed tab should read "built against an incompatible Fizzy SDK" with Retry/Reinstall/Uninstall.

Follow-ups

  • A refused build that the page never remembered (a first install this host refuses) has no URL to retry, so its card's Retry reports 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

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
@foxnne
foxnne marked this pull request as ready for review October 11, 2026 11:04
@foxnne
foxnne merged commit f68e492 into main Oct 11, 2026
12 checks passed
@foxnne
foxnne deleted the ccr-cfd175bc-wakut0 branch October 11, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant