Skip to content

fix(registry-promo): adjust logic for isDefaultRegistry#1773

Merged
samuv merged 1 commit intomainfrom
fix-registry-promo
Mar 20, 2026
Merged

fix(registry-promo): adjust logic for isDefaultRegistry#1773
samuv merged 1 commit intomainfrom
fix-registry-promo

Conversation

@samuv
Copy link
Collaborator

@samuv samuv commented Mar 20, 2026

as per title, we were checking name instead of type

@samuv samuv self-assigned this Mar 20, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 14:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the registry promo/meta-filter gating logic to correctly detect the built-in default registry using the registry type (instead of the registry name), aligning UI behavior with how registry configuration is represented in the API.

Changes:

  • Update isDefaultRegistry detection to use registryData.type (default vs url/file/api) with a fallback for missing type.
  • Update route tests to set type in mock overrides instead of mutating name.
  • Extend the registry-by-name MSW fixture to include type: 'default' by default.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
renderer/src/routes/(registry)/-registry.route.tsx Switches default-registry detection logic from name-based to type-based to drive promo visibility and meta-server filtering.
renderer/src/routes/__tests__/registry.test.tsx Updates test overrides to validate behavior based on registry type instead of name.
renderer/src/common/mocks/fixtures/registry_name/get.ts Adds type: 'default' to the default mocked registry response to reflect API shape.

@samuv samuv enabled auto-merge (squash) March 20, 2026 15:04
@samuv samuv merged commit e26a86c into main Mar 20, 2026
20 checks passed
@samuv samuv deleted the fix-registry-promo branch March 20, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants