Repository navigation
feat(plugins): page, sort and filter the marketplace through the center - #2397
Merged
Merged
Conversation
Deploying pi-desktop with
|
| Latest commit: |
157b12b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ccf35c8d.pi-desktop.pages.dev |
| Branch Preview URL: | https://feat-market-browse-paging.pi-desktop.pages.dev |
The marketplace tab held the whole catalog in the renderer and filtered it client-side, which does not scale and offered no ordering. A new market.browse RPC asks the plugin center's paged search off the host state lock, caches pages for a minute, and maps entries through the same summary rules, so trust, installability and update state are unchanged. When the center is unreachable, predates the route, or the source is not an http(s) center, the host pages the last valid snapshot with the same semantics and the tab labels it as the saved catalog. The renderer lets only the newest request land and returns to page one whenever the query, category or sort changes.
A numbered pager made browsing a shuffled catalog a series of clicks with no sense of position. The marketplace is now one list that asks for the next page as its end comes into view, with a Load more button for keyboard users and retries, and an "N of M loaded" line. Every change of query, category, sort or language starts a new generation, so a first or next page for something the user has left is dropped instead of mixed into the list. A failed page pauses automatic loading until the user retries, and an install updates its card in place rather than reloading every page scrolled through.
The center answers JSON through a compressing CDN, so the review and browse reads were transferring the uncompressed body. curl now asks for the compressed form; the size limit still applies to the decoded body.
vastsa
force-pushed
the
feat/market-browse-paging
branch
from
November 17, 2026 06:48
93e404a to
157b12b
Compare
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.
Why
The Marketplace tab loaded the whole catalog into the renderer and filtered it client-side, with no ordering and no paging.
What
market.browse: one page from the plugin center's newGET /api/v1/catalog/search(AIUO-Net/pi-plugin-center46e042d, release-v1.0.48), fetched off the AppState lock, bounded (5 s / 8 MiB), cached 60 s; negative caches for a center without the route (5 min) or unreachable (30 s); cleared by an explicit refresh. Entries go through the existing summary/trust/installable rules; install still resolves against a fresh full catalog.source: "local",fallbackReason), shown as a "Saved catalog" chip.market.searchis kept for the MCP control surface.Tests
cargo test -p host-core: new unit and RPC fixture tests (remote page, cache, unsupported / failing center backoff, oversized page rejection, remote-only detail). Full run: 1323 pass; the 2 failures (a_valid_id_cannot_take_over_a_legacy_plugin…,review_rpc_records_workspace_scratch…) fail identically on baseecb2d9894(machine environment).clippy/fmtclean for new code; desktop typecheck, biome, style tokens and i18n tests pass.market-browse-render.test.mjs,market-browse-user-path.test.mjs(Electron: page → sort → category → search with a held stale response; verified to fail when the stale-response guard is removed), and browse cases inmarket-review-ipc.test.mjs.