feat(plugins): Settings → Plugins becomes one catalog with categories #39

Closed
gabrielvidal wants to merge 0 commits from plugins-page-rework into main
pull from: plugins-page-rework
Owner

Summary

Settings → Plugins becomes one catalog: a category sidebar with counts, a search, an All / Installed / Available filter, a sort, and cover cards or compact rows. Categories come from a new manifest field, category. Layout and choices decided in form plugins-page-rework_rhce3j (the Orca plugins page as the reference for the layout, not the look).

Merge after #38: this branch is rebased onto translation-plugin, so until #38 is merged the diff here shows its commit too.

Key changes

  • backend/plugins/categories.py (new): an app plugin picks dev, data, agents, chat, scheduling, media or other (the default); providers, harnesses and translations sit under their kind's category. Strict: an unknown value, or a category that contradicts the kind, is refused at install. It is not part of a plugin's approval fingerprint, so nothing asks for re-approval.
  • /api/plugins rows carry their category (installed, catalog, what a guest is given). A plugin installed before the field reads it from its source's plugin.json.
  • frontend/src/business/plugins/pages/PluginsPage.tsx rewritten; labels and icons in categories.ts. Each control counts what clicking it would show; empty categories are hidden.
  • Phone: the categories are a chip row that scrolls sideways; a category opened from a link scrolls its chip into view.
  • The sort is remembered per person (settings.pluginsSort).
  • Addresses are ?cat= and ?show=; the old ?tab= links (including ?tab=catalog&kind=harness and ?tab=translations) still land in the right place.
  • The Translations tab #38 added to the old page is replaced by the Translations category; its language pill and intro line are kept.

Key decisions

  • "Available" means not installed yet. The old Catalog tab listed installed plugins too; "All" now shows everything once.
  • A guest sees one list instead of four tabs, still limited to their own installs, what the owner gives them and the catalog entries open to guests. The backend filtering is untouched.
  • category is optional for a provider, harness or translation: the kind decides it.
  • No extra filters (language, guests, setup, updates) in this version: the question was skipped in the form.

Changelog

  • Changed: Settings → Plugins is one catalog with categories, a search, an Installed / Available filter, a sort and cover cards.
  • Added: plugins declare a category.

Test notes

  • Backend: 171 modules, each in its own bwrap sandbox; only test_typed_plugins fails, the same way as on the base branch. I re-ran test_plugin_categories (8) and test_i18n (35) after the rebase: all pass.
  • Frontend: tsc clean; vitest 1106 of 1107, the failure (FreshContext) also fails on main.
  • Live local hub seeded from the plugins branch (72 plugins, translation-fr installed, a guest): a catalog install clicked through end to end; screenshots below, desktop and phone, owner, guest and owner in French.
  • Deploy from the Homelab, this PR before ai-agent-plugins #28: a hub on the old code refuses the category key. Not deployed from the EVOX2.

Screenshots

desktop-dark-all.png
desktop-light-all.png
desktop-light-category-translations.png
desktop-dark-search-mail.png
desktop-light-list.png
phone-light-all.png
phone-dark-category-translations.png
desktop-light-guest.png
desktop-dark-owner-fr-translations.png

## Summary Settings → Plugins becomes one catalog: a category sidebar with counts, a search, an All / Installed / Available filter, a sort, and cover cards or compact rows. Categories come from a new manifest field, `category`. Layout and choices decided in form `plugins-page-rework_rhce3j` (the Orca plugins page as the reference for the layout, not the look). **Merge after #38**: this branch is rebased onto `translation-plugin`, so until #38 is merged the diff here shows its commit too. ## Key changes - `backend/plugins/categories.py` (new): an app plugin picks `dev`, `data`, `agents`, `chat`, `scheduling`, `media` or `other` (the default); providers, harnesses and translations sit under their kind's category. Strict: an unknown value, or a category that contradicts the kind, is refused at install. It is not part of a plugin's approval fingerprint, so nothing asks for re-approval. - `/api/plugins` rows carry their category (installed, catalog, what a guest is given). A plugin installed before the field reads it from its source's `plugin.json`. - `frontend/src/business/plugins/pages/PluginsPage.tsx` rewritten; labels and icons in `categories.ts`. Each control counts what clicking it would show; empty categories are hidden. - Phone: the categories are a chip row that scrolls sideways; a category opened from a link scrolls its chip into view. - The sort is remembered per person (`settings.pluginsSort`). - Addresses are `?cat=` and `?show=`; the old `?tab=` links (including `?tab=catalog&kind=harness` and `?tab=translations`) still land in the right place. - The Translations tab #38 added to the old page is replaced by the Translations category; its language pill and intro line are kept. ## Key decisions - **"Available" means not installed yet.** The old Catalog tab listed installed plugins too; "All" now shows everything once. - **A guest sees one list instead of four tabs**, still limited to their own installs, what the owner gives them and the catalog entries open to guests. The backend filtering is untouched. - **`category` is optional for a provider, harness or translation**: the kind decides it. - **No extra filters** (language, guests, setup, updates) in this version: the question was skipped in the form. ## Changelog - Changed: Settings → Plugins is one catalog with categories, a search, an Installed / Available filter, a sort and cover cards. - Added: plugins declare a category. ## Test notes - Backend: 171 modules, each in its own bwrap sandbox; only `test_typed_plugins` fails, the same way as on the base branch. I re-ran `test_plugin_categories` (8) and `test_i18n` (35) after the rebase: all pass. - Frontend: `tsc` clean; vitest 1106 of 1107, the failure (`FreshContext`) also fails on `main`. - Live local hub seeded from the plugins branch (72 plugins, `translation-fr` installed, a guest): a catalog install clicked through end to end; screenshots below, desktop and phone, owner, guest and owner in French. - **Deploy from the Homelab, this PR before ai-agent-plugins #28**: a hub on the old code refuses the `category` key. Not deployed from the EVOX2. ## Screenshots ![desktop-dark-all.png](https://git.gabvdl.xyz/attachments/c9b9763d-1f53-4703-ae3c-37c0da96c45a) ![desktop-light-all.png](https://git.gabvdl.xyz/attachments/dd9f6c2d-8330-4999-9b57-32d85f18bfbe) ![desktop-light-category-translations.png](https://git.gabvdl.xyz/attachments/d96a54f1-f7e5-44c3-a18c-74b8492792ce) ![desktop-dark-search-mail.png](https://git.gabvdl.xyz/attachments/2f28eb35-fab7-4300-ac4e-2df759a84d7e) ![desktop-light-list.png](https://git.gabvdl.xyz/attachments/e5a47e7e-41d7-4b5a-bb72-c917395b9f65) ![phone-light-all.png](https://git.gabvdl.xyz/attachments/658ec73a-f4d6-4031-b2b4-40fddf908211) ![phone-dark-category-translations.png](https://git.gabvdl.xyz/attachments/2002e1e6-2e2b-4a78-be9c-cc97b2aa61c8) ![desktop-light-guest.png](https://git.gabvdl.xyz/attachments/69d0c5eb-b741-4ec7-957f-ccdf6be55b72) ![desktop-dark-owner-fr-translations.png](https://git.gabvdl.xyz/attachments/b2636c07-7325-4311-a9a3-c7208b544622)
gabrielvidal self-assigned this 2026-11-28 19:21:11 +01:00
gabrielvidal added 2 commits 2026-11-28 19:21:11 +01:00
The core speaks English only; every other language is a kind: "translation" plugin
(translation-<lang>; the French one is translation-fr in ai-agent-plugins, seeded once at start).

- plugins: kind translation (typed_manifest.parse_translation: lang, name, englishName, flag,
  locale, promptLine, ui/backend JSON dictionaries — strict, operator-only, in the fingerprint);
  a top-level "languages" field on any plugin (default ["en"]) shown on its page; seeding takes
  translation-*; plugins/translations.py reads the enabled ones (first by id wins a code).
- core/i18n: tr / langs / localized / clean_pref / effective_lang read the installed
  translations; a pick whose translation is gone reads English and is kept; browserLang records
  any base code. core/i18n_fr.py and FRENCH_LINE are gone (language_line = the plugin's promptLine).
- The owner picks a language too (users.json ownerLang, PUT /api/me {lang}; English by default).
- Public GET /api/i18n/languages and /api/i18n/{lang} (ETag/304), guest host and sign-in included.
- Coverage: backend/core/i18n_keys/{ui,backend}.json (kept by the two i18n tests,
  UPDATE_I18N_KEYS=1); a translation's page shows translated / missing / stale / placeholder
  mismatches.
- Frontend: frontend/src/i18n/fr removed; the dictionary comes from the hub, cached in
  localStorage and revalidated in the background (first boot in a language waits <= 4 s, any
  failure is English); Lang is a string; number/currency style from the translation's locale;
  LanguageSelect lists English + installed translations (hidden when none); Settings → Plugins
  has a Translations kind (tab, catalog filter, group) and a Translation section with the
  missing-strings count; mock is English only.
- Tests: test_i18n.py rewritten on a made-up translation; i18n_testkit.speaking() for the
  tests that need a second language. authz golden, openapi.json + src/generated regenerated;
  docs/plugins.md (Translations), CLAUDE.md, i18n README, docs/settings.md.

Changelog
- Added: languages are plugins — Settings → Plugins → Translations; the owner can pick a language.
- Changed: French moved to the translation-fr plugin (seeded at start: nothing changes for guests).
- Removed: the core's built-in French dictionaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orca's layout in the app's own look (form plugins-page-rework_rhce3j): a
category sidebar with counts (a chip row on a phone), search, All / Installed /
Available, a sort (Installed first, Name, Recently updated — per person), and
cover cards or compact rows (the grid / list toggle is kept).

- New manifest field `category` (backend/plugins/categories.py), strict: an
  app picks dev, data, agents, chat, scheduling, media or other (the
  default); a provider / harness / translation sits under its kind's shelf.
  Not in the approval fingerprint. Every row of GET /api/plugins carries the
  resolved category; a record from before the field reads its source's
  plugin.json.
- Translations works as soon as the translation kind exists; an empty
  category is hidden.
- ?cat= / ?show= addresses; the old ?tab= / ?kind= links still land.
- Docs: docs/plugins.md → "Categories and the Plugins page", CLAUDE.md.

Deploy this before installing ai-agent-plugins' plugin-categories branch:
an older core refuses the unknown `category` key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner
Merged into `main` as a0da309b by the auto-ship batch https://ai-agent.lab.gabvdl.xyz/conversation/cadefe6f-0940-4688-bc56-1306d9265430.
gabrielvidal closed this pull request 2026-11-28 21:10:24 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gabrielvidal/ai-agent#39