refactor: use direct registry API call for server detail page#490
Merged
refactor: use direct registry API call for server detail page#490
Conversation
Replace the multi-registry Promise.all fan-out with a single direct API
call to /registry/{registryName}/v0.1/servers/{serverName}/versions/{version}.
The registry name is now threaded from the catalog list page to the
detail page via a query parameter, avoiding unnecessary API calls.
Falls back to fetching the default registry when the query param is
missing (e.g. direct URL navigation).
Also removes the unused CATALOG_ALL_REGISTRIES constant and the
"All registries" select option that was no longer needed.
Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Refactors the catalog server detail flow to avoid multi-registry fan-out by carrying the selected registryName from the catalog list into the detail page (via query param) and using a single direct registry API call, with a fallback to the default registry for direct URL navigation.
Changes:
- Remove the “All registries” option/constant and treat registry selection as a concrete registry name.
- Append
?registryName=when navigating from the catalog list to a server detail page. - Update the server detail server-action to resolve the registry (query param or default) and issue a single direct API request.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/catalog/hooks/use-catalog-filters.ts | Drops the “all registries” sentinel and stores a concrete registryName filter value. |
| src/app/catalog/constants.ts | Removes the unused CATALOG_ALL_REGISTRIES constant. |
| src/app/catalog/components/servers.tsx | Adds registryName prop and includes it in the pushed detail URL query param. |
| src/app/catalog/components/servers-wrapper.tsx | Ensures a concrete registry name is passed down to filters and server list (fallback to first registry). |
| src/app/catalog/components/server-filters.tsx | Removes “All registries” SelectItem and updates placeholder text. |
| src/app/catalog/components/tests/servers.test.tsx | Updates tests to pass the new required registryName prop. |
| src/app/catalog/[repoName]/[serverName]/[version]/page.tsx | Reads registryName from searchParams and passes it into getServerDetails. |
| src/app/catalog/[repoName]/[serverName]/[version]/not-found.tsx | Adjusts layout wrapper classes (removes redundant padding). |
| src/app/catalog/[repoName]/[serverName]/[version]/actions.ts | Resolves registry via query param or default and performs a single direct registry API call. |
JAORMX
approved these changes
Apr 13, 2026
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
Promise.allfan-out in the server detail page with a single direct API call to/registry/{registryName}/v0.1/servers/{serverName}/versions/{version}registryNamefrom the catalog list page to the detail page via a URL query parameter, eliminating unnecessary API callsCATALOG_ALL_REGISTRIESconstant and "All registries" select optionTest plan
?registryName=) — verify fallback worksMade with Cursor