Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(ui): the marketplace gets a section of its own

Haraldbbe0c5e68adb
diff --git a/jarvis/plugins/tool/navigate.py b/jarvis/plugins/tool/navigate.py
index bdc5613479..c780e962f0 100644
--- a/jarvis/plugins/tool/navigate.py
+++ b/jarvis/plugins/tool/navigate.py
@@ -61,6 +61,13 @@ KNOWN: frozenset[str] = frozenset(
# grid" an unknown section to the brain.
"agentic-ide-classic",
"chat-workspace",
+ # The assistant's character screen. It was a valid SECTION_IDS entry
+ # from the day it shipped but never landed here, which left the parity
+ # guard red and made "open the modes" an unknown section.
+ "modes",
+ # The marketplace, in the app: community plugins, skills and wallpapers
+ # in one storefront.
+ "marketplace",
}
)
@@ -181,6 +188,21 @@ _ALIASES: dict[str, str] = {
"voice input keys": "voice-api-keys",
"spracheingabe-schlüssel": "voice-api-keys", # i18n-allow: input vocab
"claves de entrada de voz": "voice-api-keys", # i18n-allow: input vocab
+ # The marketplace. "store"/"shop" are the words people actually reach for,
+ # and none of these names anything else in the app.
+ "market": "marketplace",
+ "market place": "marketplace",
+ "store": "marketplace",
+ "shop": "marketplace",
+ "marktplatz": "marketplace", # i18n-allow: input vocab
+ "mercado": "marketplace", # i18n-allow: input vocab
+ "tienda": "marketplace", # i18n-allow: input vocab
+ # The character screen, spoken. The bare id already resolves; these are the
+ # singular and localised forms.
+ "mode": "modes",
+ "modus": "modes", # i18n-allow: input vocab
+ "modi": "modes", # i18n-allow: input vocab
+ "modos": "modes", # i18n-allow: input vocab
}
diff --git a/jarvis/ui/web/frontend/src/components/layout/MainView.tsx b/jarvis/ui/web/frontend/src/components/layout/MainView.tsx
index 55d11a9e05..e31e74e9fe 100644
--- a/jarvis/ui/web/frontend/src/components/layout/MainView.tsx
+++ b/jarvis/ui/web/frontend/src/components/layout/MainView.tsx
@@ -161,6 +161,11 @@ const VisualizationView = lazyView(() =>
default: m.VisualizationView,
})),
);
+const MarketplaceView = lazyView(() =>
+ import("@/views/MarketplaceView").then((m) => ({
+ default: m.MarketplaceView,
+ })),
+);
type IdleWindow = Window & {
requestIdleCallback?: (
@@ -442,6 +447,10 @@ function SwitchOnActiveSection({ active }: { active: string }) {
// building another one by talking to it.
case "modes":
return <ModesView />;
+ // The marketplace storefront: everything the community published, in one
+ // place, installable without leaving the app.
+ case "marketplace":
+ return <MarketplaceView />;
// Deliberately nothing: the coding workspace is rendered by the STICKY
// branch in `MainView` above, which keeps it mounted across section
// changes. This switch is not rendered at all while one of those ids is
diff --git a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts b/jarvis/ui/web/frontend/src/components/layout/navGroups.ts
index 30367e82d9..bf16e6ebb5 100644
--- a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts
+++ b/jarvis/ui/web/frontend/src/components/layout/navGroups.ts
@@ -28,6 +28,7 @@ import {
Settings,
Share2,
Sparkles,
+ Store,
Terminal,
UserCircle2,
Users,
@@ -87,6 +88,16 @@ export const NAV_GROUPS: NavItem[][] = [
},
// CLIs — the CLIs list + the CLI Test Hub behind one tab switch (CLIs first).
{ id: "clis", labelKey: "nav.clis_hub", icon: Terminal, matchIds: ["clis", "cli-test-hub"] },
+ // The marketplace. Sits right under Skills & Tools because that is what
+ // fills those lists: a plugin, a skill or a wallpaper published there ends
+ // up in one of them once installed. Same Store icon as the badge that
+ // marks an installed entry, so the mark and its origin read as one thing.
+ {
+ id: "marketplace",
+ labelKey: "nav.marketplace",
+ icon: Store,
+ fallbackLabel: "Marketplace",
+ },
],
// 2) Content & data — things the user reads, edits, or browses.
[
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 5f6b1a5e71..cd1dd4b9e3 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -102,6 +102,7 @@
"agent_instructions": "{name}.md",
"wallpaper": "Hintergrund",
"modes": "Modi",
+ "marketplace": "Marketplace",
"agentic_ide": "Agentic IDE",
"agentic_ide_beta": "Beta",
"voice": "{name} Stimme",
@@ -4574,5 +4575,52 @@
"character_placeholder": "Sprich leise. Es ist spät und ich fahre runter…",
"save_mode": "Modus speichern",
"save_changes": "Änderungen speichern"
+ },
+ "marketplace": {
+ "title": "Marketplace",
+ "loading": "Der Marketplace wird geladen…",
+ "refresh": "Verzeichnis neu laden",
+ "open_web": "Webseite",
+ "search_placeholder": "Plugins, Skills und Hintergründe durchsuchen…",
+ "subtitle_count": "{count} veröffentlichte Einträge",
+ "subtitle_revision": "Stand {revision}",
+ "filter_all": "Alle",
+ "filter_plugins": "Plugins",
+ "filter_skills": "Skills",
+ "filter_wallpapers": "Hintergründe",
+ "status_stale": "Angezeigt wird das zuletzt geladene Verzeichnis — die Registry war gerade nicht erreichbar.",
+ "status_unavailable": "Die Registry war nicht erreichbar und es liegt noch nichts im Zwischenspeicher. Versuch es erneut, sobald du online bist.",
+ "status_disabled": "Das Community-Verzeichnis ist in dieser Installation abgeschaltet.",
+ "shelf_wallpapers": "Hintergründe",
+ "shelf_wallpapers_hint": "Von der Community veröffentlichte Hintergrundbilder",
+ "shelf_plugins": "Plugins",
+ "shelf_plugins_hint": "Einen fremden Dienst und seine Werkzeuge anbinden",
+ "shelf_skills": "Skills",
+ "shelf_skills_hint": "Anleitungen, die eine neue Arbeitsweise beibringen",
+ "installed": "Installiert",
+ "entry_unreadable": "Diese Version kann das Manifest dieses Eintrags nicht lesen.",
+ "empty": "In dieser Kategorie ist noch nichts veröffentlicht.",
+ "empty_search": "Nichts passt zu „{query}“.",
+ "empty_clear": "Suche zurücksetzen",
+ "publish_hint": "Etwas gebaut, das andere gebrauchen können? Veröffentlichen ist ein Pull Request auf die offene Registry.",
+ "publish_cta": "Eigenes veröffentlichen",
+ "close": "Schließen",
+ "kind_plugin": "Plugin",
+ "kind_skill": "Skill",
+ "kind_wallpaper": "Hintergrund",
+ "unreviewed_note": "Von einem Community-Mitglied veröffentlicht und automatisch geprüft zusammengeführt — von Hand hat das niemand kontrolliert. Unten stehen genau die Dateien, die installiert werden.",
+ "view_source": "Quell-Repository öffnen",
+ "files": "Veröffentlichte Dateien",
+ "files_loading": "Das veröffentlichte Paket wird gelesen…",
+ "files_none": "Dieser Eintrag veröffentlicht keine lesbaren Textdateien.",
+ "files_truncated": "… gekürzt",
+ "install": "Installieren",
+ "already_installed": "Schon installiert — du findest es in seiner eigenen Sektion.",
+ "landed_title": "{title} installiert",
+ "landed_plugin": "Liegt jetzt unter Plugins. Verbinde es, dann kannst du es nutzen.",
+ "landed_skill": "Liegt jetzt unter Skills und ist sofort einsatzbereit.",
+ "landed_wallpaper": "Liegt jetzt unter Hintergrund — auswählen, um es zu setzen.",
+ "landed_needs_connect": "Installiert, aber noch nicht nutzbar: es muss noch verbunden werden.",
+ "landed_open": "Zeig es mir"
}
}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index ea30093253..2878cd330d 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -102,6 +102,7 @@
"agent_instructions": "{name}.md",
"wallpaper": "Wallpaper",
"modes": "Modes",
+ "marketplace": "Marketplace",
"agentic_ide": "Agentic IDE",
"agentic_ide_beta": "Beta",
"voice": "{name} Voice",
@@ -4574,5 +4575,52 @@
"character_placeholder": "Speak quietly. It is late and I am winding down…",
"save_mode": "Save mode",
"save_changes": "Save changes"
+ },
+ "marketplace": {
+ "title": "Marketplace",
+ "loading": "Loading the marketplace index…",
+ "refresh": "Fetch the index again",
+ "open_web": "Storefront",
+ "search_placeholder": "Search plugins, skills and wallpapers…",
+ "subtitle_count": "{count} published entries",
+ "subtitle_revision": "index {revision}",
+ "filter_all": "All",
+ "filter_plugins": "Plugins",
+ "filter_skills": "Skills",
+ "filter_wallpapers": "Wallpapers",
+ "status_stale": "Showing the last index that was downloaded — the registry could not be reached just now.",
+ "status_unavailable": "The registry could not be reached and nothing was cached yet. Try again once you are online.",
+ "status_disabled": "The community index is switched off in this install.",
+ "shelf_wallpapers": "Wallpapers",
+ "shelf_wallpapers_hint": "Backgrounds published by the community",
+ "shelf_plugins": "Plugins",
+ "shelf_plugins_hint": "Connect an outside service and its tools",
+ "shelf_skills": "Skills",
+ "shelf_skills_hint": "Instructions that teach a new way of working",
+ "installed": "Installed",
+ "entry_unreadable": "This entry's manifest could not be read by this version.",
+ "empty": "Nothing is published in this category yet.",
+ "empty_search": "Nothing matches “{query}”.",
+ "empty_clear": "Clear the search",
+ "publish_hint": "Built something worth sharing? Publishing is a pull request against the open registry.",
+ "publish_cta": "Publish yours",
+ "close": "Close",
+ "kind_plugin": "Plugin",
+ "kind_skill": "Skill",
+ "kind_wallpaper": "Wallpaper",
+ "unreviewed_note": "Published by a community member and merged by automated checks — nobody reviewed it by hand. The files below are exactly what gets installed.",
+ "view_source": "Open the source repository",
+ "files": "Published files",
+ "files_loading": "Reading the published package…",
+ "files_none": "This entry publishes no readable text files.",
+ "files_truncated": "… truncated",
+ "install": "Install",
+ "already_installed": "Already installed — you will find it in its own section.",
+ "landed_title": "{title} installed",
+ "landed_plugin": "It is in Plugins now. Connect it to start using it.",
+ "landed_skill": "It is in Skills now and can be used right away.",
+ "landed_wallpaper": "It is in Wallpaper now — pick it to apply it.",
+ "landed_needs_connect": "Installed, but not usable yet: it still needs to be connected.",
+ "landed_open": "Show me"
}
}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 3647988759..2bbaa9aed7 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -102,6 +102,7 @@
"agent_instructions": "{name}.md",
"wallpaper": "Fondo de pantalla",
"modes": "Modos",
+ "marketplace": "Marketplace",
"agentic_ide": "IDE agéntico",
"agentic_ide_beta": "Beta",
"voice": "Voz de {name}",
@@ -4574,5 +4575,52 @@
"character_placeholder": "Habla bajo. Es tarde y estoy desconectando…",
"save_mode": "Guardar modo",
"save_changes": "Guardar cambios"
+ },
+ "marketplace": {
+ "title": "Marketplace",
+ "loading": "Cargando el índice del marketplace…",
+ "refresh": "Volver a cargar el índice",
+ "open_web": "Sitio web",
+ "search_placeholder": "Buscar plugins, skills y fondos…",
+ "subtitle_count": "{count} entradas publicadas",
+ "subtitle_revision": "índice {revision}",
+ "filter_all": "Todo",
+ "filter_plugins": "Plugins",
+ "filter_skills": "Skills",
+ "filter_wallpapers": "Fondos",
+ "status_stale": "Se muestra el último índice descargado: ahora mismo no se pudo llegar al registro.",
+ "status_unavailable": "No se pudo llegar al registro y todavía no hay nada guardado. Inténtalo otra vez cuando tengas conexión.",
+ "status_disabled": "El índice de la comunidad está desactivado en esta instalación.",
+ "shelf_wallpapers": "Fondos",
+ "shelf_wallpapers_hint": "Fondos de pantalla publicados por la comunidad",
+ "shelf_plugins": "Plugins",
+ "shelf_plugins_hint": "Conecta un servicio externo y sus herramientas",
+ "shelf_skills": "Skills",
+ "shelf_skills_hint": "Instrucciones que enseñan una nueva forma de trabajar",
+ "installed": "Instalado",
+ "entry_unreadable": "Esta versión no puede leer el manifiesto de esta entrada.",
+ "empty": "Todavía no hay nada publicado en esta categoría.",
+ "empty_search": "Nada coincide con «{query}».",
+ "empty_clear": "Borrar la búsqueda",
+ "publish_hint": "¿Has creado algo que merece compartirse? Publicar es un pull request al registro abierto.",
+ "publish_cta": "Publica el tuyo",
+ "close": "Cerrar",
+ "kind_plugin": "Plugin",
+ "kind_skill": "Skill",
+ "kind_wallpaper": "Fondo",
+ "unreviewed_note": "Publicado por alguien de la comunidad y fusionado por comprobaciones automáticas: nadie lo ha revisado a mano. Abajo están exactamente los archivos que se instalan.",
+ "view_source": "Abrir el repositorio de origen",
+ "files": "Archivos publicados",
+ "files_loading": "Leyendo el paquete publicado…",
+ "files_none": "Esta entrada no publica archivos de texto legibles.",
+ "files_truncated": "… recortado",
+ "install": "Instalar",
+ "already_installed": "Ya está instalado: lo encontrarás en su propia sección.",
+ "landed_title": "{title} instalado",
+ "landed_plugin": "Ya está en Plugins. Conéctalo para poder usarlo.",
+ "landed_skill": "Ya está en Skills y se puede usar enseguida.",
+ "landed_wallpaper": "Ya está en Fondo de pantalla: elígelo para aplicarlo.",
+ "landed_needs_connect": "Instalado, pero todavía no se puede usar: falta conectarlo.",
+ "landed_open": "Muéstramelo"
}
}
diff --git a/jarvis/ui/web/frontend/src/store/events.ts b/jarvis/ui/web/frontend/src/store/events.ts
index e36eef3104..cd55053e95 100644
--- a/jarvis/ui/web/frontend/src/store/events.ts
+++ b/jarvis/ui/web/frontend/src/store/events.ts
@@ -89,7 +89,11 @@ export type SectionId =
// stay reachable while the new surface grows into full parity.
| "agentic-ide-classic"
// The assistant's character: pick a mode, or build one by talking to it.
- | "modes";
+ | "modes"
+ // The Jarvis Marketplace, in the app: everything the community published —
+ // plugins, skills and wallpapers — browsable and installable in one place
+ // instead of scattered across three unrelated sections.
+ | "marketplace";
export const SECTION_IDS = [
"chats",
@@ -131,6 +135,7 @@ export const SECTION_IDS = [
"chat-workspace",
"agentic-ide-classic",
"modes",
+ "marketplace",
] as const satisfies readonly SectionId[];
export function isSectionId(value: unknown): value is SectionId {
@@ -198,6 +203,7 @@ export const SECTION_LABELS: Record<SectionId, string> = {
"chat-workspace": "Chat",
"agentic-ide-classic": "Terminal grid",
modes: "Modes",
+ marketplace: "Marketplace",
};
export interface EventItem {
diff --git a/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsx
new file mode 100644
index 0000000000..c1bbe8de6f
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsx
@@ -0,0 +1,278 @@
+/**
+ * Component tests for MarketplaceView — the storefront section.
+ *
+ * What is pinned here is what the section exists for: one search across all
+ * three published kinds, a detail drawer that shows the published files BEFORE
+ * an install button is reachable (this is unreviewed third-party content), and
+ * a landing that names where the thing went instead of a bare green tick.
+ *
+ * No jest-dom in this repo — assertions use toBeTruthy()/toBeNull().
+ */
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+// ViewHeader lives in ChatsView, which drags the whole chat surface into the
+// render; the view only needs its shape.
+vi.mock("@/views/ChatsView", () => ({
+ ViewHeader: ({
+ title,
+ subtitle,
+ right,
+ }: {
+ title: string;
+ subtitle?: string;
+ right?: React.ReactNode;
+ }) => (
+ <header>
+ <h2>{title}</h2>
+ {subtitle && <p>{subtitle}</p>}
+ {right}
+ </header>
+ ),
+}));
+
+const openExternalUrl = vi.fn();
+vi.mock("@/lib/openExternal", () => ({
+ openExternalUrl: (url: string) => openExternalUrl(url),
+}));
+
+import { MarketplaceView } from "@/views/MarketplaceView";
+import { setUiLanguage } from "@/i18n";
+import { useEventStore } from "@/store/events";
+import type { CommunityResponse } from "@/views/PluginsCommunity";
+
+const INDEX: CommunityResponse = {
+ status: "fresh",
+ revision: 24,
+ generated_at: "2026-08-17T12:58:53Z",
+ plugins: [
+ {
+ name: "sentry",
+ valid: true,
+ id: "sentry",
+ display_name: "Sentry",
+ description: "Errors, issues and releases from your Sentry projects",
+ category: "Developer",
+ logo_slug: "sentry",
+ logo_color: "362D59",
+ publisher: "octocat",
+ version: "1.0.0",
+ source_url: "https://github.com/PersonalJarvis/marketplace/tree/main/plugins/sentry",
+ auth: { mode: "hosted_mcp_oauth_dcr" },
+ installed: false,
+ },
+ ],
+ skills: [
+ {
+ name: "three-bullet-brief",
+ title: "Three Bullet Brief",
+ description: "Turns any topic into exactly three crisp bullets",
+ publisher: "octocat",
+ version: "1.0.0",
+ categories: ["productivity", "writing"],
+ source_url: "https://github.com/PersonalJarvis/marketplace",
+ raw_url: "https://raw.example/skills/three-bullet-brief/SKILL.md",
+ installed: false,
+ },
+ ],
+ wallpapers: [
+ {
+ name: "flooded-observatory",
+ title: "Flooded Observatory",
+ description: "A drowned observatory under a storm-lit sky",
+ publisher: "octocat",
+ version: "1.0.0",
+ categories: [],
+ source_url: "https://github.com/PersonalJarvis/marketplace",
+ raw_url: "https://example.test/wallpaper.webp",
+ thumb_url: "https://example.test/thumb.webp",
+ theme: "dark",
+ installed: false,
+ },
+ ],
+};
+
+const CONTENTS = {
+ kind: "skill" as const,
+ name: "three-bullet-brief",
+ title: "Three Bullet Brief",
+ root: "skills/three-bullet-brief",
+ files: [
+ {
+ path: "SKILL.md",
+ size: 812,
+ text: "---\nname: three-bullet-brief\n---\nWrite three bullets.",
+ truncated: false,
+ },
+ ],
+};
+
+function installFetchMock(overrides?: Partial<CommunityResponse>) {
+ const fetchMock = vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {
+ const url = String(input);
+ const method = init?.method ?? "GET";
+ if (url === "/api/marketplace/community" && method === "GET") {
+ return { ok: true, status: 200, json: async () => ({ ...INDEX, ...overrides }) } as Response;
+ }
+ if (url.endsWith("/contents")) {
+ return { ok: true, status: 200, json: async () => CONTENTS } as Response;
+ }
+ if (url === "/api/marketplace/community/install/three-bullet-brief") {
+ return {
+ ok: true,
+ status: 200,
+ json: async () => ({
+ ok: true,
+ kind: "skill",
+ id: "three-bullet-brief",
+ title: "Three Bullet Brief",
+ location: "skills/three-bullet-brief",
+ ready: true,
+ next_action: null,
+ }),
+ } as Response;
+ }
+ if (url === "/api/marketplace/community/install/sentry") {
+ return {
+ ok: false,
+ status: 502,
+ json: async () => ({ detail: "The registry did not answer in time." }),
+ } as Response;
+ }
+ throw new Error(`unexpected fetch: ${method} ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ return fetchMock;
+}
+
+function renderView() {
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });
+ return render(
+ <QueryClientProvider client={client}>
+ <MarketplaceView />
+ </QueryClientProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ openExternalUrl.mockReset();
+ setUiLanguage("en");
+});
+
+describe("MarketplaceView", () => {
+ it("shows all three published kinds in one storefront", async () => {
+ installFetchMock();
+ renderView();
+
+ expect(await screen.findByText("Sentry")).toBeTruthy();
+ expect(screen.getByText("Three Bullet Brief")).toBeTruthy();
+ expect(screen.getByText("Flooded Observatory")).toBeTruthy();
+ // The count in the subtitle covers every kind, not just the plugins.
+ expect(screen.getByText(/3 published entries/)).toBeTruthy();
+ });
+
+ it("searches across kinds at once", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+
+ fireEvent.change(screen.getByLabelText(/Search plugins/i), {
+ target: { value: "observatory" },
+ });
+
+ expect(screen.queryByText("Sentry")).toBeNull();
+ expect(screen.queryByText("Three Bullet Brief")).toBeNull();
+ expect(screen.getByText("Flooded Observatory")).toBeTruthy();
+ });
+
+ it("filters to one kind and says how many there are", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+
+ fireEvent.click(screen.getByRole("button", { name: /Skills 1/ }));
+
+ expect(screen.queryByText("Sentry")).toBeNull();
+ expect(screen.getByText("Three Bullet Brief")).toBeTruthy();
+ });
+
+ it("shows the published files before install is reachable", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+
+ fireEvent.click(screen.getByText("Three Bullet Brief"));
+
+ // The unreviewed-content warning and the real file are both on screen.
+ expect(await screen.findByText("SKILL.md")).toBeTruthy();
+ expect(screen.getByText(/nobody reviewed it by hand/i)).toBeTruthy();
+ expect(screen.getByRole("button", { name: "Install" })).toBeTruthy();
+ });
+
+ it("names where an installed entry landed and offers the way there", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+ fireEvent.click(screen.getByText("Three Bullet Brief"));
+ fireEvent.click(await screen.findByRole("button", { name: "Install" }));
+
+ expect(await screen.findByText(/Three Bullet Brief installed/)).toBeTruthy();
+ expect(screen.getByText(/It is in Skills now/)).toBeTruthy();
+
+ fireEvent.click(screen.getByRole("button", { name: "Show me" }));
+ await waitFor(() => {
+ expect(useEventStore.getState().activeSection).toBe("skills");
+ });
+ });
+
+ it("names the cause when an install fails", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+ fireEvent.click(screen.getByText("Sentry"));
+ fireEvent.click(await screen.findByRole("button", { name: "Install" }));
+
+ expect(
+ await screen.findByText("The registry did not answer in time."),
+ ).toBeTruthy();
+ });
+
+ it("says the catalogue is stale instead of pretending it is current", async () => {
+ installFetchMock({ status: "stale" });
+ renderView();
+
+ expect(
+ await screen.findByText(/could not be reached just now/i),
+ ).toBeTruthy();
+ });
+
+ it("speaks every locale, not only English", async () => {
+ installFetchMock();
+ setUiLanguage("de");
+ renderView();
+
+ // The German strings resolve from the locale file, including the count
+ // template whose {count} token this view fills itself.
+ expect(await screen.findByText(/3 veröffentlichte Einträge/)).toBeTruthy();
+ // The word appears twice on purpose — the filter chip and the shelf head
+ // name the same thing, and they must agree.
+ expect(screen.getAllByText("Hintergründe").length).toBe(2);
+ expect(screen.getByLabelText(/Plugins, Skills und Hintergründe/)).toBeTruthy();
+
+ setUiLanguage("es");
+ expect((await screen.findAllByText("Fondos")).length).toBe(2);
+ });
+
+ it("opens the public storefront in a real browser", async () => {
+ installFetchMock();
+ renderView();
+ await screen.findByText("Sentry");
+
+ fireEvent.click(screen.getByRole("button", { name: /Storefront/ }));
+
+ expect(openExternalUrl).toHaveBeenCalledWith("https://personaljarvis.ai/marketplace/");
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx
new file mode 100644
index 0000000000..644a255365
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx
@@ -0,0 +1,958 @@
+import { useEffect, useMemo, useState } from "react";
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import {
+ AlertTriangle,
+ ArrowRight,
+ Check,
+ ExternalLink,
+ FileText,
+ Loader2,
+ Package,
+ RefreshCw,
+ Search,
+ Sparkles,
+ Store,
+ Wand2,
+ X,
+} from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import { ViewHeader } from "@/views/ChatsView";
+import { useT } from "@/i18n";
+import { cn } from "@/lib/utils";
+import { openExternalUrl } from "@/lib/openExternal";
+import { useEventStore, type SectionId } from "@/store/events";
+import {
+ MARKETPLACE_SUBMIT_URL,
+ type CommunityPluginWire,
+ type CommunityResponse,
+ type CommunitySkillWire,
+ type CommunityWallpaperWire,
+ type EntryContentsWire,
+} from "@/views/PluginsCommunity";
+
+// ---------------------------------------------------------------------------
+// The Jarvis Marketplace, as a section of its own.
+//
+// Everything published by the community used to be reachable only by knowing
+// where to look: plugins behind the "Community" tab of Skills & Tools, skills
+// in a second list, wallpapers in a third screen entirely. Somebody who never
+// opened those three places never learned the marketplace exists.
+//
+// This screen is the storefront: one index, one search across all three kinds,
+// and — the part that matters — a landing that says where the thing WENT, with
+// a jump into the section that now holds it. Installing is not the end of the
+// errand; using the thing is.
+//
+// Everything here is UNREVIEWED third-party content. The registry auto-merges
+// submissions that pass automated checks, so every install goes through the
+// detail drawer, where the publisher, the source and the actual published
+// files are on screen before the button is reachable.
+// ---------------------------------------------------------------------------
+
+/** The public storefront — the same catalogue, on the web. */
+const MARKETPLACE_WEB_URL = "https://personaljarvis.ai/marketplace/";
+
+type Kind = "plugin" | "skill" | "wallpaper";
+type KindFilter = "all" | Kind;
+
+/** One entry of any kind, flattened into what the storefront draws. */
+interface Entry {
+ kind: Kind;
+ /** The registry name — the id every API route takes. */
+ name: string;
+ title: string;
+ description: string;
+ publisher?: string | null;
+ version?: string | null;
+ categories: string[];
+ sourceUrl?: string | null;
+ installed: boolean;
+ /** Wallpapers only — the published preview image. */
+ thumbUrl?: string | null;
+ /** Plugins only — the brand tile. */
+ logoUrl?: string | null;
+ logoColor?: string | null;
+ /** A plugin whose manifest this client could not read. */
+ broken?: boolean;
+ problem?: string | null;
+}
+
+/** Where an installed entry of this kind now lives in the app. */
+const HOME_SECTION: Record<Kind, SectionId> = {
+ plugin: "plugins",
+ skill: "skills",
+ wallpaper: "wallpaper",
+};
+
+function pluginEntry(p: CommunityPluginWire): Entry {
+ const raw = (p.logo_color ?? "").trim();
+ return {
+ kind: "plugin",
+ name: p.id ?? p.name,
+ title: p.display_name ?? p.name,
+ description: p.description ?? "",
+ publisher: p.publisher,
+ version: p.version,
+ categories: p.category ? [p.category] : [],
+ sourceUrl: p.source_url,
+ installed: Boolean(p.installed),
+ logoUrl:
+ p.logo_url ??
+ (p.logo_slug ? `https://cdn.simpleicons.org/${p.logo_slug}/F4F4F5` : null),
+ logoColor: /^[0-9a-fA-F]{6}$/.test(raw) ? `#${raw}` : null,
+ broken: !p.valid,
+ problem: p.error ?? null,
+ };
+}
+
+function skillEntry(s: CommunitySkillWire): Entry {
+ return {
+ kind: "skill",
+ name: s.name,
+ title: s.title || s.name,
+ description: s.description ?? "",
+ publisher: s.publisher,
+ version: s.version,
+ categories: s.categories ?? [],
+ sourceUrl: s.source_url,
+ installed: Boolean(s.installed),
+ };
+}
+
+function wallpaperEntry(w: CommunityWallpaperWire): Entry {
+ return {
+ kind: "wallpaper",
+ name: w.name,
+ title: w.title || w.name,
+ description: w.description ?? "",
+ publisher: w.publisher,
+ version: w.version,
+ categories: w.categories ?? [],
+ sourceUrl: w.source_url,
+ installed: Boolean(w.installed),
+ thumbUrl: w.thumb_url ?? w.raw_url ?? null,
+ };
+}
+
+function matches(entry: Entry, needle: string): boolean {
+ if (!needle) return true;
+ const hay = [
+ entry.title,
+ entry.name,
+ entry.description,
+ entry.publisher ?? "",
+ entry.categories.join(" "),
+ ]
+ .join(" ")
+ .toLowerCase();
+ return hay.includes(needle);
+}
+
+async function fetchCommunity(): Promise<CommunityResponse> {
+ const res = await fetch("/api/marketplace/community", { cache: "no-store" });
+ if (!res.ok) throw new Error(`Marketplace request failed (${res.status})`);
+ return res.json();
+}
+
+/** What `POST /community/install/{name}` answers — the honest landing report. */
+interface InstallResultWire {
+ ok: boolean;
+ kind: Kind;
+ id?: string;
+ title?: string;
+ location?: string;
+ state?: string;
+ ready?: boolean;
+ problem?: string | null;
+ next_action?: string | null;
+}
+
+export function MarketplaceView() {
+ const t = useT();
+ const queryClient = useQueryClient();
+ const [query, setQuery] = useState("");
+ const [kindFilter, setKindFilter] = useState<KindFilter>("all");
+ const [openEntry, setOpenEntry] = useState<Entry | null>(null);
+ const [landing, setLanding] = useState<InstallResultWire | null>(null);
+
+ const { data, isLoading, error } = useQuery({
+ queryKey: ["marketplace-community"],
+ queryFn: fetchCommunity,
+ });
+
+ const refresh = useMutation({
+ mutationFn: async (): Promise<CommunityResponse> => {
+ const res = await fetch("/api/marketplace/community/refresh", { method: "POST" });
+ if (!res.ok) throw new Error(`Refresh failed (${res.status})`);
+ return res.json();
+ },
+ onSuccess: (fresh) => queryClient.setQueryData(["marketplace-community"], fresh),
+ });
+
+ const install = useMutation({
+ mutationFn: async (entry: Entry): Promise<InstallResultWire> => {
+ const res = await fetch(
+ `/api/marketplace/community/install/${encodeURIComponent(entry.name)}`,
+ { method: "POST" },
+ );
+ if (!res.ok) {
+ const detail = await res
+ .json()
+ .then((body: { detail?: string }) => body.detail)
+ .catch(() => undefined);
+ // A failure names its cause — a bare "that did not work" is a bug.
+ throw new Error(detail ?? `Install failed (${res.status})`);
+ }
+ return res.json();
+ },
+ onSuccess: (result) => {
+ setOpenEntry(null);
+ setLanding(result);
+ // Everything that lists installed things must reflect the new arrival.
+ queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });
+ queryClient.invalidateQueries({ queryKey: ["marketplace-plugins"] });
+ queryClient.invalidateQueries({ queryKey: ["skills"] });
+ queryClient.invalidateQueries({ queryKey: ["wallpaper-catalog"] });
+ },
+ });
+
+ const entries = useMemo<Entry[]>(() => {
+ if (!data) return [];
+ return [
+ ...(data.plugins ?? []).map(pluginEntry),
+ ...(data.skills ?? []).map(skillEntry),
+ ...(data.wallpapers ?? []).map(wallpaperEntry),
+ ];
+ }, [data]);
+
+ const needle = query.trim().toLowerCase();
+ const visible = useMemo(
+ () =>
+ entries.filter(
+ (e) => (kindFilter === "all" || e.kind === kindFilter) && matches(e, needle),
+ ),
+ [entries, kindFilter, needle],
+ );
+
+ const wallpapers = visible.filter((e) => e.kind === "wallpaper");
+ const plugins = visible.filter((e) => e.kind === "plugin");
+ const skills = visible.filter((e) => e.kind === "skill");
+
+ const status = data?.status;
+ const offline = status === "stale" || status === "unavailable";
+
+ return (
+ <div className="relative flex h-full min-h-0 flex-col">
+ <ViewHeader
+ icon={<Store className="h-4 w-4 text-muted-foreground" />}
+ title={t("marketplace.title")}
+ subtitle={subtitleFor(t, data, isLoading)}
+ right={
+ <div className="flex items-center gap-2">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => refresh.mutate()}
+ disabled={refresh.isPending}
+ title={t("marketplace.refresh")}
+ >
+ <RefreshCw
+ className={cn("h-4 w-4", refresh.isPending && "animate-spin")}
+ />
+ </Button>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => openExternalUrl(MARKETPLACE_WEB_URL)}
+ >
+ {t("marketplace.open_web")}
+ <ExternalLink className="ml-1.5 h-3.5 w-3.5" />
+ </Button>
+ </div>
+ }
+ />
+
+ <div className="flex items-center gap-3 border-b border-border bg-background/60 px-6 py-3 backdrop-blur-sm">
+ <div className="relative min-w-0 flex-1">
+ <Search className="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
+ <input
+ value={query}
+ onChange={(event) => setQuery(event.target.value)}
+ placeholder={t("marketplace.search_placeholder")}
+ aria-label={t("marketplace.search_placeholder")}
+ className={cn(
+ "h-9 w-full rounded-md border border-border bg-background pl-9 pr-3",
+ "text-sm text-foreground placeholder:text-muted-foreground",
+ "outline-none transition-colors focus:border-primary/60",
+ )}
+ />
+ </div>
+ <FilterChips
+ active={kindFilter}
+ onChange={setKindFilter}
+ counts={{
+ all: entries.length,
+ plugin: entries.filter((e) => e.kind === "plugin").length,
+ skill: entries.filter((e) => e.kind === "skill").length,
+ wallpaper: entries.filter((e) => e.kind === "wallpaper").length,
+ }}
+ t={t}
+ />
+ </div>
+
+ {offline && (
+ <p className="flex items-center gap-2 border-b border-border bg-amber-500/10 px-6 py-2 text-xs text-amber-700 dark:text-amber-300">
+ <AlertTriangle className="h-3.5 w-3.5 shrink-0" />
+ {status === "unavailable"
+ ? t("marketplace.status_unavailable")
+ : t("marketplace.status_stale")}
+ </p>
+ )}
+
+ <ScrollArea className="min-h-0 flex-1">
+ <div className="px-6 py-5">
+ {isLoading && (
+ <p className="flex items-center gap-2 py-10 text-sm text-muted-foreground">
+ <Loader2 className="h-4 w-4 animate-spin" />
+ {t("marketplace.loading")}
+ </p>
+ )}
+
+ {error && !isLoading && (
+ <p className="flex items-center gap-2 py-10 text-sm text-destructive">
+ <AlertTriangle className="h-4 w-4" />
+ {(error as Error).message}
+ </p>
+ )}
+
+ {!isLoading && !error && visible.length === 0 && (
+ <EmptyState
+ query={query}
+ onClear={() => {
+ setQuery("");
+ setKindFilter("all");
+ }}
+ t={t}
+ />
+ )}
+
+ {wallpapers.length > 0 && (
+ <Shelf
+ title={t("marketplace.shelf_wallpapers")}
+ hint={t("marketplace.shelf_wallpapers_hint")}
+ count={wallpapers.length}
+ >
+ <div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
+ {wallpapers.map((entry) => (
+ <WallpaperTile
+ key={entry.name}
+ entry={entry}
+ onOpen={() => setOpenEntry(entry)}
+ t={t}
+ />
+ ))}
+ </div>
+ </Shelf>
+ )}
+
+ {plugins.length > 0 && (
+ <Shelf
+ title={t("marketplace.shelf_plugins")}
+ hint={t("marketplace.shelf_plugins_hint")}
+ count={plugins.length}
+ >
+ <EntryList
+ entries={plugins}
+ onOpen={setOpenEntry}
+ icon={(entry) => <BrandTile entry={entry} />}
+ t={t}
+ />
+ </Shelf>
+ )}
+
+ {skills.length > 0 && (
+ <Shelf
+ title={t("marketplace.shelf_skills")}
+ hint={t("marketplace.shelf_skills_hint")}
+ count={skills.length}
+ >
+ <EntryList
+ entries={skills}
+ onOpen={setOpenEntry}
+ icon={() => (
+ <div className="grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-border/60 bg-secondary/50">
+ <Wand2 className="h-4 w-4 text-muted-foreground" />
+ </div>
+ )}
+ t={t}
+ />
+ </Shelf>
+ )}
+
+ {!isLoading && !error && (
+ <PublishFooter t={t} />
+ )}
+ </div>
+ </ScrollArea>
+
+ {openEntry && (
+ <EntryDrawer
+ entry={openEntry}
+ onClose={() => setOpenEntry(null)}
+ onInstall={() => install.mutate(openEntry)}
+ installing={install.isPending}
+ installError={install.error ? (install.error as Error).message : null}
+ t={t}
+ />
+ )}
+
+ {landing && <LandingToast result={landing} onClose={() => setLanding(null)} t={t} />}
+ </div>
+ );
+}
+
+type Translate = (key: string) => string;
+
+/**
+ * Fill `{token}` placeholders in a translated string.
+ *
+ * The in-house i18n resolver interpolates exactly one token — the assistant's
+ * name — and takes no variables, so counts and titles are substituted here
+ * rather than by widening a resolver three locales and every view depend on.
+ */
+function fill(template: string, vars: Record<string, string | number>): string {
+ return template.replace(/\{(\w+)\}/g, (match, key: string) =>
+ key in vars ? String(vars[key]) : match,
+ );
+}
+
+/** "12 entries · index 24 · updated 4 days ago", or the honest alternative. */
+function subtitleFor(
+ t: Translate,
+ data: CommunityResponse | undefined,
+ loading: boolean,
+): string {
+ if (loading) return t("marketplace.loading");
+ if (!data) return "";
+ if (data.status === "disabled") return t("marketplace.status_disabled");
+ const total =
+ (data.plugins?.length ?? 0) + (data.skills?.length ?? 0) + (data.wallpapers?.length ?? 0);
+ const parts = [fill(t("marketplace.subtitle_count"), { count: total })];
+ if (data.revision != null) {
+ parts.push(fill(t("marketplace.subtitle_revision"), { revision: data.revision }));
+ }
+ if (data.generated_at) parts.push(formatDate(data.generated_at));
+ return parts.join(" · ");
+}
+
+function formatDate(iso: string): string {
+ const parsed = new Date(iso);
+ if (Number.isNaN(parsed.getTime())) return iso;
+ return parsed.toLocaleDateString(undefined, {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+ });
+}
+
+function FilterChips({
+ active,
+ onChange,
+ counts,
+ t,
+}: {
+ active: KindFilter;
+ onChange: (kind: KindFilter) => void;
+ counts: Record<KindFilter, number>;
+ t: Translate;
+}) {
+ const chips: { id: KindFilter; label: string }[] = [
+ { id: "all", label: t("marketplace.filter_all") },
+ { id: "plugin", label: t("marketplace.filter_plugins") },
+ { id: "skill", label: t("marketplace.filter_skills") },
+ { id: "wallpaper", label: t("marketplace.filter_wallpapers") },
+ ];
+ return (
+ <div className="flex shrink-0 items-center gap-1">
+ {chips.map((chip) => (
+ <button
+ key={chip.id}
+ type="button"
+ onClick={() => onChange(chip.id)}
+ aria-pressed={active === chip.id}
+ className={cn(
+ "rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",
+ active === chip.id
+ ? "bg-secondary text-foreground"
+ : "text-muted-foreground hover:bg-secondary/50 hover:text-foreground",
+ )}
+ >
+ {chip.label}
+ <span className="ml-1.5 tabular-nums opacity-60">{counts[chip.id]}</span>
+ </button>
+ ))}
+ </div>
+ );
+}
+
+/** A titled band of the storefront. Not a card — a heading and its row. */
+function Shelf({
+ title,
+ hint,
+ count,
+ children,
+}: {
+ title: string;
+ hint: string;
+ count: number;
+ children: React.ReactNode;
+}) {
+ return (
+ <section className="mb-8 last:mb-0">
+ <div className="mb-3 flex items-baseline gap-3">
+ <h3 className="font-display text-sm font-semibold tracking-tight text-foreground">
+ {title}
+ </h3>
+ <span className="text-xs tabular-nums text-muted-foreground">{count}</span>
+ <span className="min-w-0 truncate text-xs font-medium text-foreground/75">{hint}</span>
+ </div>
+ {children}
+ </section>
+ );
+}
+
+function WallpaperTile({
+ entry,
+ onOpen,
+ t,
+}: {
+ entry: Entry;
+ onOpen: () => void;
+ t: Translate;
+}) {
+ return (
+ <button
+ type="button"
+ onClick={onOpen}
+ className={cn(
+ "group relative block aspect-[16/10] w-full overflow-hidden rounded-xl",
+ "border border-border bg-secondary/40 text-left",
+ "transition-colors hover:border-primary/50",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",
+ )}
+ >
+ {entry.thumbUrl ? (
+ <img
+ src={entry.thumbUrl}
+ alt=""
+ loading="lazy"
+ className="h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"
+ />
+ ) : (
+ <div className="grid h-full w-full place-items-center">
+ <Sparkles className="h-5 w-5 text-muted-foreground" />
+ </div>
+ )}
+ <div className="absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/75 via-black/35 to-transparent p-3">
+ <p className="truncate text-sm font-medium text-white">{entry.title}</p>
+ {entry.publisher && (
+ <p className="truncate text-[11px] text-white/70">{entry.publisher}</p>
+ )}
+ </div>
+ {entry.installed && (
+ <span className="absolute right-2 top-2 flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-[10px] font-medium text-white backdrop-blur">
+ <Check className="h-3 w-3" />
+ {t("marketplace.installed")}
+ </span>
+ )}
+ </button>
+ );
+}
+
+function BrandTile({ entry }: { entry: Entry }) {
+ const [failed, setFailed] = useState(false);
+ return (
+ <div
+ className="grid h-10 w-10 shrink-0 place-items-center overflow-hidden rounded-lg border border-border/60"
+ style={{ backgroundColor: entry.logoColor ?? undefined }}
+ >
+ {failed || !entry.logoUrl ? (
+ <span
+ className={cn(
+ "text-sm font-semibold",
+ entry.logoColor ? "text-white/90" : "text-muted-foreground",
+ )}
+ >
+ {entry.title.slice(0, 1).toUpperCase()}
+ </span>
+ ) : (
+ <img
+ src={entry.logoUrl}
+ alt=""
+ loading="lazy"
+ className="h-5 w-5"
+ onError={() => setFailed(true)}
+ />
+ )}
+ </div>
+ );
+}
+
+/** Rows with a hairline between them — a list, deliberately not a grid of boxes. */
+function EntryList({
+ entries,
+ onOpen,
+ icon,
+ t,
+}: {
+ entries: Entry[];
+ onOpen: (entry: Entry) => void;
+ icon: (entry: Entry) => React.ReactNode;
+ t: Translate;
+}) {
+ return (
+ <div className="divide-y divide-border/70 overflow-hidden rounded-xl border border-border bg-card/60 backdrop-blur-sm">
+ {entries.map((entry) => (
+ <button
+ key={`${entry.kind}:${entry.name}`}
+ type="button"
+ onClick={() => onOpen(entry)}
+ className={cn(
+ "flex w-full items-center gap-3 px-3.5 py-3 text-left transition-colors",
+ "hover:bg-secondary/60 focus-visible:outline-none focus-visible:bg-secondary/60",
+ )}
+ >
+ {entry.broken ? (
+ <div className="grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-border/60 bg-muted">
+ <AlertTriangle className="h-4 w-4 text-muted-foreground" />
+ </div>
+ ) : (
+ icon(entry)
+ )}
+ <div className="min-w-0 flex-1">
+ <div className="flex items-center gap-2">
+ <span className="truncate text-sm font-semibold text-foreground">
+ {entry.title}
+ </span>
+ {entry.installed && (
+ <span className="flex shrink-0 items-center gap-1 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary">
+ <Check className="h-3 w-3" />
+ {t("marketplace.installed")}
+ </span>
+ )}
+ </div>
+ <p className="truncate text-xs text-muted-foreground">
+ {entry.broken
+ ? (entry.problem ?? t("marketplace.entry_unreadable"))
+ : entry.description}
+ </p>
+ </div>
+ <div className="hidden shrink-0 items-center gap-3 text-[11px] text-muted-foreground sm:flex">
+ {entry.publisher && <span className="truncate">{entry.publisher}</span>}
+ {entry.version && <span className="tabular-nums">v{entry.version}</span>}
+ </div>
+ <ArrowRight className="h-4 w-4 shrink-0 text-muted-foreground/50" />
+ </button>
+ ))}
+ </div>
+ );
+}
+
+function EmptyState({
+ query,
+ onClear,
+ t,
+}: {
+ query: string;
+ onClear: () => void;
+ t: Translate;
+}) {
+ return (
+ <div className="py-16 text-center">
+ <Package className="mx-auto mb-3 h-6 w-6 text-muted-foreground/60" />
+ <p className="text-sm text-muted-foreground">
+ {query ? fill(t("marketplace.empty_search"), { query }) : t("marketplace.empty")}
+ </p>
+ {query && (
+ <Button variant="ghost" size="sm" className="mt-3" onClick={onClear}>
+ {t("marketplace.empty_clear")}
+ </Button>
+ )}
+ </div>
+ );
+}
+
+function PublishFooter({ t }: { t: Translate }) {
+ return (
+ <div className="mt-10 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-dashed border-border bg-card/50 px-4 py-3 backdrop-blur-sm">
+ <p className="text-xs text-muted-foreground">{t("marketplace.publish_hint")}</p>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => openExternalUrl(MARKETPLACE_SUBMIT_URL)}
+ >
+ {t("marketplace.publish_cta")}
+ <ExternalLink className="ml-1.5 h-3.5 w-3.5" />
+ </Button>
+ </div>
+ );
+}
+
+/** The published bytes of one entry, fetched only when its drawer opens. */
+function useEntryContents(name: string | null) {
+ return useQuery({
+ queryKey: ["marketplace-community-contents", name],
+ enabled: name !== null,
+ staleTime: 5 * 60 * 1000,
+ queryFn: async (): Promise<EntryContentsWire> => {
+ const res = await fetch(
+ `/api/marketplace/community/${encodeURIComponent(name ?? "")}/contents`,
+ { cache: "no-store" },
+ );
+ if (!res.ok) throw new Error(`Could not read that entry (${res.status})`);
+ return res.json();
+ },
+ });
+}
+
+/**
+ * The trust boundary. Nothing installs from a list row — the publisher, the
+ * source repo and the actual published files are on screen first, because this
+ * is unreviewed third-party content and the person clicking deserves to see
+ * what they are about to run.
+ */
+function EntryDrawer({
+ entry,
+ onClose,
+ onInstall,
+ installing,
+ installError,
+ t,
+}: {
+ entry: Entry;
+ onClose: () => void;
+ onInstall: () => void;
+ installing: boolean;
+ installError: string | null;
+ t: Translate;
+}) {
+ const contents = useEntryContents(entry.name);
+ useEffect(() => {
+ const onKey = (event: KeyboardEvent) => {
+ if (event.key === "Escape") onClose();
+ };
+ window.addEventListener("keydown", onKey);
+ return () => window.removeEventListener("keydown", onKey);
+ }, [onClose]);
+ return (
+ <div className="absolute inset-0 z-40 flex justify-end">
+ <button
+ type="button"
+ aria-label={t("marketplace.close")}
+ onClick={onClose}
+ className="absolute inset-0 bg-background/70 backdrop-blur-sm"
+ />
+ <aside className="relative flex h-full w-full max-w-md flex-col border-l border-border bg-card shadow-2xl">
+ <header className="flex items-start gap-3 border-b border-border px-5 py-4">
+ <div className="min-w-0 flex-1">
+ <p className="text-[11px] uppercase tracking-wide text-muted-foreground">
+ {t(`marketplace.kind_${entry.kind}`)}
+ </p>
+ <h3 className="truncate font-display text-base font-semibold tracking-tight">
+ {entry.title}
+ </h3>
+ <p className="truncate text-xs text-muted-foreground">
+ {[entry.publisher, entry.version ? `v${entry.version}` : null]
+ .filter(Boolean)
+ .join(" · ")}
+ </p>
+ </div>
+ <Button variant="ghost" size="sm" onClick={onClose} aria-label={t("marketplace.close")}>
+ <X className="h-4 w-4" />
+ </Button>
+ </header>
+
+ <ScrollArea className="min-h-0 flex-1">
+ <div className="space-y-5 px-5 py-4">
+ {entry.thumbUrl && (
+ <img
+ src={entry.thumbUrl}
+ alt=""
+ className="w-full rounded-lg border border-border object-cover"
+ />
+ )}
+
+ {entry.description && (
+ <p className="text-sm leading-relaxed text-foreground/90">
+ {entry.description}
+ </p>
+ )}
+
+ {entry.categories.length > 0 && (
+ <div className="flex flex-wrap gap-1.5">
+ {entry.categories.map((category) => (
+ <span
+ key={category}
+ className="rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground"
+ >
+ {category}
+ </span>
+ ))}
+ </div>
+ )}
+
+ <p className="rounded-lg border border-border bg-secondary/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground">
+ {t("marketplace.unreviewed_note")}
+ </p>
+
+ {entry.sourceUrl && (
+ <Button
+ variant="outline"
+ size="sm"
+ className="w-full"
+ onClick={() => openExternalUrl(entry.sourceUrl as string)}
+ >
+ {t("marketplace.view_source")}
+ <ExternalLink className="ml-1.5 h-3.5 w-3.5" />
+ </Button>
+ )}
+
+ <div>
+ <h4 className="mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground">
+ <FileText className="h-3.5 w-3.5" />
+ {t("marketplace.files")}
+ </h4>
+ {contents.isLoading && (
+ <p className="flex items-center gap-2 text-xs text-muted-foreground">
+ <Loader2 className="h-3.5 w-3.5 animate-spin" />
+ {t("marketplace.files_loading")}
+ </p>
+ )}
+ {contents.error && (
+ <p className="text-xs text-destructive">
+ {(contents.error as Error).message}
+ </p>
+ )}
+ {contents.data && (
+ <div className="space-y-2">
+ {contents.data.files.length === 0 && (
+ <p className="text-xs text-muted-foreground">
+ {t("marketplace.files_none")}
+ </p>
+ )}
+ {contents.data.files.map((file) => (
+ <details
+ key={file.path}
+ className="rounded-lg border border-border bg-background/50"
+ >
+ <summary className="cursor-pointer select-none px-3 py-2 text-xs font-medium text-foreground">
+ {file.path}
+ <span className="ml-2 tabular-nums text-muted-foreground">
+ {file.size < 1024
+ ? `${file.size} B`
+ : `${(file.size / 1024).toFixed(1)} kB`}
+ </span>
+ </summary>
+ <pre className="max-h-64 overflow-auto border-t border-border px-3 py-2 text-[11px] leading-relaxed text-muted-foreground">
+ {file.text}
+ {file.truncated ? `\n${t("marketplace.files_truncated")}` : ""}
+ </pre>
+ </details>
+ ))}
+ </div>
+ )}
+ </div>
+ </div>
+ </ScrollArea>
+
+ <footer className="space-y-2 border-t border-border px-5 py-4">
+ {installError && (
+ <p className="flex items-start gap-2 text-xs text-destructive">
+ <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />
+ {installError}
+ </p>
+ )}
+ {entry.broken ? (
+ <p className="text-xs text-muted-foreground">
+ {entry.problem ?? t("marketplace.entry_unreadable")}
+ </p>
+ ) : entry.installed ? (
+ <p className="flex items-center gap-2 text-xs text-muted-foreground">
+ <Check className="h-3.5 w-3.5 text-primary" />
+ {t("marketplace.already_installed")}
+ </p>
+ ) : (
+ <Button className="w-full" onClick={onInstall} disabled={installing}>
+ {installing && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
+ {t("marketplace.install")}
+ </Button>
+ )}
+ </footer>
+ </aside>
+ </div>
+ );
+}
+
+/**
+ * Where the thing landed — and the way to it.
+ *
+ * An install that ends in a green tick leaves the person holding something they
+ * cannot find. This says what arrived, whether it is usable yet, and jumps to
+ * the section that now holds it.
+ */
+function LandingToast({
+ result,
+ onClose,
+ t,
+}: {
+ result: InstallResultWire;
+ onClose: () => void;
+ t: Translate;
+}) {
+ const setActiveSection = useEventStore((s) => s.setActiveSection);
+ const target = HOME_SECTION[result.kind] ?? "skills";
+ const ready = result.ready !== false;
+ return (
+ <div className="pointer-events-none absolute inset-x-0 bottom-0 z-50 flex justify-center p-5">
+ <div className="pointer-events-auto flex w-full max-w-lg items-start gap-3 rounded-xl border border-border bg-card px-4 py-3 shadow-xl">
+ <div
+ className={cn(
+ "grid h-8 w-8 shrink-0 place-items-center rounded-lg",
+ ready ? "bg-primary/15 text-primary" : "bg-amber-500/15 text-amber-600 dark:text-amber-400",
+ )}
+ >
+ {ready ? <Check className="h-4 w-4" /> : <AlertTriangle className="h-4 w-4" />}
+ </div>
+ <div className="min-w-0 flex-1">
+ <p className="text-sm font-medium text-foreground">
+ {fill(t("marketplace.landed_title"), { title: result.title ?? result.id ?? "" })}
+ </p>
+ <p className="text-xs text-muted-foreground">
+ {result.problem
+ ? result.problem
+ : ready
+ ? t(`marketplace.landed_${result.kind}`)
+ : t("marketplace.landed_needs_connect")}
+ </p>
+ </div>
+ <div className="flex shrink-0 items-center gap-1">
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={() => {
+ onClose();
+ setActiveSection(target);
+ }}
+ >
+ {t("marketplace.landed_open")}
+ </Button>
+ <Button size="sm" variant="ghost" onClick={onClose} aria-label={t("marketplace.close")}>
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx
index 0025408085..6595cbdadd 100644
--- a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx
+++ b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx
@@ -7,6 +7,7 @@ import {
Loader2,
RefreshCw,
Search,
+ Store,
Trash2,
UploadCloud,
} from "lucide-react";
@@ -16,6 +17,7 @@ import { cn } from "@/lib/utils";
import { installBlock } from "@/lib/installStandard";
import { openExternalUrl } from "@/lib/openExternal";
import { PRODUCT_NAME } from "@/lib/branding";
+import { useEventStore } from "@/store/events";
// ---------------------------------------------------------------------------
// Community marketplace tab.
@@ -98,6 +100,8 @@ export interface CommunityWallpaperWire {
categories: string[];
source_url?: string | null;
raw_url?: string | null;
+ /** The small preview the registry publishes next to the full image. */
+ thumb_url?: string | null;
theme?: string | null;
installed: boolean;
}
@@ -172,6 +176,9 @@ const AUTH_MODE_LABEL: Record<string, string> = {
export function CommunityTab() {
const queryClient = useQueryClient();
+ // The storefront section shows the same index with room to browse it; this
+ // tab keeps the plugin connect flow next to the installed plugins.
+ const setActiveSection = useEventStore((s) => s.setActiveSection);
const { data, isLoading, error } = useQuery({
queryKey: ["marketplace-community"],
queryFn: fetchCommunity,
@@ -335,6 +342,15 @@ export function CommunityTab() {
to before installing it.
</p>
</div>
+ <Button
+ size="sm"
+ variant="outline"
+ onClick={() => setActiveSection("marketplace")}
+ title="The whole marketplace — plugins, skills and wallpapers — in its own section"
+ >
+ <Store className="mr-1.5 h-3.5 w-3.5" />
+ Marketplace section
+ </Button>
<Button
size="sm"
variant="outline"