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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(ui): show what came from the marketplace, where it landed
Harald498ae4f64bca
diff --git a/jarvis/cli_ctl/commands/marketplace.py b/jarvis/cli_ctl/commands/marketplace.pyindex 395572f7ff..f8a8c45db4 100644--- a/jarvis/cli_ctl/commands/marketplace.py+++ b/jarvis/cli_ctl/commands/marketplace.py@@ -42,14 +42,21 @@ def _fail(exc: ApiError) -> typer.Exit:return typer.Exit(code=1)+#: Index section -> the kind a single entry of it is. One table, so adding a+#: published kind never leaves the lookup and the suggester disagreeing.+_SECTIONS: tuple[tuple[str, str], ...] = (+ ("skills", "skill"),+ ("plugins", "plugin"),+ ("wallpapers", "wallpaper"),+)++def _find_entry(index: dict[str, Any], item_id: str) -> tuple[str, dict[str, Any]] | None:- """Locate ``item_id`` in a community index payload as ("skill"|"plugin", entry)."""- for skill in index.get("skills") or []:- if skill.get("name") == item_id:- return "skill", skill- for plugin in index.get("plugins") or []:- if plugin.get("name") == item_id:- return "plugin", plugin+ """Locate ``item_id`` in a community index payload as (kind, entry)."""+ for section, kind in _SECTIONS:+ for entry in index.get(section) or []:+ if entry.get("name") == item_id:+ return kind, entryreturn None@@ -57,8 +64,11 @@ def _suggest(index: dict[str, Any], item_id: str) -> str:"""Closest existing name, phrased as a hint — or an empty string."""import difflib- names = [s.get("name", "") for s in index.get("skills") or []]- names += [p.get("name", "") for p in index.get("plugins") or []]+ names = [+ str(entry.get("name") or "")+ for section, _ in _SECTIONS+ for entry in index.get(section) or []+ ]close = difflib.get_close_matches(item_id, [n for n in names if n], n=1, cutoff=0.6)return f" Did you mean {close[0]!r}?" if close else ""@@ -71,14 +81,25 @@ _field = render.field# -----------------------------------------------------------------------_SKILL_BLURB = (- "A written instruction sheet for the assistant. It adds no server and no "- "login of its own."-)-_PLUGIN_BLURB = (- "A connector to an outside service. Installing it only puts it on your "- "list — it stays powerless until you connect your account."-)+_BLURBS = {+ "skill": (+ "A written instruction sheet for the assistant. It adds no server and "+ "no login of its own."+ ),+ "plugin": (+ "A connector to an outside service. Installing it only puts it on your "+ "list — it stays powerless until you connect your account."+ ),+ "wallpaper": (+ "A picture for the app background. It is re-encoded on the way in, "+ "exactly like one you would drag in yourself."+ ),+}+_LANDS_IN = {+ "skill": "your skills",+ "plugin": "your plugin list",+ "wallpaper": "your wallpapers",+}def _preview(kind: str, entry: dict[str, Any], item_id: str) -> None:@@ -92,12 +113,12 @@ def _preview(kind: str, entry: dict[str, Any], item_id: str) -> None:render.line()render.line(f"[bold]{title}[/bold] · {' · '.join(parts)}")render.line()- _field("What", _SKILL_BLURB if kind == "skill" else _PLUGIN_BLURB)+ _field("What", _BLURBS.get(kind, "A marketplace entry."))if entry.get("description"):_field("Does", str(entry["description"]))if entry.get("source_url"):_field("From", str(entry["source_url"]))- _field("Goes to", "your skills" if kind == "skill" else "your plugin list")+ _field("Goes to", _LANDS_IN.get(kind, "your library"))render.line()@@ -119,6 +140,11 @@ def _report_installed(payload: dict[str, Any]) -> int:_field("File", str(payload["location"]))if payload.get("ready"):+ if kind == "wallpaper":+ _field("Status", "in your wallpapers now — open Wallpaper to pick it")+ _field("From", "shown there as a Marketplace picture")+ render.line()+ return 0_field("Status","ready to use — Jarvis picked it up already, no restart needed",@@ -152,6 +178,10 @@ def _report_already_there(kind: str, item_id: str, client: Any) -> int:render.line(f"[green]Already installed:[/green] [bold]{item_id}[/bold]")render.line()_field("Kind", kind)+ if kind == "wallpaper":+ _field("Status", "in your wallpapers — open Wallpaper to pick it")+ render.line()+ return 0if kind == "skill":try:detail = client.request("GET", f"/api/skills/{item_id}")@@ -274,10 +304,10 @@ def browse() -> None:render.emit(index, as_json=json_out)returnpayload = index if isinstance(index, dict) else {}- for kind, key in (("Skills", "skills"), ("Plugins", "plugins")):- entries = payload.get(key) or []+ for section, _ in _SECTIONS:+ entries = payload.get(section) or []render.line()- render.line(f"[bold]{kind}[/bold] ({len(entries)})")+ render.line(f"[bold]{section.capitalize()}[/bold] ({len(entries)})")if not entries:render.line(" nothing published yet")continuediff --git a/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsx b/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsxnew file mode 100644index 0000000000..67d2da1084--- /dev/null+++ b/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsx@@ -0,0 +1,47 @@+import { Store } from "lucide-react";+import { translate } from "@/i18n";+import { cn } from "@/lib/utils";++/**+ * "This came from the marketplace."+ *+ * One component for all three kinds — a plugin card, a skill row, a wallpaper+ * tile — because the whole point is that the mark reads the same everywhere:+ * somebody who installed a skill yesterday should recognise the same badge on+ * a wallpaper today without being told.+ *+ * Colours come from theme tokens only, so it stays legible in light and dark+ * mode and over the wallpaper-tinted panes.+ */+export function MarketplaceBadge({+ publisher,+ compact = false,+ className,+}: {+ /** GitHub login of the publisher, when the entry carries one. */+ publisher?: string | null;+ /** Icon only — for a dense tile where a word would not fit. */+ compact?: boolean;+ className?: string;+}) {+ const label = translate("marketplace_origin.badge");+ const title = publisher+ ? `${translate("marketplace_origin.tooltip")} · ${publisher}`+ : translate("marketplace_origin.tooltip");+ return (+ <span+ title={title}+ aria-label={title}+ className={cn(+ "inline-flex shrink-0 items-center gap-1 rounded-full border border-primary/30",+ "bg-primary/10 text-primary",+ compact ? "px-1.5 py-0.5" : "px-2 py-0.5",+ "text-[10px] font-medium uppercase tracking-wide",+ className,+ )}+ >+ <Store className="h-3 w-3" aria-hidden />+ {!compact && <span>{label}</span>}+ </span>+ );+}diff --git a/jarvis/ui/web/frontend/src/hooks/useSkills.ts b/jarvis/ui/web/frontend/src/hooks/useSkills.tsindex 4607b9d02b..fa4783997d 100644--- a/jarvis/ui/web/frontend/src/hooks/useSkills.ts+++ b/jarvis/ui/web/frontend/src/hooks/useSkills.ts@@ -26,11 +26,22 @@ export const RESOURCE_LABELS: Record<ResourceKind, string> = {agents: "Agents",};+/** Where an installed skill came from. Null for one the owner wrote. */+export interface SkillOrigin {+ source: string;+ source_id: string;+ publisher: string | null;+ version: string | null;+ source_url: string | null;+ installed_at: string | null;+}+export interface SkillSummary {name: string;state: SkillState;is_builtin: boolean;error: string | null;+ origin?: SkillOrigin | null;description: string;category: string;version: string;diff --git a/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.ts b/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.tsindex 1f231df1a1..520cf35d20 100644--- a/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.ts+++ b/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.ts@@ -21,8 +21,14 @@ export interface WallpaperEntry {/*** True for a picture the owner uploaded. Those are the only wallpapers that* can be removed or re-themed, so the preview needs to know which it has.+ * An installed marketplace wallpaper lives in the same store and is an+ * upload in that sense: it can be re-themed and removed the same way.*/isUpload?: boolean;+ /** True for a picture installed from the community marketplace. */+ fromMarketplace?: boolean;+ /** GitHub login that published it, when the entry carried one. */+ publisher?: string | null;}export interface WallpaperStyle {diff --git a/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.ts b/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.tsindex 3516fd3926..f893bb930e 100644--- a/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.ts+++ b/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.ts@@ -3,17 +3,31 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import type { Theme } from "@/hooks/useTheme";import type { WallpaperEntry } from "@/hooks/useWallpaperCatalog";-/** One wallpaper the owner brought themselves, as the server reports it. */+/** One wallpaper outside the generated library, as the server reports it.+ *+ * Either the owner brought it (`source: "own"`) or they installed it from the+ * marketplace (`source: "marketplace"`, plus the entry it came from). Both+ * live in the same store, so both arrive through this list.+ */export interface WallpaperUpload {id: string;title: string;theme: Theme;createdAt: number;+ source?: string;+ sourceId?: string;+ publisher?: string | null;+ version?: string | null;+ sourceUrl?: string | null;}/** The filter slug and chip label the owner's own pictures live under. */export const UPLOAD_WALLPAPER_STYLE = "yours";+/** Installed marketplace pictures get their own chip, so "what did I just+ * install?" is one click rather than a hunt through five hundred tiles. */+export const MARKETPLACE_WALLPAPER_STYLE = "marketplace";+const UPLOADS_URL = "/api/wallpapers/uploads";const UPLOADS_KEY = ["wallpapers", "uploads"] as const;@@ -28,15 +42,18 @@ async function detail(response: Response, fallback: string): Promise<string> {return fallback;}-/** Present an upload the way the browse grid knows every other wallpaper. */+/** Present a stored picture the way the browse grid knows every other one. */export function uploadAsEntry(upload: WallpaperUpload): WallpaperEntry {+ const fromMarketplace = upload.source === "marketplace";return {id: upload.id,title: upload.title,- style: UPLOAD_WALLPAPER_STYLE,- styleLabel: "Yours",+ style: fromMarketplace ? MARKETPLACE_WALLPAPER_STYLE : UPLOAD_WALLPAPER_STYLE,+ styleLabel: fromMarketplace ? "Marketplace" : "Yours",theme: upload.theme,isUpload: true,+ fromMarketplace,+ publisher: upload.publisher ?? null,};}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex ae9af71624..bb92da19db 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -4267,5 +4267,10 @@"reveal_failed": "Die Datei konnte nicht im Ordner gezeigt werden.","open_from_agent": "Visualisierungen","open_from_agent_hint": "Zeigt als Graph, was die letzten Durchläufe getan und erzeugt haben."+ },+ "marketplace_origin": {+ "badge": "Marketplace",+ "tooltip": "Aus dem Marketplace installiert",+ "view_source": "Eintrag ansehen"}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 485b6b21bc..ddd56f1941 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -4267,5 +4267,10 @@"reveal_failed": "That file could not be shown in the folder.","open_from_agent": "Visuals","open_from_agent_hint": "Show what the latest runs did and produced, as a graph."+ },+ "marketplace_origin": {+ "badge": "Marketplace",+ "tooltip": "Installed from the marketplace",+ "view_source": "view listing"}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex ab1041e202..647eff6777 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -4267,5 +4267,10 @@"reveal_failed": "No se pudo mostrar el archivo en la carpeta.","open_from_agent": "Visuales","open_from_agent_hint": "Muestra como grafo lo que hicieron y produjeron las últimas ejecuciones."+ },+ "marketplace_origin": {+ "badge": "Marketplace",+ "tooltip": "Instalado desde el marketplace",+ "view_source": "ver publicación"}}diff --git a/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsxnew file mode 100644index 0000000000..3dcd660ea2--- /dev/null+++ b/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsx@@ -0,0 +1,150 @@+/**+ * What the app shows after something is installed from the marketplace.+ *+ * Installing used to be a one-way trip: the thing landed somewhere on disk and+ * no view could say it had arrived, let alone where it came from. These tests+ * pin the three places that now answer that — a plugin in Plugins, a skill in+ * Skills, a picture in Wallpaper — because "it installed fine" is worth+ * nothing to somebody who cannot find it.+ */+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";++import { PluginsView } from "@/views/PluginsView";+import { uploadAsEntry } from "@/hooks/useWallpaperUploads";++function client() {+ return new QueryClient({+ defaultOptions: { queries: { retry: false }, mutations: { retry: false } },+ });+}++const SEED_PLUGIN = {+ id: "github",+ display_name: "GitHub",+ description: "Repos, issues, pull requests and Actions runs",+ category: "Developer",+ logo_slug: "github",+ auth: { mode: "pat_paste" },+ status: "not_connected",+ source: "seed",+};++const INSTALLED_COMMUNITY_PLUGIN = {+ id: "todo-fox",+ display_name: "TodoFox",+ description: "Tasks and reminders from TodoFox",+ category: "Lists & Tasks",+ logo_slug: "todofox",+ auth: { mode: "pat_paste" },+ // The whole point: installed from the marketplace, not connected yet.+ status: "not_connected",+ source: "community",+ publisher: "octocat",+ version: "1.2.0",+};++function mockCatalog(plugins: unknown[]) {+ const fetchMock = vi.fn(async (input: RequestInfo | URL) => {+ const url = String(input);+ if (url === "/api/marketplace/plugins") {+ return {+ ok: true,+ status: 200,+ json: async () => ({+ version: 1,+ schema_version: "2026-05-09",+ total: plugins.length,+ connected: 0,+ plugins,+ }),+ } as Response;+ }+ throw new Error(`unexpected fetch ${url}`);+ });+ (globalThis as unknown as { fetch: typeof fetch }).fetch =+ fetchMock as unknown as typeof fetch;+}++afterEach(() => {+ cleanup();+ vi.restoreAllMocks();+});++describe("an installed community plugin is findable", () => {+ it("counts in the Installed tab even before it is connected", async () => {+ mockCatalog([SEED_PLUGIN, INSTALLED_COMMUNITY_PLUGIN]);+ render(+ <QueryClientProvider client={client()}>+ <PluginsView />+ </QueryClientProvider>,+ );++ // The shipped catalog is always "available", so a community plugin that+ // only showed up in Browse was indistinguishable from the ones the app+ // came with — Installed is where somebody looks for what they added.+ const installedTab = await screen.findByRole("button", { name: /^Installed\b/i });+ await waitFor(() => {+ expect(installedTab.textContent).toContain("1");+ });++ fireEvent.click(installedTab);+ await waitFor(() => {+ expect(screen.getByText("TodoFox")).toBeDefined();+ });+ // The seed plugin is NOT installed and must not have followed it in.+ expect(screen.queryByText("GitHub")).toBeNull();+ });++ it("marks it as coming from the marketplace, and leaves a seed plugin unmarked", async () => {+ mockCatalog([SEED_PLUGIN, INSTALLED_COMMUNITY_PLUGIN]);+ render(+ <QueryClientProvider client={client()}>+ <PluginsView />+ </QueryClientProvider>,+ );++ await waitFor(() => {+ expect(screen.getByText("TodoFox")).toBeDefined();+ });+ const marks = screen.getAllByLabelText(/Installed from the marketplace/i);+ expect(marks.length).toBe(1);+ expect(marks[0].textContent).toContain("Marketplace");+ // …and the publisher rides along in the title, so the mark answers+ // "from whom" and not just "from somewhere".+ expect(marks[0].getAttribute("title")).toContain("octocat");+ });+});++describe("wallpapers keep their two origins apart", () => {+ it("files an installed picture under Marketplace, not under Yours", () => {+ const installed = uploadAsEntry({+ id: "ua1b2c3d4e5f60718",+ title: "Moonlit Wave",+ theme: "dark",+ createdAt: 1,+ source: "marketplace",+ sourceId: "moonlit-wave",+ publisher: "octocat",+ });+ expect(installed.style).toBe("marketplace");+ expect(installed.styleLabel).toBe("Marketplace");+ expect(installed.fromMarketplace).toBe(true);+ expect(installed.publisher).toBe("octocat");+ // Removable and re-themeable like any stored picture.+ expect(installed.isUpload).toBe(true);+ });++ it("leaves a picture the owner brought as theirs", () => {+ const own = uploadAsEntry({+ id: "ub1b2c3d4e5f60718",+ title: "My Photo",+ theme: "light",+ createdAt: 2,+ });+ expect(own.style).toBe("yours");+ expect(own.styleLabel).toBe("Yours");+ expect(own.fromMarketplace).toBe(false);+ });+});diff --git a/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx b/jarvis/ui/web/frontend/src/views/PluginsView.test.tsxindex 5f49189170..7a5646b6a7 100644--- a/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsView.test.tsx@@ -791,6 +791,7 @@ describe("plugin search matches more than the display name", () => {status: "not_connected",longevity: "permanent",oauthClientConfigured: false,+ fromMarketplace: false,...extra,});@@ -855,6 +856,7 @@ describe("plugin status filter", () => {status,longevity: "permanent",oauthClientConfigured: false,+ fromMarketplace: false,});it("lets everything through on 'all'", () => {diff --git a/jarvis/ui/web/frontend/src/views/PluginsView.tsx b/jarvis/ui/web/frontend/src/views/PluginsView.tsxindex ebefe83ad5..3b897b0c5d 100644--- a/jarvis/ui/web/frontend/src/views/PluginsView.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsView.tsx@@ -27,6 +27,7 @@ import { ScrollArea } from "@/components/ui/scroll-area";import { Button } from "@/components/ui/button";import { BrandedSelect } from "@/components/ui/select";import { cn } from "@/lib/utils";+import { MarketplaceBadge } from "@/components/MarketplaceBadge";import { openExternalUrl } from "@/lib/openExternal";import { robustCopy } from "@/lib/clipboard";import { PRODUCT_NAME } from "@/lib/branding";@@ -119,6 +120,13 @@ interface CatalogPlugin {* reasons. Never carries provider error text. */reauth_reason?: ReauthReason | string | null;reauth_at?: string | null;+ /** "seed" for a plugin the app ships, "community" for one installed from+ * the marketplace. Drives the Marketplace mark and keeps an installed+ * community plugin in the Installed tab before it is ever connected. */+ source?: string;+ publisher?: string | null;+ version?: string | null;+ source_url?: string | null;}interface CatalogResponse {@@ -205,6 +213,10 @@ export interface Plugin {reauthReason?: ReauthReason | string;reauthAt?: string;oauthClientConfigured: boolean;+ /** True for a plugin installed from the community marketplace. */+ fromMarketplace: boolean;+ publisher?: string;+ sourceUrl?: string;}function adapt(p: CatalogPlugin): Plugin {@@ -227,6 +239,9 @@ function adapt(p: CatalogPlugin): Plugin {reauthReason: p.reauth_reason ?? undefined,reauthAt: p.reauth_at ?? undefined,oauthClientConfigured: p.oauth_client_configured ?? false,+ fromMarketplace: p.source === "community",+ publisher: p.publisher ?? undefined,+ sourceUrl: p.source_url ?? undefined,};}@@ -641,13 +656,20 @@ export function PluginsView() {// "Installed" keeps every plugin the user ever connected — including a revoked// (needs_reauth) or errored one — so a dead token surfaces a Reconnect prompt// here instead of silently dropping back into Browse as a plain "+".+ //+ // A plugin installed from the marketplace belongs here from the moment it is+ // installed, connected or not: the shipped catalog is always "available", so+ // a community plugin that only appeared in Browse was indistinguishable from+ // the twenty the app came with — somebody who had just installed one had no+ // place to look for it.const installed = useMemo(() =>allPlugins.filter((p) =>p.status === "connected" ||p.status === "needs_reauth" ||- p.status === "error",+ p.status === "error" ||+ p.fromMarketplace,),[allPlugins],);@@ -1621,6 +1643,9 @@ function PluginRow({<span>Error</span></span>)}+ {plugin.fromMarketplace && (+ <MarketplaceBadge publisher={plugin.publisher} />+ )}</div>{needsReauth ? (<ReauthExplanation plugin={plugin} />diff --git a/jarvis/ui/web/frontend/src/views/SkillsView.tsx b/jarvis/ui/web/frontend/src/views/SkillsView.tsxindex baf6979fb4..a343f53502 100644--- a/jarvis/ui/web/frontend/src/views/SkillsView.tsx+++ b/jarvis/ui/web/frontend/src/views/SkillsView.tsx@@ -37,6 +37,7 @@ import { ViewHeader } from "@/views/ChatsView";import { ScrollArea } from "@/components/ui/scroll-area";import { Button } from "@/components/ui/button";import { Badge } from "@/components/ui/badge";+import { MarketplaceBadge } from "@/components/MarketplaceBadge";import { Switch } from "@/components/ui/switch";import { BrandedSelect } from "@/components/ui/select";import { cn } from "@/lib/utils";@@ -605,6 +606,12 @@ function SkillRowDraggable({aria-label="Builtin"/>)}+ {skill.origin?.source === "marketplace" && (+ <MarketplaceBadge+ compact+ publisher={skill.origin.publisher}+ />+ )}</div>{skill.description && (<p className="mt-1 line-clamp-2 text-xs text-muted-foreground">@@ -976,10 +983,32 @@ function SkillDetailPanel({ name }: { name: string }) {builtin</Badge>)}+ {data.origin?.source === "marketplace" && (+ <MarketplaceBadge publisher={data.origin.publisher} />+ )}</div><p className="mt-1 text-xs text-muted-foreground">v{data.version} · {data.category} · {data.path}</p>+ {data.origin?.source === "marketplace" && (+ <p className="mt-1 text-xs text-muted-foreground">+ {t("marketplace_origin.tooltip")}+ {data.origin.publisher ? ` · ${data.origin.publisher}` : ""}+ {data.origin.source_url ? (+ <>+ {" · "}+ <a+ href={data.origin.source_url}+ target="_blank"+ rel="noreferrer"+ className="underline underline-offset-2 hover:text-foreground"+ >+ {t("marketplace_origin.view_source")}+ </a>+ </>+ ) : null}+ </p>+ )}</div><div className="flex items-center gap-3">{!isDraft && (diff --git a/jarvis/ui/web/frontend/src/views/WallpaperView.tsx b/jarvis/ui/web/frontend/src/views/WallpaperView.tsxindex 73d56869b4..e995297499 100644--- a/jarvis/ui/web/frontend/src/views/WallpaperView.tsx+++ b/jarvis/ui/web/frontend/src/views/WallpaperView.tsx@@ -9,12 +9,14 @@ import {Loader2,Moon,RotateCcw,+ Store,Sun,Trash2,Upload,X,} from "lucide-react";+import { translate } from "@/i18n";import { Button } from "@/components/ui/button";import { ScrollArea } from "@/components/ui/scroll-area";import { ViewHeader } from "@/views/ChatsView";@@ -28,6 +30,7 @@ import {uploadAsEntry,useUploadMutations,useWallpaperUploads,+ MARKETPLACE_WALLPAPER_STYLE,UPLOAD_WALLPAPER_STYLE,} from "@/hooks/useWallpaperUploads";import { useApplyWallpaper } from "@/hooks/useApplyWallpaper";@@ -290,6 +293,18 @@ function WallpaperTile({{item.styleLabel}</span></span>+ {/* Over artwork, not over a themed surface: this mark is deliberately+ white-on-scrim rather than a theme token, because the tile behind+ it is an arbitrary picture in either mode. */}+ {item.fromMarketplace && (+ <span+ className="pointer-events-none absolute right-2 top-2 inline-flex items-center gap-1 rounded-full bg-black/60 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide text-white backdrop-blur-sm"+ title={`${translate("marketplace_origin.tooltip")}${item.publisher ? ` · ${item.publisher}` : ""}`}+ >+ <Store className="h-2.5 w-2.5" aria-hidden />+ {translate("marketplace_origin.badge")}+ </span>+ )}</button><FavoriteButtonitem={item}@@ -371,6 +386,9 @@ function WallpaperPreview({<h3 className="truncate text-sm font-semibold">{item.title}</h3><p className="truncate text-xs text-muted-foreground">{item.styleLabel} · {item.theme === "dark" ? "Dark" : "Light"}+ {item.fromMarketplace+ ? ` · ${translate("marketplace_origin.tooltip")}${item.publisher ? ` · ${item.publisher}` : ""}`+ : ""}</p></div>{/* Only an upload can be re-themed: the library's own light/dark comes@@ -519,17 +537,25 @@ export function WallpaperView() {reconcile((id) => items.find((item) => item.id === id)?.theme ?? null);}, [data, items, reconcile]);+ // Two chips, not one: a picture the owner brought and one they installed are+ // different answers to "where did this come from", and somebody who just+ // installed one needs a single click to find it among five hundred tiles.const styles = useMemo(() => {const known = data?.styles ?? [];- if (!ownEntries.length) return known;- const chip = {- slug: UPLOAD_WALLPAPER_STYLE,- label: "Yours",- count: ownEntries.length,- };+ const own = ownEntries.filter((entry) => !entry.fromMarketplace).length;+ const installed = ownEntries.length - own;+ const chips = [+ own > 0 && { slug: UPLOAD_WALLPAPER_STYLE, label: "Yours", count: own },+ installed > 0 && {+ slug: MARKETPLACE_WALLPAPER_STYLE,+ label: "Marketplace",+ count: installed,+ },+ ].filter(Boolean) as { slug: string; label: string; count: number }[];+ if (!chips.length) return known;const [bundled, ...rest] = known;- return bundled ? [bundled, chip, ...rest] : [chip, ...known];- }, [data?.styles, ownEntries.length]);+ return bundled ? [bundled, ...chips, ...rest] : [...chips, ...known];+ }, [data?.styles, ownEntries]);const favoriteIds = useMemo(() => new Set(favorites), [favorites]);// Counted against the catalog, not against the stored list: an id left over