Skip to content

fix(marketplace): hide registry entries with no artifact for current platform#76

Merged
facontidavide merged 1 commit intodevelopmentfrom
fix/marketplace-platform-filter
Apr 29, 2026
Merged

fix(marketplace): hide registry entries with no artifact for current platform#76
facontidavide merged 1 commit intodevelopmentfrom
fix/marketplace-platform-filter

Conversation

@pabloinigoblasco
Copy link
Copy Markdown
Collaborator

Summary

  • Hide registry entries that declare no artifact for the host OS/arch from the marketplace catalog view, since ExtensionManager::doInstall would reject them anyway with "No artifact available for platform …".
  • New RegistryManager::compatibleExtensions(platform) encapsulates the filter; MarketplaceWindow calls it with PlatformUtils::currentPlatform(). The platform key is injected by the caller so RegistryManager stays 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

  • New CompatibleExtensionsFiltersByRequestedPlatform test exercises the filter with a synthetic platform key, no host detection involved.
  • Existing registry/marketplace tests still pass (the extensions() accessor is unchanged).

…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.
@facontidavide facontidavide merged commit 26fca34 into development Apr 29, 2026
2 checks passed
@pabloinigoblasco pabloinigoblasco deleted the fix/marketplace-platform-filter branch May 4, 2026 12:34
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.

2 participants