feat(web): /explore federated package browser (Phase D v0)#3
Merged
Conversation
First slice of Phase D. Ships a public, no-auth /explore page that mirrors `pakx search` from the CLI. - `lib/registry.ts` — server-side TS port of the official-mcp + smithery source clients. Hits the upstream public APIs directly; no pakx backend dependency. Parallel fetch via `Promise.allSettled`, dedupes by `source/id`, sorts by name, returns per-source errors so a single failing source does not blank the page. - `app/explore/page.tsx` — server component. `?q=` drives a GET form, page is `force-dynamic`. Empty state, error banner, per-package card with source badge and version. - `components/site-nav.tsx` — shared top nav (pakx / Explore / GitHub / Releases), now mounted in the root layout so it appears on every page. Deferred to follow-up PRs: - `/p/[owner]/[name]` package detail page - `/dashboard` (needs Auth.js + pakx-registry) - pakx-registry as a third federated source (needs deployed backend)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
arwenizEr
added a commit
to pakxdev/pakx
that referenced
this pull request
May 21, 2026
* fix(registry-client): accept 2025-12-11 wrapped MCP Registry schema
`registry.modelcontextprotocol.io` switched its list and detail
responses to a new envelope:
{ "server": <core>, "_meta": { ... } }
The flat shape (`core` fields at the top level) is still emitted by
older deployments. Today `pakx search` against the real upstream
returns zero MCP results because every entry hits the existing
`#[derive(Deserialize)]` on the flat-only `ServerRaw` and fails.
Surfaced while writing the TS port of this client for
`pakx-web` `/explore` (pakxdev/pakx-web#3) — both layers needed
the same fix.
- Split `ServerRaw` into:
- `ServerCore` — the flat field set (unchanged semantics).
- `ServerRaw` — `#[serde(untagged)]` enum over `Wrapped { server,
_meta }` and `Flat(ServerCore)`. Decoders try `Wrapped` first;
legacy flat payloads fall through.
- `into_package` now folds `_meta` (when present) into the
`install_hints` object so the resolver can read upstream status
flags without re-parsing.
- Two new wiremock tests cover the wrapped shape on both `search`
and `fetch`; existing flat-shape tests still pass unchanged.
* fix(registry-client): satisfy clippy::use_self in ServerRaw impl
CI clippy rejected `ServerRaw::Wrapped` / `ServerRaw::Flat` inside
the impl block. Use `Self::*` instead.
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
First slice of Phase D. Ships a public, no-auth
/explorepage that mirrorspakx searchfrom the CLI.lib/registry.ts— Server-side TS port of theofficial-mcp+smitherysource clients. Hits the upstream public APIs directly; no pakx backend dependency. Parallel fetch viaPromise.allSettled, dedupes bysource/id, sorts by name, returns per-source errors so one failing source doesn't blank the page.app/explore/page.tsx— Server component.?q=drives a GET form, page isforce-dynamic. Empty state, error banner, per-package card with source badge and version.components/site-nav.tsx— Shared top nav (pakx / Explore / GitHub / Releases), mounted in the root layout so it shows on every page.Deferred to follow-ups
/p/[owner]/[name]package detail page/dashboard(needs Auth.js + pakx-registry)Test plan
pnpm lintcleanpnpm buildgreen (4 pages generated,/explorecorrectly marked dynamic)GET /explore,GET /explore?q=github,GET /all return 200 with results rendered/exploreagainst real upstream APIs