fix(marketplace): hide registry entries with no artifact for current platform#76
Merged
facontidavide merged 1 commit intodevelopmentfrom Apr 29, 2026
Merged
Conversation
…platform The registry view listed every extension regardless of whether the declared `platforms` map contained an artifact for the host OS/arch. ExtensionManager::doInstall already rejects those installs with "No artifact available for platform ...", so advertising them in the catalog only led users to a guaranteed failure. Encapsulate the filter in RegistryManager::compatibleExtensions(platform) and call it from MarketplaceWindow with PlatformUtils::currentPlatform(). The platform key is injected by the caller so RegistryManager stays independent of host detection — tests can exercise the filter with any key (covered by the new CompatibleExtensionsFiltersByRequestedPlatform test) without depending on the OS the suite runs on.
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.
Summary
ExtensionManager::doInstallwould reject them anyway with "No artifact available for platform …".RegistryManager::compatibleExtensions(platform)encapsulates the filter;MarketplaceWindowcalls it withPlatformUtils::currentPlatform(). The platform key is injected by the caller soRegistryManagerstays independent of host detection.extensions()keeps returning the parsed list verbatim — only the catalog view consumes the filtered variant.Why
Before this change, the marketplace listed every entry from the registry. Users on Linux/x86_64 saw Windows-only and macOS-only extensions, clicked Install, and got a confusing "No artifact available for platform …" error. The catalog now only shows extensions the host can actually install.
Test plan
CompatibleExtensionsFiltersByRequestedPlatformtest exercises the filter with a synthetic platform key, no host detection involved.extensions()accessor is unchanged).