Skip to content

feat(plugins): show marketplace categories in the app's language - #2400

Merged
vastsa merged 1 commit into
mainfrom
feat/plugin-category-labels
Nov 17, 2026
Merged

vastsa merged 1 commit into
mainfrom
feat/plugin-category-labels

Conversation

@vastsa

@vastsa vastsa commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Why

The plugin center now files every plugin under a fixed category id (productivity, themes, …) and publishes the labels in English and Chinese, so the desktop was about to render developer-tools where a shelf belongs.

What

  • host-core: the catalog document reads the published categoryLabels; MarketPluginSummary keeps the labels in categories and the ids in the new categoryIds, and a browse facet carries name beside its id. market.browse reads labels from the center's page, the local snapshot fallback reads them from the catalog, and the RPC answer resolves both for the app's language.
  • Fallback order: exact locale → same language (zh-TW reads zh-CN) → English → the id. A catalog published before the vocabulary existed still renders.
  • Renderer: a category chip shows name and filters by id, so the language can change without changing what a click selects.
  • Shared types, the marketplace spec (§ Category vocabulary) and the 0.23.0 changelog in all nine languages.

Depends on AIUO-Net/pi-plugin-center 3c1f418 / release-v1.0.50, which is deployed. Compatible with an older center: no labels means ids render, exactly as today.

Tests

  • cargo test -p host-core: new category_labels_fall_back_in_a_defined_order and a_page_carries_the_labels_of_its_categories; the RPC fixture now asserts a facet carries its label and a card carries both the label it shows and the id a filter selects.
  • Electron user path (market-browse-user-path): the chip shows Writing while the request carries writing.
  • Desktop typecheck, biome, cargo fmt/clippy for the touched files, and the marketplace render/IPC tests pass.

Verified against production

/api/v1/plugins returns all 115 plugins with canonical ids and categoryLabels ({"en": "Productivity", "zh-CN": "效率工具"}); catalog.json carries the same map and every entry an id.

The plugin center now stores category ids and publishes their labels, so
the desktop stops rendering a slug where a shelf belongs. A card carries
the labels it displays and the ids a filter selects, a browse facet
carries its label beside its id, and a catalog that predates the
vocabulary falls back to the id rather than showing nothing.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: b8ba44f
Status: ✅  Deploy successful!
Preview URL: https://5cbf98ce.pi-desktop.pages.dev
Branch Preview URL: https://feat-plugin-category-labels.pi-desktop.pages.dev

View logs

@vastsa
vastsa merged commit e2f137d into main Nov 17, 2026
7 checks passed
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.

1 participant