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): remove wallpapers from the app and the marketplace
rubenluetke10-beep7a96979a7480
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7bcaf0456b..de98f31fad 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,13 @@ versioning per [SemVer](https://semver.org/).- Center API Keys settings and show provider cards in two columns when thewindow is wide enough, with a single column in narrower windows.+### Removed++- Remove wallpapers. The app always paints its flat theme colour; the+ Wallpaper page in Settings, the bundled pictures, the wallpaper library+ download and uploads are gone. The marketplace no longer lists, installs+ or publishes wallpapers — it carries plugins and skills only.+---## [2.3.2] — 2026-09-23diff --git a/docs/agent-society/world-masterplan-v2.md b/docs/agent-society/world-masterplan-v2.mdindex dc5b323cfb..29b63bd834 100644--- a/docs/agent-society/world-masterplan-v2.md+++ b/docs/agent-society/world-masterplan-v2.md@@ -189,7 +189,7 @@ a silhouette, a job for the agents, a job for the player, and live signals. Two| Skills & Tools → **Plugins** | **Plugin Docks** | a row of loading bays with roll-up doors, one per installed plugin | a plugin tool is in use (Gmail, calendar, …) | opens plugins; hover a bay = plugin name | bay door open + light when its plugin is active; red lamp on error || Skills & Tools → **MCPs** | **Relay Tower** | slim tower with a rotating dish and cable spans to the docks | an MCP server call | opens MCPs | dish spins during calls; connection state as ring colour || **CLIs & CLI Test Hub** | **Terminal Cantina** | café with a long counter of glowing terminals under an awning | a coding session runs on a CLI seat (Claude Code, Codex, …) — the agent sits at a terminal | opens the Agentic IDE / that session | one terminal lit per live session, provider mark on the awning |-| **Marketplace** | **Bazaar** | open market stalls in the square's outer band, canopies in provider colours | a package is being installed/published | opens the marketplace; a stall = a category (skills, plugins, wallpapers) | new arrivals as crates; a "Featured" banner |+| **Marketplace** | **Bazaar** | open market stalls in the square's outer band, canopies in provider colours | a package is being installed/published | opens the marketplace; a stall = a category (skills, plugins) | new arrivals as crates; a "Featured" banner || **Local models** | **Model Foundry** | round power-plant with cooling fins and a core light | local inference runs (the agent's brain is local) | opens local models | core glows by load; smoke when hot (also the VRAM-degrade trigger) || **API Keys** | **Vault** | small solid bank with a round door | never (agents do not touch keys — AP-2/AP-12) | opens API keys | door lamp green when the tier has a working key || **Wiki / memory** | **Archive** (exists) | round tower, dome | knowledge writes / reviewed promotion | opens the wiki | lamp when writing; a queue of scrolls for unreviewed knowledge |diff --git a/docs/architecture-overview.md b/docs/architecture-overview.mdindex f8e302e329..49192981e1 100644--- a/docs/architecture-overview.md+++ b/docs/architecture-overview.md@@ -54,7 +54,7 @@ subprocess flicker, audio host-API) are catalogued there.| **Channels (Web / Telegram / Discord)** | ✅ | `jarvis/channels/` (`base.py` ChannelAdapter, `manager.py`, `bootstrap.py` `bootstrap_channels`, `chat_bridge.py`, `web.py`/`telegram.py`/`discord.py`). Bridges a DM/guild message into the normal Jarvis chat path. Entry points `web` (base), `telegram` (base dep `python-telegram-bot`), `discord` (optional `[channels]` extra, lazy-imported, graceful `ChannelStartError` when absent). Tokens via the OS credential store. || **Friends + Socials** | ✅ | `jarvis/friends/` (`registry.py` `FriendRegistry` on `aiosqlite`, `status_publisher.py`, `status_filter.py`, `messages.py`, `schemas.py`). Routes `friends_routes.py` + `socials_routes.py`; views `FriendsView.tsx`, `frontend/src/views/friends/` + `socials/`. Telegram channel is the live transport (F-FRIENDS F0/F1). || **Contacts + Telephony** | ✅ | `jarvis/contacts/` (`store.py`, `schema.py`, `notify.py`) — contacts mirror to guaranteed Wiki person pages `people/<slug>.md` on `ContactChanged` (PII stays out of the page). Tools `contact-lookup` (safe), `contact-upsert` (monitor, write), `call-contact` (ask, echo-confirm). `jarvis/telephony/` (`outbound.py`, `twiml.py`, `provisioning.py`, `security.py`, `session.py`) places real outbound calls via Twilio. **Twilio is the optional `[telephony]` extra** — routes (`telephony_routes.py`) + `TelephonyManager` degrade gracefully when absent (AD-T8). Views `TelephonyView.tsx`, `frontend/src/views/contacts/`. |-| **Marketplace plugins** | ✅ | `jarvis/marketplace/` (catalog + `auth/` OAuth + `oauth_callback_server.py` + `plugin_loader.py`/`plugin_registry.py`/`plugin_relevance.py` + `mcp_bridge.py`). The `plugin-tools` entry-point loader expands connected marketplace plugins into live brain tools. Native REST tools where a catalog transport was insufficient: `gmail` (`gmail_rest`, ask — send is consequential) + `vercel` (`vercel_rest`, monitor — read-only). Router-tier, never a spawn (AP-5/AP-14). Route `marketplace_routes.py`; views `MarketplaceView.tsx` (the storefront section: the community index for plugins, skills and wallpapers under one search), `PluginsView.tsx`, `ExtensionsView.tsx`. |+| **Marketplace plugins** | ✅ | `jarvis/marketplace/` (catalog + `auth/` OAuth + `oauth_callback_server.py` + `plugin_loader.py`/`plugin_registry.py`/`plugin_relevance.py` + `mcp_bridge.py`). The `plugin-tools` entry-point loader expands connected marketplace plugins into live brain tools. Native REST tools where a catalog transport was insufficient: `gmail` (`gmail_rest`, ask — send is consequential) + `vercel` (`vercel_rest`, monitor — read-only). Router-tier, never a spawn (AP-5/AP-14). Route `marketplace_routes.py`; views `MarketplaceView.tsx` (the storefront section: the community index for plugins and skills under one search), `PluginsView.tsx`, `ExtensionsView.tsx`. || **Workflows** | ✅ | `jarvis/workflows/` (`runner.py`, `scheduler.py`, `store.py`, `schema.sql`, `seed.py`). Imperative cron/manual-triggered multi-step pipelines (brain-prompt / harness-dispatch / shell / tool-call / speak steps) — distinct from Phase-6 *missions* (single persistent self-healing action). Route `workflows_routes.py` (CRUD); `bootstrap_workflows` on `app.state`. View `WorkflowsView.tsx`. || **Conductor** | ✅ | **Separate root package `conductor/`** (`api/`, `core/`, `jobs/`, `seed/`, `cli.py`) with its own SQLite store — a YAML-first agentic-workflow canvas (shell/http/agent jobs, cron/webhook/manual triggers, timeline view). Jarvis mounts the Conductor router inside its own FastAPI server → `ConductorView.tsx`. Do not confuse with **Workflows** (imperative, in-`jarvis/`) — Conductor is YAML-first and standalone-capable. || **Jarvis-Agents / Outputs** | ✅ | `jarvis/agents/registry.py` builds an in-RAM agent event tree from the EventBus (harness/Brain/Tool signals; TTL-cached, no DB) → `sub_agents_routes.py` (`/api/sub-agents/tree`) + `SubAgentsView.tsx`. **Outputs** (`outputs_routes.py` + `OutputsView.tsx`) list a mission's *deliverables* from the filesystem (`<repo_parent>/sub-agents-outputs/<slug>/`, NOT a DB). An "artifact" is a `.md`/PDF/HTML/code file a worker produced. Per-artifact download (`Content-Disposition` attachment) / view (server-rendered markdown→HTML under a strict `default-src 'none'` CSP) / desktop-only reveal+open-with-default-app via `jarvis/platform/open_path.py`; native actions are off on headless/VPS (`native_file_actions` launcher flag). |diff --git a/docs/commands-reference.md b/docs/commands-reference.mdindex 560c4e0da7..be977f6b29 100644--- a/docs/commands-reference.md+++ b/docs/commands-reference.md@@ -293,7 +293,7 @@ Return the effective live Brain tool surface, including native, connected CLI, M## `marketplace-browse` — Browse the marketplace-List everything the community marketplace publishes — skills, plugins and wallpapers — with the exact name of each entry and whether it is already installed. Use this to find the name before installing, and to answer 'what is there to install'.+List everything the community marketplace publishes — skills and plugins — with the exact name of each entry and whether it is already installed. Use this to find the name before installing, and to answer 'what is there to install'.- **Endpoint:** `GET /api/marketplace/community`- **Arguments:** none@@ -303,13 +303,13 @@ List everything the community marketplace publishes — skills, plugins and wall## `marketplace-install` — Install from the marketplace-Install ONE published marketplace entry by its exact name. The kind is resolved by the app, so the same command installs a skill, a plugin or a wallpaper. What the user gets differs and the answer must say so: a skill is usable right away, a wallpaper lands in the wallpaper picker, a plugin only lands on the plugin list and stays powerless until the user connects their account. Look the name up with marketplace-browse first rather than guessing it; report the result the tool returns.+Install ONE published marketplace entry by its exact name. The kind is resolved by the app, so the same command installs a skill or a plugin. What the user gets differs and the answer must say so: a skill is usable right away, a plugin only lands on the plugin list and stays powerless until the user connects their account. Look the name up with marketplace-browse first rather than guessing it; report the result the tool returns.- **Endpoint:** `POST /api/marketplace/community/install/{item_id}`- **Arguments:** `item_id` (string; required)- **Requires confirmation:** yes- **Desktop UI section:** `plugins`-- **Voice example (EN):** "install that wallpaper"+- **Voice example (EN):** "install that skill"## `dictation-start` — Start dictationdiff --git a/docs/jarvis-cli-reference.md b/docs/jarvis-cli-reference.mdindex 8ad264559e..17f83512be 100644--- a/docs/jarvis-cli-reference.md+++ b/docs/jarvis-cli-reference.md@@ -152,7 +152,7 @@ _Generated from the curated command tree by `scripts/ci/gen_cli_reference.py`- `jarvis marketplace connect-poll <plugin_id> <flow_id>` — Poll an in-progress OAuth connect flow.- `jarvis marketplace connect-start <plugin_id> --yes --dry-run` — Begin an OAuth connect flow (prints the redirect URI + flow id).- `jarvis marketplace disconnect <plugin_id> --yes --dry-run` — Disconnect a plugin.-- `jarvis marketplace install <item_id> --yes --dry-run` — Install a marketplace entry by name — skill, plugin or wallpaper — and report it.+- `jarvis marketplace install <item_id> --yes --dry-run` — Install a marketplace entry by name — skill or plugin — and report it.- `jarvis marketplace list` — List marketplace plugins + their connection status.## mcpsdiff --git a/docs/jarvis-cli.md b/docs/jarvis-cli.mdindex dfc23e78be..900fc6da91 100644--- a/docs/jarvis-cli.md+++ b/docs/jarvis-cli.md@@ -89,8 +89,7 @@ jarvis missions list # rich table, for humans## Installing from the marketplaceA marketplace page prints one line to copy. It works for every kind of entry —-skills, plugins and wallpapers — and you never have to know which one you are-looking at:+skills and plugins — and you never have to know which one you are looking at:```bashjarvis marketplace install three-bullet-brief@@ -100,14 +99,14 @@ jarvis marketplace browse # everything on offer + what youAt a terminal the command first shows what the entry is and where it comes from,asks once, and then says plainly what happened. What "installed" is worth differsper kind, and the answer says which one you got: a skill that validated is usable-immediately, a wallpaper is in your picker straight away, and a plugin lands on-your list but stays powerless until you connect your account. **Exit code 1 means+immediately, and a plugin lands on your list but stays powerless until you+connect your account. **Exit code 1 means"not usable"**: an unknown name, a declined prompt, or a skill whose file failedvalidation. Piped or with `--json` it skips the prose and the prompt and printsthe API payload (`POST /api/marketplace/community/install/<name>`).-The same install is reachable by just asking for it — "install the wallpaper-rain-antenna-city" — because both the browse and the install are Command-Registry+The same install is reachable by just asking for it — "install the skill+three-bullet-brief" — because both the browse and the install are Command-Registryentries (`marketplace-browse`, `marketplace-install`), so the assistant can lookthe name up and then install it. Installing pulls somebody else's publishedcontent onto your machine, so that path asks you to confirm out loud first.diff --git a/docs/marketplace/wallpapers-lane.md b/docs/marketplace/wallpapers-lane.mddeleted file mode 100644index e36a4b2d3d..0000000000--- a/docs/marketplace/wallpapers-lane.md+++ /dev/null@@ -1,172 +0,0 @@-# The wallpapers lane — community images, notice-and-action--**Status:** built 2026-08-14, converted from pre-moderation to-notice-and-action 2026-08-15, given an in-app publish surface 2026-08-15.-Live in the registry and the feed; the storefront's app-facing half awaits-the push listed at the end. **Related:**-[community-registry.md](community-registry.md),-[install-standard.md](install-standard.md),-[validator-parity.md](validator-parity.md).--## What changed, and why--The lane originally inverted the marketplace's trust model: every wallpaper-waited in a private queue until the maintainer approved it by hand. The-reasoning was sound — no pattern list recognizes a hateful or illegal-picture — but the cost was not payable. Pre-moderation puts one person in-front of every upload forever, and it makes that person look at exactly the-images the queue exists to stop.--So the lane now publishes automatically, like plugins and skills, and moves-its safeguard behind publication. This is the model the law actually asks of-a host: a platform is not liable for what users upload, but becomes liable-for what it leaves up after being told (DSA Art. 6 and 16). Prior inspection-is not required; prompt removal is.--**The trade accepted here is real and should be stated plainly:** a hateful-or illegal image can be publicly reachable under the project's name until-somebody reports it. What buys that back is the speed and completeness of-removal, so anything that slows a takedown is a defect in this lane, not a-nice-to-have.--## The pipeline, end to end--```-uploader — two surfaces, one endpoint, one identity:- storefront form GitHub session cookie + optional Turnstile- desktop picker GitHub device-flow token (Bearer), no Turnstile- │ re-encode before upload: 4K cap, EXIF stripped, WebP- │ (browser: canvas · app: Pillow, jarvis/marketplace/publish.py)- │ machine checks: magic bytes, 8 MB cap, license allowlist,- │ daily per-account quota, rights statement- ▼-PUBLIC registry PersonalJarvis/marketplace- submissions/<name>.json + wallpapers/<name>/wallpaper.<ext>- │ validate (CI) → expand (ledger) → build: Pillow RE-ENCODE + thumbnail- ▼-GitHub Pages feed …/marketplace/index.json wallpapers[] + image bytes- │- ├── storefront gallery /marketplace/wallpapers (live fold-in)- ├── app wallpaper picker "Community" chip, browse + one-click add- ├── app import route POST /api/marketplace/community/wallpapers/{name}/install- └── CLI jarvis marketplace install <name>-- report link on every detail page → registry issue- maintainer /marketplace/wallpapers/moderate → one-click delist- │ removes submissions/<name>.json, then the image- ▼ next Pages build drops it from the feed and every surface-```--## What actually protects the lane--1. **Identity on every upload.** A GitHub sign-in is required and the- publisher is derived from the verified identity, never from the form. An- abusive uploader is a named account, not an anonymous POST. Two ways to- prove that identity, one standard of proof: a session cookie our own- callback signed, or a Bearer token verified to belong to OUR GitHub App- before it counts as anything (`checkTokenBelongsToApp` — a token minted by- a foreign app is not evidence, however valid it is for GitHub). Turnstile- is skipped on the Bearer path only: the app cannot render the widget, and- an interactive device-flow approval is the stronger gate. The quota- applies to both.-2. **A per-account daily quota** (3/day, `MAX_SUBMISSIONS_PER_DAY`), counted- from the registry's own commit history. Without a human gate this is the- main brake on a flood, so it is load-bearing rather than hygiene.-3. **An explicit rights and legality statement**, recorded in the submission- the uploader publishes under their own name. The upload form says plainly- that nobody checks it first — a form implying later review would make the- statement feel optional.-4. **Bytes are always re-produced.** The uploader side re-encodes before- upload — the browser with a canvas, the app with Pillow — and the registry- build re-encodes a third time before anything reaches Pages. No byte an- uploader crafted is served as-is. This never judged the depiction and- still does not; it stops payloads, not pictures. The app's route takes an- upload ID rather than image bytes, so what is published is the picture the- owner is looking at, already sanitized when it entered the picker.-5. **A fast, complete takedown.** Every detail page carries a report link;- `/marketplace/wallpapers/moderate` lists everything published with a- two-click Delist. Deletion order mirrors publication in reverse — the- listing first, then the image — so a half-failure leaves an unreachable- orphan rather than a listing pointing at nothing.--Because the upload form commits the image and the listing together, a-wallpaper pull request can only ever carry one of the two. `automerge_gate.py`-therefore still refuses `kind=wallpaper`, pinned by `scripts/test_wallpapers.py`-— not as a moderation gate any more, but so a listing whose picture is-missing never merges.--## The "Add Wallpaper to Personal Jarvis" button--Unchanged by this conversion. The storefront button POSTs to the running app-at `127.0.0.1:47821/api/marketplace/community/wallpapers/{name}/install`.-`SurfaceSecurity` admits **exactly this path from exactly the configured-storefront origin** (`marketplace.storefront_origin`, default-`https://personaljarvis.ai`, empty string closes the door) — including the-private-network preflight Chrome requires. It deliberately does NOT add the-storefront to the general trusted origins: a compromised storefront must-never be worth more than "a community wallpaper appeared in the picker".-The app resolves the name against the published feed itself; the website can-not hand it a URL. Fallback when no app answers: the three install-standard-surfaces (CLI / uvx / assistant prompt).--Imports land in the existing uploads store with an `origin:-community:<name>` marker (dedupe + future "installed" badges) and show up in-the picker under "Yours". Note the consequence of automatic publication: a-delisted wallpaper disappears from the feed but stays on machines that-already imported it. Removal is not retroactive.--## Who owns what--| Piece | Repo | Key files |-| --- | --- | --- |-| Feed model, import route, storefront door, CLI | PersonalJarvis (app) | `jarvis/marketplace/community_source.py`, `jarvis/ui/web/marketplace_routes.py`, `jarvis/ui/web/surface_security.py`, `jarvis/cli_ctl/commands/marketplace.py` |-| In-app publish + community browsing | PersonalJarvis (app) | `jarvis/marketplace/publish.py`, `jarvis/ui/web/marketplace_publish_routes.py`, `jarvis/ui/web/frontend/src/views/WallpaperView.tsx`, `.../components/wallpaper/PublishWallpaperDialog.tsx`, `.../hooks/useCommunityWallpapers.ts` |-| Validation, never-auto-merge, ledger, site build | marketplace (registry) | `scripts/validate.py`, `scripts/automerge_gate.py`, `scripts/build_index.py`, `scripts/test_wallpapers.py` |-| Gallery, upload, moderation UI, publish + delist functions | personal-jarvis-webui (storefront) | `src/pages/marketplace/wallpapers/*`, `functions/api/marketplace/submit-wallpaper.ts`, `functions/api/marketplace/wallpapers/*`, `functions/_lib/wallpapers.ts` |--Rules that must move together across repos: the `kind` enum (schema,-`validate.py`, `expand.py`, app), the name regex, the license allowlist-(`WALLPAPER_LICENSES` → `rules.json` → storefront), and the install-command-strings (`install_standard.py` ↔ `src/lib/wallpapers-client.ts`).--## Activation checklist (maintainer)--Measured against the live services on 2026-08-15, not against the clones:--1. **Registry — done.** `index.json` is at revision 13 and carries- `wallpapers[]` with three CC0 seeds; every image URL resolves.-2. **Storefront — deployed, one commit behind.**- `POST /api/marketplace/submit-wallpaper` answers **401** (it exists and- demands identity), but the deployed revision is the PRE-conversion one: it- still writes to the private inbox repo and accepts a browser session only.- The local `remake` clone holds two commits it has not seen — the- notice-and-action rewrite, and the Bearer path the desktop app needs.- **Until that push, in-app wallpaper publishing answers 401 and the- picker's Share button is the only part that works.**-3. **App — done and committed on main.** The picker browses the community- lane and offers Share; the button hides itself when- `publish_wallpaper_endpoint` is empty, so a fork without the lane shows- nothing broken.--The private `marketplace-inbox` repo is obsolete once step 2 ships. Nothing-in the current code reads or writes it.--## Residual risks, stated honestly--- **An illegal image is public until reported.** This is the accepted trade,- not an oversight. The report link, the moderation page and the delist- endpoint exist to make the exposure window short; keep all three working.-- **Child sexual abuse material is the one case where removal is not- enough.** Delist it, do not forward or archive it, and report the incident- to the police or a hotline (in Germany: jugendschutz.net / BKA). Every- other category is handled by taking the image down.-- **A delisted wallpaper survives on machines that already imported it.** The- feed is the only thing a takedown reaches.-- **The quota is per account, and accounts are free.** A determined attacker- can make more accounts. If that ever happens in practice, the cheap next- step is an automated image-moderation check on upload (an OpenAI moderation- call or Cloudflare Images' classifier), which was the alternative to this- design and remains the natural escalation.-- The skills `raw_url` download in `jarvis/skills/finder.py` still follows- redirects (pre-existing); the wallpaper download does not. Worth unifying- some day.diff --git a/docs/os-parity.md b/docs/os-parity.mdindex bd56a74fe2..183261d7aa 100644--- a/docs/os-parity.md+++ b/docs/os-parity.md@@ -620,7 +620,7 @@ experiences today.| P-31 | Low | Detached views | The "own window" detach (Agentic IDE / Voice into a second pywebview window) creates the window at RUNTIME, after `webview.start()`. pywebview documents runtime multi-window, and the code path is OS-neutral (worker-thread create, distinct title, shared backend), but it has only been RUN against the Windows/WebView2 backend; whether the cocoa and GTK backends accept a runtime `create_window` is unverified from this machine. Browser-lock auth in the second window additionally relies on a shared cookie jar, which is verified for WebView2 only | `jarvis/ui/desktop_app.py::open_detached_window`, `jarvis/platform/probes.py::webview_backend_available`, `jarvis/ui/web/desktop_routes.py` | Every failure is honest and keeps the feature usable: a shell whose backend refuses the runtime create answers `ok: false` with the solo URL and the frontend opens it in the user's real browser tab (via open-external); plain-browser clients open the tab directly; headless answers `no_desktop_shell` the same way. macOS/Linux desktop live check pending: detach, close main, reattach, tray-reopen — on success this row shrinks to the cookie-jar note or disappears || P-33 | Low | Music control (YouTube Music) | With the default **background player** (`jarvis/platform/music_player.py` + `music_player_host.py`: a pywebview companion window with its own persistent profile, driven over stdin/stdout JSON lines) pause / resume / next / previous / volume / "what is playing" go through the player's page directly and need only a display plus the `[desktop]` extra (pywebview) — verified live on Windows/WebView2 (a hidden window does NOT start media; minimized does, hence the minimized start); macOS WKWebView and Linux GTK/Qt WebKit are the same code, unverified from this machine, and autoplay policy there may need one press of play (the tool shows the window and says so). In **browser mode**, and wherever the player cannot run, the same verbs go through the OS media session — the registry the keyboard's media keys use — because Google publishes no remote-playback API. Windows reads and steers it through WinRT (`winrt-Windows.Media.Control`, in the `[desktop]` extra; measured live 2026-08-18 against YouTube Music in Chrome, including the two-tabs-same-app-id case) and falls back to blind media keys without the extra. Linux has no binding in the base install and needs the `playerctl` CLI (MPRIS); macOS has no public API at all and needs the Homebrew `nowplaying-cli`, whose MediaRemote access Apple has been narrowing on recent releases | `jarvis/platform/media_session.py::make_media_session_controller`, `WindowsMediaSession`, `LinuxMediaSession`, `MacMediaSession`, `jarvis/plugins/tool/youtube_music_rest.py::_control` | Playing (search + open the `music.youtube.com` deep link) works on every desktop OS. Without the CLI, `now_playing` and the transport verbs answer with the exact install command instead of a fake success, and the play deep link plus the library actions (like, playlists) stay fully usable. Headless: no player exists, so the tool returns the link and says so. Linux `playerctl` and macOS `nowplaying-cli` backends are unit-tested with fake CLI output, not live-run from this machine || P-34 | Low | Drop-path bridge | The desktop shell reports the REAL path of a file or folder dropped onto the UI (`jarvis-native-drop` DOM event from `jarvis/ui/native_drop.py`, consumed by `src/lib/nativeDrop.ts` in the Agentic IDE folder picker). Built on pywebview's own cross-platform drop handling (`pywebviewFullPath` — WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux); live-verified for a dropped FOLDER on Windows/WebView2 only | `jarvis/ui/native_drop.py::register_native_drop`, `jarvis/ui/desktop_app.py::_register_native_drop`, `jarvis/ui/web/frontend/src/lib/nativeDrop.ts` | Honest degradation everywhere: without the announcement (plain browser, headless, a shell whose backend does not resolve paths) the picker falls back to searching for the dropped NAME after 2 s, exactly as before. macOS/Linux live check pending: drop a folder onto the folder step and confirm the exact path is used without a candidate list |-| P-35 | Low | Desktop shell | The embedded browser's profile is PERSISTENT (`webview.start(private_mode=False, storage_path=<data>/webview)`) so the frontend's `localStorage` — wallpaper pick, deck/classic surface, pane sizes, favourites, theme cache — survives a restart (2026-08-18: pywebview's default private mode parked the WebView2 profile in a fresh `%TEMP%` folder per launch and the interface forgot every pick). The same call is honoured by every pywebview backend (Edge `UserDataFolder`, WebKitGTK `WebsiteDataManager`, Qt profile path, Cocoa's default persistent data store) but has only been RUN against Windows/WebView2 | `jarvis/ui/desktop_app.py::webview_storage_dir` | Honest everywhere: a checkout without a writable data directory falls back to the per-user directory, then to private mode with a logged warning — the interface still works, it only forgets its cosmetic picks. macOS/Linux live check pending: pick a wallpaper, restart, confirm it is still there |+| P-35 | Low | Desktop shell | The embedded browser's profile is PERSISTENT (`webview.start(private_mode=False, storage_path=<data>/webview)`) so the frontend's `localStorage` — deck/classic surface, pane sizes, favourites, theme cache — survives a restart (2026-08-18: pywebview's default private mode parked the WebView2 profile in a fresh `%TEMP%` folder per launch and the interface forgot every pick). The same call is honoured by every pywebview backend (Edge `UserDataFolder`, WebKitGTK `WebsiteDataManager`, Qt profile path, Cocoa's default persistent data store) but has only been RUN against Windows/WebView2 | `jarvis/ui/desktop_app.py::webview_storage_dir` | Honest everywhere: a checkout without a writable data directory falls back to the per-user directory, then to private mode with a logged warning — the interface still works, it only forgets its cosmetic picks. macOS/Linux live check pending: resize a pane, restart, confirm the size is still there || P-36 | Low | Coding-CLI panes | DeepSeek Harness is the one registered CLI whose interface is NOT the terminal. Upstream removed its terminal front door and publishes no `@deepseek-ai/dsh-tui*` bundle (checked 2026-08-22), so the two shipped profiles are `web` — a server the pane boots, whose UI opens in the default browser — and `headless`, which answers one task and exits. The pane therefore runs and is detected like every other entry, but declines the keystroke channel (`accepts_typed_prompts=False`), so the prompt bar, voice fan-out and CLI never type into it, and it has no transcript, recap or conversation resume | `jarvis/workspace/agents.py` (the `deepseek-harness` entry), `jarvis/agentic_ide/session.py::accepts_prompts`, upstream `apps/cli/README.md` | Identical on all three OSes — one npm package, one Node entrypoint, no native binary and no OS-specific installer. The one difference is not ours: on a host with no browser (headless Linux, an SSH launch) the harness prints its URL instead of opening it, which is the honest degradation and leaves the pane usable over a forwarded port || P-37 | Low | Dev instance | A second desktop app from the same checkout (`--instance dev` / `JARVIS_INSTANCE=dev`, see `docs/dev-instance.md`) is built OS-neutral — own `data-dev/`, ports +100, own single-instance lock, window title, DEV-badged icon, no wake word / global hotkeys / chat channels / autostart / on-screen overlay (the dev app boots the NullOverlay at runtime and its overlay-style route answers 409, so a pick there can never rewrite the shared `jarvis.toml`) — but only the WINDOWS identity layer has been run live: AUMID `PersonalJarvis.PersonalJarvis.Dev`, Start-Menu shortcut `Personal Jarvis Dev.lnk`, branded `PersonalJarvisDev.exe`, tray tooltip. Linux gets its own `.desktop` entry + `StartupWMClass` through the same code path (unverified live). macOS has NO separate bundle for the dev instance: the dock shows the default app's bundle icon, and an in-app restart of the dev instance re-enters through the interpreter directly (`build_launch_command` skips the LaunchServices bundle for a non-default instance, because `open -a` would not carry `JARVIS_INSTANCE` and would bring it back as a second default app) — so the restarted dev app has no TCC attachment of its own | `jarvis/core/instance.py`, `jarvis/ui/icon_utils.py` (instance-bound constants), `jarvis/ui/relauncher.py::build_launch_command` | Windows: full parity, verified live. Linux desktop: expected parity (title, icon, tray, data, ports), entry unverified. macOS: functional (data, ports, title, ambient duties, in-app restart), dock icon degrades as described — the dev window is still told apart by its title and the DEV tag in the sidebar |diff --git a/jarvis/cli_ctl/commands/marketplace.py b/jarvis/cli_ctl/commands/marketplace.pyindex 99a439c341..9c91fdb159 100644--- a/jarvis/cli_ctl/commands/marketplace.py+++ b/jarvis/cli_ctl/commands/marketplace.py@@ -47,7 +47,6 @@ def _fail(exc: ApiError) -> typer.Exit:_SECTIONS: tuple[tuple[str, str], ...] = (("skills", "skill"),("plugins", "plugin"),- ("wallpapers", "wallpaper"),)@@ -90,15 +89,10 @@ _BLURBS = {"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",}@@ -140,11 +134,6 @@ 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",@@ -178,10 +167,6 @@ 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}")@@ -222,7 +207,7 @@ def install(yes: bool = options.yes_opt(),dry_run: bool = options.dry_opt(),) -> None:- """Install a marketplace entry by name — skill, plugin or wallpaper — and report it.+ """Install a marketplace entry by name — skill or plugin — and report it.At a terminal this shows what the entry is and asks once before installing,then states plainly whether the thing is usable now or still needs a step.diff --git a/jarvis/commands/registry.py b/jarvis/commands/registry.pyindex 2756b0ec63..b5a1a07d89 100644--- a/jarvis/commands/registry.py+++ b/jarvis/commands/registry.py@@ -862,8 +862,8 @@ def _build_registry() -> tuple[AppCommand, ...]:id="marketplace-browse",title="Browse the marketplace",description=(- "List everything the community marketplace publishes — skills, "- "plugins and wallpapers — with the exact name of each entry and "+ "List everything the community marketplace publishes — skills "+ "and plugins — with the exact name of each entry and ""whether it is already installed. Use this to find the name ""before installing, and to answer 'what is there to install'."),@@ -874,15 +874,15 @@ def _build_registry() -> tuple[AppCommand, ...]:voice_aliases={"de": ( # i18n-allow: input vocab"was gibt es im marktplatz",- "welche wallpaper kann ich installieren",+ "welche skills kann ich installieren", # i18n-allow: input vocab),"en": ("what is in the marketplace",- "which wallpapers can i install",+ "which skills can i install",),"es": ( # i18n-allow: input vocab"qué hay en el mercado",- "qué fondos de pantalla puedo instalar",+ "qué skills puedo instalar",),},),@@ -892,10 +892,9 @@ def _build_registry() -> tuple[AppCommand, ...]:description=("Install ONE published marketplace entry by its exact name. The ""kind is resolved by the app, so the same command installs a "- "skill, a plugin or a wallpaper. What the user gets differs and "- "the answer must say so: a skill is usable right away, a "- "wallpaper lands in the wallpaper picker, a plugin only lands on "- "the plugin list and stays powerless until the user connects "+ "skill or a plugin. What the user gets differs and the answer "+ "must say so: a skill is usable right away, a plugin only lands "+ "on the plugin list and stays powerless until the user connects ""their account. Look the name up with marketplace-browse first ""rather than guessing it; report the result the tool returns."),@@ -923,15 +922,15 @@ def _build_registry() -> tuple[AppCommand, ...]:ui_section="plugins",voice_aliases={"de": ( # i18n-allow: input vocab- "installier das wallpaper",+ "installier den skill","installier das plugin aus dem marktplatz",),"en": (- "install that wallpaper",+ "install that skill","install that plugin from the marketplace",),"es": ( # i18n-allow: input vocab- "instala ese fondo de pantalla",+ "instala ese skill","instala ese complemento del mercado",),},diff --git a/jarvis/core/config.py b/jarvis/core/config.pyindex dee0797da2..77e373c445 100644--- a/jarvis/core/config.py+++ b/jarvis/core/config.py@@ -4097,12 +4097,6 @@ class MarketplaceConfig(BaseModel):# retired, so a stock install offers no Publish button instead of firing# a request at a host that answers nothing.publish_endpoint: str = ""- # Where the in-app Wallpapers view publishes a picture. A lane of its own- # because the payload is multipart image bytes, not a JSON manifest — but- # the same identity, the same registry, the same feed. Empty string hides- # "Share to community" in the wallpaper picker — the default, for the same- # reason as ``publish_endpoint`` above.- publish_wallpaper_endpoint: str = ""# Client id of the marketplace GitHub App (public by design — device flow# needs no secret, which is why a downloadable binary can use it).publish_github_client_id: str = "Iv23li1YcX62KJO67whO"diff --git a/jarvis/core/events.py b/jarvis/core/events.pyindex 3c31bcabad..a88544f5d8 100644--- a/jarvis/core/events.py+++ b/jarvis/core/events.py@@ -2290,10 +2290,10 @@ class MarketplaceItemInstalled(Event):exactly the lane that changed.``ready`` mirrors the install reply's own field: True when the thing is- usable right now (a wallpaper, a skill that validated), False when it+ usable right now (a skill that validated), False when itstill needs the user (a plugin waiting to be connected)."""- kind: str = "" # "skill" | "plugin" | "wallpaper"+ kind: str = "" # "skill" | "plugin"item_id: str = ""title: str = ""ready: bool = Falsediff --git a/jarvis/core/http_guard.py b/jarvis/core/http_guard.pyindex 70d1c758bc..571dfe25aa 100644--- a/jarvis/core/http_guard.py+++ b/jarvis/core/http_guard.py@@ -1,11 +1,11 @@"""Keep an https-only download https-only, redirect after redirect.Several places fetch a URL that came from the community registry: the index-itself, a skill's ``SKILL.md``, a wallpaper's bytes, a plugin's files. Each of-them checks the URL is ``https://`` before fetching, and each says why in a-comment — the fetch runs on the user's machine, so a plaintext or internal-address would let a published entry aim the backend at the loopback API, the-router's admin page, or a cloud metadata endpoint.+itself, a skill's ``SKILL.md``, a plugin's files. Each of them checks the URL+is ``https://`` before fetching, and each says why in a comment — the fetch+runs on the user's machine, so a plaintext or internal address would let a+published entry aim the backend at the loopback API, the router's admin page,+or a cloud metadata endpoint.That check covers the FIRST url only. With ``follow_redirects=True`` theserver on the other end picks the next one, and a publisher who controlsdiff --git a/jarvis/core/uploads.py b/jarvis/core/uploads.pyindex 51da7d619c..03a1645d17 100644--- a/jarvis/core/uploads.py+++ b/jarvis/core/uploads.py@@ -20,9 +20,9 @@ fail-closed:- size and count ceilings are checked against the archive's own headersBEFORE anything is written, so a zip bomb never reaches the disk.-The caller decides what the staged folder means (a skill, a plugin, a-wallpaper); this module only guarantees that the folder is a faithful,-harmless copy of what was uploaded.+The caller decides what the staged folder means (a skill or a plugin); this+module only guarantees that the folder is a faithful, harmless copy of what+was uploaded."""from __future__ import annotationsdiff --git a/jarvis/marketplace/community_source.py b/jarvis/marketplace/community_source.pyindex 62c4d76ed6..5d160493a5 100644--- a/jarvis/marketplace/community_source.py+++ b/jarvis/marketplace/community_source.py@@ -159,61 +159,11 @@ class CommunitySkillEntry(_Tolerant):return self.flavor == "portable"-class CommunityWallpaperEntry(_Tolerant):- """One installable wallpaper.-- A wallpaper is the simplest thing the registry publishes: a picture and a- name. It carries no code, no credentials, and no manifest — installing one- downloads an image, re-encodes it, and drops it next to the owner's own- uploads, so it can never be more dangerous than a file the owner dragged- in themselves.- """-- name: str- title: str | None = None- description: str = ""- publisher: str | None = None- version: str | None = None- published_at: str | None = None- categories: list[str] = Field(default_factory=list)- source_url: str | None = None- license: str | None = None- #: Full-size picture. This is what the published registry actually emits;- #: ``raw_url`` is accepted alongside it so the field name the other two- #: kinds use keeps working for a hand-written entry.- image_url: str | None = None- raw_url: str | None = None- #: Small preview, for showing the picture before anything is installed.- thumb_url: str | None = None- width: int | None = None- height: int | None = None- # Light/dark hint from the publisher. Only a hint: the server re-derives- # the theme from the actual pixels, exactly as it does for an upload, so a- # wrong or absent value costs nothing.- theme: str | None = None-- @field_validator("image_url", "raw_url", "thumb_url")- @classmethod- def _https_only(cls, value: str | None) -> str | None:- # Same reasoning as the skill raw_url above: the backend fetches this- # server-side, so anything but https is an SSRF vector.- if value is not None and not value.lower().startswith("https://"):- logger.warning("community index: dropping non-https wallpaper url %r", value)- return None- return value-- @property- def download_url(self) -> str | None:- """The picture to fetch, whichever field the publisher used."""- return self.image_url or self.raw_url--class CommunityIndex(_Tolerant):revision: int = 0generated_at: str | None = Noneplugins: list[CommunityPluginEntry] = Field(default_factory=list)skills: list[CommunitySkillEntry] = Field(default_factory=list)- wallpapers: list[CommunityWallpaperEntry] = Field(default_factory=list)@field_validator("skills", mode="after")@classmethod@@ -230,25 +180,6 @@ class CommunityIndex(_Tolerant):logger.warning("community index: dropping skill with unsafe name %r", entry.name)return kept- @field_validator("wallpapers", mode="after")- @classmethod- def _drop_unsafe_wallpaper_names(- cls, value: list[CommunityWallpaperEntry]- ) -> list[CommunityWallpaperEntry]:- # A wallpaper name never becomes a path (the store keys by a random- # id), but it IS the identity the install-by-name route resolves and- # the "already installed" check compares, so it obeys the same shape- # as every other entry rather than being a free-form string.- kept: list[CommunityWallpaperEntry] = []- for entry in value:- if _SKILL_NAME_RE.fullmatch(entry.name) and ".." not in entry.name:- kept.append(entry)- else:- logger.warning(- "community index: dropping wallpaper with unsafe name %r", entry.name- )- return kept-def index_url() -> str:"""The configured index URL (empty string = community section disabled)."""diff --git a/jarvis/marketplace/install_standard.py b/jarvis/marketplace/install_standard.pyindex 4f1b450cad..4e7ab31ab2 100644--- a/jarvis/marketplace/install_standard.py+++ b/jarvis/marketplace/install_standard.py@@ -32,7 +32,7 @@ from typing import Literal, TypedDict# which is what makes a copy-paste one-liner possible at all._NAME_RE = re.compile(r"^[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$")-EntryKind = Literal["plugin", "skill", "wallpaper"]+EntryKind = Literal["plugin", "skill"]class InstallBlock(TypedDict):diff --git a/jarvis/marketplace/publish.py b/jarvis/marketplace/publish.pyindex b8f5fc518e..9a518e8281 100644--- a/jarvis/marketplace/publish.py+++ b/jarvis/marketplace/publish.py@@ -10,11 +10,8 @@ token belongs to OUR App (confused-deputy check), derives the publisher fromit, and opens the registry PR as the bot — one publishing implementation forweb and app.-Two lanes share that one identity. A **package** (plugin or skill) travels-as JSON to ``/submit``; a **wallpaper** travels as multipart image bytes to-``/submit-wallpaper``, where the endpoint slugifies the title into a name and-commits straight to the public registry. Both end up in the same feed the-store reads back.+A package (plugin or skill) travels as JSON to ``/submit`` and ends up in+the same feed the store reads back.Validation here MIRRORS the endpoint's rules (``_lib/validate.ts``, itself amirror of the registry CI) for instant field-level feedback in the form. It@@ -26,7 +23,6 @@ a bad submission merge.from __future__ import annotationsimport asyncio-import ioimport jsonimport loggingimport re@@ -72,15 +68,6 @@ _UA = {"User-Agent": "Personal-Jarvis/1.0"}_NAME_RE = re.compile(r"^[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$")_SEMVER_RE = re.compile(r"^\d+\.\d+\.\d+$")MAX_FILE_BYTES = 128 * 1024-# The wallpaper lane's own limits, mirrored from the endpoint's-# functions/_lib/wallpapers.ts. Same reasoning as the rules above: a mirror-# that drifts costs a duplicate error message, never a bad publish — the-# endpoint re-checks all of it and the registry CI re-checks it again.-MAX_WALLPAPER_BYTES = 8 * 1024 * 1024-MAX_TITLE_CHARS = 80-# Redistribution licenses only. A wallpaper published here is copied onto-# stranger's machines, so "all rights reserved" has no meaning in this lane.-WALLPAPER_LICENSES = ("CC0-1.0", "CC-BY-4.0", "CC-BY-SA-4.0")# Re-exported under this module's existing name, but the VALUE comes from# agent_plugins_loader — the install-time authority — so the two numbers# cannot silently drift apart.@@ -245,119 +232,6 @@ def validate_draft(draft: dict[str, Any]) -> tuple[dict[str, Any] | None, list[Freturn value, []-def validate_wallpaper_draft(- draft: Mapping[str, Any],-) -> tuple[dict[str, str] | None, list[FieldError]]:- """Normalize and check a wallpaper submission's text fields.-- The image itself is checked separately (``prepare_wallpaper_image``) —- bytes and metadata fail for different reasons and the form wants to say- which. There is no ``name`` or ``version`` field here on purpose: the- endpoint slugifies the title into a free name and stamps 1.0.0, so a- client that invented either would only be describing something the server- ignores.- """- errors: list[FieldError] = []- title = str(draft.get("title") or "").strip()- if not title:- errors.append(FieldError("a title is required", "title"))- elif _utf16_len(title) > MAX_TITLE_CHARS:- errors.append(FieldError(f"title longer than {MAX_TITLE_CHARS} characters", "title"))- elif not re.search(r"[a-z0-9]", title.lower()):- # The endpoint slugifies the title and refuses an empty slug. Saying- # so here, in the words the endpoint uses, beats a 422 after upload.- errors.append(FieldError("the title needs at least a few letters or digits", "title"))-- description = str(draft.get("description") or "").strip()- if _utf16_len(description) > MAX_DESCRIPTION_CHARS:- errors.append(- FieldError(f"description longer than {MAX_DESCRIPTION_CHARS} characters", "description")- )-- license_id = str(draft.get("license") or "").strip()- if license_id not in WALLPAPER_LICENSES:- errors.append(FieldError("pick one of the redistribution licenses", "license"))-- theme = str(draft.get("theme") or "").strip()- if theme not in ("light", "dark", ""):- errors.append(FieldError("theme must be 'light' or 'dark'", "theme"))-- if draft.get("rights") is not True:- # Not decoration: this is the uploader's own statement, recorded in a- # submission published under their name. Nobody inspects the picture- # before it goes live, which is exactly why the statement is required.- errors.append(- FieldError(- "confirm that you hold the rights and the image is legal to publish", "rights"- )- )-- if errors:- return None, errors- value = {"title": title, "license": license_id, "rights": "yes"}- if description:- value["description"] = description- if theme:- value["theme"] = theme- return value, []---def prepare_wallpaper_image(data: bytes) -> tuple[bytes, str]:- """Re-encode a picture into the bytes that will be published.-- Returns ``(webp_bytes, "wallpaper.webp")``. Nothing the caller supplied- survives the round trip: Pillow decodes and re-encodes, so EXIF (GPS- included), a forged header and anything appended past the image data are- all gone. That is the same guarantee the website's uploader gives with a- canvas, and the registry build re-encodes a third time — no byte an- uploader crafted is ever served as-is.-- Raises ``SubmitError`` with a sentence meant for the person uploading.- """- if not data:- raise SubmitError(422, "that file is empty", "file")- try:- from PIL import Image- except ImportError as exc: # pragma: no cover - Pillow is a hard dependency- raise SubmitError(503, "image support is unavailable on this install", "file") from exc-- try:- with Image.open(io.BytesIO(data)) as probe:- probe.verify()- with Image.open(io.BytesIO(data)) as source:- source.load()- prepared = source.convert("RGB")- except Exception as exc: # noqa: BLE001 - any decode failure means "not an image"- raise SubmitError(422, "that file is not an image the app can read", "file") from exc-- # 4K cap, matching the picker's own store and the website's uploader.- max_width = 3840- if prepared.width > max_width:- height = max(1, round(prepared.height * max_width / prepared.width))- prepared = prepared.resize((max_width, height), Image.Resampling.LANCZOS)-- # Step down the quality until it fits rather than refusing a picture the- # user cannot fix by hand — a 4K photograph can exceed 8 MB at q82, and- # "export a smaller one" is not an instruction a wallpaper picker can act- # on. The floor is deliberate: below q50 the result is not worth shipping.- encoded = b""- for quality in (82, 70, 60, 50):- buffer = io.BytesIO()- prepared.save(buffer, "WEBP", quality=quality, method=4)- encoded = buffer.getvalue()- if len(encoded) <= MAX_WALLPAPER_BYTES:- break- prepared.close()- if len(encoded) > MAX_WALLPAPER_BYTES:- raise SubmitError(- 413,- f"even re-encoded, that image stays over "- f"{MAX_WALLPAPER_BYTES // (1024 * 1024)} MB — publish a smaller one",- "file",- )- return encoded, "wallpaper.webp"--def _validate_bundled_skills(raw: Any, *, plugin_name: str) -> tuple[list[dict[str, str]], list[FieldError]]:@@ -467,19 +341,6 @@ def publish_endpoint() -> str:return MarketplaceConfig().publish_endpoint-def publish_wallpaper_endpoint() -> str:- """The configured wallpaper endpoint (empty string = lane disabled)."""- from jarvis.core.config import load_config-- try:- return str(load_config().marketplace.publish_wallpaper_endpoint).strip()- except Exception: # noqa: BLE001 - config trouble must not kill the picker- log.warning("publish: could not read config for the wallpaper endpoint")- from jarvis.core.config import MarketplaceConfig-- return MarketplaceConfig().publish_wallpaper_endpoint--def make_device_handler() -> DeviceFlowHandler:"""A device-flow handler for the marketplace GitHub App.@@ -614,51 +475,6 @@ async def submit(raise SubmitError(r.status_code, error, field if isinstance(field, str) else None)-async def submit_wallpaper(- fields: Mapping[str, str],- image: bytes,- filename: str = "wallpaper.webp",- store: TokenStore | None = None,- transport: httpx.AsyncBaseTransport | None = None,-) -> dict[str, Any]:- """POST an already-validated wallpaper; returns ``{"name": ...}``.-- Multipart rather than JSON because the payload is image bytes, but the- identity chain is the one ``submit`` uses: the token travels as- ``Authorization: Bearer``, the endpoint proves it belongs to the- marketplace App and derives the publisher from it. Nothing- identity-shaped is in the form.- """- endpoint = publish_wallpaper_endpoint()- if not endpoint:- raise SubmitError(503, "wallpaper publishing is disabled in this deployment")- store = store or TokenStore()- tokens = await asyncio.to_thread(store.load, PUBLISHER_TOKEN_ID)- if tokens is None:- raise SubmitError(401, "sign in with GitHub first")- try:- async with httpx.AsyncClient(timeout=_HTTP_TIMEOUT, transport=transport) as client:- r = await client.post(- endpoint,- data=dict(fields),- files={"file": (filename, image, "image/webp")},- headers={**_UA, "Authorization": f"Bearer {tokens.access}"},- )- except httpx.HTTPError as exc:- raise SubmitError(502, f"the publish endpoint is unreachable: {exc}") from exc- try:- body = r.json()- except ValueError:- body = {}- if r.status_code == 201:- # The endpoint slugified the title into the name — the caller could- # not have known it in advance, and it is what the live check needs.- return {"name": str(body.get("name") or "")}- error = str(body.get("error") or f"publish failed (HTTP {r.status_code})")- field = body.get("field")- raise SubmitError(r.status_code, error, field if isinstance(field, str) else None)--async def live_status(name: str, version: str, *, force: bool = False) -> dict[str, Any]:"""Whether ``name`` at ``version`` is in the community index yet.@@ -670,7 +486,7 @@ async def live_status(name: str, version: str, *, force: bool = False) -> dict[sindex, status = await community_source.get_index(force=force)live = Falseif index is not None:- entries: list[Any] = [*index.plugins, *index.skills, *index.wallpapers]+ entries: list[Any] = [*index.plugins, *index.skills]for entry in entries:if entry.name == name and (entry.version or "") == version:live = Truediff --git a/jarvis/plugins/tool/navigate.py b/jarvis/plugins/tool/navigate.pyindex dd479b3abb..f50f281121 100644--- a/jarvis/plugins/tool/navigate.py+++ b/jarvis/plugins/tool/navigate.py@@ -53,7 +53,6 @@ KNOWN: frozenset[str] = frozenset("contacts","feedback","agent-instructions",- "wallpaper",# Appshots: the shortcut and destination for showing the front window."appshots",# Jarvis actions: which app actions Jarvis may run, ask for or never run.@@ -71,8 +70,8 @@ KNOWN: frozenset[str] = frozenset(# grid" an unknown section to the brain."agentic-ide-classic","chat-workspace",- # The marketplace, in the app: community plugins, skills and wallpapers- # in one storefront.+ # The marketplace, in the app: community plugins and skills in one+ # storefront."marketplace",})@@ -198,11 +197,6 @@ _ALIASES: dict[str, str] = {"ausgaben": "visualization", # i18n-allow: input vocab"ergebnisse": "visualization", # i18n-allow: input vocab"resultados": "visualization", # i18n-allow: input vocab- "wallpapers": "wallpaper",- "background": "wallpaper",- "hintergrund": "wallpaper", # i18n-allow: input vocab- "hintergrundbild": "wallpaper", # i18n-allow: input vocab- "fondo de pantalla": "wallpaper", # i18n-allow: input vocab"appshot": "appshots","jarvis actions": "jarvis-actions","jarvis aktionen": "jarvis-actions", # i18n-allow: speech-input vocabularydiff --git a/jarvis/ui/desktop_app.py b/jarvis/ui/desktop_app.pyindex 8448eeb594..344181361c 100644--- a/jarvis/ui/desktop_app.py+++ b/jarvis/ui/desktop_app.py@@ -998,8 +998,8 @@ def webview_storage_dir(pywebview starts in ``private_mode`` by default: the WebView2 profile livesin a fresh ``%TEMP%\tmpXXXX`` folder that nobody deletes, and everything the- frontend keeps in ``localStorage`` — the chosen wallpaper, the deck/classic- surface, pane sizes, favourites, the theme cache the boot script paints the+ frontend keeps in ``localStorage`` — the deck/classic surface, pane sizes,+ favourites, the theme cache the boot script paints thefirst frame from — dies with the process (forensic 2026-08-18: light chromeon the dark bundled artwork after every restart, because the light pick wasgone while the theme itself survived on the backend). The profile therefore@@ -1011,8 +1011,8 @@ def webview_storage_dir(checkouts running side by side must not fight over one browser profile. Aread-only checkout falls back to the per-user data directory, exactly likethe credential store does; if neither can be created the caller keeps- pywebview's private mode — a wallpaper that does not survive a restart is- not worth failing the boot over.+ pywebview's private mode — a layout that does not survive a restart is not+ worth failing the boot over."""candidates: list[Path] = [(data_dir if data_dir is not None else DATA_DIR) / WEBVIEW_PROFILE_DIRNAME@@ -5649,7 +5649,7 @@ class DesktopApp:# the UI: degrade to the browser-UI fallback. No-op on Windows/macOS# where the native backend starts normally.# The browser profile is persistent (see webview_storage_dir): the- # frontend's localStorage — wallpaper, surface, pane sizes, theme cache+ # frontend's localStorage — surface, pane sizes, theme cache# — must survive a restart, and pywebview's default private mode throws# it away with the process. Only when no directory can be written does# the shell fall back to that private mode, and says so.@@ -5662,8 +5662,8 @@ class DesktopApp:_profile_logger.warning("No writable directory for the WebView profile — the browser "- "runs in private mode and the interface forgets its wallpaper "- "and layout on every restart."+ "runs in private mode and the interface forgets its layout "+ "on every restart.")# Read by ``_begin_quit_from_close``: a force-exit backstop armed at the# X only makes sense while a real window loop is tearing down.diff --git a/jarvis/ui/web/frontend/index.html b/jarvis/ui/web/frontend/index.htmlindex 9c0f3788e4..91e33ac494 100644--- a/jarvis/ui/web/frontend/index.html+++ b/jarvis/ui/web/frontend/index.html@@ -45,17 +45,6 @@var root = document.documentElement;root.classList.toggle("dark", mode === "dark");root.style.colorScheme = mode;- // The ground: a flat theme colour unless the user switched a- // wallpaper on. Same key and fallback as src/lib/backgroundMode.ts —- // the class gates the wallpaper readability floor in index.css, so it- // must be right before the first frame, not a moment after.- var wallpaper = false;- try {- wallpaper = localStorage.getItem("jarvis.background.v1") === "wallpaper";- } catch (e) {- /* storage blocked — the flat colour is the default anyway */- }- root.classList.toggle("jarvis-wallpaper", wallpaper);window.__JARVIS_BOOT_STARTED_AT = performance.now();})();</script>diff --git a/jarvis/ui/web/frontend/src/App.detached.test.tsx b/jarvis/ui/web/frontend/src/App.detached.test.tsxindex 1df914435c..da7ba1dd3e 100644--- a/jarvis/ui/web/frontend/src/App.detached.test.tsx+++ b/jarvis/ui/web/frontend/src/App.detached.test.tsx@@ -3,7 +3,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import App from "@/App";import { useEventStore } from "@/store/events";-import { useWallpaperStore } from "@/store/wallpaper";vi.mock("@/hooks/useWebSocket", () => ({ useWebSocket: () => undefined }));vi.mock("@/hooks/useBrainStatus", () => ({ useBrainStatus: () => undefined }));@@ -74,10 +73,6 @@ beforeEach(() => {solo: false,detachedViews: [],});- // The ground is a flat colour by default (2026-08-23); these tests are- // about the wallpaper layer, so they switch it on. The solid default has- // its own test below.- useWallpaperStore.setState({ background: "wallpaper" });});afterEach(() => {@@ -95,42 +90,16 @@ describe("App shell around detached coding views", () => {expect(screen.getByTestId("sidebar-resizer")).toBeTruthy();});- it("renders the desktop wallpaper behind normal app sections", () => {- render(<App />);-- expect(screen.getByTestId("jarvis-desktop-wallpaper")).toBeTruthy();- expect(screen.queryByTestId("jarvis-desktop-wallpaper-mascot")).toBeNull();- expect(- screen.getByTestId("main-view").parentElement?.classList.contains("jarvis-section-stage"),- ).toBe(true);- });-- it("paints no mascot layer on top of the wallpaper", () => {- render(<App />);-- expect(screen.getByTestId("jarvis-desktop-wallpaper")).toBeTruthy();- expect(screen.queryByTestId("jarvis-desktop-wallpaper-mascot")).toBeNull();- });-- it("paints no wallpaper layer at all on the solid ground (the default)", () => {- useWallpaperStore.setState({ background: "solid" });+ it("paints the sections on the flat theme ground, with no wallpaper layer", () => {render(<App />);+ // Wallpapers were removed (2026-09-30): the app has one ground, the theme+ // colour, and nothing is layered behind the sections.expect(screen.queryByTestId("jarvis-desktop-wallpaper")).toBeNull();- expect(screen.queryByTestId("jarvis-desktop-wallpaper-mascot")).toBeNull();- // The stage class stays: the solid-ground overrides in index.css key on- // the root class, not on the stage being absent.expect(screen.getByTestId("main-view").parentElement?.classList.contains("jarvis-section-stage"),).toBe(true);- });-- it("shows the plain wallpaper with no mascot on every section", () => {- useEventStore.setState({ activeSection: "tasks" });- render(<App />);-- expect(screen.getByTestId("jarvis-desktop-wallpaper")).toBeTruthy();- expect(screen.queryByTestId("jarvis-desktop-wallpaper-mascot")).toBeNull();+ expect(document.documentElement.classList.contains("jarvis-wallpaper")).toBe(false);});it("keeps the sidebar reachable in the main window", () => {@@ -155,7 +124,6 @@ describe("App shell around detached coding views", () => {expect(screen.getByTestId("sidebar")).toBeTruthy();expect(screen.getByTestId("sidebar-resizer")).toBeTruthy();- expect(screen.getByTestId("jarvis-desktop-wallpaper")).toBeTruthy();expect(screen.getByTestId("main-view").parentElement?.classList.contains("jarvis-section-stage"),).toBe(true);@@ -173,7 +141,6 @@ describe("App shell around detached coding views", () => {expect(screen.queryByTestId("sidebar")).toBeNull();// The caption stays: it is that window's title bar.expect(screen.getByTestId("topbar")).toBeTruthy();- expect(screen.getByTestId("jarvis-desktop-wallpaper")).toBeTruthy();expect(screen.getByTestId("main-view").parentElement?.classList.contains("jarvis-section-stage"),).toBe(true);diff --git a/jarvis/ui/web/frontend/src/App.tsx b/jarvis/ui/web/frontend/src/App.tsxindex 046f50f03c..1dd49e6072 100644--- a/jarvis/ui/web/frontend/src/App.tsx+++ b/jarvis/ui/web/frontend/src/App.tsx@@ -45,57 +45,20 @@ import { OnboardingGate } from "@/components/onboarding/OnboardingGate";import { installDictationFocusTracker } from "@/lib/dictationTarget";import { SubscriptionRealtimeTransportBroker } from "@/components/voice/SubscriptionRealtimeTransportBroker";import { BrowserRealtimeControl } from "@/components/voice/BrowserRealtimeControl";-import { useDesktopWallpaper } from "@/hooks/useDesktopWallpaper";-import { installWallpaperSync, useWallpaperStore } from "@/store/wallpaper";import { cn } from "@/lib/utils";/** Where the collapsed/expanded choice for the nav sidebar is remembered. */const NAV_COLLAPSED_KEY = "jarvis.sidebar.collapsed.v1";-/**- * The shared visual ground for every app section.- *- * The image and its theme veil are separate layers: the artwork can stay crisp- * while light and dark mode independently tune contrast through semantic theme- * channels in index.css. Focused workspaces keep their content surfaces on top.- *- * Which artwork is shown belongs to the user — see the Wallpaper section. The- * picture that ships with the app remains the default, and the one every- * failure path returns to. The artwork stays a pure scene with no mascot- * composited on top.- */-function DesktopWallpaper() {- const wallpaperUrl = useDesktopWallpaper();- const background = useWallpaperStore((state) => state.background);- // A flat theme colour is the default ground (lib/backgroundMode.ts): the- // picture and its veil exist only once a wallpaper is switched on.- // index.css keys the readability floor on the same choice.- if (background !== "wallpaper") return null;- return (- <div- aria-hidden- data-testid="jarvis-desktop-wallpaper"- className="pointer-events-none absolute inset-0 -z-10 overflow-hidden"- >- <div- className="jarvis-desktop-wallpaper absolute inset-0"- style={{ backgroundImage: `url(${wallpaperUrl})` }}- />- <div className="jarvis-desktop-wallpaper-veil absolute inset-0" />- </div>- );-}-/*** The surface the active section is drawn on.** Two grounds, because the app has two kinds of screen. Everything the app- * writes itself sits on the wallpaper and gets the readability floor that comes- * with it (`.jarvis-section-stage` in index.css). The Visualization section- * shows pictures somebody ELSE produced — a rendered chart, a diagram, a framed- * page — and the same floor damages those: an inherited text halo lands on the- * labels inside an SVG, and busy artwork behind a transparent PNG makes it- * impossible to tell what the picture actually looks like.+ * writes itself sits on the section stage (`.jarvis-section-stage`). The+ * Visualization section shows pictures somebody ELSE produced — a rendered+ * chart, a diagram, a framed page — so it gets one quiet opaque ground with no+ * inherited text shadow, and a transparent PNG is judged against one flat+ * colour (`.jarvis-visualization-stage` in index.css).** The choice belongs to the shell rather than to the view. The stage is the* surface a section is laid out ON, and it has to hold in BOTH shapes this@@ -103,7 +66,7 @@ function DesktopWallpaper() {* detached window where the section is the whole screen.** Exported for its own test: rendering the whole shell to assert one class- * would drag in the WebSocket, the wallpaper sync and the onboarding gate.+ * would drag in the WebSocket and the onboarding gate.*/export function SectionStage({visualization,@@ -173,13 +136,6 @@ export default function App() {*/useEffect(() => installDictationFocusTracker(), []);- /*- * Follow the wallpaper choice across windows. Picking one in the main window- * should not leave a detached window wearing the previous picture until it- * happens to reload.- */- useEffect(() => installWallpaperSync(), []);-/** Resync the detached-window registry once per document. The WS events keep* it live afterwards; this fetch covers the window that (re)loaded after the@@ -327,7 +283,6 @@ export default function App() {if (solo) {return (<div className="jarvis-nav-surface relative isolate flex h-screen w-screen overflow-hidden text-foreground">- <DesktopWallpaper />{brokerMounted && <SubscriptionRealtimeTransportBroker />}<BrowserRealtimeControl controlOnly />{/* The caption paints nothing: the window ground is the sidebar gray,@@ -358,7 +313,6 @@ export default function App() {<div className="jarvis-nav-surface relative isolate flex h-screen w-screen overflow-hidden text-foreground">{brokerMounted && <SubscriptionRealtimeTransportBroker />}<BrowserRealtimeControl controlOnly />- <DesktopWallpaper />{!hideNavigation && <><Sidebar@@ -381,16 +335,15 @@ export default function App() {The stage column carries NO z-index, and must not get one back.A positive z-index here makes <main> its own stacking context, and- then every full-screen overlay a section renders inside it — the- wallpaper preview, the view dialogs, their scrims — is trapped at- THAT level however high its own z-index climbs. The nav column- beside it (z-20) then paints over the overlay: the sidebar logo,- the assistant name and the voice state landed on top of the- wallpaper preview's own header, one line of text over the other.+ then every full-screen overlay a section renders inside it — an image+ preview, the view dialogs, their scrims — is trapped at THAT level+ however high its own z-index climbs. The nav column beside it (z-20)+ then paints over the overlay: the sidebar logo, the assistant name and+ the voice state landed on top of a full-screen preview's own header,+ one line of text over the other.- `relative` alone is all the column needs: it stays above the- wallpaper layer because that one is negative (-z-10), and the- overlays inside reach the app's real dialog levels. Guarded by+ `relative` alone is all the column needs, and the overlays inside+ reach the app's real dialog levels. Guarded bycomponents/layout/overlay-stacking.test.ts.*/}<main className="relative flex min-w-0 flex-1 flex-col">diff --git a/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper-light.webp b/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper-light.webpdeleted file mode 100644index bf1f540f22..0000000000Binary files a/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper-light.webp and /dev/null differdiff --git a/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper.webp b/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper.webpdeleted file mode 100644index 8e0dfaa423..0000000000Binary files a/jarvis/ui/web/frontend/src/assets/jarvis-desktop-wallpaper.webp and /dev/null differdiff --git a/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsx b/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsxindex a32189553f..c1338208da 100644--- a/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsx+++ b/jarvis/ui/web/frontend/src/components/MarketplaceBadge.tsx@@ -5,13 +5,13 @@ 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.+ * One component for both kinds — a plugin card, a skill row — 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 plugin+ * 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.+ * mode.*/export function MarketplaceBadge({publisher,diff --git a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsxindex e7d52e51f4..edc3b858fa 100644--- a/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/AgenticTerminal.test.tsx@@ -2687,7 +2687,7 @@ describe("terminal text size across a rebuild", () => {});// GrokNight paints #141414 on every empty cell. That RGB is the canvas- // fill; xterm must see the default background so the wallpaper shows.+ // fill; xterm must see the default background so the pane shell shows.// The rewrite is not keyed on the pane's product name.expect(terminalHarness.write).toHaveBeenCalledWith("\x1b[49m \x1b[0m");});diff --git a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsxindex cc183640b9..a3164e70ce 100644--- a/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx+++ b/jarvis/ui/web/frontend/src/components/agentic/WorkspaceExplorer.tsx@@ -3,7 +3,7 @@** It follows the familiar editor explorer shape without importing another* product's chrome: compact rows, folders first, one gold selection mark, and- * the app's own translucent panel token over the shared wallpaper.+ * the app's own panel token.*/import { useCallback, useEffect, useRef, useState } from "react";import {diff --git a/jarvis/ui/web/frontend/src/components/agentic/terminalGlass.ts b/jarvis/ui/web/frontend/src/components/agentic/terminalGlass.tsindex bacbee5591..58b2e2d989 100644--- a/jarvis/ui/web/frontend/src/components/agentic/terminalGlass.ts+++ b/jarvis/ui/web/frontend/src/components/agentic/terminalGlass.ts@@ -3,7 +3,7 @@** xterm is already clear (`allowTransparency` + a transparent theme* background in ./terminalThemes). Claude Code and a plain shell leave the- * default background alone, so the wallpaper shows through the pane shell.+ * default background alone, so the pane shell shows through.* A ratatui TUI such as Grok Build paints every cell with its theme's* `bg_base` — a solid RGB, not the default — and that one colour is what* turns the pane into an opaque card.@@ -153,7 +153,7 @@ export function rewriteCanvasFillSgr(params: string): string {/*** Replace canvas-fill cell backgrounds with the terminal default, so the- * pane shell (and the wallpaper under it) shows through.+ * pane shell shows through.** Complete SGR sequences only — a CSI split across two PTY reads is left* for xterm, the same as every other escape this pane does not rewrite.diff --git a/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts b/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.tsindex 14fe9474e4..c2389b5c6e 100644--- a/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts+++ b/jarvis/ui/web/frontend/src/components/agentic/terminalThemes.ts@@ -217,9 +217,8 @@ export interface PaneChrome {* Chrome (pane frame) colours that go with each terminal theme.** Every value below is one of the app's own surface-ladder steps, expressed as- * an alpha over the pane's ground so it still composites correctly when a- * wallpaper is showing through the shell. On a flat ground they resolve to the- * tokens by name: `border` lands on `--border`, `edge.exited` a step below it,+ * an alpha over the pane's ground, so on the app's flat ground they resolve to+ * the tokens by name: `border` lands on `--border`, `edge.exited` a step below it,* `PaneBrand.chip` on `--secondary`, `PaneBrand.accentSoft` on* `--border-strong`. The table exists because a pane's appearance is a* SEPARATE setting from the app theme — a light pane inside a dark app is a@@ -349,7 +348,7 @@ export interface PaneTileChrome {* A multiplexer grid is separated by its lines alone — no radius, no* elevation — so the resting edge is a full step brighter than* the card style's hairline (herdr draws it in a mid grey). Otherwise every- * edge would dissolve into the wallpaper and the grid would read as one+ * edge would dissolve into the ground and the grid would read as one* block of text.** The focused pane wears the app's signal hue (`--accent`: #3D8BFF dark,diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckCard.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckCard.tsxindex 5c91123acd..2c13fcb220 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckCard.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckCard.tsx@@ -8,8 +8,8 @@ import { cn } from "@/lib/utils";* One instrument on the deck.** Deliberately NOT a filled box: the app's convention (index.css, "Frontend- * theming") is that the wallpaper shines through untinted and the stage's- * text halo keeps ink readable on it. So a card is a HUD frame (see+ * theming") is that the stage's ground shows through untinted. So a card is+ * a HUD frame (see* HudFrame.tsx — bracket, chamfer or rail, chosen per card so the stage does* not read as a grid of identical rectangles), a title strip in plain words* with a status lamp, and its content.diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckSignalCards.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckSignalCards.tsxindex a87312d290..eed01c8928 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckSignalCards.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckSignalCards.tsx@@ -91,7 +91,7 @@ export function CaptureCard({ className }: { className?: string }) {>{/* A picture gets a letterbox in the theme's own scrim (a screenshot ona dark plate reads as a screen); the ledger and the empty line sit- on the wallpaper like every other readout — a plain dark slab under+ on the stage's ground like every other readout — a plain dark slab under"no capture" was a hole in the light stage. */}<divclassName={cn(diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckStage3D.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckStage3D.tsxindex dcd79f5fb2..d9776056da 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckStage3D.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckStage3D.tsx@@ -1,6 +1,5 @@import { useEffect, useRef, type RefObject } from "react";import { useReducedMotion } from "framer-motion";-import { useDesktopWallpaper } from "@/hooks/useDesktopWallpaper";import {PERSPECTIVE_ORIGIN,driftCompensation,@@ -30,12 +29,9 @@ import {* planes at the board's edges drift outward and are clipped.** `DeckFloor` is the ground the case stands on: a plane laid flat under the- * board, receding from the viewer to the wallpaper, carrying a blurred,- * upside-down echo of the picture — the mascot and the planes stand on a- * floor that reflects the wall behind them, which is what turns a picture- * with things in front of it into a room. It takes the theme's ground colour- * (so it is dark glass under the wave and pale stone under the terrace) and- * the current wallpaper URL, nothing else.+ * board, receding from the viewer — the mascot and the planes stand on a+ * floor instead of floating in the air. It takes the theme's ground colour+ * and nothing else.*/export function useDeckParallax<T extends HTMLElement>(ref: RefObject<T | null>,@@ -106,10 +102,8 @@ export function useDeckParallax<T extends HTMLElement>(}export function DeckFloor() {- const wallpaperUrl = useDesktopWallpaper();return (<div aria-hidden data-testid="deck-floor" className="deck-floor">- <div className="deck-floor-echo" style={{ backgroundImage: `url(${wallpaperUrl})` }} /><div className="deck-floor-sheen" /></div>);diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckStandby.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckStandby.tsxindex 4bd1bc8cb4..e999e90a0c 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckStandby.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckStandby.tsx@@ -452,8 +452,8 @@ function BootTitle({ text, animate }: { text: string; animate: boolean }) {* Bezel, tick scale, the four gate arcs at the compass points (dashed while* pending, drawn solid when true, dim and short when honestly off), the* sweep while the wake word is being listened for, and the one-shot ping.- * All strokes are the theme accent under the HUD halo so they read on any- * wallpaper in either appearance.+ * All strokes are the theme accent under the HUD halo so they read on the+ * ground in either appearance.*/function StandbyRing({size,diff --git a/jarvis/ui/web/frontend/src/components/deck/DeckWiki.tsx b/jarvis/ui/web/frontend/src/components/deck/DeckWiki.tsxindex 7e39c5275c..10e2b6331a 100644--- a/jarvis/ui/web/frontend/src/components/deck/DeckWiki.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/DeckWiki.tsx@@ -275,8 +275,9 @@ export function WikiCard({ className }: { className?: string }) {/*** The map at the whole window. A HUD overlay, not a modal dialog: a thin- * bracket frame, a title strip with the counts, and the scene — the wallpaper- * still shows through the WebGL background the way it does everywhere else.+ * bracket frame, a title strip with the counts, and the scene — the app's+ * ground still shows through the WebGL background the way it does everywhere+ * else.*/function WikiExpanded({graphData,diff --git a/jarvis/ui/web/frontend/src/components/deck/HudFrame.tsx b/jarvis/ui/web/frontend/src/components/deck/HudFrame.tsxindex ccf6504011..08e0ae06af 100644--- a/jarvis/ui/web/frontend/src/components/deck/HudFrame.tsx+++ b/jarvis/ui/web/frontend/src/components/deck/HudFrame.tsx@@ -47,10 +47,9 @@ export function useElementSize<T extends HTMLElement>(): [RefObject<T>, { w: num}/**- * A soft halo in the theme's own ground colour under every HUD stroke — the- * SVG twin of the stage's text-shadow readability floor. Accent hairlines on a- * light theme over a dark picture (or the reverse) would otherwise vanish;- * with the halo they read on any wallpaper in either appearance.+ * A soft halo in the theme's own ground colour under every HUD stroke, so+ * accent hairlines stay separate from whatever they cross and read in either+ * appearance.*/export function HudHaloDefs({ id }: { id: string }) {return (diff --git a/jarvis/ui/web/frontend/src/components/home/StageWaveform.tsx b/jarvis/ui/web/frontend/src/components/home/StageWaveform.tsxindex bf0056bdd0..fc68604202 100644--- a/jarvis/ui/web/frontend/src/components/home/StageWaveform.tsx+++ b/jarvis/ui/web/frontend/src/components/home/StageWaveform.tsx@@ -85,8 +85,7 @@ import { cn } from "@/lib/utils";* Canvas rather than DOM capsules: forty to sixty shapes repainted every* frame are cheap on a 2D context and would be layout work as elements.* Every colour is read from the theme tokens on the element itself, so the- * drawing follows light/dark and the wallpaper floor without a single- * literal. Reduced motion keeps the information (a level meter) and drops+ * drawing follows light/dark without a single literal. Reduced motion keeps the information (a level meter) and drops* the decoration (no breathing, no sweep, no scroll).*/export function StageWaveform({diff --git a/jarvis/ui/web/frontend/src/components/layout/MainView.settingsHub.test.tsx b/jarvis/ui/web/frontend/src/components/layout/MainView.settingsHub.test.tsxindex 26ddfba174..290205b16b 100644--- a/jarvis/ui/web/frontend/src/components/layout/MainView.settingsHub.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/MainView.settingsHub.test.tsx@@ -37,7 +37,6 @@ describe("MainView — every settings-hub id mounts the hub", () => {"telephony","telephony-setup","local-models",- "wallpaper","costs","feedback",] as SectionId[])("routes %s to the Settings hub", async (activeSection) => {diff --git a/jarvis/ui/web/frontend/src/components/layout/MainView.tsx b/jarvis/ui/web/frontend/src/components/layout/MainView.tsxindex 3f689716e4..4db2654f87 100644--- a/jarvis/ui/web/frontend/src/components/layout/MainView.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/MainView.tsx@@ -82,7 +82,7 @@ function lazyPropView<P>(// front-loads what the user reaches for first. Views are named exports, hence// the explicit unwrap into the { default } shape React.lazy expects.// The Settings hub — Profile, {name}.md, Contacts, Socials, API Keys, Local-// models, Wallpaper, Spend and Feedback behind one left-nav dialog. The hub+// models, Spend and Feedback behind one left-nav dialog. The hub// statically owns only its shell; every tab stays its own lazy chunk (see// SettingsHubView), so this one import replaces the eleven per-view imports// below without merging their chunks back together.diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsxindex ae33972c8c..1c7080b343 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.test.tsx@@ -317,7 +317,7 @@ describe("Sidebar settings-hub entry", () => {test("the profile button stays lit while any hub section is on screen", () => {// It IS the hub's entry point, so it carries "you are here" for all of// the hub's sections — including ones only reachable from inside the hub.- useEventStore.setState({ activeSection: "wallpaper" });+ useEventStore.setState({ activeSection: "local-models" });renderSidebar();expect(screen.getByTestId("sidebar-profile-toggle").className).toMatch(@@ -688,7 +688,7 @@ describe("compact sidebar navigation", () => {});test("the profile button opens the hub — hub tabs are the hub's own tests", () => {- // No popup anymore: entries like Wallpaper live in the hub's left nav+ // No popup anymore: entries like Spend live in the hub's left nav// (see SettingsHubView.test), so one click on the profile button is the// whole interaction and it lands on the Profile tab.renderSidebar();diff --git a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsxindex d475466aa9..2b5ff05851 100644--- a/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx+++ b/jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx@@ -543,7 +543,7 @@ export function Sidebar({{/* The footer is one button now, not a popup: it opens the Settings hubon the Profile tab. The hub carries every former popup entry(Profile, {name}.md, Contacts, Spend, Socials, API Keys, Local- models, Settings, Wallpaper, Feedback) in its own left navigation.+ models, Settings, Feedback) in its own left navigation.The attention dot stays — a failing provider, or a local setup thatneeds care, must be visible without opening anything. */}<div className="shrink-0 border-t border-border p-2">diff --git a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts b/jarvis/ui/web/frontend/src/components/layout/navGroups.tsindex 4c4aa40e9c..2f06486a8c 100644--- a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts+++ b/jarvis/ui/web/frontend/src/components/layout/navGroups.ts@@ -32,7 +32,6 @@ import {Users,Wallet,Workflow,- Image as ImageIcon,ScanLine,ShieldCheck,type LucideIcon,@@ -136,8 +135,8 @@ export const NAV_GROUPS: NavItem[][] = [icon: Boxes,matchIds: ["skills", "plugins", "mcps"],},- // The marketplace fills those lists: a plugin, a skill or a wallpaper- // published there ends up in one of them once installed.+ // The marketplace fills those lists: a plugin or a skill published there+ // ends up in one of them once installed.{id: "marketplace",labelKey: "nav.marketplace",@@ -249,12 +248,6 @@ export const NAV_GROUPS: NavItem[][] = [// missing from a locale, and it is NOT interpolated.fallbackLabel: "Voice",},- {- id: "wallpaper",- labelKey: "nav.wallpaper",- icon: ImageIcon,- fallbackLabel: "Wallpaper",- },],];@@ -305,7 +298,6 @@ export const SETTINGS_HUB_IDS: readonly SectionId[] = ["telephony-setup","local-models","computers",- "wallpaper","appshots","jarvis-actions","costs",diff --git a/jarvis/ui/web/frontend/src/components/layout/overlay-stacking.test.ts b/jarvis/ui/web/frontend/src/components/layout/overlay-stacking.test.tsindex 66ce794ed5..2204874fe4 100644--- a/jarvis/ui/web/frontend/src/components/layout/overlay-stacking.test.ts+++ b/jarvis/ui/web/frontend/src/components/layout/overlay-stacking.test.ts@@ -6,13 +6,13 @@ import { describe, expect, it } from "vitest";/*** The shell must not build a stacking context around the section stage.*- * A full-screen overlay inside a view (the wallpaper preview, a view's own+ * A full-screen overlay inside a view (an image preview, a view's own* dialog and its scrim) is `position: fixed` and climbs to z-40/z-50/z-70 to* cover the app. All of that is void the moment an ANCESTOR between it and the* shell root carries a z-index of its own: the overlay is then trapped at the* ancestor's level, and the nav column beside it (z-20) paints straight over* it — which is how the sidebar logo, the assistant name and the voice state- * ended up printed on top of the wallpaper preview's own header.+ * ended up printed on top of a full-screen preview's own header.** The chain guarded here is the whole path from the shell root down to a* section: <main> in App.tsx, the SectionStage it wraps the section in, anddiff --git a/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.test.tsx b/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.test.tsxindex 582903c3db..f30731d6bd 100644--- a/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.test.tsx+++ b/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.test.tsx@@ -29,10 +29,9 @@ import {} from "@/components/marketplace/PublishIdentity";import { setUiLanguage } from "@/i18n";-const SIGNED_OUT: PublishIdentityWire = { enabled: true, wallpapers_enabled: true, signed_in: false };+const SIGNED_OUT: PublishIdentityWire = { enabled: true, signed_in: false };const SIGNED_IN: PublishIdentityWire = {enabled: true,- wallpapers_enabled: true,signed_in: true,login: "octocat",avatar_url: null,@@ -125,7 +124,7 @@ describe("PublisherChip", () => {});it("renders nothing when publishing is disabled in this deployment", async () => {- stubServer({ enabled: false, wallpapers_enabled: false, signed_in: false });+ stubServer({ enabled: false, signed_in: false });renderWith(<PublisherChip onSignIn={() => undefined} />);await waitFor(() => expect((fetch as unknown as ReturnType<typeof vi.fn>).mock.calls.length).toBeGreaterThan(0));await waitFor(() => expect(screen.queryByTestId("publisher-chip-signed-out")).toBeNull());diff --git a/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.tsx b/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.tsxindex a072499f99..e4568b2aa6 100644--- a/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.tsx+++ b/jarvis/ui/web/frontend/src/components/marketplace/PublishIdentity.tsx@@ -23,11 +23,10 @@ import { cn } from "@/lib/utils";// ---------------------------------------------------------------------------// One identity for everything the app publishes.//-// Packages and wallpapers are two lanes with two endpoints, but a person signs-// in once — so the sign-in lives here rather than inside either surface. Every-// surface reads the same query key, which means signing in from the wallpaper-// picker leaves the marketplace signed in and the other way round, with no-// state to keep in step.+// A person signs in once — so the sign-in lives here rather than inside any+// one surface. Every surface reads the same query key, which means signing in+// anywhere leaves every other surface signed in too, with no state to keep in+// step.//// The flow is GitHub's DEVICE flow: the app shows a code, the user types it at// github.com/login/device, and the app polls until GitHub reports approval.@@ -40,8 +39,6 @@ import { cn } from "@/lib/utils";export interface PublishIdentityWire {/** Package publishing (plugins and skills) is configured. */enabled: boolean;- /** The wallpaper lane is configured — a fork may run one without the other. */- wallpapers_enabled?: boolean;signed_in: boolean;login?: string;avatar_url?: string | null;@@ -468,7 +465,7 @@ export function PublisherChip({}, [open]);const data = identity.data;- if (data && !data.enabled && !data.wallpapers_enabled) return null;+ if (data && !data.enabled) return null;if (identity.isLoading || !ready) {return <Loader2 className="h-4 w-4 animate-spin text-muted-foreground" aria-hidden />;diff --git a/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.test.tsx b/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.test.tsxindex 2c8ab267d8..be0f6d7902 100644--- a/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.test.tsx+++ b/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.test.tsx@@ -21,12 +21,11 @@ import { setUiLanguage } from "@/i18n";const SIGNED_IN: PublishIdentityWire = {enabled: true,- wallpapers_enabled: true,signed_in: true,login: "octocat",avatar_url: null,};-const SIGNED_OUT: PublishIdentityWire = { enabled: true, wallpapers_enabled: true, signed_in: false };+const SIGNED_OUT: PublishIdentityWire = { enabled: true, signed_in: false };function stubServer(identity: PublishIdentityWire, opts?: { validateErrors?: unknown[] }) {const calls: { url: string; body?: unknown }[] = [];@@ -41,11 +40,6 @@ function stubServer(identity: PublishIdentityWire, opts?: { validateErrors?: unkbody: typeof init?.body === "string" ? JSON.parse(init.body) : init?.body,});if (url === "/api/marketplace/publish/identity" && method === "GET") return json(identity);- if (url === "/api/wallpapers/uploads" && method === "POST") {- // The picker's own upload route: the dropped picture comes back as a- // fresh "own" upload the lane can hand straight to the share dialog.- return json({ id: "u0000000000000003", title: "Dropped", theme: "dark", createdAt: 3, source: "own" });- }if (url === "/api/marketplace/publish/validate") {return json({ ok: !(opts?.validateErrors?.length), errors: opts?.validateErrors ?? [] });}@@ -70,21 +64,6 @@ function stubServer(identity: PublishIdentityWire, opts?: { validateErrors?: unk201,);}- if (url === "/api/wallpapers/uploads") {- return json({- items: [- { id: "u0000000000000001", title: "Harbour At Dawn", theme: "light", createdAt: 1, source: "own" },- {- id: "u0000000000000002",- title: "Borrowed",- theme: "dark",- createdAt: 2,- source: "marketplace",- publisher: "someone",- },- ],- });- }if (url.startsWith("/api/marketplace/publish/status")) return json({ live: true });return json({});}),@@ -92,11 +71,11 @@ function stubServer(identity: PublishIdentityWire, opts?: { validateErrors?: unkreturn calls;}-function renderStudio(onClose = () => undefined, initialStage?: "source" | "wallpapers") {+function renderStudio(onClose = () => undefined) {const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });return render(<QueryClientProvider client={client}>- <PublishStudio onClose={onClose} initialStage={initialStage} />+ <PublishStudio onClose={onClose} /></QueryClientProvider>,);}@@ -108,12 +87,12 @@ afterEach(() => {});describe("PublishStudio", () => {- it("opens on the doors, with the wallpaper lane among them", async () => {+ it("opens on the package doors, with no wallpaper lane", async () => {stubServer(SIGNED_IN);renderStudio();expect(await screen.findByTestId("studio-door-folder")).toBeTruthy();expect(screen.getByTestId("studio-door-github")).toBeTruthy();- expect(screen.getByTestId("studio-door-wallpaper")).toBeTruthy();+ expect(screen.queryByTestId("studio-door-wallpaper")).toBeNull();// The rail lights the "what" station once somebody is signed in.await screen.findByText(/Signed in as @octocat/);});@@ -176,20 +155,8 @@ describe("PublishStudio", () => {expect((screen.getByTestId("studio-publish") as HTMLButtonElement).disabled).toBe(true);});- it("lists only the owner's own pictures in the wallpaper lane", async () => {- stubServer(SIGNED_IN);- renderStudio(() => undefined, "wallpapers");- const grid = await screen.findByTestId("studio-own-wallpapers");- expect(grid.textContent).toContain("Harbour At Dawn");- // An installed community picture is somebody else's work — not offered.- expect(grid.textContent).not.toContain("Borrowed");-- fireEvent.click(screen.getByRole("button", { name: /Harbour At Dawn/ }));- expect(await screen.findByTestId("publish-wallpaper-dialog")).toBeTruthy();- });-it("says so when publishing is disabled in this deployment", async () => {- stubServer({ enabled: false, wallpapers_enabled: false, signed_in: false });+ stubServer({ enabled: false, signed_in: false });renderStudio();expect(await screen.findByText(/Publishing is disabled/)).toBeTruthy();});@@ -214,19 +181,6 @@ describe("PublishStudio", () => {expect((screen.getByTestId("studio-name") as HTMLInputElement).value).toBe("todo-triage");});- it("takes a dropped picture in the wallpaper lane and opens the share form on it", async () => {- const calls = stubServer(SIGNED_IN);- renderStudio(() => undefined, "wallpapers");- const drop = await screen.findByTestId("studio-wallpaper-drop");- const file = new File(["png-bytes"], "sunset.png", { type: "image/png" });- fireEvent.drop(drop, { dataTransfer: { files: [file] } });-- expect(await screen.findByTestId("publish-wallpaper-dialog")).toBeTruthy();- const upload = calls.find((c) => c.url === "/api/wallpapers/uploads" && c.body instanceof FormData);- expect(upload).toBeTruthy();- expect((upload?.body as FormData).get("file")).toBeInstanceOf(File);- });-it("speaks German when the UI does", async () => {stubServer(SIGNED_IN);setUiLanguage("de");diff --git a/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.tsx b/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.tsxindex 516778de21..7b95b8043f 100644--- a/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.tsx+++ b/jarvis/ui/web/frontend/src/components/marketplace/PublishStudio.tsx@@ -8,13 +8,11 @@ import {FileText,FolderUp,Github,- Image as ImageIcon,Loader2,PencilLine,Plug,Search,Sparkles,- Upload,UploadCloud,X,} from "lucide-react";@@ -27,13 +25,6 @@ import {PublisherAvatar,usePublishIdentity,} from "@/components/marketplace/PublishIdentity";-import { PublishWallpaperDialog } from "@/components/wallpaper/PublishWallpaperDialog";-import { thumbUrlFor, type WallpaperEntry } from "@/hooks/useWallpaperCatalog";-import {- uploadAsEntry,- useUploadMutations,- useWallpaperUploads,-} from "@/hooks/useWallpaperUploads";import { fill, useLocaleChunk, useT } from "@/i18n";import { openExternalUrl } from "@/lib/openExternal";import { cn } from "@/lib/utils";@@ -61,9 +52,8 @@ import {// A full-height overlay over the storefront with a rail of four stations on// the left (who · what · check · live) and the work on the right. The author// never starts at an empty form: the entry screen offers the ways a package-// can arrive — drop the folder, import it from a public GitHub repo, write it-// by hand, or pick one of your own wallpapers — and "the folder is the-// classification" (publishing-plan.md §2): what is inside decides whether it+// can arrive — drop the folder, import it from a public GitHub repo, or write+// it by hand — and "the folder is the classification" (publishing-plan.md §2): what is inside decides whether it// becomes a skill or a plugin card.//// Anyone may publish: whatever passes the automated checks goes live with no@@ -93,7 +83,7 @@ interface SubmitResultWire {}type Kind = "skill" | "plugin";-type Stage = "source" | "github" | "wallpapers" | "form" | "done";+type Stage = "source" | "github" | "form" | "done";interface Draft {kind: Kind;@@ -206,23 +196,14 @@ function draftToBody(return { body };}-/**- * The studio. `initialStage` lets a caller open it straight at a lane — the- * wallpaper picker's "Share" lands in the wallpapers station, for example.- */-export function PublishStudio({- onClose,- initialStage = "source",-}: {- onClose: () => void;- initialStage?: Stage;-}) {+/** The studio: a full-height overlay that walks one package to "live". */+export function PublishStudio({ onClose }: { onClose: () => void }) {const t = useT();const localeReady = useLocaleChunk("marketplace");const queryClient = useQueryClient();const identity = usePublishIdentity();- const [stage, setStage] = useState<Stage>(initialStage);+ const [stage, setStage] = useState<Stage>("source");const [draft, setDraft] = useState<Draft>(EMPTY_DRAFT);const [prefill, setPrefill] = useState<{origin: string;@@ -398,7 +379,6 @@ export function PublishStudio({<p className="truncate text-sm font-semibold text-foreground">{stage === "source" && t("marketplace.studio_h_source")}{stage === "github" && t("marketplace.studio_h_github")}- {stage === "wallpapers" && t("marketplace.studio_h_wallpapers")}{stage === "form" && t("marketplace.studio_h_form")}{stage === "done" && t("marketplace.studio_h_done")}</p>@@ -426,17 +406,13 @@ export function PublishStudio({<PublishedCard result={result} onPublishAnother={startOver} t={t} />) : (<div className="space-y-5">- {stage !== "wallpapers" && (- <PublishIdentityCard identity={identity.data} loading={identity.isLoading} />- )}+ <PublishIdentityCard identity={identity.data} loading={identity.isLoading} />{stage === "source" && (<SourcePickeronFolder={applyFolderDraft}onGithub={() => setStage("github")}onBlank={startBlank}- onWallpapers={() => setStage("wallpapers")}- wallpapersEnabled={identity.data?.wallpapers_enabled !== false}t={t}/>)}@@ -449,10 +425,6 @@ export function PublishStudio({/>)}- {stage === "wallpapers" && (- <WallpaperLane identityLoading={identity.isLoading} identity={identity.data} t={t} />- )}-{stage === "form" && (<DraftFormdraft={draft}@@ -523,15 +495,11 @@ function SourcePicker({onFolder,onGithub,onBlank,- onWallpapers,- wallpapersEnabled,t,}: {onFolder: (draft: FolderDraft, origin: string) => void;onGithub: () => void;onBlank: (kind: Kind) => void;- onWallpapers: () => void;- wallpapersEnabled: boolean;t: Translate;}) {const [dragOver, setDragOver] = useState(false);@@ -695,17 +663,6 @@ function SourcePicker({</Button></div></div>-- {wallpapersEnabled && (- <Door- icon={<ImageIcon className="h-4 w-4" />}- title={t("marketplace.studio_door_wallpaper")}- hint={t("marketplace.studio_door_wallpaper_hint")}- onClick={onWallpapers}- testId="studio-door-wallpaper"- className="md:col-span-2"- />- )}</div>{dropError && (@@ -1084,152 +1041,6 @@ function GithubImportPanel({);}-// ----------------------------------------------------------------------------// The wallpaper lane: your own pictures, one click from published.-// -----------------------------------------------------------------------------function WallpaperLane({- identity,- identityLoading,- t,-}: {- identity: ReturnType<typeof usePublishIdentity>["data"];- identityLoading: boolean;- t: Translate;-}) {- const { data: uploads, isLoading } = useWallpaperUploads();- const [shareItem, setShareItem] = useState<WallpaperEntry | null>(null);- const own = useMemo(- () => (uploads ?? []).filter((u) => u.source !== "marketplace").map(uploadAsEntry),- [uploads],- );- // Adding a picture right here, not only in the Wallpaper section: the same- // upload the picker uses (it lands in "Yours" there too), and the share- // dialog opens on it straight away — drop, title, publish, three steps.- const { add } = useUploadMutations();- const [dragOver, setDragOver] = useState(false);- const imagePickerRef = useRef<HTMLInputElement | null>(null);- const addAndShare = (file: File | undefined) => {- if (!file) return;- add.mutate(file, { onSuccess: (upload) => setShareItem(uploadAsEntry(upload)) });- };- return (- <section className="space-y-4">- <PublishIdentityCard- identity={identity}- loading={identityLoading}- blurb={t("marketplace.share_identity_blurb")}- />- <div- role="button"- tabIndex={0}- aria-label={t("marketplace.studio_wallpapers_add")}- data-testid="studio-wallpaper-drop"- onClick={() => imagePickerRef.current?.click()}- onKeyDown={(e) => {- if (e.key === "Enter" || e.key === " ") imagePickerRef.current?.click();- }}- onDragOver={(e) => {- e.preventDefault();- setDragOver(true);- }}- onDragLeave={() => setDragOver(false)}- onDrop={(e) => {- e.preventDefault();- setDragOver(false);- addAndShare(e.dataTransfer.files?.[0]);- }}- className={cn(- "flex cursor-pointer items-center gap-4 rounded-2xl border border-dashed p-4 text-left transition-colors",- "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",- dragOver- ? "bg-secondary"- : "border-border bg-gradient-to-br from-primary/10 via-card to-card hover:border-border-strong",- )}- >- <span className="grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-primary text-primary-foreground">- {add.isPending ? (- <Loader2 className="h-5 w-5 animate-spin" />- ) : (- <Upload className="h-5 w-5" />- )}- </span>- <span className="min-w-0">- <span className="block font-display text-sm font-semibold tracking-tight text-foreground">- {t("marketplace.studio_wallpapers_add")}- </span>- <span className="mt-0.5 block text-xs leading-relaxed text-muted-foreground">- {t("marketplace.studio_wallpapers_add_hint")}- </span>- </span>- <input- ref={imagePickerRef}- type="file"- accept="image/png,image/jpeg,image/webp,image/gif,image/bmp"- className="hidden"- data-testid="studio-wallpaper-file-input"- onChange={(e) => {- addAndShare(e.currentTarget.files?.[0]);- e.currentTarget.value = "";- }}- />- </div>- {add.error && (- <p className="flex items-start gap-2 rounded-md bg-secondary px-2 py-1.5 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />- {add.error.message}- </p>- )}- <div className="flex flex-wrap items-baseline gap-2">- <span className="text-xs font-semibold text-foreground">- {t("marketplace.studio_wallpapers_label")}- </span>- <span className="text-micro text-muted-foreground">- {t("marketplace.studio_wallpapers_hint")}- </span>- </div>- {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.loading")}- </p>- ) : own.length === 0 ? (- <div className="rounded-2xl border border-dashed border-border p-6 text-center">- <ImageIcon className="mx-auto mb-2 h-5 w-5 text-muted-foreground" />- <p className="text-xs text-muted-foreground">{t("marketplace.studio_wallpapers_empty")}</p>- </div>- ) : (- <div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3" data-testid="studio-own-wallpapers">- {own.map((entry) => (- <button- key={entry.id}- type="button"- onClick={() => setShareItem(entry)}- className="group relative aspect-[16/10] overflow-hidden rounded-xl bg-secondary text-left transition-colors hover:border-border-strong focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"- >- <img- src={thumbUrlFor(entry)}- alt=""- loading="lazy"- className="h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"- />- <span className="absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/75 to-transparent p-3">- <span className="min-w-0 flex-1 truncate text-xs font-medium text-white">- {entry.title}- </span>- <span className="rounded-full bg-white/15 px-2 py-0.5 text-micro font-medium text-white backdrop-blur">- {t("marketplace.share_cta")}- </span>- </span>- </button>- ))}- </div>- )}- {shareItem && <PublishWallpaperDialog item={shareItem} onClose={() => setShareItem(null)} />}- </section>- );-}-// ---------------------------------------------------------------------------// Station 3: the form (prefilled or blank) + live store-card preview// ---------------------------------------------------------------------------diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsxindex e9e172a440..f37cf4f8b5 100644--- a/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx@@ -156,9 +156,8 @@ export function ProviderLogo({//// The tile is a LIFT surface with no rim. It used to be a --background// fill inside a --border outline: the room itself, which on a card is- // a child darker than its parent, and which the wallpaper path- // converges to transparent — between them, that is why a logo tile- // could render as an empty outline. A nested tile steps UP, and once+ // a child darker than its parent — that is why a logo tile could+ // render as an empty outline. A nested tile steps UP, and once// it has a real fill the outline is what was standing in for one.small? "inline-flex h-4 w-4 shrink-0 items-center justify-center overflow-hidden rounded-full"diff --git a/jarvis/ui/web/frontend/src/components/society/office/officeTalk.css b/jarvis/ui/web/frontend/src/components/society/office/officeTalk.cssindex bbd720f2c1..c03e91d300 100644--- a/jarvis/ui/web/frontend/src/components/society/office/officeTalk.css+++ b/jarvis/ui/web/frontend/src/components/society/office/officeTalk.css@@ -70,6 +70,3 @@.office-talk-tools button:disabled { opacity:.4; cursor:not-allowed; }.office-talk-note { margin:0 14px 10px; }@media (prefers-reduced-motion:reduce) { .office-talk-mic[aria-pressed="true"] { animation:none; } }-/* The light-mode wallpaper halo (index.css) rings every glyph in ivory; on filled chips with light- ink — your own messages, the in-world bubbles and name pills — that ring smears the letters. */-.office-talk-msg[data-from="you"] p, .office-talk-mic, .office-talk-send, .office-bubble, .office-plate, .office-checkpoint { text-shadow:none; }diff --git a/jarvis/ui/web/frontend/src/components/wallpaper/PublishWallpaperDialog.tsx b/jarvis/ui/web/frontend/src/components/wallpaper/PublishWallpaperDialog.tsxdeleted file mode 100644index 7ae705c712..0000000000--- a/jarvis/ui/web/frontend/src/components/wallpaper/PublishWallpaperDialog.tsx+++ /dev/null@@ -1,361 +0,0 @@-import { useEffect, useState } from "react";-import { useMutation, useQueryClient } from "@tanstack/react-query";-import { AlertTriangle, Check, Loader2, Send, X } from "lucide-react";--import { Button } from "@/components/ui/button";-import { InstallStandard, type InstallStandardWire } from "@/components/InstallStandard";-import {- PublishIdentityCard,- usePublishIdentity,-} from "@/components/marketplace/PublishIdentity";-import { fullUrlFor, type WallpaperEntry } from "@/hooks/useWallpaperCatalog";-import { fill, useLocaleChunk, useT } from "@/i18n";-import { cn } from "@/lib/utils";--// ----------------------------------------------------------------------------// "Share to community" — publishing one of your own wallpapers.-//-// What this dialog owes the person using it is honesty about three things,-// because all three are irreversible in ways a picker normally is not:-//-// 1. It goes PUBLIC, under their GitHub name, and nobody reviews it first.-// 2. The license they pick is the permission strangers get — this lane-// only accepts licenses that allow redistribution, because the picture-// is copied onto other people's machines.-// 3. Taking it down later removes it from the store, not from the machines-// that already imported it.-//-// The rights checkbox is the record that carries the lane: no human inspects-// the image before it is live, so the uploader's own statement is the thing-// that makes publishing an accountable act rather than an anonymous one.-// -----------------------------------------------------------------------------/** Exactly the licenses the endpoint accepts (publish.py WALLPAPER_LICENSES). */-const LICENSES = ["CC0-1.0", "CC-BY-4.0", "CC-BY-SA-4.0"] as const;-type LicenseId = (typeof LICENSES)[number];-const LICENSE_KEY: Record<LicenseId, string> = {- "CC0-1.0": "cc0",- "CC-BY-4.0": "ccby",- "CC-BY-SA-4.0": "ccbysa",-};--const MAX_TITLE_CHARS = 80;-const MAX_DESCRIPTION_CHARS = 500;--interface PublishedWire {- ok: boolean;- name: string;- version: string;- install?: InstallStandardWire | null;-}--interface FieldErrorWire {- field: string | null;- error: string;-}--export function PublishWallpaperDialog({- item,- onClose,-}: {- item: WallpaperEntry;- onClose: () => void;-}) {- const t = useT();- useLocaleChunk("marketplace");- const queryClient = useQueryClient();- const identity = usePublishIdentity();- const signedIn = identity.data?.signed_in === true;-- const [title, setTitle] = useState(item.title);- const [description, setDescription] = useState("");- const [license, setLicense] = useState<LicenseId>(LICENSES[0]);- const [rights, setRights] = useState(false);- const [error, setError] = useState<FieldErrorWire | null>(null);- const [published, setPublished] = useState<PublishedWire | null>(null);-- useEffect(() => {- const onKey = (event: KeyboardEvent) => {- if (event.key === "Escape") onClose();- };- window.addEventListener("keydown", onKey);- return () => window.removeEventListener("keydown", onKey);- }, [onClose]);-- const publish = useMutation({- mutationFn: async (): Promise<PublishedWire> => {- const res = await fetch("/api/marketplace/publish/submit-wallpaper", {- method: "POST",- headers: { "Content-Type": "application/json" },- body: JSON.stringify({- upload_id: item.id,- title: title.trim(),- description: description.trim(),- license,- // The picker's own light/dark filing travels with the picture, so- // it lands in the right half of somebody else's store too.- theme: item.theme,- rights,- }),- });- const body = await res.json().catch(() => ({}));- if (!res.ok) {- const detail = (body as { detail?: unknown }).detail;- if (detail && typeof detail === "object") {- const shaped = detail as FieldErrorWire;- throw Object.assign(new Error(shaped.error), { field: shaped.field ?? null });- }- throw new Error(- typeof detail === "string" ? detail : `Publishing failed (${res.status})`,- );- }- return body as PublishedWire;- },- onSuccess: (result) => {- setError(null);- setPublished(result);- queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });- },- onError: (err: Error & { field?: string | null }) => {- setError({ field: err.field ?? null, error: err.message });- },- });-- const titleTooLong = title.trim().length > MAX_TITLE_CHARS;- const descriptionTooLong = description.trim().length > MAX_DESCRIPTION_CHARS;- const ready =- signedIn && rights && title.trim().length > 0 && !titleTooLong && !descriptionTooLong;-- return (- <div- role="dialog"- aria-modal="true"- aria-label={fill(t("marketplace.share_dialog_aria"), { title: item.title })}- data-testid="publish-wallpaper-dialog"- className="fixed inset-0 z-[65] flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm"- >- <div className="flex max-h-full w-full max-w-2xl flex-col overflow-hidden rounded-2xl border border-border bg-popover text-popover-foreground">- <header className="flex items-center gap-3 border-b border-border px-5 py-3">- <div className="min-w-0 flex-1">- <h2 className="truncate font-display text-sm font-semibold tracking-tight">- {t("marketplace.share_title")}- </h2>- <p className="truncate text-xs text-muted-foreground">- {published ? t("marketplace.share_subtitle_done") : t("marketplace.share_subtitle")}- </p>- </div>- <Button size="sm" variant="ghost" onClick={onClose} aria-label={t("marketplace.close")}>- <X className="h-4 w-4" />- </Button>- </header>-- <div className="min-h-0 flex-1 space-y-4 overflow-y-auto p-5">- <div className="flex gap-4">- <img- src={fullUrlFor(item)}- alt={item.title}- className="h-24 w-40 shrink-0 rounded-xl border border-border object-cover"- />- <p className="text-xs leading-relaxed text-muted-foreground">- {t("marketplace.share_consequences")}- </p>- </div>-- {published ? (- <PublishedPanel result={published} t={t} />- ) : (- <>- <PublishIdentityCard- identity={identity.data}- loading={identity.isLoading}- blurb={t("marketplace.share_identity_blurb")}- />-- <Field- label={t("marketplace.share_f_title")}- error={error?.field === "title" ? error.error : null}- >- <input- value={title}- onChange={(e) => setTitle(e.target.value)}- maxLength={MAX_TITLE_CHARS * 2}- className={inputCls(error?.field === "title" || titleTooLong)}- placeholder="Rain Antenna City"- data-testid="wallpaper-title"- />- <p className="mt-1 text-xs text-muted-foreground">- {titleTooLong- ? fill(t("marketplace.share_f_title_too_long"), {- count: title.trim().length,- max: MAX_TITLE_CHARS,- })- : t("marketplace.share_f_title_hint")}- </p>- </Field>-- <Field- label={t("marketplace.share_f_description")}- error={error?.field === "description" ? error.error : null}- >- <textarea- value={description}- onChange={(e) => setDescription(e.target.value)}- rows={2}- className={cn(- inputCls(error?.field === "description" || descriptionTooLong),- "resize-y",- )}- placeholder={t("marketplace.share_f_description_placeholder")}- />- </Field>-- <Field- label={t("marketplace.share_f_license")}- error={error?.field === "license" ? error.error : null}- >- <div className="grid gap-1.5 sm:grid-cols-3">- {LICENSES.map((id) => (- <label- key={id}- className={cn(- "flex cursor-pointer items-start gap-2.5 rounded-xl border p-2.5 transition-colors",- license === id- ? "border-primary bg-primary/5"- : "border-border hover:bg-muted/40",- )}- >- <input- type="radio"- name="wallpaper-license"- checked={license === id}- onChange={() => setLicense(id)}- className="mt-0.5 accent-primary"- />- <span className="min-w-0">- <span className="block text-xs font-medium text-foreground">- {t(`marketplace.share_license_${LICENSE_KEY[id]}`)}- </span>- <span className="block text-xs text-muted-foreground">- {t(`marketplace.share_license_${LICENSE_KEY[id]}_hint`)}- </span>- </span>- </label>- ))}- </div>- <p className="mt-1.5 text-xs text-muted-foreground">- {t("marketplace.share_f_license_note")}- </p>- </Field>-- <label- className={cn(- "flex cursor-pointer items-start gap-2.5 rounded-xl border p-3 transition-colors",- error?.field === "rights"- ? "border-destructive/50 bg-destructive/5"- : "border-border hover:bg-muted/40",- )}- >- <input- type="checkbox"- checked={rights}- onChange={(e) => setRights(e.target.checked)}- className="mt-0.5 accent-primary"- data-testid="wallpaper-rights"- />- <span className="text-xs leading-relaxed text-foreground">- {t("marketplace.share_rights")}- </span>- </label>-- {error && error.field === null && (- <p className="flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />- {error.error}- </p>- )}- </>- )}- </div>-- <footer className="flex items-center gap-2 border-t border-border px-5 py-3">- <p className="min-w-0 flex-1 text-xs text-muted-foreground">- {published- ? t("marketplace.share_footer_done")- : signedIn- ? t("marketplace.share_footer_ready")- : t("marketplace.share_footer_sign_in")}- </p>- {published ? (- <Button size="sm" onClick={onClose}>- {t("marketplace.identity_done")}- </Button>- ) : (- <Button- size="sm"- onClick={() => publish.mutate()}- disabled={!ready || publish.isPending}- data-testid="wallpaper-publish-submit"- >- {publish.isPending ? (- <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />- ) : (- <Send className="mr-1.5 h-3.5 w-3.5" />- )}- {t("marketplace.studio_publish")}- </Button>- )}- </footer>- </div>- </div>- );-}--/** After the upload: what it is called now, and how anyone else gets it. */-function PublishedPanel({- result,- t,-}: {- result: PublishedWire;- t: (key: string) => string;-}) {- return (- <div className="space-y-3">- <p className="flex items-start gap-2 rounded-xl border border-primary/40 bg-primary/5 px-3 py-2 text-xs text-foreground">- <Check className="mt-0.5 h-3.5 w-3.5 shrink-0 text-primary" />- <span>{fill(t("marketplace.share_published_as"), { name: result.name })}</span>- </p>- {result.install && <InstallStandard install={result.install} />}- </div>- );-}--function Field({- label,- error,- children,-}: {- label: string;- error: string | null;- children: React.ReactNode;-}) {- return (- <div>- <label className="mb-1 block text-xs font-medium text-foreground">{label}</label>- {children}- {error && (- <p className="mt-1 flex items-start gap-1.5 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3 w-3 shrink-0" />- {error}- </p>- )}- </div>- );-}--function inputCls(hasError: boolean): string {- return cn(- "w-full rounded-lg border bg-background px-2.5 py-1.5 text-xs text-foreground",- "placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary",- hasError ? "border-destructive/60" : "border-border",- );-}diff --git a/jarvis/ui/web/frontend/src/components/wiki/Graph3D.transparency.test.tsx b/jarvis/ui/web/frontend/src/components/wiki/Graph3D.transparency.test.tsxindex 235502044f..812598c686 100644--- a/jarvis/ui/web/frontend/src/components/wiki/Graph3D.transparency.test.tsx+++ b/jarvis/ui/web/frontend/src/components/wiki/Graph3D.transparency.test.tsx@@ -24,7 +24,7 @@ vi.mock("@/hooks/useGraphOrbit", () => ({import { WikiGraph3D } from "@/components/wiki/WikiGraph3D";describe("3D graph stage transparency", () => {- it("lets the wallpaper show through the Wiki graph canvas", () => {+ it("lets the app ground show through the Wiki graph canvas", () => {render(<WikiGraph3DgraphData={{ nodes: [], links: [] }}diff --git a/jarvis/ui/web/frontend/src/hooks/useApplyWallpaper.ts b/jarvis/ui/web/frontend/src/hooks/useApplyWallpaper.tsdeleted file mode 100644index a95404a984..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useApplyWallpaper.ts+++ /dev/null@@ -1,56 +0,0 @@-import { useCallback } from "react";--import { useTheme } from "@/hooks/useTheme";-import type { WallpaperEntry } from "@/hooks/useWallpaperCatalog";-import { useWallpaperStore } from "@/store/wallpaper";--/**- * Adopt a wallpaper, and take the interface theme with it.- *- * Light and dark mode here are not an independent setting the user has to keep- * in sync by hand: the wallpaper IS the app's ground, and every one of the five- * hundred is authored for one of the two. A bright daylight scene under dark- * chrome reads as a mistake, so choosing the picture chooses the mode.- *- * Both halves persist through the machinery that already owns them — the- * wallpaper through localStorage, the theme through the appearance endpoint —- * so nothing here invents a second source of truth. The theme switcher in- * Settings keeps working afterwards; it is the next wallpaper, not this one,- * that overrides a manual change.- *- * `null` means "back to the default": the current mode drops its pick and- * shows the picture bundled for it, and the mode itself stays. It used to- * clear the DARK slot and switch to dark regardless of where the user was —- * so "Default" in light mode flipped the whole app and left the light pick in- * place. Every mode has its own bundled picture now (useDesktopWallpaper), so- * the default of the mode you are in is the only sensible reading.- */-export function useApplyWallpaper(): (item: WallpaperEntry | null) => void {- const select = useWallpaperStore((state) => state.select);- const setBackground = useWallpaperStore((state) => state.setBackground);- const { theme: current, setPreference } = useTheme();-- return useCallback(- (item: WallpaperEntry | null) => {- // Picking a picture is the act of wanting a wallpaper: the app paints- // on a flat colour by default, and this is the one place that turns the- // artwork on (lib/backgroundMode.ts). The "Solid colour" control in the- // Wallpaper section is the way back.- setBackground("wallpaper");- if (item === null) {- select(null, current);- return;- }- // A bundled original has a grid tile of its own, but adopting it is the- // same act as clearing the choice for its mode: one stored state for one- // picture, so the tile and the "Default" button can never disagree.- //- // The pick is filed under the theme the picture was AUTHORED for — the- // same theme the app is about to switch into. Each mode keeps its own- // picture, so a later manual theme toggle brings the right one back.- select(item.isDefault ? null : item.id, item.theme);- setPreference(item.theme);- },- [select, setBackground, setPreference, current],- );-}diff --git a/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.test.tsx b/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.test.tsxdeleted file mode 100644index f08c8bef34..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.test.tsx+++ /dev/null@@ -1,123 +0,0 @@-import { act, cleanup, render, screen, waitFor } from "@testing-library/react";-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";--import {- DEFAULT_WALLPAPER_URLS,- defaultWallpaperUrl,- useDesktopWallpaper,-} from "@/hooks/useDesktopWallpaper";-import { useWallpaperStore } from "@/store/wallpaper";--/**- * jsdom never loads images, so the test drives the outcome by hand: an- * instance is captured on construction and its `onload`/`onerror` fired when- * the test wants the swap to succeed or fail.- */-let pending: HTMLImageElement[] = [];--class TestImage {- onload: (() => void) | null = null;- onerror: (() => void) | null = null;- complete = false;- naturalWidth = 0;- #src = "";-- constructor() {- pending.push(this as unknown as HTMLImageElement);- }-- get src() {- return this.#src;- }-- set src(value: string) {- this.#src = value;- }-}--function Probe() {- return <span data-testid="url">{useDesktopWallpaper()}</span>;-}--beforeEach(() => {- pending = [];- window.localStorage.clear();- // No ThemeProvider in these tests and no `dark` class on <html>, so the- // hook resolves the light slot; the picks below are filed there.- useWallpaperStore.setState({ selections: { light: null, dark: null } });- vi.stubGlobal("Image", TestImage);-});--afterEach(() => {- cleanup();- vi.unstubAllGlobals();- document.documentElement.classList.remove("dark");-});--describe("useDesktopWallpaper", () => {- it("starts on the bundled wallpaper of the mode on screen", () => {- render(<Probe />);-- expect(screen.getByTestId("url").textContent).toBe(defaultWallpaperUrl("light"));- expect(pending).toHaveLength(0);- });-- it("paints the night original in dark mode and the daylight one in light", async () => {- document.documentElement.classList.add("dark");- render(<Probe />);- expect(screen.getByTestId("url").textContent).toBe(DEFAULT_WALLPAPER_URLS.dark);-- // Light chrome never lands on the night scene: with no light pick stored,- // the light mode shows the picture bundled FOR light.- act(() => document.documentElement.classList.remove("dark"));- await waitFor(() =>- expect(screen.getByTestId("url").textContent).toBe(DEFAULT_WALLPAPER_URLS.light),- );- expect(DEFAULT_WALLPAPER_URLS.light).not.toBe(DEFAULT_WALLPAPER_URLS.dark);- expect(pending).toHaveLength(0);- });-- it("keeps the old picture on screen until the new one has loaded", async () => {- render(<Probe />);- act(() => useWallpaperStore.getState().select("03-anime-neon-01", "light"));-- // Requested, but not yet painted — the shell must not go blank meanwhile.- expect(pending[0]?.src).toBe("/api/wallpapers/03-anime-neon-01/full");- expect(screen.getByTestId("url").textContent).toBe(defaultWallpaperUrl("light"));-- act(() => pending[0]?.onload?.(new Event("load") as never));-- await waitFor(() =>- expect(screen.getByTestId("url").textContent).toBe(- "/api/wallpapers/03-anime-neon-01/full",- ),- );- });-- it("paints a plain ground straight from the bundle, no request to the API", async () => {- act(() => useWallpaperStore.getState().select("plain-white", "light"));-- render(<Probe />);- // A drawn colour: the URL is the image, so nothing is fetched from /api/.- expect(pending[0]?.src.startsWith("data:image/svg+xml,")).toBe(true);- act(() => pending[0]?.onload?.(new Event("load") as never));-- await waitFor(() =>- expect(screen.getByTestId("url").textContent?.startsWith("data:image/svg+xml,")).toBe(true),- );- expect(screen.getByTestId("url").textContent).toContain(encodeURIComponent("#ffffff"));- });-- it("falls back to the mode's bundled wallpaper when the library is missing", async () => {- useWallpaperStore.setState({- selections: { light: "03-anime-neon-01", dark: null },- });- render(<Probe />);-- act(() => pending[0]?.onerror?.(new Event("error") as never));-- await waitFor(() =>- expect(screen.getByTestId("url").textContent).toBe(defaultWallpaperUrl("light")),- );- });-});diff --git a/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.ts b/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.tsdeleted file mode 100644index 47e05a41ef..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useDesktopWallpaper.ts+++ /dev/null@@ -1,65 +0,0 @@-import { useEffect, useState } from "react";--import { useThemeValue } from "@/hooks/useTheme";-import { DEFAULT_WALLPAPER_URLS, defaultWallpaperUrl } from "@/lib/bundledWallpapers";-import { useWallpaperStore, wallpaperFullUrl } from "@/store/wallpaper";--// The bundled artwork itself — one picture per mode, each the default and the-// fallback of its own mode — is defined once in lib/bundledWallpapers, next to-// the other pictures that ship inside the app. Re-exported here because this-// hook is where the shell has always asked for it.-export { DEFAULT_WALLPAPER_URLS, defaultWallpaperUrl };--/** The dark original — the picture the app was born with. */-export const DEFAULT_WALLPAPER_URL = DEFAULT_WALLPAPER_URLS.dark;--/**- * The background-image URL the app shell should currently paint.- *- * A chosen wallpaper is a ~300 KB download from the library, and swapping the- * CSS URL before those bytes arrive paints the shell empty for as long as the- * transfer takes. So the new image is fetched into the browser cache first and- * the switch happens only once it can be drawn — the visible change is then a- * single repaint, with no gap in between.- *- * A failed load falls back to the bundled artwork of the mode instead of- * leaving the shell bare. That is the ordinary case on a machine where the- * wallpaper library was never generated: the id in localStorage is still- * valid, the files simply are not there.- */-export function useDesktopWallpaper(): string {- // The pick is per theme: toggling the mode swaps in that mode's picture.- const theme = useThemeValue();- const selectedId = useWallpaperStore((state) => state.selections[theme]);- const [url, setUrl] = useState(() => defaultWallpaperUrl(theme));-- useEffect(() => {- const fallback = defaultWallpaperUrl(theme);- if (!selectedId) {- setUrl(fallback);- return;- }-- const target = wallpaperFullUrl(selectedId);- let cancelled = false;- const image = new Image();- image.onload = () => {- if (!cancelled) setUrl(target);- };- image.onerror = () => {- if (!cancelled) setUrl(fallback);- };- image.src = target;- // A cached image can be complete before the handlers are attached — in- // that case no event will ever fire, so adopt it straight away.- if (image.complete && image.naturalWidth > 0) setUrl(target);-- return () => {- cancelled = true;- image.onload = null;- image.onerror = null;- };- }, [selectedId, theme]);-- return url;-}diff --git a/jarvis/ui/web/frontend/src/hooks/useTheme.tsx b/jarvis/ui/web/frontend/src/hooks/useTheme.tsxindex ba415dbd0c..ab3686c2e2 100644--- a/jarvis/ui/web/frontend/src/hooks/useTheme.tsx+++ b/jarvis/ui/web/frontend/src/hooks/useTheme.tsx@@ -51,18 +51,6 @@ export function resolveTheme(preference: ThemePreference): Theme {return preference === "system" ? systemTheme() : preference;}-/**- * The theme the app is about to paint, answered synchronously from the cache.- *- * For code that needs the answer at module-init time, before the provider (or- * even React) exists — e.g. the wallpaper store filing a stored pick under the- * mode it belongs to. Reads the same cache the boot script uses, so the three- * readers of `jarvis.theme` cannot disagree about what the first frame wears.- */-export function cachedTheme(): Theme {- return resolveTheme(readCachedPreference());-}-/*** The cached preference, read synchronously.*diff --git a/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.ts b/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.tsdeleted file mode 100644index 29d7d0672e..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useWallpaperCatalog.ts+++ /dev/null@@ -1,173 +0,0 @@-import { useQuery } from "@tanstack/react-query";--import {- BUNDLED_WALLPAPERS,- ORIGINAL_WALLPAPER_STYLE,- PLAIN_WALLPAPER_STYLE,-} from "@/lib/bundledWallpapers";-import { wallpaperFullUrl, wallpaperThumbUrl } from "@/store/wallpaper";--/** One wallpaper as the browse grid knows it — metadata only, no pixels. */-export interface WallpaperEntry {- id: string;- title: string;- /** Directory slug, e.g. `03-anime-neon`. Stable; used as the filter key. */- style: string;- /** Written-out style name for the filter chips, e.g. `Cinematic Anime Neon`. */- styleLabel: string;- theme: "light" | "dark";- /**- * True for a wallpaper that ships inside the app rather than in the- * generated library: the two originals and the plain black/white grounds.- * They are pinned to the front of the grid and their pixels come from the- * bundle, not from `/api/wallpapers` (see lib/bundledWallpapers).- */- isBundled?: boolean;- /**- * True for the one bundled wallpaper each mode falls back to — the original- * of that mode. Adopting it clears the stored choice instead of storing an- * id, so the tile and the "Default" button can never disagree.- */- isDefault?: boolean;- /**- * 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 {- slug: string;- label: string;- count: number;-}--export interface WallpaperCatalog {- /** Always true — the bundled originals are wallpapers the grid can show. */- available: boolean;- /** False when the generated 500-piece library is not installed here. */- libraryAvailable: boolean;- count: number;- styles: WallpaperStyle[];- items: WallpaperEntry[];-}--/**- * The wallpapers the app ships with, as the grid knows them.- *- * They are assembled here instead of being copied into the generated library- * so that they are present unconditionally: the library is optional content- * under a git-ignored directory, these pictures are part of the program. Their- * pixels come from the bundle (the same assets the shell already paints, or a- * drawn solid colour), so putting them in the grid costs no download at all.- *- * Which pictures, and why, is the business of lib/bundledWallpapers — the two- * originals (one per mode, each its mode's default) and the plain black and- * white grounds. Every one carries the mode it was authored for, so adopting- * it switches the interface into that mode like any other tile.- */-export const BUNDLED_WALLPAPER_ENTRIES: readonly WallpaperEntry[] = BUNDLED_WALLPAPERS.map(- ({ id, title, style, styleLabel, theme, isDefault }) => ({- id,- title,- style,- styleLabel,- theme,- isBundled: true,- ...(isDefault ? { isDefault: true } : {}),- }),-);--/**- * The style chips for the bundled wallpapers, in the order they lead the chip- * row: the originals, then the plain grounds. Counts come from the entries so- * a chip can never promise a tile the grid does not have.- */-export const BUNDLED_WALLPAPER_STYLES: readonly WallpaperStyle[] = [- { slug: ORIGINAL_WALLPAPER_STYLE, label: "Original" },- { slug: PLAIN_WALLPAPER_STYLE, label: "Plain" },-].map(({ slug, label }) => ({- slug,- label,- count: BUNDLED_WALLPAPER_ENTRIES.filter((entry) => entry.style === slug).length,-}));--/** True for a chip that stands for bundled wallpapers rather than library ones. */-export function isBundledStyle(slug: string): boolean {- return BUNDLED_WALLPAPER_STYLES.some((chip) => chip.slug === slug);-}--/**- * Where a grid tile's thumbnail comes from.- *- * The URL helpers already answer with the bundled picture for a bundled id, so- * a tile needs no special case here — the id is the whole story.- */-export function thumbUrlFor(item: WallpaperEntry): string {- return wallpaperThumbUrl(item.id);-}--/** Where a preview's full-size image comes from. */-export function fullUrlFor(item: WallpaperEntry): string {- return wallpaperFullUrl(item.id);-}--/** The catalog as it looks before (or without) the generated library. */-const BUNDLED_ONLY: WallpaperCatalog = {- available: true,- libraryAvailable: false,- count: BUNDLED_WALLPAPER_ENTRIES.length,- styles: [...BUNDLED_WALLPAPER_STYLES],- items: [...BUNDLED_WALLPAPER_ENTRIES],-};--/**- * Fetch the wallpaper catalog.- *- * The payload is a few dozen kilobytes of metadata for five hundred entries- * and it only changes when the library on disk is regenerated, so it is- * fetched once per session and kept — refetching it on every visit to the- * section would buy nothing.- *- * The bundled wallpapers are prepended to whatever the server returns, so the- * section has something to show even when the request fails or the library was- * never generated on this machine.- */-export function useWallpaperCatalog() {- return useQuery<WallpaperCatalog>({- queryKey: ["wallpapers"],- staleTime: Infinity,- retry: 1,- queryFn: async () => {- // A failure here is not an error state for the section: the bundled- // pictures are still wallpapers, and showing them beats showing a stack- // trace because a backend was mid-restart.- const data = await fetch("/api/wallpapers")- .then((response) =>- response.ok- ? (response.json() as Promise<Partial<WallpaperCatalog> | null>)- : null,- )- .catch(() => null);- if (!data || !Array.isArray(data.items) || !data.items.length) {- return BUNDLED_ONLY;- }- const styles = Array.isArray(data.styles) ? data.styles : [];- return {- available: true,- libraryAvailable: Boolean(data.available),- count:- (typeof data.count === "number" ? data.count : data.items.length) +- BUNDLED_WALLPAPER_ENTRIES.length,- styles: [...BUNDLED_WALLPAPER_STYLES, ...styles],- items: [...BUNDLED_WALLPAPER_ENTRIES, ...data.items],- };- },- });-}diff --git a/jarvis/ui/web/frontend/src/hooks/useWallpaperLibrary.ts b/jarvis/ui/web/frontend/src/hooks/useWallpaperLibrary.tsdeleted file mode 100644index 58b36b2b14..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useWallpaperLibrary.ts+++ /dev/null@@ -1,81 +0,0 @@-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";--/**- * The library installer, as the server reports it.- *- * `state` is the machine the download banner renders from: `idle` before- * anything happened, `downloading`/`unpacking` while the daemon thread works,- * `done` once the catalog is on disk, `error` with a sentence for the owner.- */-export interface LibraryInstallStatus {- installed: boolean;- state: "idle" | "downloading" | "unpacking" | "done" | "error";- receivedBytes: number;- totalBytes: number;- error: string | null;-}--const STATUS_URL = "/api/wallpapers/library";-const STATUS_KEY = ["wallpapers", "library"] as const;--/** True while the server is actively working on the install. */-export function installRunning(status: LibraryInstallStatus | undefined): boolean {- return status?.state === "downloading" || status?.state === "unpacking";-}--function parse(data: unknown): LibraryInstallStatus | null {- const status = data as Partial<LibraryInstallStatus> | null;- if (!status || typeof status.state !== "string") return null;- return {- installed: Boolean(status.installed),- state: status.state as LibraryInstallStatus["state"],- receivedBytes: typeof status.receivedBytes === "number" ? status.receivedBytes : 0,- totalBytes: typeof status.totalBytes === "number" ? status.totalBytes : 0,- error: typeof status.error === "string" ? status.error : null,- };-}--/**- * The install status, polled only while an install is actually running.- *- * The 500-piece library is optional content a fresh machine does not have, so- * this is what turns the "download it" button into a progress bar. Once the- * server reports `done`, the catalog query is refetched and the grid fills in- * without a reload.- */-export function useWallpaperLibraryInstall() {- const client = useQueryClient();-- const status = useQuery<LibraryInstallStatus | null>({- queryKey: STATUS_KEY,- queryFn: async () => {- const data = await fetch(STATUS_URL)- .then((response) => (response.ok ? response.json() : null))- .catch(() => null);- const parsed = parse(data);- // The catalog was fetched once and kept (see useWallpaperCatalog); the- // install finishing is the one event that makes it stale.- if (parsed?.state === "done") {- void client.invalidateQueries({ queryKey: ["wallpapers"], exact: true });- }- return parsed;- },- refetchInterval: (query) =>- installRunning(query.state.data ?? undefined) ? 500 : false,- });-- const start = useMutation<LibraryInstallStatus | null, Error>({- mutationFn: async () => {- const response = await fetch(`${STATUS_URL}/install`, { method: "POST" });- if (!response.ok) {- throw new Error("The download could not be started.");- }- return parse(await response.json());- },- onSuccess: (data) => {- client.setQueryData(STATUS_KEY, data);- },- });-- return { status, start };-}diff --git a/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.ts b/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.tsdeleted file mode 100644index f893bb930e..0000000000--- a/jarvis/ui/web/frontend/src/hooks/useWallpaperUploads.ts+++ /dev/null@@ -1,142 +0,0 @@-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";--import type { Theme } from "@/hooks/useTheme";-import type { WallpaperEntry } from "@/hooks/useWallpaperCatalog";--/** 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;--/** Read the sentence the server sent, or fall back to a plain one. */-async function detail(response: Response, fallback: string): Promise<string> {- try {- const body = (await response.json()) as { detail?: unknown };- if (typeof body?.detail === "string" && body.detail.trim()) return body.detail;- } catch {- /* a body that is not JSON tells us nothing useful */- }- return fallback;-}--/** 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: fromMarketplace ? MARKETPLACE_WALLPAPER_STYLE : UPLOAD_WALLPAPER_STYLE,- styleLabel: fromMarketplace ? "Marketplace" : "Yours",- theme: upload.theme,- isUpload: true,- fromMarketplace,- publisher: upload.publisher ?? null,- };-}--/**- * The owner's own wallpapers.- *- * A query of its own rather than part of the catalog: the generated library is- * five hundred fixed entries fetched once and kept forever, while this list- * changes every time someone adds or removes a picture. Keeping them apart lets- * one be refetched without discarding the other.- */-export function useWallpaperUploads() {- return useQuery<WallpaperUpload[]>({- queryKey: UPLOADS_KEY,- queryFn: async () => {- // A backend that is mid-restart means "no uploads to show right now",- // not a broken section — the library and the bundled original still are.- const data = await fetch(UPLOADS_URL)- .then((response) => (response.ok ? response.json() : null))- .catch(() => null);- const items = (data as { items?: unknown } | null)?.items;- if (!Array.isArray(items)) return [];- return items.filter(- (item): item is WallpaperUpload =>- typeof item?.id === "string" &&- typeof item?.title === "string" &&- (item?.theme === "light" || item?.theme === "dark"),- );- },- });-}--/**- * Add, retheme, and remove the owner's own wallpapers.- *- * Every mutation refetches the list rather than patching it in place: the store- * is a directory on disk that another window may also be writing to, and a- * refetch is a few hundred bytes.- */-export function useUploadMutations() {- const client = useQueryClient();- const refresh = () => client.invalidateQueries({ queryKey: UPLOADS_KEY });-- const add = useMutation<WallpaperUpload, Error, File>({- mutationFn: async (file) => {- const body = new FormData();- body.append("file", file);- const response = await fetch(UPLOADS_URL, { method: "POST", body });- if (!response.ok) {- throw new Error(await detail(response, "That image could not be added."));- }- return (await response.json()) as WallpaperUpload;- },- onSuccess: refresh,- });-- const setTheme = useMutation<WallpaperUpload, Error, { id: string; theme: Theme }>({- mutationFn: async ({ id, theme }) => {- const response = await fetch(`${UPLOADS_URL}/${encodeURIComponent(id)}`, {- method: "PATCH",- headers: { "Content-Type": "application/json" },- body: JSON.stringify({ theme }),- });- if (!response.ok) {- throw new Error(await detail(response, "That change could not be saved."));- }- return (await response.json()) as WallpaperUpload;- },- onSuccess: refresh,- });-- const remove = useMutation<string, Error, string>({- mutationFn: async (id) => {- const response = await fetch(`${UPLOADS_URL}/${encodeURIComponent(id)}`, {- method: "DELETE",- });- if (!response.ok) {- throw new Error(await detail(response, "That wallpaper could not be removed."));- }- return id;- },- onSuccess: refresh,- });-- return { add, setTheme, remove };-}diff --git a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts b/jarvis/ui/web/frontend/src/hooks/useWebSocket.tsindex e40ad47e8a..20418bbdc0 100644--- a/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts+++ b/jarvis/ui/web/frontend/src/hooks/useWebSocket.ts@@ -634,10 +634,7 @@ export function useWebSocket(): void {// restarted. Reload the lane that changed, wherever it came from.const p = env.payload as { kind?: string };void queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });- if (p.kind === "wallpaper") {- // Prefix match: catalog, uploads and library all hang off this key.- void queryClient.invalidateQueries({ queryKey: ["wallpapers"] });- } else if (p.kind === "skill") {+ if (p.kind === "skill") {void queryClient.invalidateQueries({ queryKey: ["skills"] });} else if (p.kind === "plugin") {void queryClient.invalidateQueries({ queryKey: ["marketplace-plugins"] });diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex e0a2fb86d8..a15811255a 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -160,7 +160,6 @@"group_you": "Du","group_system": "System","agent_instructions": "{name}.md",- "wallpaper": "Hintergrund","appshots": "Appshots","jarvis_actions": "Jarvis-Aktionen","marketplace": "Marketplace",@@ -660,11 +659,7 @@"prompt_mode_off": "Prompt-Modus ist aus — Diktate kommen so an, wie gesprochen. Klicken, damit jedes Diktat zu einem fertigen Prompt für einen Coding-Agenten wird.","prompt_mode_failed": "Der Prompt-Modus konnte nicht umgeschaltet werden.","theme_to_light": "Zum hellen Modus wechseln",- "theme_to_dark": "Zum dunklen Modus wechseln",- "background_label": "Hintergrund",- "background_solid": "Einfarbig",- "background_wallpaper": "Hintergrundbild",- "background_hint": "Die App zeichnet standardmäßig auf einer einfarbigen Fläche. Wähle unten ein Bild, um es als Hintergrund zu nutzen; „Einfarbig“ bringt die schlichte Fläche zurück."+ "theme_to_dark": "Zum dunklen Modus wechseln"},"agent_chat": {"pair_open": "Agenten-Chat öffnen",@@ -2608,7 +2603,7 @@"safety_description": "Patterns die ohne Nachfrage ausgeführt werden, auch bei Risk-Tier 'ask'. Vermeidet Confirmation-Fatigue.","appearance": {"title": "Erscheinungsbild",- "description": "Ändert die Farben der Oberfläche, ohne dein Hintergrundbild zu tönen. Dunkel ist die Voreinstellung und der Wechsel erfolgt sofort.",+ "description": "Ändert die Farben der Oberfläche. Dunkel ist die Voreinstellung und der Wechsel erfolgt sofort.","dark": "Dunkel","light": "Hell","system": "System",@@ -4706,18 +4701,15 @@"loading": "Der Marketplace wird geladen…","refresh": "Verzeichnis neu laden","open_web": "Webseite",- "search_placeholder": "Plugins, Skills und Hintergründe durchsuchen…",+ "search_placeholder": "Plugins und Skills 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",@@ -4732,7 +4724,6 @@"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",@@ -4744,7 +4735,6 @@"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.","sends_data_to": "Sobald verbunden, gehen Anfragen und dein Zugriffstoken an:","runs_command": "Sobald verbunden, läuft dieser Befehl auf deinem Rechner:",@@ -4752,7 +4742,6 @@"sign_in_method": "Anmeldeweg","portable_skill": "Portabler Skill — läuft auch in","portable_any": "anderen Agenten, die SKILL.md lesen",- "license": "Lizenz","seed_conflict": "Ein Plugin dieses Namens liegt der App schon bei. Dieses hier ersetzt es.","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.jsonindex 831331ec7e..5ad610137e 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -160,7 +160,6 @@"group_you": "You","group_system": "System","agent_instructions": "{name}.md",- "wallpaper": "Wallpaper","appshots": "Appshots","jarvis_actions": "Jarvis actions","marketplace": "Marketplace",@@ -660,11 +659,7 @@"prompt_mode_off": "Prompt Mode is off — dictations arrive as spoken. Click to turn every dictation into a finished prompt for a coding agent.","prompt_mode_failed": "Prompt Mode could not be switched.","theme_to_light": "Switch to light mode",- "theme_to_dark": "Switch to dark mode",- "background_label": "Background",- "background_solid": "Solid colour",- "background_wallpaper": "Wallpaper",- "background_hint": "The app paints on a plain colour by default. Pick a picture below to use it as your wallpaper; “Solid colour” brings the plain ground back."+ "theme_to_dark": "Switch to dark mode"},"agent_chat": {"pair_open": "Open agent conversation",@@ -2641,7 +2636,7 @@"safety_description": "Patterns executed without confirmation, even at risk-tier 'ask'. Avoids confirmation fatigue.","appearance": {"title": "Appearance",- "description": "Changes the interface colours without tinting your wallpaper. Dark is the default and switching is instant.",+ "description": "Changes the interface colours. Dark is the default and switching is instant.","dark": "Dark","light": "Light","system": "System",@@ -4739,18 +4734,15 @@"loading": "Loading the marketplace index…","refresh": "Fetch the index again","open_web": "Storefront",- "search_placeholder": "Search plugins, skills and wallpapers…",+ "search_placeholder": "Search plugins and skills…","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",@@ -4765,7 +4757,6 @@"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",@@ -4777,7 +4768,6 @@"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.","sends_data_to": "Once connected, requests and your access token go to:","runs_command": "Once connected, this command runs on your computer:",@@ -4785,7 +4775,6 @@"sign_in_method": "Sign-in method","portable_skill": "Portable skill — also runs in","portable_any": "other agents that read SKILL.md",- "license": "Licence","seed_conflict": "A plugin of this name already ships with the app. Installing this one replaces it.","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.jsonindex 33ee9631c2..8f023d4407 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -160,7 +160,6 @@"group_you": "Tú","group_system": "Sistema","agent_instructions": "{name}.md",- "wallpaper": "Fondo de pantalla","appshots": "Appshots","jarvis_actions": "Acciones de Jarvis","marketplace": "Marketplace",@@ -660,11 +659,7 @@"prompt_mode_off": "El modo Prompt está desactivado: los dictados llegan tal como se dijeron. Haz clic para convertir cada dictado en un prompt terminado para un agente de código.","prompt_mode_failed": "No se pudo cambiar el modo Prompt.","theme_to_light": "Cambiar al modo claro",- "theme_to_dark": "Cambiar al modo oscuro",- "background_label": "Fondo",- "background_solid": "Color sólido",- "background_wallpaper": "Fondo de pantalla",- "background_hint": "La app se dibuja sobre un color liso por defecto. Elige una imagen abajo para usarla de fondo; «Color sólido» devuelve la superficie lisa."+ "theme_to_dark": "Cambiar al modo oscuro"},"agent_chat": {"pair_open": "Abrir conversación entre agentes",@@ -2608,7 +2603,7 @@"safety_description": "Patrones ejecutados sin confirmación, incluso en nivel de riesgo 'preguntar'. Evita la fatiga de confirmaciones.","appearance": {"title": "Apariencia",- "description": "Cambia los colores de la interfaz sin teñir el fondo de pantalla. Oscuro es el predeterminado y el cambio es instantáneo.",+ "description": "Cambia los colores de la interfaz. Oscuro es el predeterminado y el cambio es instantáneo.","dark": "Oscuro","light": "Claro","system": "Sistema",@@ -4706,18 +4701,15 @@"loading": "Cargando el índice del marketplace…","refresh": "Volver a cargar el índice","open_web": "Sitio web",- "search_placeholder": "Buscar plugins, skills y fondos…",+ "search_placeholder": "Buscar plugins y skills…","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",@@ -4732,7 +4724,6 @@"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",@@ -4744,7 +4735,6 @@"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.","sends_data_to": "Una vez conectado, las peticiones y tu token de acceso van a:","runs_command": "Una vez conectado, este comando se ejecuta en tu ordenador:",@@ -4752,7 +4742,6 @@"sign_in_method": "Forma de iniciar sesión","portable_skill": "Skill portable: también funciona en","portable_any": "otros agentes que leen SKILL.md",- "license": "Licencia","seed_conflict": "La app ya trae un plugin con este nombre. Instalar este lo sustituye.","landed_open": "Muéstramelo"},diff --git a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/de.json b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/de.jsonindex 23bbb25190..9e733cfc33 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/de.json@@ -1,10 +1,10 @@{"marketplace": {"filter_mine": "Meine",- "empty_mine": "Unter deinem Namen ist noch nichts veröffentlicht. Dein erstes Paket oder Wallpaper ist einen Klick entfernt.",+ "empty_mine": "Unter deinem Namen ist noch nichts veröffentlicht. Dein erstes Paket ist einen Klick entfernt.","hero_eyebrow": "Community-Marketplace","hero_title": "Gebaut von Leuten, die diese App benutzen",- "hero_body": "Plugins, Skills und Wallpaper — von der Community veröffentlicht, mit einem Klick installiert. Jeder kann veröffentlichen: mit GitHub anmelden, und alles, was die automatischen Prüfungen besteht, geht unter deinem Namen live.",+ "hero_body": "Plugins und Skills — von der Community veröffentlicht, mit einem Klick installiert. Jeder kann veröffentlichen: mit GitHub anmelden, und alles, was die automatischen Prüfungen besteht, geht unter deinem Namen live.","hero_publish_signed_in": "Etwas veröffentlichen","publish_on_web": "Auf der Website","identity_label": "Identität",@@ -42,7 +42,6 @@"studio_back": "Zurück","studio_h_source": "Wo ist dein Paket?","studio_h_github": "Aus GitHub importieren",- "studio_h_wallpapers": "Ein Wallpaper teilen","studio_h_form": "Prüfen, checken, veröffentlichen","studio_h_done": "Eingereicht","studio_disabled": "Veröffentlichen ist in dieser Installation abgeschaltet — es ist kein Publish-Endpunkt konfiguriert.",@@ -56,8 +55,6 @@"studio_door_github_hint": "Durchsuche deine öffentlichen Repositories, wähle das Paket, prüfe es zuerst.","studio_door_blank": "Von vorn beginnen","studio_door_blank_hint": "Direkt im Formular schreiben — am besten für einen einzelnen Skill.",- "studio_door_wallpaper": "Ein Wallpaper teilen",- "studio_door_wallpaper_hint": "Leg ein Bild ab oder wähle eines deiner eigenen — die Community kann es mit einem Klick übernehmen.","studio_origin_folder": "deinem Ordner","studio_err_folder": "Der Ordner konnte nicht gelesen werden.","studio_err_plugin_json": "plugin.json ist kein gültiges JSON",@@ -87,11 +84,6 @@"studio_err_import": "Import fehlgeschlagen.","studio_err_ref": "Gib ein Repository als „owner/name“ an oder füge seine GitHub-URL ein.","studio_err_resolve": "Das Repository konnte nicht aufgelöst werden.",- "studio_wallpapers_label": "Deine Bilder",- "studio_wallpapers_hint": "nur Bilder, die du selbst mitgebracht hast — ein installiertes Community-Wallpaper ist die Arbeit von jemand anderem",- "studio_wallpapers_empty": "Noch keine eigenen Bilder — leg oben eines ab oder füge eines in der Wallpaper-Sektion hinzu und teile es dann von hier aus.",- "studio_wallpapers_add": "Bild hinzufügen",- "studio_wallpapers_add_hint": "Zieh ein Bild hierher oder klicke, um eines zu wählen — PNG, JPEG, WebP, GIF oder BMP, bis 40 MB. Es landet in deiner Wallpaper-Sektion, und das Teilen-Formular öffnet sich sofort.","studio_form_label": "Was du veröffentlichst","studio_prefilled_from": "Geladen aus {origin} — prüfe die Felder, dann checken und veröffentlichen.","studio_f_name": "Paketname",@@ -130,31 +122,6 @@"studio_done_waited_out": "Nach mehreren Minuten noch nicht im Feed — öffne den Pull Request oben und sieh nach, was die Prüfungen sagen.","studio_done_watching": "Beobachte den Live-Feed, bis dein Paket erscheint — meist ein paar Minuten.","studio_done_share_heading": "Weitergeben",- "studio_done_share_note": "Das kann jetzt jeder ausführen — es löst deinen Eintrag aus der öffentlichen Registry auf.",- "share_cta": "Teilen",- "share_title": "Mit der Community teilen",- "share_subtitle": "Jeder, der Personal Jarvis nutzt, kann dieses Wallpaper übernehmen.",- "share_subtitle_done": "Veröffentlicht — es erscheint im Store, sobald der Feed neu gebaut ist.",- "share_dialog_aria": "{title} mit der Community teilen",- "share_consequences": "Das veröffentlicht das Bild öffentlich unter deinem GitHub-Namen, ohne Durchsicht vorab. Lade nur hoch, was du selbst gemacht hast oder woran du die Rechte hältst. Nimmst du es später zurück, verschwindet es aus dem Store — nicht von Rechnern, die es schon übernommen haben.",- "share_identity_blurb": "dieses Wallpaper erscheint unter diesem Namen.",- "share_f_title": "Titel",- "share_f_title_hint": "Der Store macht daraus die Adresse des Wallpapers — wähle ihn unverwechselbar.",- "share_f_title_too_long": "{count}/{max} — zu lang.",- "share_f_description": "Beschreibung (optional)",- "share_f_description_placeholder": "Neon-Dächer und Antennenwälder im Regen.",- "share_f_license": "Lizenz",- "share_f_license_note": "Nur Lizenzen, die Weitergabe erlauben — das Bild wird auf die Rechner anderer Leute kopiert.",- "share_license_cc0": "CC0 — gemeinfrei",- "share_license_cc0_hint": "Jeder darf es für alles nutzen, ohne Namensnennung.",- "share_license_ccby": "CC BY — Namensnennung",- "share_license_ccby_hint": "Jeder darf es nutzen, solange dein Name genannt wird.",- "share_license_ccbysa": "CC BY-SA — Namensnennung, gleiche Bedingungen",- "share_license_ccbysa_hint": "Wie CC BY, und alles, was darauf aufbaut, trägt dieselbe Lizenz.",- "share_rights": "Ich habe dieses Bild gemacht oder halte die Rechte, es zu veröffentlichen, und es darf geteilt werden — kein geschütztes Werk eines anderen, nichts Hasserfülltes und keine echte Person ohne ihre Zustimmung.",- "share_footer_done": "Du kannst das hier schließen — mehr ist nicht nötig.",- "share_footer_ready": "Hochgeladen wird erst, wenn du auf Veröffentlichen klickst.",- "share_footer_sign_in": "Melde dich oben mit GitHub an, um zu veröffentlichen.",- "share_published_as": "Veröffentlicht als {name}. Der Store baut seine Liste alle paar Minuten neu — dort und im Marketplace dieser App erscheint es in Kürze."+ "studio_done_share_note": "Das kann jetzt jeder ausführen — es löst deinen Eintrag aus der öffentlichen Registry auf."}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/en.json b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/en.jsonindex f07808019e..9fda74afba 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/en.json@@ -1,10 +1,10 @@{"marketplace": {"filter_mine": "Mine",- "empty_mine": "Nothing published under your name yet. Your first package or wallpaper is one click away.",+ "empty_mine": "Nothing published under your name yet. Your first package is one click away.","hero_eyebrow": "Community marketplace","hero_title": "Built by people who use this app",- "hero_body": "Plugins, skills and wallpapers, published by the community and installed in one click. Anyone can publish — sign in with GitHub, and whatever passes the automated checks goes live under your name.",+ "hero_body": "Plugins and skills, published by the community and installed in one click. Anyone can publish — sign in with GitHub, and whatever passes the automated checks goes live under your name.","hero_publish_signed_in": "Publish something","publish_on_web": "On the website","identity_label": "Identity",@@ -42,7 +42,6 @@"studio_back": "Back","studio_h_source": "Where is your package?","studio_h_github": "Import from GitHub",- "studio_h_wallpapers": "Share a wallpaper","studio_h_form": "Review, check, publish","studio_h_done": "Submitted","studio_disabled": "Publishing is disabled in this deployment — no publish endpoint is configured.",@@ -56,8 +55,6 @@"studio_door_github_hint": "Browse your public repositories, pick the package, review it first.","studio_door_blank": "Start from scratch","studio_door_blank_hint": "Write it in the form — best for a single skill.",- "studio_door_wallpaper": "Share a wallpaper",- "studio_door_wallpaper_hint": "Drop a picture or pick one of your own — the community can add it in one click.","studio_origin_folder": "your folder","studio_err_folder": "Could not read the folder.","studio_err_plugin_json": "plugin.json is not valid JSON",@@ -87,11 +84,6 @@"studio_err_import": "Import failed.","studio_err_ref": "Enter a repository as \"owner/name\" or paste its GitHub URL.","studio_err_resolve": "Could not resolve the repository.",- "studio_wallpapers_label": "Your pictures",- "studio_wallpapers_hint": "only pictures you brought yourself — an installed community wallpaper is somebody else's work",- "studio_wallpapers_empty": "No pictures of your own yet — drop one above, or add one in the Wallpaper section and share it from here.",- "studio_wallpapers_add": "Add a picture",- "studio_wallpapers_add_hint": "Drag an image here or click to choose one — PNG, JPEG, WebP, GIF or BMP, up to 40 MB. It lands in your Wallpaper section, and the share form opens right away.","studio_form_label": "What you are publishing","studio_prefilled_from": "Loaded from {origin} — review the fields, then check and publish.","studio_f_name": "Package name",@@ -130,31 +122,6 @@"studio_done_waited_out": "Still not in the feed after several minutes — open the pull request above to see what its checks say.","studio_done_watching": "Watching the live feed until your package appears — usually a few minutes.","studio_done_share_heading": "Share it",- "studio_done_share_note": "Anyone can run this now — it resolves your listing from the public registry.",- "share_cta": "Share",- "share_title": "Share with the community",- "share_subtitle": "Anyone using Personal Jarvis will be able to add this wallpaper.",- "share_subtitle_done": "Published — it appears in the store once the feed rebuilds.",- "share_dialog_aria": "Share {title} with the community",- "share_consequences": "This publishes the picture publicly, under your GitHub name, with no review before it goes live. Only upload something you made or hold the rights to. If you take it down later it disappears from the store — not from machines that already added it.",- "share_identity_blurb": "this wallpaper publishes under this name.",- "share_f_title": "Title",- "share_f_title_hint": "The store turns this into the wallpaper's address, so make it distinctive.",- "share_f_title_too_long": "{count}/{max} — too long.",- "share_f_description": "Description (optional)",- "share_f_description_placeholder": "Neon rooftops and antenna forests in the rain.",- "share_f_license": "License",- "share_f_license_note": "Only licenses that allow redistribution — the picture is copied onto other people's machines.",- "share_license_cc0": "CC0 — public domain",- "share_license_cc0_hint": "Anyone may use it for anything, no credit required.",- "share_license_ccby": "CC BY — credit required",- "share_license_ccby_hint": "Anyone may use it, as long as they credit you.",- "share_license_ccbysa": "CC BY-SA — credit, share alike",- "share_license_ccbysa_hint": "As CC BY, and anything built on it carries the same license.",- "share_rights": "I made this picture or hold the rights to publish it, and it is legal to share — no copyrighted work of someone else, nothing hateful, and nothing that depicts a real person without their consent.",- "share_footer_done": "You can close this — nothing else is needed.",- "share_footer_ready": "Nothing is uploaded until you click Publish.",- "share_footer_sign_in": "Sign in with GitHub above to publish.",- "share_published_as": "Published as {name}. The store rebuilds its list every few minutes — it appears there, and in this app's Marketplace, shortly."+ "studio_done_share_note": "Anyone can run this now — it resolves your listing from the public registry."}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/es.json b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/es.jsonindex 5bccde243f..6a7b20357b 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/marketplace/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/marketplace/es.json@@ -1,10 +1,10 @@{"marketplace": {"filter_mine": "Míos",- "empty_mine": "Todavía no hay nada publicado con tu nombre. Tu primer paquete o fondo de pantalla está a un clic.",+ "empty_mine": "Todavía no hay nada publicado con tu nombre. Tu primer paquete está a un clic.","hero_eyebrow": "Marketplace de la comunidad","hero_title": "Creado por gente que usa esta app",- "hero_body": "Plugins, skills y fondos de pantalla, publicados por la comunidad e instalados con un clic. Cualquiera puede publicar: inicia sesión con GitHub y todo lo que supere las comprobaciones automáticas sale en vivo con tu nombre.",+ "hero_body": "Plugins y skills, publicados por la comunidad e instalados con un clic. Cualquiera puede publicar: inicia sesión con GitHub y todo lo que supere las comprobaciones automáticas sale en vivo con tu nombre.","hero_publish_signed_in": "Publicar algo","publish_on_web": "En la web","identity_label": "Identidad",@@ -42,7 +42,6 @@"studio_back": "Atrás","studio_h_source": "¿Dónde está tu paquete?","studio_h_github": "Importar desde GitHub",- "studio_h_wallpapers": "Compartir un fondo de pantalla","studio_h_form": "Revisar, comprobar, publicar","studio_h_done": "Enviado","studio_disabled": "La publicación está desactivada en esta instalación: no hay ningún endpoint de publicación configurado.",@@ -56,8 +55,6 @@"studio_door_github_hint": "Explora tus repositorios públicos, elige el paquete y revísalo primero.","studio_door_blank": "Empezar desde cero","studio_door_blank_hint": "Escríbelo en el formulario: ideal para una sola skill.",- "studio_door_wallpaper": "Compartir un fondo de pantalla",- "studio_door_wallpaper_hint": "Suelta una imagen o elige una de las tuyas; la comunidad puede añadirla con un clic.","studio_origin_folder": "tu carpeta","studio_err_folder": "No se pudo leer la carpeta.","studio_err_plugin_json": "plugin.json no es JSON válido",@@ -87,11 +84,6 @@"studio_err_import": "La importación falló.","studio_err_ref": "Indica un repositorio como \"owner/name\" o pega su URL de GitHub.","studio_err_resolve": "No se pudo resolver el repositorio.",- "studio_wallpapers_label": "Tus imágenes",- "studio_wallpapers_hint": "solo imágenes que trajiste tú; un fondo instalado desde la comunidad es obra de otra persona",- "studio_wallpapers_empty": "Todavía no tienes imágenes propias: suelta una arriba, o añade una en la sección Fondo de pantalla y compártela desde aquí.",- "studio_wallpapers_add": "Añadir una imagen",- "studio_wallpapers_add_hint": "Arrastra una imagen aquí o haz clic para elegirla: PNG, JPEG, WebP, GIF o BMP, hasta 40 MB. Queda en tu sección Fondo de pantalla y el formulario para compartir se abre de inmediato.","studio_form_label": "Lo que estás publicando","studio_prefilled_from": "Cargado desde {origin}: revisa los campos, luego comprueba y publica.","studio_f_name": "Nombre del paquete",@@ -130,31 +122,6 @@"studio_done_waited_out": "Tras varios minutos sigue sin aparecer en el feed: abre el pull request de arriba para ver qué dicen sus comprobaciones.","studio_done_watching": "Vigilando el feed en vivo hasta que aparezca tu paquete; suelen ser unos minutos.","studio_done_share_heading": "Compártelo",- "studio_done_share_note": "Cualquiera puede ejecutar esto ahora: resuelve tu entrada desde el registro público.",- "share_cta": "Compartir",- "share_title": "Compartir con la comunidad",- "share_subtitle": "Cualquiera que use Personal Jarvis podrá añadir este fondo de pantalla.",- "share_subtitle_done": "Publicado: aparecerá en la tienda cuando se reconstruya el feed.",- "share_dialog_aria": "Compartir {title} con la comunidad",- "share_consequences": "Esto publica la imagen públicamente, con tu nombre de GitHub, sin revisión previa. Sube solo algo que hayas hecho tú o cuyos derechos tengas. Si la retiras más tarde desaparece de la tienda, no de las máquinas que ya la añadieron.",- "share_identity_blurb": "este fondo se publica con este nombre.",- "share_f_title": "Título",- "share_f_title_hint": "La tienda lo convierte en la dirección del fondo, así que hazlo distintivo.",- "share_f_title_too_long": "{count}/{max} — demasiado largo.",- "share_f_description": "Descripción (opcional)",- "share_f_description_placeholder": "Azoteas de neón y bosques de antenas bajo la lluvia.",- "share_f_license": "Licencia",- "share_f_license_note": "Solo licencias que permiten la redistribución: la imagen se copia en las máquinas de otras personas.",- "share_license_cc0": "CC0 — dominio público",- "share_license_cc0_hint": "Cualquiera puede usarla para lo que sea, sin atribución.",- "share_license_ccby": "CC BY — con atribución",- "share_license_ccby_hint": "Cualquiera puede usarla, siempre que te dé crédito.",- "share_license_ccbysa": "CC BY-SA — atribución, compartir igual",- "share_license_ccbysa_hint": "Como CC BY, y todo lo que se construya sobre ella lleva la misma licencia.",- "share_rights": "Hice esta imagen o tengo los derechos para publicarla, y es legal compartirla: ninguna obra protegida de otra persona, nada de odio y ninguna persona real sin su consentimiento.",- "share_footer_done": "Puedes cerrar esto: no hace falta nada más.",- "share_footer_ready": "No se sube nada hasta que hagas clic en Publicar.",- "share_footer_sign_in": "Inicia sesión con GitHub arriba para publicar.",- "share_published_as": "Publicado como {name}. La tienda reconstruye su lista cada pocos minutos: aparecerá allí y en el Marketplace de esta app en breve."+ "studio_done_share_note": "Cualquiera puede ejecutar esto ahora: resuelve tu entrada desde el registro público."}}diff --git a/jarvis/ui/web/frontend/src/index.css b/jarvis/ui/web/frontend/src/index.cssindex 91d37853dd..f4184b8234 100644--- a/jarvis/ui/web/frontend/src/index.css+++ b/jarvis/ui/web/frontend/src/index.css@@ -634,24 +634,11 @@ label,must read as "the app, blurred" rather than a grey rectangle. */--shell-rgb: 255 255 255;- /* --- Glass alphas — WALLPAPER PATH ONLY -------------------------------- These are read exclusively by the readability floor further down, which- is now scoped to `:root.jarvis-wallpaper`. On the flat ground the app- opens with (the default since 2026-08-23) nothing reads them: a surface- there is a NAMED token, never a token multiplied by an opacity. They- exist because ink over user-chosen artwork — 500 pictures of any- brightness, in either theme — needs a predictable ground under it.- Three more (`stage`, `wiki-pane`, `wiki-stage`) were deleted: nothing- had read them since the wiki panes were made fully transparent. */- --surface-card-alpha: 0.6;- --surface-panel-alpha: 0.58;- --surface-control-alpha: 0.72;-/* --- Stages ----------------------------------------------------------The full-bleed canvases behind the knowledge maps. They are not chrome:a force graph needs its own depth cue, so it gets its own ground, its- own centre-of-gravity glow, and its own dot field. Light mode exposes- the wallpaper while retaining ink-dark stars and ink state cues. */+ own centre-of-gravity glow, and its own dot field. Light mode keeps+ ink-dark stars and ink state cues. */--stage-bg: 0 0% 100%;--stage-dot-rgb: 23 23 23;--stage-dot-strong: 0.28;@@ -811,11 +798,6 @@ label,--sheen-rgb: 255 255 255;--shell-rgb: 10 10 10; /* the room, as channels */- /* Wallpaper path only — see the note in :root. */- --surface-card-alpha: 0.6;- --surface-panel-alpha: 0.58;- --surface-control-alpha: 0.72;---stage-bg: 0 0% 4%;--stage-dot-rgb: 255 255 255;--stage-dot-strong: 0.5;@@ -947,65 +929,12 @@ body {}@layer components {- /*- * Full-bleed desktop artwork behind the normal app sections.- *- * The source image is intentionally identical in both themes. Dark mode- * keeps its contrast veil; light mode displays the selected artwork without- * tinting, fading or recolouring it. This keeps future light and dark- * wallpapers under the user's control instead of baking a theme into them.- */- .jarvis-desktop-wallpaper {- background-position: center;- background-repeat: no-repeat;- background-size: cover;- filter: saturate(0.92) brightness(0.78) contrast(1.08);- opacity: 0.94;- transform: scale(1.002);- }-- .jarvis-desktop-wallpaper-veil {- background:- linear-gradient(- 180deg,- rgb(var(--shell-rgb) / 0.3) 0%,- transparent 18%,- transparent 72%,- rgb(var(--shell-rgb) / 0.34) 100%- ),- radial-gradient(- ellipse at 52% 42%,- transparent 24%,- rgb(var(--shell-rgb) / 0.16) 100%- );- }-- /* Light keeps the artwork untinted (no darkening filter), but it retains- the contrast veil: the veil is built from --shell-rgb, so on paper it- settles the edges of the frame — where chrome text lives — with a faint- ivory wash instead of dimming the artwork's centre.-- A full-frame ivory frosting veil was tried here (2026-08-11) and rejected- by the maintainer: the wallpaper must stay genuinely visible in light- mode. Readability over arbitrary artwork is therefore carried by the ink- itself — the halo/outline rules further down — never by washing the- picture out. */- :root:not(.dark) .jarvis-desktop-wallpaper {- filter: none;- opacity: 1;- }-/** The named app surfaces.** Each one is a ROLE, and on the flat ground the app opens with, each is* simply the token for that role — a fill, no alpha, no blur. Depth is a* named token; a token multiplied by an opacity is not a surface.- *- * The wallpaper variants underneath are the exception the design system- * grants: a wallpaper user's chrome sits on arbitrary artwork, so it keeps- * the glass that made ink legible there. Everything about them is scoped to- * `:root.jarvis-wallpaper` so it costs the default path nothing.*/.jarvis-nav-surface {background: hsl(var(--sidebar));@@ -1044,43 +973,6 @@ body {background: hsl(var(--input));}- /* NOTE (2026-08-11): a full glass ground for the nav column, top bar and- the Agentic IDE chrome was tried and rejected for the WALLPAPER mode —- the maintainer wants the artwork to shine through the chrome untinted.- So under a wallpaper the nav paints nothing and only stays as the scoping- hook for the ink/outline rules further down. */- :root.jarvis-wallpaper .jarvis-nav-surface {- background: transparent;- }-- :root.jarvis-wallpaper .jarvis-shell-surface {- background: linear-gradient(- 180deg,- rgb(var(--shell-rgb) / 0.16),- rgb(var(--shell-rgb) / 0.07)- );- }-- :root.jarvis-wallpaper .jarvis-panel-surface {- background: rgb(var(--shell-rgb) / var(--surface-panel-alpha));- }-- :root.jarvis-wallpaper .jarvis-message-surface {- background: linear-gradient(- 135deg,- rgb(var(--shell-rgb) / var(--surface-card-alpha)),- rgb(var(--shell-rgb) / calc(var(--surface-card-alpha) * 0.82))- );- -webkit-backdrop-filter: blur(12px) saturate(1.08);- backdrop-filter: blur(12px) saturate(1.08);- }-- :root.jarvis-wallpaper .jarvis-input-surface {- background: rgb(var(--shell-rgb) / var(--surface-control-alpha));- -webkit-backdrop-filter: blur(14px) saturate(1.08);- backdrop-filter: blur(14px) saturate(1.08);- }-/* Outbound chat bubble. Fill-only — the dirty look was inverted cream(`bg-foreground/70`) sitting on near-black. The tokens flip with theme. */.jarvis-user-bubble {@@ -1097,128 +989,12 @@ body {box-shadow: inset 2px 0 0 hsl(var(--accent));}- /* Section-level grounds disappear everywhere the wallpaper is active. The- selectors intentionally stop at page roots and purpose-built stages: cards,- dialogs and data tables retain their own hierarchy and remain readable.- On the flat ground they keep their own token ground, which is the room —- the same colour, arrived at by the palette instead of by an exception. */- :root.jarvis-wallpaper .jarvis-section-stage > [class~="bg-background"],- :root.jarvis-wallpaper .jarvis-section-stage .agents-board-stage,- :root.jarvis-wallpaper .jarvis-section-stage .uw-stage {- background-color: transparent;- }-- /*- * Wallpaper readability floor — WALLPAPER PATH ONLY.- *- * Everything inside a section stage may end up directly on user-chosen- * artwork — 500 wallpapers of any brightness, in either theme. Nothing can- * be tuned per image, so the floor works locally instead:- *- * 1. An inherited text halo. text-shadow cascades to every descendant, so a- * single declaration protects all ink in the stage. The halo pulls- * towards the theme's own ground (near-black in dark, paper in light);- * on calm surfaces it is invisible, on busy artwork it restores the- * missing contrast — the same trick desktop OSes use for icon labels.- * 2. Scoped token floors. Muted ink and hairline borders are re-declared on- * the stage only: strong enough to survive artwork, while popovers and- * dialogs outside the stage keep the quieter global values.- *- * Every rule in this floor is gated on `:root.jarvis-wallpaper`, because on- * a flat ground every one of these treatments is a defect: a halo around- * text on paper reads as a printing error, and a re-floored --border turns- * a hairline meant to be barely visible into a drawn box. The palette is- * calibrated for the flat ground; the floor is what a picture costs.- */- :root.jarvis-wallpaper.dark .jarvis-section-stage {- --muted-foreground: 0 0% 68%;- --border: 0 0% 24%;- text-shadow:- 0 1px 2px rgb(var(--scrim-rgb) / 0.55),- 0 0 12px rgb(var(--scrim-rgb) / 0.35);- }-- /* The same floor covers the shell chrome (nav column, top bar): those live- OUTSIDE the section stage, and they were the loudest reported symptom —- nav icons and toolbar labels dissolving into the artwork.-- The chrome carries NO surface of its own (maintainer decision: the- wallpaper stays untinted and fully visible), so the ink must survive- alone. Two changes relative to the plain stage floor: near-foreground- ink, and a tight outline-grade halo — the desktop-OS icon-label trick,- where a 1–2px light ring makes dark ink read on ANY artwork. On calm- ivory glass the ring is ivory-on-ivory and invisible. */- :root.jarvis-wallpaper:not(.dark) .jarvis-section-stage,- :root.jarvis-wallpaper:not(.dark) .jarvis-nav-surface,- :root.jarvis-wallpaper:not(.dark) .jarvis-shell-surface {- --muted-foreground: 0 0% 18%;- --border: 0 0% 46%;- /* Subtitle-grade outline, not a soft glow: eight hard offsets close a- full-opacity ivory ring around every glyph — the only treatment that- keeps dark ink legible when the artwork behind it is busy or dark.- The blurred layers separate the ring from detail. On the app's own- ivory glass the ring is ivory-on-ivory and invisible. */- text-shadow:- 1px 0 0 rgb(var(--shell-rgb)),- -1px 0 0 rgb(var(--shell-rgb)),- 0 1px 0 rgb(var(--shell-rgb)),- 0 -1px 0 rgb(var(--shell-rgb)),- 1px 1px 0 rgb(var(--shell-rgb) / 0.85),- -1px 1px 0 rgb(var(--shell-rgb) / 0.85),- 1px -1px 0 rgb(var(--shell-rgb) / 0.85),- -1px -1px 0 rgb(var(--shell-rgb) / 0.85),- 0 0 4px rgb(var(--shell-rgb) / 0.95),- 0 1px 8px rgb(var(--shell-rgb) / 0.85),- 0 0 18px rgb(var(--shell-rgb) / 0.6);- }-- /* text-shadow never reaches SVG strokes, so the halo above cannot protect- the icons themselves. Stacked tight drop-shadows are the SVG equivalent- of an outline — invisible on calm glass, a rescue ring on busy artwork.- Scoped to the chrome (nav, top bar, IDE toolbar + chat rail), where- icons ARE the interface; content views draw icons on their own cards. */- :root.jarvis-wallpaper:not(.dark) .jarvis-nav-surface svg,- :root.jarvis-wallpaper:not(.dark) .jarvis-shell-surface svg,- :root.jarvis-wallpaper:not(.dark) [data-testid="agentic-toolbar"] svg,- :root.jarvis-wallpaper:not(.dark) [data-testid="agentic-chat-rail"] svg {- filter: drop-shadow(1px 0 0 rgb(var(--shell-rgb)))- drop-shadow(-1px 0 0 rgb(var(--shell-rgb)))- drop-shadow(0 1px 0 rgb(var(--shell-rgb)))- drop-shadow(0 -1px 0 rgb(var(--shell-rgb)))- drop-shadow(0 0 4px rgb(var(--shell-rgb) / 0.85));- }-- /* The IDE toolbar and chat rail live INSIDE the stage but hold shell-grade- small controls; give their text the same outline-grade ink as the chrome- above (the stage floor alone was tuned for text on glass cards). */- :root.jarvis-wallpaper:not(.dark) [data-testid="agentic-toolbar"],- :root.jarvis-wallpaper:not(.dark) [data-testid="agentic-chat-rail"] {- --muted-foreground: 0 0% 18%;- text-shadow:- 1px 0 0 rgb(var(--shell-rgb)),- -1px 0 0 rgb(var(--shell-rgb)),- 0 1px 0 rgb(var(--shell-rgb)),- 0 -1px 0 rgb(var(--shell-rgb)),- 1px 1px 0 rgb(var(--shell-rgb) / 0.85),- -1px 1px 0 rgb(var(--shell-rgb) / 0.85),- 1px -1px 0 rgb(var(--shell-rgb) / 0.85),- -1px -1px 0 rgb(var(--shell-rgb) / 0.85),- 0 0 4px rgb(var(--shell-rgb) / 0.95),- 0 1px 8px rgb(var(--shell-rgb) / 0.85),- 0 0 18px rgb(var(--shell-rgb) / 0.6);- }-/** The visualization viewport — a section stage's opposite number.*- * The readability floor above works by putting a text halo on EVERY- * descendant, which is right for a screen made of the app's own text and- * wrong for one made of somebody else's picture: the halo lands on the labels- * inside a rendered SVG chart and on the type of a framed HTML page, where it- * reads as a printing error. So this stage takes the opposite deal — no- * inherited shadow, and a quiet opaque ground instead of the wallpaper, so a- * diagram with a transparent background is judged against one flat colour- * rather than against whichever artwork the user picked.+ * A screen made of somebody else's picture — a rendered SVG chart, a framed+ * HTML page — gets no inherited text shadow and a quiet opaque ground, so a+ * diagram with a transparent background is judged against one flat colour.** Chosen by the shell (App.tsx) rather than by the view, for the same reason* the section stage is: it is the surface the section is drawn ON, and a view@@ -1230,13 +1006,6 @@ body {text-shadow: none;}- /* Under a wallpaper the same stage keeps a near-opaque veil rather than the- flat token: a diagram is still judged against one predictable colour, but- the artwork stays faintly present at the frame. */- :root.jarvis-wallpaper .jarvis-visualization-stage {- background: rgb(var(--shell-rgb) / 0.94);- }-/* Subtle grid pattern in the background — gives a dashboard feel withoutdistracting. Drawn in the accent so it reads as the app's own texture;slightly stronger on paper, where a 4 % line simply disappears. */@@ -1382,495 +1151,9 @@ body {}@layer utilities {- /*- * ===========================================================================- * THE WALLPAPER APPARATUS — everything down to the `profile-rise` keyframes- * ===========================================================================- *- * These rules exist for exactly one situation: the app painted on artwork a- * user chose, which can be any picture at any brightness in either theme.- * They converge eleven bg-card steps, fifteen bg-background steps and nine- * bg-muted steps onto two composite colours, so that whatever a view asked- * for, the ink on top of it lands on a predictable ground.- *- * That convergence is exactly wrong on a flat ground — it flattens every- * hierarchy a section authored, which is the mechanism behind "every screen- * looks like one grey mesh". So every rule here is now scoped to- * `:root.jarvis-wallpaper`: the class the boot script in index.html stamps- * on <html> when, and only when, a wallpaper is really shown- * (`lib/backgroundMode.ts`; the flat colour has been the default since- * 2026-08-23). On the default path the palette in the token block is the- * whole answer and nothing here fires at all.- *- * Not everything below this point is wallpaper logic. The animation- * utilities, the Gigi mascot, the deck's ring and 3-D case, and the- * expanded-map `main:has(...)` rule are genuine utilities and stay global.- */- :root.jarvis-wallpaper .jarvis-section-stage- :where(- [class~="bg-card"],- [class~="bg-card/20"],- [class~="bg-card/25"],- [class~="bg-card/30"],- [class~="bg-card/40"],- [class~="bg-card/50"],- [class~="bg-card/60"],- [class~="bg-card/70"],- [class~="bg-card/80"],- [class~="bg-card/90"],- [class~="bg-card/95"]- ) {- background-color: hsl(var(--card) / var(--surface-card-alpha));- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where(- div,- aside,- section,- article,- header,- footer,- main,- nav,- form,- table,- thead,- tbody,- ul,- ol,- li,- label,- button- ):where(- [class~="bg-background"],- [class~="bg-background/20"],- [class~="bg-background/25"],- [class~="bg-background/30"],- [class~="bg-background/35"],- [class~="bg-background/40"],- [class~="bg-background/45"],- [class~="bg-background/50"],- [class~="bg-background/55"],- [class~="bg-background/60"],- [class~="bg-background/70"],- [class~="bg-background/80"],- [class~="bg-background/85"],- [class~="bg-background/90"],- [class~="bg-background/95"],- [class~="bg-muted"],- [class~="bg-muted/20"],- [class~="bg-muted/25"],- [class~="bg-muted/30"],- [class~="bg-muted/35"],- [class~="bg-muted/40"],- [class~="bg-muted/50"],- [class~="bg-muted/60"],- [class~="bg-muted/70"],- [class~="bg-muted/80"]- ) {- background-color: hsl(var(--card) / var(--surface-panel-alpha));- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where(input, textarea, select, [role="combobox"]):where(- [class~="bg-background"],- [class~="bg-background/20"],- [class~="bg-background/25"],- [class~="bg-background/30"],- [class~="bg-background/40"],- [class~="bg-background/50"],- [class~="bg-background/60"],- [class~="bg-background/70"],- [class~="bg-background/80"],- [class~="bg-background/90"],- [class~="bg-background/95"],- [class~="bg-muted"],- [class~="bg-muted/20"],- [class~="bg-muted/25"],- [class~="bg-muted/30"],- [class~="bg-muted/40"],- [class~="bg-muted/50"]- ) {- background-color: hsl(var(--background) / var(--surface-control-alpha));- }-- /* Profile and several older dashboards used a 30% scrim instead of a real- content surface. On detailed wallpaper that drops muted labels below the- George Voice contrast baseline, so these cards now use the same 60% glass- while the artwork remains clearly visible around and through them. */- :root.jarvis-wallpaper .jarvis-section-stage :where([class~="bg-scrim/30"]) {- background-color: hsl(var(--card) / var(--surface-card-alpha));- }-- /* BoardCard previously supplied only a 1.5–5.5% sheen gradient. That is an- edge highlight, not a readable surface, and it made both Board and Profile- dissolve into detailed wallpaper. Keep the sheen, but give it the same- card glass that George Voice uses underneath. */- :root.jarvis-wallpaper .jarvis-section-stage- :where(- [class~="from-sheen/[0.055]"][class~="to-sheen/[0.015]"]- ) {- background-color: hsl(var(--card) / var(--surface-card-alpha));- }-- /* Selected and status cards used colour washes as their only background.- Layer the wash over the shared glass instead: state stays recognisable,- but provider forms, output cards and branded feedback remain as readable- as their neutral neighbours. */- :root.jarvis-wallpaper .jarvis-section-stage- :where(div, section, article, li, label, button):where(- [class~="bg-primary/5"],- [class~="bg-primary/10"],- [class~="bg-primary/15"],- [class~="bg-primary/20"],- [class~="bg-primary/25"],- [class~="bg-primary/30"],- [class~="bg-primary/[0.04]"],- [class~="bg-primary/[0.05]"],- [class~="bg-primary/[0.06]"],- [class~="bg-primary/[0.07]"],- [class~="bg-destructive/[0.05]"],- [class~="bg-[#5865F2]/10"]- ) {- background-color: hsl(var(--card) / var(--surface-card-alpha));- background-image: linear-gradient(- var(--surface-tint-color),- var(--surface-tint-color)- );- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/[0.04]"]) {- --surface-tint-color: hsl(var(--primary) / 0.04);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/5"], [class~="bg-primary/[0.05]"]) {- --surface-tint-color: hsl(var(--primary) / 0.05);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/[0.06]"]) {- --surface-tint-color: hsl(var(--primary) / 0.06);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/[0.07]"]) {- --surface-tint-color: hsl(var(--primary) / 0.07);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/10"]) {- --surface-tint-color: hsl(var(--primary) / 0.1);- }-- /* The active-state washes (segment pills, "Coding mode" badge, selected- rows). Without the card glass underneath, a 15-25% ink wash over- artwork is no ground at all — the reported "active filter is- invisible" symptom. */- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/15"]) {- --surface-tint-color: hsl(var(--primary) / 0.15);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/20"]) {- --surface-tint-color: hsl(var(--primary) / 0.2);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/25"]) {- --surface-tint-color: hsl(var(--primary) / 0.25);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-primary/30"]) {- --surface-tint-color: hsl(var(--primary) / 0.3);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-destructive/[0.05]"]) {- --surface-tint-color: hsl(var(--destructive) / 0.05);- }-- :root.jarvis-wallpaper .jarvis-section-stage- :where([class~="bg-[#5865F2]/10"]) {- --surface-tint-color: rgb(88 101 242 / 0.1);- }-- /* Light mode uses transparent glass rather than stacked white sheets. A- restrained blur separates content from the artwork while the- warm inset highlight preserves the same glass hierarchy as dark mode. */- :root.jarvis-wallpaper:not(.dark)- .jarvis-section-stage- :where(- [class~="bg-card"],- [class~="bg-card/20"],- [class~="bg-card/25"],- [class~="bg-card/30"],- [class~="bg-card/40"],- [class~="bg-card/50"],- [class~="bg-card/60"],- [class~="bg-card/70"],- [class~="bg-card/80"],- [class~="bg-card/90"],- [class~="bg-card/95"],- [class~="bg-background"],- [class~="bg-background/20"],- [class~="bg-background/25"],- [class~="bg-background/30"],- [class~="bg-background/35"],- [class~="bg-background/40"],- [class~="bg-background/45"],- [class~="bg-background/50"],- [class~="bg-background/55"],- [class~="bg-background/60"],- [class~="bg-background/70"],- [class~="bg-background/80"],- [class~="bg-background/85"],- [class~="bg-background/90"],- [class~="bg-background/95"],- [class~="bg-muted"],- [class~="bg-muted/20"],- [class~="bg-muted/25"],- [class~="bg-muted/30"],- [class~="bg-muted/35"],- [class~="bg-muted/40"],- [class~="bg-muted/50"],- [class~="bg-muted/60"],- [class~="bg-muted/70"],- [class~="bg-muted/80"],- [class~="bg-scrim/30"],- [class~="from-sheen/[0.055]"][class~="to-sheen/[0.015]"],- [class~="bg-primary/5"],- [class~="bg-primary/10"],- [class~="bg-primary/15"],- [class~="bg-primary/20"],- [class~="bg-primary/25"],- [class~="bg-primary/30"],- [class~="bg-primary/[0.04]"],- [class~="bg-primary/[0.05]"],- [class~="bg-primary/[0.06]"],- [class~="bg-primary/[0.07]"],- [class~="bg-destructive/[0.05]"],- [class~="bg-[#5865F2]/10"]- ) {- -webkit-backdrop-filter: blur(12px) saturate(0.92);- backdrop-filter: blur(12px) saturate(0.92);- box-shadow:- inset 0 1px 0 rgb(255 255 255 / 0.42),- 0 10px 26px rgb(var(--scrim-rgb) / 0.07);- }-- /* Views quiet their secondary labels with alpha variants of the muted ink- (text-muted-foreground/40 … /80). On plain paper that hierarchy reads- fine; over bright artwork the text alpha stacks with the translucent- glass and those labels vanish completely — the reported symptom. Inside- the light stage the variants converge on one readable floor; hierarchy- survives through the size and weight steps the views already use. */- :root.jarvis-wallpaper:not(.dark)- .jarvis-section-stage- :where(- [class~="text-muted-foreground/40"],- [class~="text-muted-foreground/45"],- [class~="text-muted-foreground/50"],- [class~="text-muted-foreground/60"]- ) {- color: hsl(var(--muted-foreground) / 0.78);- }-- :root.jarvis-wallpaper:not(.dark)- .jarvis-section-stage- :where(- [class~="text-muted-foreground/70"],- [class~="text-muted-foreground/75"],- [class~="text-muted-foreground/80"]- ) {- color: hsl(var(--muted-foreground) / 0.9);- }-- /* Same defect, different token: views also quiet rows with alpha variants- of the FULL ink (text-foreground/70..85 — e.g. the IDE chat rail's- session titles on /75) and of the accent (text-primary/60..85). Over- artwork the missing alpha is exactly the missing legibility, so inside- the light floors they converge on near-full ink; hierarchy keeps- reading through size and weight. */- :root.jarvis-wallpaper:not(.dark)- :where(- .jarvis-section-stage,- .jarvis-nav-surface,- .jarvis-shell-surface- )- :where(- [class~="text-foreground/60"],- [class~="text-foreground/70"],- [class~="text-foreground/75"],- [class~="text-foreground/80"],- [class~="text-foreground/85"]- ) {- color: hsl(var(--foreground) / 0.95);- }-- :root.jarvis-wallpaper:not(.dark)- :where(- .jarvis-section-stage,- .jarvis-nav-surface,- .jarvis-shell-surface- )- :where(- [class~="text-primary/60"],- [class~="text-primary/70"],- [class~="text-primary/80"],- [class~="text-primary/85"]- ) {- color: hsl(var(--primary));- }-- /* The active pills that live in the CHROME (e.g. the "Coding mode"- badge in the top bar) sit outside the section stage, so the stage's- card-glass-under-tint rule cannot reach them. Same treatment, scoped to- light: the pill gets a real ivory chip under its ink wash instead of- 15-25% ink over raw artwork. */- :root.jarvis-wallpaper:not(.dark)- :where(.jarvis-nav-surface, .jarvis-shell-surface)- :where(button, a, span, div):where(- [class~="bg-primary/10"],- [class~="bg-primary/15"],- [class~="bg-primary/20"],- [class~="bg-primary/25"],- [class~="bg-primary/30"]- ) {- background-color: rgb(var(--shell-rgb) / 0.85);- background-image: linear-gradient(- hsl(var(--primary) / 0.16),- hsl(var(--primary) / 0.16)- );- }-- :root.jarvis-wallpaper:not(.dark) .jarvis-section-stage .card-outline,- :root.jarvis-wallpaper:not(.dark)- .jarvis-section-stage- :where(div, section, article)[class~="bg-border"] {- background-color: transparent;- }-- /* Radix portals and hand-built pickers render under <body>, outside the- section stage above — so they inherit neither its glass ground nor its- readability floor, and they hang over arbitrary content: another card, a- wallpaper, or a terminal pane full of text.-- A floating layer is NOT chrome. The untinted-wallpaper decision applies- to surfaces the artwork is the background OF (nav column, top bar); a- menu, dialog or tooltip is a transient overlay whose whole purpose is to- be read, and it covers what is under it on purpose. Light mode used to- drop its ground entirely and rely on a blur alone — but a blur is not a- contrast ground, so the agent picker over a terminal pane came out as a- milky smear with its 11px descriptions dissolving into the text behind- them (maintainer report 2026-08-11).-- These surfaces therefore carry their own near-opaque paper ground, a- border firm enough to read as an edge, and no inherited halo (ink sits on- paper here, so an outline would be pure noise). */- :root.jarvis-wallpaper:not(.dark)- :where([class~="bg-popover"], [class~="bg-popover/95"]),- :root.jarvis-wallpaper:not(.dark)- :where(- [role="dialog"],- [role="menu"],- [role="listbox"],- [role="tooltip"]- ):where(- [class~="bg-card"],- [class~="bg-card/95"],- [class~="bg-background"],- [class~="bg-background/95"]- ) {- /* Firmer than the stage's hairline: this edge separates the overlay from- whatever it happens to hang over, not two cards on one ground. */- --border: 0 0% 52%;- background-color: hsl(var(--popover) / 0.97);- -webkit-backdrop-filter: blur(16px) saturate(1.02);- backdrop-filter: blur(16px) saturate(1.02);- box-shadow:- inset 0 1px 0 rgb(255 255 255 / 0.6),- 0 18px 44px rgb(var(--scrim-rgb) / 0.2);- text-shadow: none;- }-- /* Nested grounds INSIDE a dialog are flattened — the dialog above already- supplies one, and stacking a second translucent fill on it only muddies- it. The `:not()` chain protects the floating layer's own ground: a menu or- a tooltip opened from within a dialog is a surface in front of it, not a- panel inside it, and this selector outranks the rule above. */- :root.jarvis-wallpaper:not(.dark)- [role="dialog"]- :where(- [class~="bg-card"],- [class~="bg-card/40"],- [class~="bg-card/50"],- [class~="bg-card/60"],- [class~="bg-card/70"],- [class~="bg-card/80"],- [class~="bg-card/90"],- [class~="bg-card/95"],- [class~="bg-background"],- [class~="bg-background/40"],- [class~="bg-background/50"],- [class~="bg-background/60"],- [class~="bg-background/70"],- [class~="bg-background/80"],- [class~="bg-background/90"],- [class~="bg-background/95"],- [class~="bg-muted"],- [class~="bg-muted/20"],- [class~="bg-muted/30"],- [class~="bg-muted/40"],- [class~="bg-muted/50"]- ):where(- :not([role="menu"], [role="listbox"], [role="tooltip"], [role="dialog"])- ) {- background-color: transparent;- }-- /* Modal backdrops may blur the wallpaper, but must not tint it white or- black. Semantic colour washes inside the modal remain untouched. */- :root.jarvis-wallpaper:not(.dark)- :where(- [class~="bg-scrim/40"],- [class~="bg-scrim/50"],- [class~="bg-scrim/60"],- [class~="bg-scrim/70"],- [class~="bg-scrim/80"],- [class~="bg-scrim/90"],- [class~="bg-background/70"],- [class~="bg-background/80"],- [class~="bg-background/90"],- [class~="bg-[#090909]/75"]- )[class~="fixed"][class~="inset-0"] {- background-color: transparent;- -webkit-backdrop-filter: blur(4px) saturate(0.92);- backdrop-filter: blur(4px) saturate(0.92);- }-- :root.jarvis-wallpaper .jarvis-section-stage > [class~="bg-background"] {- background-color: transparent;- }-- /* The normal Wiki is assembled from nested full-height panes. Giving every- structural wrapper its own glass fill compounds the alpha and turns three- transparent layers into an almost opaque rectangle. Keep the workspace,- centre column and side panes clear so the desktop artwork stays visible. */- :root.jarvis-wallpaper .jarvis-section-stage #wiki-workspace,- :root.jarvis-wallpaper .jarvis-section-stage- #wiki-workspace- > section[class~="bg-background"] {- background-color: transparent;- }-/* A transparent full-screen map must not reveal the app bar's labels under- its own toolbar. The wallpaper should continue through the overlay; the- shell controls should not. They return immediately when the map restores. */+ its own toolbar. The shell controls stay hidden while the map is expanded+ and return immediately when it restores. */main:has(> .jarvis-section-stage#wiki-workspace[data-graph-expanded="true"]@@ -1879,27 +1162,6 @@ body {visibility: hidden;}- :root.jarvis-wallpaper .jarvis-section-stage- #wiki-workspace- :where(- [data-testid="wiki-tree-sidebar"],- [data-testid="wiki-backlinks-panel"],- [data-testid="wiki-backlinks-placeholder"]- ) {- background-color: transparent;- -webkit-backdrop-filter: none;- backdrop-filter: none;- }-- :root.jarvis-wallpaper .jarvis-section-stage- #wiki-workspace- > section- > [class~="bg-card/40"] {- background-color: transparent;- -webkit-backdrop-filter: none;- backdrop-filter: none;- }-/* Staggered reveal on view mount — one orchestrated page-load moment.Pair with an inline `animationDelay` for the stagger cadence. */@keyframes profile-rise {@@ -3074,7 +2336,7 @@ body {* The board as a display case (lib/deckDepth.ts). The board element sets* the perspective; each slot's wrapper carries its depth as custom* properties and ONE transform rule turns them into a plane in front of- * (or behind) the wallpaper, turned toward the centre, swayed by the+ * (or behind) the back wall, turned toward the centre, swayed by the* pointer (`--deck-px/--deck-py`, written by useDeckParallax) and scaled* back so neighbours never overlap. Cards inside the case are glass slabs* — a ground of the theme's card colour, blurred, with a shadow that@@ -3132,16 +2394,6 @@ body {mask-image: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.85) 14%, rgb(0 0 0 / 0.5) 50%, transparent 92%);-webkit-mask-image: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.85) 14%, rgb(0 0 0 / 0.5) 50%, transparent 92%);}- .deck-floor-echo {- position: absolute;- inset: 0;- background-position: center 0;- background-size: 100% auto;- background-repeat: no-repeat;- transform: scaleY(-1);- filter: blur(10px) saturate(0.9);- opacity: 0.32;- }.deck-floor-sheen {position: absolute;inset: 0;@@ -3149,9 +2401,6 @@ body {radial-gradient(ellipse at 50% 0%, hsl(var(--primary) / 0.18), transparent 55%),linear-gradient(180deg, hsl(var(--background) / 0.35), hsl(var(--background) / 0.75));}- :root:not(.dark) .deck-floor-echo {- opacity: 0.22;- }:root:not(.dark) .deck-floor-sheen {background:radial-gradient(ellipse at 50% 0%, hsl(var(--primary) / 0.1), transparent 55%),diff --git a/jarvis/ui/web/frontend/src/lib/backgroundMode.test.ts b/jarvis/ui/web/frontend/src/lib/backgroundMode.test.tsdeleted file mode 100644index 22a04fd03c..0000000000--- a/jarvis/ui/web/frontend/src/lib/backgroundMode.test.ts+++ /dev/null@@ -1,37 +0,0 @@-import { afterEach, beforeEach, describe, expect, it } from "vitest";--import {- BACKGROUND_MODE_KEY,- WALLPAPER_CLASS,- applyBackgroundClass,- readBackgroundMode,- writeBackgroundMode,-} from "@/lib/backgroundMode";--describe("backgroundMode", () => {- beforeEach(() => {- window.localStorage.clear();- document.documentElement.classList.remove(WALLPAPER_CLASS);- });- afterEach(() => {- document.documentElement.classList.remove(WALLPAPER_CLASS);- });-- it("defaults to the solid ground", () => {- expect(readBackgroundMode()).toBe("solid");- });-- it("round-trips the wallpaper choice and ignores garbage", () => {- writeBackgroundMode("wallpaper");- expect(readBackgroundMode()).toBe("wallpaper");- window.localStorage.setItem(BACKGROUND_MODE_KEY, "nonsense");- expect(readBackgroundMode()).toBe("solid");- });-- it("stamps the root class only for the wallpaper", () => {- applyBackgroundClass("wallpaper");- expect(document.documentElement.classList.contains(WALLPAPER_CLASS)).toBe(true);- applyBackgroundClass("solid");- expect(document.documentElement.classList.contains(WALLPAPER_CLASS)).toBe(false);- });-});diff --git a/jarvis/ui/web/frontend/src/lib/backgroundMode.ts b/jarvis/ui/web/frontend/src/lib/backgroundMode.tsdeleted file mode 100644index 89c507fdaa..0000000000--- a/jarvis/ui/web/frontend/src/lib/backgroundMode.ts+++ /dev/null@@ -1,55 +0,0 @@-/**- * What the app is painted ON: a flat theme colour, or a wallpaper.- *- * The flat colour is the default (maintainer, 2026-08-23): the app no longer- * opens on artwork. A wallpaper stays one click away in the Wallpaper- * section — choosing a picture there switches this to `wallpaper`, and the- * "Solid colour" control switches it back. Every wallpaper pick the user has- * made is kept either way; this only says whether it is shown.- *- * Two readers must agree on the answer before the first paint: the inline- * boot script in index.html (which stamps the `jarvis-wallpaper` class on- * <html> so the wallpaper readability floor in index.css applies from the- * first frame) and the wallpaper store once React owns the document. Both- * read THIS key with THIS fallback — keep them in lockstep.- */--export type BackgroundMode = "solid" | "wallpaper";--export const BACKGROUND_MODE_KEY = "jarvis.background.v1";-export const DEFAULT_BACKGROUND_MODE: BackgroundMode = "solid";--/** The class index.css keys the wallpaper readability floor on. */-export const WALLPAPER_CLASS = "jarvis-wallpaper";--export function isBackgroundMode(value: unknown): value is BackgroundMode {- return value === "solid" || value === "wallpaper";-}--export function readBackgroundMode(): BackgroundMode {- if (typeof window === "undefined") return DEFAULT_BACKGROUND_MODE;- try {- const raw = window.localStorage.getItem(BACKGROUND_MODE_KEY);- return isBackgroundMode(raw) ? raw : DEFAULT_BACKGROUND_MODE;- } catch {- // Private mode / storage disabled — the flat colour still has to paint.- return DEFAULT_BACKGROUND_MODE;- }-}--export function writeBackgroundMode(mode: BackgroundMode): void {- try {- window.localStorage.setItem(BACKGROUND_MODE_KEY, mode);- } catch {- /* not being able to remember the choice must not break applying it */- }-}--/**- * Put the document into the given mode — the class is what index.css reads.- * Idempotent, safe to call on every store change.- */-export function applyBackgroundClass(mode: BackgroundMode): void {- if (typeof document === "undefined") return;- document.documentElement.classList.toggle(WALLPAPER_CLASS, mode === "wallpaper");-}diff --git a/jarvis/ui/web/frontend/src/lib/bundledWallpapers.ts b/jarvis/ui/web/frontend/src/lib/bundledWallpapers.tsdeleted file mode 100644index 770b013488..0000000000--- a/jarvis/ui/web/frontend/src/lib/bundledWallpapers.ts+++ /dev/null@@ -1,143 +0,0 @@-import jarvisDesktopWallpaperLight from "@/assets/jarvis-desktop-wallpaper-light.webp";-import jarvisDesktopWallpaper from "@/assets/jarvis-desktop-wallpaper.webp";-import type { Theme } from "@/hooks/useTheme";--/**- * The wallpapers that ship INSIDE the app — the one place that knows them.- *- * Everything else in the wallpaper section comes from somewhere optional: the- * generated library is a git-ignored download, the uploads live in the data- * directory, the marketplace needs a network. These few are part of the- * program, so a fresh checkout, a headless container, and a machine that never- * downloaded anything all have them — and every consumer that holds only an id- * (the shell painting the ground, a pick restored from storage, a grid tile)- * resolves it here first, before asking `/api/wallpapers`.- *- * Two kinds live in this list:- *- * - The two ORIGINALS, one per mode. Each is the default and the fallback of- * its mode: an empty selection means "this one" (see store/wallpaper.ts and- * useDesktopWallpaper), and adopting it is the same act as clearing the- * choice.- * - The PLAIN grounds — pure black for dark, pure white for light. Ordinary- * wallpapers in every respect (stored by id, starred, filtered), just with- * no pixels to fetch: a solid colour is drawn, not downloaded, so each is a- * tiny SVG data URI instead of an asset file.- *- * Every entry is authored for exactly one mode, like every other wallpaper —- * adopting one switches the interface into that mode.- */-export interface BundledWallpaper {- id: string;- title: string;- /** Filter slug shared with the catalog's style chips. */- style: string;- styleLabel: string;- theme: Theme;- /** Where the pixels come from — an asset URL or a data URI, never `/api/`. */- url: string;- /** True for the one wallpaper a mode falls back to. Exactly one per mode. */- isDefault: boolean;-}--/** The filter slug and chip label the two originals live under. */-export const ORIGINAL_WALLPAPER_STYLE = "original";--/** The filter slug and chip label the plain black/white grounds live under. */-export const PLAIN_WALLPAPER_STYLE = "plain";--/**- * A full-frame solid colour as an image URL.- *- * An SVG data URI rather than a PNG in `assets/`: it IS the colour, byte for- * byte readable, and it scales without a thumbnail. Kept free of parentheses- * and quotes on purpose — the shell puts it into an unquoted CSS `url(...)`.- */-export function solidColorWallpaperUrl(hex: string): string {- const svg =- `<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080">` +- `<rect width="100%" height="100%" fill="${hex}"/></svg>`;- return `data:image/svg+xml,${encodeURIComponent(svg)}`;-}--/** In the order they appear in the grid: night, day, black, white. */-export const BUNDLED_WALLPAPERS: readonly BundledWallpaper[] = [- {- id: "original",- title: "The Original",- style: ORIGINAL_WALLPAPER_STYLE,- styleLabel: "Original",- theme: "dark",- url: jarvisDesktopWallpaper,- isDefault: true,- },- {- id: "original-light",- title: "The Original, by day",- style: ORIGINAL_WALLPAPER_STYLE,- styleLabel: "Original",- theme: "light",- url: jarvisDesktopWallpaperLight,- isDefault: true,- },- {- id: "plain-black",- title: "Black",- style: PLAIN_WALLPAPER_STYLE,- styleLabel: "Plain",- theme: "dark",- url: solidColorWallpaperUrl("#000000"),- isDefault: false,- },- {- id: "plain-white",- title: "White",- style: PLAIN_WALLPAPER_STYLE,- styleLabel: "Plain",- theme: "light",- url: solidColorWallpaperUrl("#ffffff"),- isDefault: false,- },-];--const BY_ID: ReadonlyMap<string, BundledWallpaper> = new Map(- BUNDLED_WALLPAPERS.map((entry) => [entry.id, entry]),-);--/** True for an id whose pixels ship with the app. */-export function isBundledId(id: string): boolean {- return BY_ID.has(id);-}--/** The bundled picture behind an id, or null for one served from the API. */-export function bundledWallpaperUrl(id: string): string | null {- return BY_ID.get(id)?.url ?? null;-}--/**- * The picture each mode falls back to — the original authored for it.- *- * Two, not one, because a wallpaper belongs to exactly one mode: the moonlit- * woodblock ocean is a night scene, and for as long as it stood in for BOTH- * modes, light chrome landed on it whenever the light slot was empty — a- * fresh profile, a cleared store, a manual switch to light before any light- * picture was chosen — and nothing on that screen could be read (maintainer- * report 2026-08-18). The daylight courtyard is the same place in the light- * mode's own register, so a mode without a pick of its own shows a picture- * authored for it, never the other mode's. Gigi is not in these pictures.- */-export const DEFAULT_WALLPAPER_URLS: Readonly<Record<Theme, string>> = {- dark: defaultOf("dark"),- light: defaultOf("light"),-};--function defaultOf(theme: Theme): string {- const entry = BUNDLED_WALLPAPERS.find((item) => item.isDefault && item.theme === theme);- if (!entry) throw new Error(`No bundled default wallpaper for ${theme} mode`);- return entry.url;-}--/** The bundled artwork of one mode. */-export function defaultWallpaperUrl(theme: Theme): string {- return DEFAULT_WALLPAPER_URLS[theme];-}diff --git a/jarvis/ui/web/frontend/src/lib/deckDepth.ts b/jarvis/ui/web/frontend/src/lib/deckDepth.tsindex 99d1293040..75d97ecf28 100644--- a/jarvis/ui/web/frontend/src/lib/deckDepth.ts+++ b/jarvis/ui/web/frontend/src/lib/deckDepth.ts@@ -4,8 +4,8 @@ import type { BoardSlot } from "@/lib/deckStandby";* The board's depth — the "Schaukasten" (display case).** The mission deck used to be a flat grid of instruments on top of the- * wallpaper (maintainer, 2026-08-22: it does not look good, it is not creative).- * The wallpaper stays exactly what it is — the back wall — and the board+ * background (maintainer, 2026-08-22: it does not look good, it is not creative).+ * The background stays exactly what it is — the back wall — and the board* gains DEPTH in front of it instead: every slot stands on its own plane at* a distance from the wall, turned a few degrees toward the centre, and the* whole case sways a little with the pointer so the eye reads the distances.@@ -27,7 +27,7 @@ export const DECK_PERSPECTIVE_PX = 1400;export const PARALLAX_MAX_PX = 9;export interface SlotDepth {- /** Distance in front of (+) or behind (−) the wallpaper plane, in px. */+ /** Distance in front of (+) or behind (−) the back wall, in px. */z: number;/** Turn toward the centre, in degrees (left slots +, right slots −). */rotateY: number;diff --git a/jarvis/ui/web/frontend/src/lib/deckRoom.ts b/jarvis/ui/web/frontend/src/lib/deckRoom.tsindex 15d0520b6e..318c26c5f9 100644--- a/jarvis/ui/web/frontend/src/lib/deckRoom.ts+++ b/jarvis/ui/web/frontend/src/lib/deckRoom.ts@@ -1,7 +1,7 @@/*** The mission deck as a ROOM — the numbers behind `components/deck/room/`.*- * The room is a display case in real 3D (three.js): the wallpaper is the+ * The room is a display case in real 3D (three.js): the app's ground is the* back wall, a reflecting floor runs from it toward the viewer, the mascot* stands on that floor, and the instruments stand around it as upright* glass panels — near the viewer what the person acts on (log, outputs,diff --git a/jarvis/ui/web/frontend/src/lib/deckStage.ts b/jarvis/ui/web/frontend/src/lib/deckStage.tsindex 8bdf83908f..8c0349143c 100644--- a/jarvis/ui/web/frontend/src/lib/deckStage.ts+++ b/jarvis/ui/web/frontend/src/lib/deckStage.ts@@ -1,6 +1,6 @@/*** The deck's centre stage: how large the orb reticle is for the room it has,- * and the vignette the wallpaper gets under it.+ * and the vignette the background gets under it.*/const ORB_MIN = 200;@@ -29,7 +29,7 @@ export function orbSizeFor(width: number, height: number): number {* ran off the top and bottom edges while still at a third of its opacity and* was cut there, so the "soft pool" was a rectangle with two straight edges.* On the dark deck that read as a slightly darker box; in light mode, where- * the ground colour is near-white over a dark wallpaper, it was a bright slab+ * the ground colour is near-white, it was a bright slab* behind the mascot — the same defect the orb PNG had, from the other side.* On its own square element nothing can clip it.*/@@ -38,10 +38,9 @@ export function stageWashSize(size: number): number {}/**- * The stage under the centre: the wallpaper darkens softly around the mascot,- * in the theme's own ground colour (so it is a light pool in light mode), and- * the mascot stands on a stage instead of on whatever the wallpaper puts- * there. Sized off the reticle so it reads the same at every stage size, and+ * The stage under the centre: the background darkens softly around the+ * mascot, in the theme's own ground colour (so it is a light pool in light+ * mode), and the mascot stands on a stage instead of on the bare ground. Sized off the reticle so it reads the same at every stage size, and* centred on its own element (see `stageWashSize`).*/export function stageVignette(size: number): string {diff --git a/jarvis/ui/web/frontend/src/store/events.ts b/jarvis/ui/web/frontend/src/store/events.tsindex 3de5f78cd4..71ccf5f2ce 100644--- a/jarvis/ui/web/frontend/src/store/events.ts+++ b/jarvis/ui/web/frontend/src/store/events.ts@@ -84,7 +84,6 @@ export type SectionId =| "contacts"| "feedback"| "agent-instructions"- | "wallpaper"// Appshots: the shortcut, destination, sound and flash for showing the// assistant the front window. A Settings-hub page.| "appshots"@@ -112,8 +111,8 @@ export type SectionId =// stay reachable while the new surface grows into full parity.| "agentic-ide-classic"// 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.+ // plugins and skills — browsable and installable in one place instead of+ // scattered across unrelated sections.| "marketplace";export const SECTION_IDS = [@@ -144,7 +143,6 @@ export const SECTION_IDS = ["contacts","feedback","agent-instructions",- "wallpaper","appshots","jarvis-actions","dictionary",@@ -173,9 +171,13 @@ export function isSectionId(value: unknown): value is SectionId {** - "outputs": the Outputs section folded into Artifacts (2026-08-23) — every* run, with or without a page, is listed there now.+ * - "wallpaper": the Wallpaper page was removed (2026-09-30); the app paints+ * its flat theme colour only. A remembered link lands in Settings, where+ * the page used to live.*/export const LEGACY_SECTION_ALIASES: Readonly<Record<string, SectionId>> = {outputs: "visualization",+ wallpaper: "settings",};/** The section an id names today — itself, its successor, or null. */@@ -236,7 +238,6 @@ export const SECTION_LABELS: Record<SectionId, string> = {contacts: "Contacts",feedback: "Feedback","agent-instructions": "Agent Instructions",- wallpaper: "Wallpaper",appshots: "Appshots","jarvis-actions": "Jarvis actions",dictionary: "Dictionary",diff --git a/jarvis/ui/web/frontend/src/store/wallpaper.test.ts b/jarvis/ui/web/frontend/src/store/wallpaper.test.tsdeleted file mode 100644index e783303b55..0000000000--- a/jarvis/ui/web/frontend/src/store/wallpaper.test.ts+++ /dev/null@@ -1,154 +0,0 @@-import { beforeEach, describe, expect, it } from "vitest";--import { DEFAULT_WALLPAPER_URLS } from "@/lib/bundledWallpapers";-import {- useWallpaperStore,- wallpaperFullUrl,- wallpaperThumbUrl,-} from "@/store/wallpaper";--/**- * Three id families, three sources — and the id alone tells them apart, so- * whoever holds only an id (the shell, a restored pick) lands on the right- * picture without a flag beside it.- */-describe("wallpaper URLs by id", () => {- it("serves a library id from the catalog endpoint", () => {- expect(wallpaperFullUrl("03-anime-neon-01")).toBe("/api/wallpapers/03-anime-neon-01/full");- expect(wallpaperThumbUrl("03-anime-neon-01")).toBe("/api/wallpapers/03-anime-neon-01/thumb");- });-- it("serves an upload id from the uploads endpoint", () => {- expect(wallpaperFullUrl("u0123456789abcdef")).toBe(- "/api/wallpapers/uploads/u0123456789abcdef/full",- );- });-- it("answers a bundled id from the bundle, never from the API", () => {- expect(wallpaperFullUrl("original")).toBe(DEFAULT_WALLPAPER_URLS.dark);- expect(wallpaperFullUrl("original-light")).toBe(DEFAULT_WALLPAPER_URLS.light);- expect(wallpaperThumbUrl("original")).toBe(DEFAULT_WALLPAPER_URLS.dark);- });-- it("draws the plain grounds as data URIs — pure black, pure white", () => {- const black = wallpaperFullUrl("plain-black");- const white = wallpaperFullUrl("plain-white");- expect(black.startsWith("data:image/svg+xml,")).toBe(true);- expect(white.startsWith("data:image/svg+xml,")).toBe(true);- expect(decodeURIComponent(black)).toContain('fill="#000000"');- expect(decodeURIComponent(white)).toContain('fill="#ffffff"');- // The shell puts the URL into an unquoted CSS url(...): no parentheses or- // quotes may survive encoding, or the declaration would end early.- for (const url of [black, white]) {- expect(url).not.toMatch(/[()'"\s]/);- }- expect(wallpaperThumbUrl("plain-black")).toBe(black);- });-});--/**- * The pre-per-theme slot must be migrated, never read live.- *- * Read as a live fallback it leaked one mode's picture into the other: a dark- * pick stored before the per-theme split kept showing behind light chrome for- * as long as light mode had no pick of its own. `adopt()` runs the same- * migration the store runs on load, which is what lets a test drive it after- * the module has long been imported.- */-describe("legacy single-slot migration", () => {- beforeEach(() => {- window.localStorage.clear();- useWallpaperStore.setState({ selections: { light: null, dark: null } });- });-- it("files the old pick under the cached theme and retires the slot", () => {- window.localStorage.setItem("jarvis.theme", "dark");- window.localStorage.setItem("jarvis.wallpaper.v1", "05-noir-03");-- useWallpaperStore.getState().adopt();-- const { selections } = useWallpaperStore.getState();- expect(selections.dark).toBe("05-noir-03");- // The leak this replaces: light mode must NOT inherit the dark pick.- expect(selections.light).toBeNull();- expect(window.localStorage.getItem("jarvis.wallpaper.v1")).toBeNull();- expect(window.localStorage.getItem("jarvis.wallpaper.dark.v1")).toBe(- "05-noir-03",- );- });-- it("never overwrites a mode's own pick", () => {- window.localStorage.setItem("jarvis.theme", "light");- window.localStorage.setItem("jarvis.wallpaper.light.v1", "chosen-light");- window.localStorage.setItem("jarvis.wallpaper.v1", "older-pick");-- useWallpaperStore.getState().adopt();-- expect(useWallpaperStore.getState().selections.light).toBe("chosen-light");- expect(window.localStorage.getItem("jarvis.wallpaper.v1")).toBeNull();- });-});--/**- * The catalog-backed correction pass.- *- * The boot migration can only guess a mode from the theme cache; `reconcile`- * is handed the real answer per picture and moves anything the guess misfiled.- */-describe("reconcile", () => {- beforeEach(() => {- window.localStorage.clear();- useWallpaperStore.setState({ selections: { light: null, dark: null } });- });-- const themes: Record<string, "light" | "dark"> = {- "05-noir-03": "dark",- "07-terrace-01": "light",- };- const themeOf = (id: string) => themes[id] ?? null;-- it("moves a dark picture out of the light slot and into its own", () => {- window.localStorage.setItem("jarvis.wallpaper.light.v1", "05-noir-03");-- useWallpaperStore.getState().reconcile(themeOf);-- const { selections } = useWallpaperStore.getState();- expect(selections.light).toBeNull();- expect(selections.dark).toBe("05-noir-03");- });-- it("drops a misfiled pick when its own mode has already chosen", () => {- window.localStorage.setItem("jarvis.wallpaper.light.v1", "05-noir-03");- window.localStorage.setItem("jarvis.wallpaper.dark.v1", "already-dark");-- useWallpaperStore.getState().reconcile(themeOf);-- const { selections } = useWallpaperStore.getState();- // A mode showing its default is right; one wearing the other mode's- // picture is the bug — so the misfiled pick goes, not the chosen one.- expect(selections.light).toBeNull();- expect(selections.dark).toBe("already-dark");- });-- it("leaves ids the catalog cannot answer for exactly where they are", () => {- window.localStorage.setItem("jarvis.wallpaper.light.v1", "u0123456789abcdef");-- useWallpaperStore.getState().reconcile(themeOf);-- // An upload still loading must not be thrown away for being unknown.- expect(useWallpaperStore.getState().selections.light).toBe(- "u0123456789abcdef",- );- });-- it("keeps a correctly filed pick untouched", () => {- window.localStorage.setItem("jarvis.wallpaper.light.v1", "07-terrace-01");- window.localStorage.setItem("jarvis.wallpaper.dark.v1", "05-noir-03");-- useWallpaperStore.getState().reconcile(themeOf);-- const { selections } = useWallpaperStore.getState();- expect(selections.light).toBe("07-terrace-01");- expect(selections.dark).toBe("05-noir-03");- });-});diff --git a/jarvis/ui/web/frontend/src/store/wallpaper.ts b/jarvis/ui/web/frontend/src/store/wallpaper.tsdeleted file mode 100644index 78c8bf88b5..0000000000--- a/jarvis/ui/web/frontend/src/store/wallpaper.ts+++ /dev/null@@ -1,323 +0,0 @@-import { create } from "zustand";--import { cachedTheme, type Theme } from "@/hooks/useTheme";-import {- BACKGROUND_MODE_KEY,- applyBackgroundClass,- readBackgroundMode,- writeBackgroundMode,- type BackgroundMode,-} from "@/lib/backgroundMode";-import { bundledWallpaperUrl } from "@/lib/bundledWallpapers";--/**- * Which desktop wallpaper the app is wearing — one choice PER THEME.- *- * Every catalog picture is authored for one of the two modes (a daylight- * terrace for light, a moonlit ocean for dark), and picking one switches the- * app into that mode (`useApplyWallpaper`). A single shared slot therefore- * could not survive a manual theme toggle: the bright picture stayed behind- * dark chrome and read as a mistake. Each mode keeps its own pick instead,- * and toggling the theme brings that mode's picture back with it.- *- * The bundled artwork stays the default and the fallback — one picture PER- * MODE (useDesktopWallpaper): an empty selection means "the one that ships- * with the app for this mode", so a fresh profile, a cleared browser storage,- * and a checkout without the generated library all land on a known-good- * picture authored for the mode on screen rather than on a blank shell — or,- * as it was until 2026-08-18, on the night scene under light chrome.- *- * The choice lives in localStorage rather than on the server. It is a per-- * screen cosmetic preference with no backend meaning, and localStorage is the- * one store every window of the app — including the detached solo windows —- * already shares.- */-const THEME_KEYS: Record<Theme, string> = {- light: "jarvis.wallpaper.light.v1",- dark: "jarvis.wallpaper.dark.v1",-};--/** The single pre-per-theme slot. Migrated on load, never read live. */-const LEGACY_KEY = "jarvis.wallpaper.v1";--/**- * One-time move of the pre-per-theme pick into a per-theme slot.- *- * The old slot used to be read as a live fallback for BOTH modes, and that is- * how a night scene ended up behind light chrome: whichever mode had no pick- * of its own inherited the other mode's picture, forever. A wallpaper belongs- * to exactly one mode, so the fallback is gone and the stored pick is filed- * once, under the mode it was authored for.- *- * The single-slot world switched the interface into every adopted picture's- * mode and persisted that switch, so the cached theme at the moment this first- * runs is the best witness for which mode the old pick belongs to. Worst case- * it is filed under the wrong one and the next pick overwrites it — a one-time- * cost, where the live fallback was a standing one.- */-function migrateLegacySelection(): void {- if (typeof window === "undefined") return;- try {- const legacy = window.localStorage.getItem(LEGACY_KEY);- if (legacy && legacy.trim()) {- const slot = THEME_KEYS[cachedTheme()];- if (!window.localStorage.getItem(slot)) {- window.localStorage.setItem(slot, legacy);- }- }- window.localStorage.removeItem(LEGACY_KEY);- // The retired Gigi-on-wallpaper toggle (removed 2026-09-10): drop its- // stored value so it does not linger in browser storage forever.- window.localStorage.removeItem("jarvis.wallpaper.mascot.v1");- } catch {- /* storage blocked — then there is no stored pick to migrate either */- }-}--/**- * The shortlist of wallpapers worth coming back to.- *- * Deliberately NOT split per theme the way the selection is: a favourite is a- * property of the picture, not of the mode the app happens to be in. Splitting- * it would force someone who loves a daylight scene to re-star it after every- * toggle, and the theme filter in the grid already answers "which of my- * favourites fit dark mode".- */-const FAVORITES_KEY = "jarvis.wallpaper.favorites.v1";--/**- * An id minted by the upload store (`u` + 16 hex), as opposed to one written by- * the library's manifest builder (`03-anime-neon-07`) or one of the few ids- * that ship inside the app (`original`, `plain-black`, …).- *- * The three sources are served from different places, and the id is what- * tells them apart — deliberately, so that everything holding only an id (the- * shell that paints the background, a per-theme selection restored from- * storage) resolves to the right picture without carrying a flag alongside it.- */-const UPLOAD_ID_PATTERN = /^u[0-9a-f]{16}$/;--export function isUploadId(id: string): boolean {- return UPLOAD_ID_PATTERN.test(id);-}--/**- * Where a chosen wallpaper's full-size file is served from.- *- * A bundled picture answers with its own URL and never touches the API: it is- * the one kind of wallpaper that must resolve on a machine with no library, no- * uploads and no backend at all.- */-export function wallpaperFullUrl(id: string): string {- const bundled = bundledWallpaperUrl(id);- if (bundled) return bundled;- const safe = encodeURIComponent(id);- return isUploadId(id)- ? `/api/wallpapers/uploads/${safe}/full`- : `/api/wallpapers/${safe}/full`;-}--/** Where a chosen wallpaper's grid thumbnail is served from. */-export function wallpaperThumbUrl(id: string): string {- const bundled = bundledWallpaperUrl(id);- if (bundled) return bundled;- const safe = encodeURIComponent(id);- return isUploadId(id)- ? `/api/wallpapers/uploads/${safe}/thumb`- : `/api/wallpapers/${safe}/thumb`;-}--function readStoredId(theme: Theme): string | null {- try {- const own = window.localStorage.getItem(THEME_KEYS[theme]);- return own && own.trim() ? own : null;- } catch {- // Private mode, or storage disabled by policy — the default is a fine- // answer, and a wallpaper is not worth failing a mount over.- return null;- }-}--function readSelections(): Record<Theme, string | null> {- if (typeof window === "undefined") return { light: null, dark: null };- migrateLegacySelection();- return { light: readStoredId("light"), dark: readStoredId("dark") };-}--/**- * The stored favourites, defensively.- *- * Anything that is not a list of non-empty strings is treated as "no- * favourites": the value is hand-editable browser storage, and a malformed- * entry must cost the grid a shortlist, never a mount.- */-function readFavorites(): string[] {- if (typeof window === "undefined") return [];- try {- const raw = window.localStorage.getItem(FAVORITES_KEY);- if (!raw) return [];- const parsed: unknown = JSON.parse(raw);- if (!Array.isArray(parsed)) return [];- const clean = parsed.filter(- (entry): entry is string => typeof entry === "string" && entry.trim() !== "",- );- return [...new Set(clean)];- } catch {- return [];- }-}--interface WallpaperStore {- /**- * Whether the app is painted on a wallpaper at all, or on the flat theme- * colour (the default). Independent of WHICH picture is picked: the picks- * survive a switch to solid, and come back when the wallpaper returns.- */- background: BackgroundMode;- /** Each theme's chosen wallpaper id, or null for the bundled default. */- selections: Record<Theme, string | null>;- /** Favourited wallpaper ids, oldest first. Shared by both themes. */- favorites: string[];- /** Persist a choice for one theme. Pass null to go back to the default. */- select: (id: string | null, theme: Theme) => void;- /** Paint on the flat colour, or on the chosen wallpaper. */- setBackground: (mode: BackgroundMode) => void;- /**- * Drop one wallpaper everywhere it is remembered — every theme slot and the- * favourites. For a picture that no longer exists: an id kept for a deleted- * upload would resolve to a 404 and silently fall back forever.- */- forget: (id: string) => void;- /** Star or un-star one wallpaper. */- toggleFavorite: (id: string) => void;- /** Adopt choices made in another window. Does not write back. */- adopt: () => void;- /**- * Re-file every stored pick under the mode its picture was authored for.- *- * The load-time migration above can only GUESS at the legacy pick's mode- * (from the theme cache), and a wrong guess would park a night scene in the- * light slot — the very leak all of this exists to end. This is the- * correction pass, run by whoever holds the catalog and can therefore- * answer for real: `themeOf` returns the mode a picture was authored for,- * or null for an id it does not know (an upload still loading, a library- * not installed) — unknown ids are left exactly where they are.- */- reconcile: (themeOf: (id: string) => Theme | null) => void;-}--export const useWallpaperStore = create<WallpaperStore>((set, get) => ({- background: readBackgroundMode(),- selections: readSelections(),- favorites: readFavorites(),- select: (id, theme) => {- try {- if (id) window.localStorage.setItem(THEME_KEYS[theme], id);- else window.localStorage.removeItem(THEME_KEYS[theme]);- } catch {- /* the choice still applies to this window, it just will not survive */- }- set({ selections: readSelections() });- },- forget: (id) => {- if (!id) return;- try {- for (const theme of ["light", "dark"] as Theme[]) {- if (window.localStorage.getItem(THEME_KEYS[theme]) === id) {- window.localStorage.removeItem(THEME_KEYS[theme]);- }- }- if (window.localStorage.getItem(LEGACY_KEY) === id) {- window.localStorage.removeItem(LEGACY_KEY);- }- const favorites = readFavorites().filter((entry) => entry !== id);- if (favorites.length) {- window.localStorage.setItem(FAVORITES_KEY, JSON.stringify(favorites));- } else {- window.localStorage.removeItem(FAVORITES_KEY);- }- } catch {- /* nothing to clean up if storage is unavailable */- }- set({ selections: readSelections(), favorites: readFavorites() });- },- toggleFavorite: (id) => {- if (!id) return;- // Computed from the store rather than re-read from storage, so a rapid- // double-click resolves against what this window last wrote.- const current = get().favorites;- const next = current.includes(id)- ? current.filter((entry) => entry !== id)- : [...current, id];- try {- if (next.length) window.localStorage.setItem(FAVORITES_KEY, JSON.stringify(next));- else window.localStorage.removeItem(FAVORITES_KEY);- } catch {- /* the star still shows in this window, it just will not survive */- }- set({ favorites: next });- },- setBackground: (mode) => {- writeBackgroundMode(mode);- applyBackgroundClass(mode);- set({ background: mode });- },- adopt: () => {- const background = readBackgroundMode();- applyBackgroundClass(background);- set({- background,- selections: readSelections(),- favorites: readFavorites(),- });- },- reconcile: (themeOf) => {- try {- for (const slot of ["light", "dark"] as Theme[]) {- const id = window.localStorage.getItem(THEME_KEYS[slot]);- if (!id || !id.trim()) continue;- const authored = themeOf(id);- if (authored === null || authored === slot) continue;- // Misfiled: hand the pick to its own mode when that mode has not- // chosen for itself, and clear the wrong slot either way — a mode- // showing its default is right; one wearing the other mode's picture- // is the bug.- if (!window.localStorage.getItem(THEME_KEYS[authored])) {- window.localStorage.setItem(THEME_KEYS[authored], id);- }- window.localStorage.removeItem(THEME_KEYS[slot]);- }- } catch {- /* storage blocked — nothing stored means nothing misfiled */- }- set({ selections: readSelections() });- },-}));--/**- * Keep every window on the same wallpaper.- *- * A `storage` event fires in the *other* documents of the origin, which is- * exactly the set of windows that need to repaint: pick a wallpaper in the- * main window and the detached ones follow without a reload.- */-export function installWallpaperSync(): () => void {- if (typeof window === "undefined") return () => {};- const watched = new Set<string>([- LEGACY_KEY,- THEME_KEYS.light,- THEME_KEYS.dark,- FAVORITES_KEY,- BACKGROUND_MODE_KEY,- ]);- // The boot script already stamped the class for the first paint; this- // re-applies it once the store exists, which is also what heals a document- // whose boot script could not read storage.- applyBackgroundClass(useWallpaperStore.getState().background);- const onStorage = (event: StorageEvent) => {- if (event.key !== null && !watched.has(event.key)) return;- useWallpaperStore.getState().adopt();- };- window.addEventListener("storage", onStorage);- return () => window.removeEventListener("storage", onStorage);-}diff --git a/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsxindex bf99b38b15..1cdaf67a47 100644--- a/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsx+++ b/jarvis/ui/web/frontend/src/views/MarketplaceOrigin.test.tsx@@ -3,16 +3,15 @@** 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.+ * pin the places that now answer that — a plugin in Plugins, a skill in+ * Skills — 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({@@ -116,35 +115,3 @@ describe("an installed community plugin is findable", () => {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/MarketplaceView.test.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsxindex 1ef0620381..84f93a31da 100644--- a/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/MarketplaceView.test.tsx@@ -78,21 +78,6 @@ const INDEX: CommunityResponse = {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 = {@@ -111,7 +96,7 @@ const CONTENTS = {};/** The publishing identity the view asks for; signed out unless a test says so. */-let identity: Record<string, unknown> = { enabled: true, wallpapers_enabled: true, signed_in: false };+let identity: Record<string, unknown> = { enabled: true, signed_in: false };function installFetchMock(overrides?: Partial<CommunityResponse>) {const fetchMock = vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {@@ -123,9 +108,6 @@ function installFetchMock(overrides?: Partial<CommunityResponse>) {if (url === "/api/marketplace/publish/identity" && method === "GET") {return { ok: true, status: 200, json: async () => identity } as Response;}- if (url === "/api/wallpapers/uploads") {- return { ok: true, status: 200, json: async () => ({ items: [] }) } as Response;- }if (url === "/api/marketplace/publish/signin/start") {return {ok: true,@@ -181,19 +163,20 @@ afterEach(() => {vi.unstubAllGlobals();openExternalUrl.mockReset();setUiLanguage("en");- identity = { enabled: true, wallpapers_enabled: true, signed_in: false };+ identity = { enabled: true, signed_in: false };});describe("MarketplaceView", () => {- it("shows all three published kinds in one storefront", async () => {+ it("shows both 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();+ expect(screen.getByText(/2 published entries/)).toBeTruthy();+ // Wallpapers were retired as a marketplace kind: no filter, no shelf.+ expect(screen.queryByRole("button", { name: /Wallpapers/ })).toBeNull();});it("searches across kinds at once", async () => {@@ -202,12 +185,11 @@ describe("MarketplaceView", () => {await screen.findByText("Sentry");fireEvent.change(screen.getByLabelText(/Search plugins/i), {- target: { value: "observatory" },+ target: { value: "crisp bullets" },});expect(screen.queryByText("Sentry")).toBeNull();- expect(screen.queryByText("Three Bullet Brief")).toBeNull();- expect(screen.getByText("Flooded Observatory")).toBeTruthy();+ expect(screen.getByText("Three Bullet Brief")).toBeTruthy();});it("filters to one kind and says how many there are", async () => {@@ -315,14 +297,11 @@ describe("MarketplaceView", () => {// 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 three times on purpose — the hero count, the filter- // chip and the shelf head name the same thing, and they must agree.- expect(screen.getAllByText("Hintergründe").length).toBe(3); // i18n-allow- expect(screen.getByLabelText(/Plugins, Skills und Hintergründe/)).toBeTruthy();+ expect(await screen.findByText(/2 veröffentlichte Einträge/)).toBeTruthy(); // i18n-allow+ expect(screen.getByLabelText(/Plugins und Skills durchsuchen/)).toBeTruthy(); // i18n-allowsetUiLanguage("es");- expect((await screen.findAllByText("Fondos")).length).toBe(3);+ expect(await screen.findByLabelText(/Buscar plugins y skills/)).toBeTruthy(); // i18n-allow});it("opens the public storefront in a real browser", async () => {@@ -359,7 +338,6 @@ describe("MarketplaceView", () => {it("filters to the signed-in account's own publications", async () => {identity = {enabled: true,- wallpapers_enabled: true,signed_in: true,login: "octocat",avatar_url: null,@@ -381,7 +359,7 @@ describe("MarketplaceView", () => {const chip = await screen.findByTestId("publisher-chip");expect(chip.textContent).toContain("@octocat");- fireEvent.click(screen.getByRole("button", { name: /Mine 3/ }));+ fireEvent.click(screen.getByRole("button", { name: /Mine 2/ }));expect(screen.getByText("Three Bullet Brief")).toBeTruthy();expect(screen.getByText("Sentry")).toBeTruthy();expect(screen.queryByText("Someone Else's Skill")).toBeNull();diff --git a/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx b/jarvis/ui/web/frontend/src/views/MarketplaceView.tsxindex eb74ef2895..030914e39e 100644--- a/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx+++ b/jarvis/ui/web/frontend/src/views/MarketplaceView.tsx@@ -10,7 +10,6 @@ import {Package,RefreshCw,Search,- Sparkles,Store,UploadCloud,Wand2,@@ -35,7 +34,6 @@ import {type CommunityPluginWire,type CommunityResponse,type CommunitySkillWire,- type CommunityWallpaperWire,type EntryContentsWire,} from "@/views/PluginsCommunity";@@ -44,10 +42,10 @@ import {//// 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.+// in a second list. Somebody who never opened those places never learned the+// marketplace exists.//-// This screen is the storefront: one index, one search across all three kinds,+// This screen is the storefront: one index, one search across both 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.@@ -61,7 +59,7 @@ import {/** The public storefront — the same catalogue, on the web. */const MARKETPLACE_WEB_URL = "https://github.com/PersonalJarvis/marketplace";-type Kind = "plugin" | "skill" | "wallpaper";+type Kind = "plugin" | "skill";type KindFilter = "all" | Kind | "mine";/** One entry of any kind, flattened into what the storefront draws. */@@ -76,8 +74,6 @@ interface Entry {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;@@ -99,15 +95,12 @@ interface Entry {seedConflict?: boolean;/** Skills only: a portable Agent Skill states the agents it also runs in. */portableAgents?: string[] | null;- /** Wallpapers only. */- license?: 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 {@@ -149,22 +142,6 @@ function skillEntry(s: CommunitySkillWire): Entry {};}-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,- license: w.license ?? null,- };-}-function matches(entry: Entry, needle: string): boolean {if (!needle) return true;const hay = [@@ -258,7 +235,6 @@ export function MarketplaceView() {queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });queryClient.invalidateQueries({ queryKey: ["marketplace-plugins"] });queryClient.invalidateQueries({ queryKey: ["skills"] });- queryClient.invalidateQueries({ queryKey: ["wallpaper-catalog"] });},});@@ -267,7 +243,6 @@ export function MarketplaceView() {return [...(data.plugins ?? []).map(pluginEntry),...(data.skills ?? []).map(skillEntry),- ...(data.wallpapers ?? []).map(wallpaperEntry),];}, [data]);@@ -287,7 +262,6 @@ export function MarketplaceView() {[entries, kindFilter, needle, login],);- const wallpapers = visible.filter((e) => e.kind === "wallpaper");const plugins = visible.filter((e) => e.kind === "plugin");const skills = visible.filter((e) => e.kind === "skill");@@ -361,7 +335,6 @@ export function MarketplaceView() {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,mine: mineCount,}}showMine={login !== null}@@ -418,25 +391,6 @@ export function MarketplaceView() {/>)}- {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 && (<Shelftitle={t("marketplace.shelf_plugins")}@@ -511,8 +465,7 @@ function subtitleFor(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 total = (data.plugins?.length ?? 0) + (data.skills?.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 }));@@ -548,7 +501,6 @@ function FilterChips({{ 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") },];if (showMine) chips.push({ id: "mine", label: t("marketplace.filter_mine") });return (@@ -600,54 +552,6 @@ function Shelf({);}-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",- "bg-secondary text-left",- "transition-colors hover:border-border-strong",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong/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-micro 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-micro 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 (@@ -801,7 +705,6 @@ function Hero({const counts = {plugins: data?.plugins?.length ?? 0,skills: data?.skills?.length ?? 0,- wallpapers: data?.wallpapers?.length ?? 0,};return (<section@@ -841,10 +744,9 @@ function Hero({)}</div></div>- <dl className="grid grid-cols-3 gap-3 sm:gap-4">+ <dl className="grid grid-cols-2 gap-3 sm:gap-4"><Stat value={counts.plugins} label={t("marketplace.filter_plugins")} /><Stat value={counts.skills} label={t("marketplace.filter_skills")} />- <Stat value={counts.wallpapers} label={t("marketplace.filter_wallpapers")} /></dl></div></section>@@ -973,14 +875,6 @@ function EntryDrawer({<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">{entry.description}@@ -1132,10 +1026,6 @@ function Destination({ entry, t }: { entry: Entry; t: Translate }) {});}- if (entry.license) {- rows.push({ label: t("marketplace.license"), value: entry.license });- }-if (rows.length === 0) return null;return (diff --git a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsxindex bebb53736b..4bd8bb358f 100644--- a/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx+++ b/jarvis/ui/web/frontend/src/views/MissionDeckView.tsx@@ -503,7 +503,7 @@ function BoardCentre({{/* The same layoutId as the standby's orb: when the board takes over,the orb travels here instead of blinking — and lands with a ring. */}<div className="relative isolate">- {/* The wash that lifts the centre off the wallpaper. It rides on the+ {/* The wash that lifts the centre off the background. It rides on theorb, on a square of its own, because it used to be a backgroundon the column above — where the column's straight top and bottomcut the circle while it was still opaque (deckStage.ts). */}diff --git a/jarvis/ui/web/frontend/src/views/PluginsCommunity.contents.test.tsx b/jarvis/ui/web/frontend/src/views/PluginsCommunity.contents.test.tsxindex 7f5a020ef2..cf8185d105 100644--- a/jarvis/ui/web/frontend/src/views/PluginsCommunity.contents.test.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsCommunity.contents.test.tsx@@ -1,14 +1,16 @@import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import { cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";+import { cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, describe, expect, it, vi } from "vitest";import { CommunityTab, type CommunityResponse } from "@/views/PluginsCommunity";// What the reader must be able to see BEFORE installing: the actual text a-// skill would hand the assistant, and the actual picture a wallpaper installs.+// skill would hand the assistant.const SKILL_TEXT = "---\nname: three-point-check\n---\n\nAlways answer in three bullets.\n";-const COMMUNITY: CommunityResponse = {+// A registry build from before wallpapers were retired may still publish the+// section; the tab must not render it.+const COMMUNITY = {status: "fresh",plugins: [],skills: [@@ -38,7 +40,7 @@ const COMMUNITY: CommunityResponse = {installed: false,},],-};+} as CommunityResponse;function installFetchMock() {const fetchMock = vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {@@ -59,18 +61,10 @@ function installFetchMock() {files: [{ path: "SKILL.md", size: 72, text: SKILL_TEXT, truncated: false },],- image_url: null,error: null,}),} as Response;}- if (url === "/api/marketplace/community/install/rain-antenna-city") {- return {- ok: true,- status: 200,- json: async () => ({ ok: true, kind: "wallpaper", id: "rain-antenna-city" }),- } as Response;- }throw new Error(`unexpected fetch ${method} ${url}`);});(globalThis as unknown as { fetch: typeof fetch }).fetch =@@ -124,26 +118,12 @@ describe("reading an entry before installing it", () => {).toBeDefined();});- it("lists wallpapers and installs the previewed one by name", async () => {- const fetchMock = installFetchMock();+ it("does not list wallpapers an older feed still publishes", async () => {+ installFetchMock();renderTab();- fireEvent.click(await screen.findByTitle(/Preview Rain Antenna City/i));- // The picture at full size IS the disclosure for a wallpaper.- const preview = await screen.findByAltText("Rain Antenna City");- expect(preview.getAttribute("src")).toBe(- "https://raw.example/wallpapers/rain-antenna-city.webp",- );-- // Scoped to the dialog: the skill card behind it carries an Install too.- const dialog = screen.getByRole("dialog");- fireEvent.click(within(dialog).getByRole("button", { name: "Install" }));- await waitFor(() =>- expect(- fetchMock.mock.calls.some(- ([u]) => String(u) === "/api/marketplace/community/install/rain-antenna-city",- ),- ).toBe(true),- );+ expect(await screen.findByTitle(/Read what Three Point Check/i)).toBeDefined();+ expect(screen.queryByText("Rain Antenna City")).toBeNull();+ expect(screen.queryByText("Wallpapers")).toBeNull();});});diff --git a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsxindex c3541489df..fd13a9c7bb 100644--- a/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx+++ b/jarvis/ui/web/frontend/src/views/PluginsCommunity.tsx@@ -91,30 +91,12 @@ function portableNote(skill: CommunitySkillWire): string | null {: "Portable skill · also runs in other agents";}-export interface CommunityWallpaperWire {- name: string;- title: string;- description: string;- publisher?: string | null;- version?: string | null;- 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;- /** SPDX id the publisher declared for the artwork. */- license?: string | null;- theme?: string | null;- installed: boolean;-}-export interface CommunityResponse {status: "fresh" | "fetched" | "stale" | "unavailable" | "disabled";revision?: number | null;generated_at?: string | null;plugins: CommunityPluginWire[];skills: CommunitySkillWire[];- wallpapers?: CommunityWallpaperWire[];}/** One readable file of a published entry — mirrors ``_text_file`` server-side. */@@ -126,12 +108,11 @@ export interface EntryFileWire {}export interface EntryContentsWire {- kind: "skill" | "plugin" | "wallpaper";+ kind: "skill" | "plugin";name: string;title: string;root: string;files: EntryFileWire[];- image_url?: string | null;error?: string | null;}@@ -188,7 +169,6 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strinconst [query, setQuery] = useState("");const [consentPlugin, setConsentPlugin] = useState<CommunityPluginWire | null>(null);const [consentSkill, setConsentSkill] = useState<CommunitySkillWire | null>(null);- const [consentPaper, setConsentPaper] = useState<CommunityWallpaperWire | null>(null);const refreshMutation = useMutation({mutationFn: async (): Promise<CommunityResponse> => {@@ -245,8 +225,7 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strinconst skillInstallMutation = useMutation({mutationFn: async (skill: CommunitySkillWire) => {- // The by-name route, same as the wallpaper below: it runs the existing- // catalog install (download, validation, registry hot-swap) and then+ // The by-name route: it runs the existing catalog install (download, validation, registry hot-swap) and then// writes the origin receipt. Posting to the catalog route directly// skipped that receipt, so a skill installed from this card arrived// with no mark on it — installed from the marketplace and unable to@@ -271,31 +250,6 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strin},});- const paperInstallMutation = useMutation({- mutationFn: async (paper: CommunityWallpaperWire) => {- // The by-name route already resolves the kind and does the download,- // re-encode and origin receipt — a picture needs no second install path.- const res = await fetch(- `/api/marketplace/community/install/${encodeURIComponent(paper.name)}`,- { method: "POST" },- );- if (!res.ok) {- const detail = await res- .json()- .then((body: { detail?: string }) => body.detail)- .catch(() => undefined);- throw new Error(detail ?? `Install failed (${res.status})`);- }- return res.json();- },- onSuccess: () => {- setConsentPaper(null);- queryClient.invalidateQueries({ queryKey: ["marketplace-community"] });- // The picker reads its own store — it has to learn about the new tile.- queryClient.invalidateQueries({ queryKey: ["wallpapers"] });- },- });-const q = query.trim().toLowerCase();const plugins = useMemo(() =>@@ -321,19 +275,6 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strin}),[data, q],);- const wallpapers = useMemo(- () =>- (data?.wallpapers ?? []).filter((w) => {- if (!q) return true;- return (- w.name.toLowerCase().includes(q) ||- w.title.toLowerCase().includes(q) ||- w.description.toLowerCase().includes(q)- );- }),- [data, q],- );-return (<div className="space-y-8"><header className="flex flex-wrap items-center gap-3">@@ -342,7 +283,7 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strinCommunity marketplace</h2><p className="text-xs text-muted-foreground">- Plugins, skills and wallpapers published by anyone. Nothing here is+ Plugins and skills published by anyone. Nothing here isreviewed by the {PRODUCT_NAME} team — read what a card would connectto before installing it.</p>@@ -351,7 +292,7 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strinsize="sm"variant="outline"onClick={() => setActiveSection("marketplace")}- title="The whole marketplace — plugins, skills and wallpapers — in its own section"+ title="The whole marketplace — plugins and skills — in its own section"><Store className="mr-1.5 h-3.5 w-3.5" />Marketplace section@@ -380,16 +321,13 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strin<StatusNotice status={data?.status} error={error} isLoading={isLoading} />- {(data?.plugins.length ?? 0) +- (data?.skills.length ?? 0) +- (data?.wallpapers?.length ?? 0) >- 0 && (+ {(data?.plugins.length ?? 0) + (data?.skills.length ?? 0) > 0 && (<label className="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2"><Search className="h-3.5 w-3.5 shrink-0 text-muted-foreground" /><inputvalue={query}onChange={(e) => setQuery(e.target.value)}- placeholder="Search community plugins, skills and wallpapers…"+ placeholder="Search community plugins and skills…"className="w-full bg-transparent text-sm text-foreground outline-none placeholder:text-faint-foreground"/></label>@@ -444,40 +382,6 @@ export function CommunityTab({ onInstalled }: { onInstalled?: (pluginName: strin</section>)}- {wallpapers.length > 0 && (- <section>- <h3 className="mb-3 font-display text-xs font-semibold text-muted-foreground">- Wallpapers- </h3>- <div className="grid gap-3 sm:grid-cols-3 lg:grid-cols-4">- {wallpapers.map((w) => (- <CommunityWallpaperCard- key={w.name}- paper={w}- onOpen={() => setConsentPaper(w)}- />- ))}- </div>- </section>- )}-- {consentPaper && (- <WallpaperPreviewDialog- paper={consentPaper}- isPending={paperInstallMutation.isPending}- errorMessage={- paperInstallMutation.error instanceof Error- ? paperInstallMutation.error.message- : null- }- onCancel={() => {- setConsentPaper(null);- paperInstallMutation.reset();- }}- onConfirm={() => paperInstallMutation.mutate(consentPaper)}- />- )}-{consentPlugin && (<InstallConsentDialogplugin={consentPlugin}@@ -893,160 +797,6 @@ function CommunitySkillRow({);}-/** A published wallpaper, shown as the thing it is: a picture.- *- * A tile rather than a row — a filename tells nobody whether they want the- * picture, and the whole card opens the full-size preview. */-function CommunityWallpaperCard({- paper,- onOpen,-}: {- paper: CommunityWallpaperWire;- onOpen: () => void;-}) {- const [failed, setFailed] = useState(false);- return (- <button- type="button"- onClick={onOpen}- title={`Preview ${paper.title}`}- className={cn(- "group overflow-hidden rounded-lg border bg-card text-left transition-colors",- paper.installed- ? "border-primary/30"- : "border-border hover:border-border-strong hover:bg-secondary",- )}- >- <div className="grid aspect-video place-items-center overflow-hidden bg-muted">- {failed || !paper.raw_url ? (- <span className="text-micro text-muted-foreground">No preview</span>- ) : (- <img- src={paper.raw_url}- alt=""- loading="lazy"- className="h-full w-full object-cover transition-transform group-hover:scale-[1.03]"- onError={() => setFailed(true)}- />- )}- </div>- <div className="px-2.5 py-2">- <div className="flex items-center gap-1.5">- <h4 className="min-w-0 truncate text-xs font-semibold text-foreground">- {paper.title}- </h4>- {paper.installed && (- <Check className="h-3 w-3 shrink-0 text-muted-foreground" aria-label="Installed" />- )}- </div>- <p className="truncate text-micro text-muted-foreground">- {paper.publisher ? `by ${paper.publisher}` : "unknown publisher"}- </p>- </div>- </button>- );-}--/** The picture at full size before it lands in the picker.- *- * A wallpaper carries no code and no credentials, so there is nothing to- * disclose beyond the image itself — which makes seeing it big the entire- * decision. */-export function WallpaperPreviewDialog({- paper,- isPending,- errorMessage,- onCancel,- onConfirm,-}: {- paper: CommunityWallpaperWire;- isPending: boolean;- errorMessage: string | null;- onCancel: () => void;- onConfirm: () => void;-}) {- useEffect(() => {- const onKey = (e: KeyboardEvent) => {- if (e.key === "Escape" && !isPending) onCancel();- };- window.addEventListener("keydown", onKey);- return () => window.removeEventListener("keydown", onKey);- }, [onCancel, isPending]);-- return (- <div- role="dialog"- aria-modal="true"- aria-labelledby="community-wallpaper-title"- className="fixed inset-0 z-50 flex items-center justify-center bg-scrim/70 backdrop-blur-sm"- onClick={(e) => {- if (e.target === e.currentTarget && !isPending) onCancel();- }}- >- <div className="relative flex max-h-[88vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg bg-popover shadow-float">- <header className="border-b border-border px-5 py-4">- <h2- id="community-wallpaper-title"- className="font-display text-base font-semibold tracking-tight"- >- {paper.installed ? paper.title : `Install ${paper.title}?`}- </h2>- <p className="text-micro text-foreground">- Community wallpaper · not reviewed- {paper.installed ? " · installed" : ""}- </p>- </header>-- <div className="min-h-0 flex-1 space-y-3 overflow-y-auto px-5 py-4 text-sm">- {paper.raw_url ? (- <img- src={paper.raw_url}- alt={paper.title}- className="max-h-[52vh] w-full rounded-lg border border-border object-contain"- />- ) : (- <Notice tone="warn">This wallpaper publishes no downloadable image.</Notice>- )}- {paper.description && (- <p className="text-muted-foreground">{paper.description}</p>- )}- <p className="text-xs text-muted-foreground">- Published by{" "}- <span className="text-foreground">- {paper.publisher ?? "an unknown author"}- </span>- {paper.version ? ` · version ${paper.version}` : ""}- </p>- <p className="text-xs text-muted-foreground">- Installing downloads the picture and stores it beside your own- uploads. It carries no code and no credentials.- </p>- {errorMessage && (- <p className="flex items-start gap-2 rounded-md bg-secondary px-2 py-1.5 text-xs text-destructive">- <AlertTriangle className="mt-0.5 h-3.5 w-3.5 shrink-0" />- {errorMessage}- </p>- )}- </div>-- <footer className="flex shrink-0 justify-end gap-2 border-t border-border px-5 py-3">- <Button size="sm" variant="ghost" onClick={onCancel} disabled={isPending}>- {paper.installed ? "Close" : "Cancel"}- </Button>- {!paper.installed && paper.raw_url && (- <Button size="sm" onClick={onConfirm} disabled={isPending}>- {isPending ? (- <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />- ) : null}- Install- </Button>- )}- </footer>- </div>- </div>- );-}-/** Skills get the same trust boundary as plugins: a community skill is* instructions the assistant will follow, downloaded from a URL nobody* reviewed — so the dialog shows that exact URL and reminds the user todiff --git a/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx b/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsxindex 03397181d7..fa974612b8 100644--- a/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/SettingsHubView.test.tsx@@ -83,7 +83,6 @@ vi.mock("@/views/TelephonyView", () => ({vi.mock("@/views/LocalModelsView", () => ({LocalModelsView: stub("TAB_LOCAL_MODELS"),}));-vi.mock("@/views/WallpaperView", () => ({ WallpaperView: stub("TAB_WALLPAPER") }));vi.mock("@/views/CostsView", () => ({ CostsView: stub("TAB_COSTS") }));vi.mock("@/views/feedback/FeedbackView", () => ({FeedbackView: stub("TAB_FEEDBACK"),@@ -102,7 +101,6 @@ const NAV_IDS = ["socials","apikeys","local-models",- "wallpaper","costs","feedback",] as const;@@ -179,8 +177,8 @@ describe("SettingsHubView header and navigation", () => {render(<SettingsHubView />);await screen.findByTestId("TAB_SETTINGS");- fireEvent.click(screen.getByTestId("settings-hub-nav-wallpaper"));- expect(mockState.setActiveSection).toHaveBeenCalledWith("wallpaper");+ fireEvent.click(screen.getByTestId("settings-hub-nav-costs"));+ expect(mockState.setActiveSection).toHaveBeenCalledWith("costs");});});@@ -193,7 +191,6 @@ describe("SettingsHubView tab resolution", () => {["socials", "TAB_SOCIALS"],["apikeys", "TAB_APIKEYS"],["local-models", "TAB_LOCAL_MODELS"],- ["wallpaper", "TAB_WALLPAPER"],["costs", "TAB_COSTS"],["feedback", "TAB_FEEDBACK"],// Merged-in ids land on the tab hosting their content.@@ -266,10 +263,10 @@ describe("SettingsHubView search", () => {await screen.findByTestId("TAB_SETTINGS");fireEvent.change(screen.getByPlaceholderText("settings_hub.search_placeholder"), {- target: { value: "wall" },+ target: { value: "spend" },});- expect(screen.getByTestId("settings-hub-nav-wallpaper")).toBeTruthy();+ expect(screen.getByTestId("settings-hub-nav-costs")).toBeTruthy();expect(screen.queryByTestId("settings-hub-nav-profile")).toBeNull();expect(screen.queryByTestId("settings-hub-nav-apikeys")).toBeNull();});diff --git a/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx b/jarvis/ui/web/frontend/src/views/SettingsHubView.tsxindex 77a185a279..2c26f77029 100644--- a/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx+++ b/jarvis/ui/web/frontend/src/views/SettingsHubView.tsx@@ -22,7 +22,7 @@ import { cn } from "@/lib/utils";* (General · System · Activity) and the selected section on the right:** General: Settings, Appshots, Profile, {name}.md, Contacts, Socials- * System: Computers, API Keys, Local models, Wallpaper+ * System: Computers, API Keys, Local models, Jarvis actions* Activity: Spend, Feedback** Same merged-section pattern as VoiceHubView / ClisHubView: the active@@ -77,9 +77,6 @@ const LocalModelsTab = lazy(() =>const ComputersTab = lazy(() =>import("@/views/ComputersView").then((m) => ({ default: m.ComputersView })),);-const WallpaperTab = lazy(() =>- import("@/views/WallpaperView").then((m) => ({ default: m.WallpaperView })),-);const JarvisActionsTab = lazy(() =>import("@/views/JarvisActionsView").then((m) => ({ default: m.JarvisActionsView })),);@@ -95,7 +92,7 @@ const FeedbackTab = lazy(() =>})),);-/** The eleven entries of the left navigation, in display order. */+/** The twelve entries of the left navigation, in display order. */type HubNavId =| "settings"| "appshots"@@ -107,7 +104,6 @@ type HubNavId =| "local-models"| "computers"| "jarvis-actions"- | "wallpaper"| "costs"| "feedback";@@ -118,7 +114,7 @@ const HUB_NAV_GROUPS: readonly { labelKey: string; ids: readonly HubNavId[] }[]},{labelKey: "settings_hub.group_system",- ids: ["computers", "apikeys", "local-models", "jarvis-actions", "wallpaper"],+ ids: ["computers", "apikeys", "local-models", "jarvis-actions"],},{labelKey: "settings_hub.group_activity",@@ -136,7 +132,6 @@ const TAB_CONTENT: Record<HubNavId | "telephony-setup", LazyExoticComponent<Comp"telephony-setup": TelephonySetupTab,"local-models": LocalModelsTab,computers: ComputersTab,- wallpaper: WallpaperTab,appshots: AppshotsTab,"jarvis-actions": JarvisActionsTab,costs: CostsTab,@@ -167,8 +162,6 @@ function resolveHubTab(active: string): { content: HubNavId | "telephony-setup";return { content: "local-models", highlight: "local-models" };case "computers":return { content: "computers", highlight: "computers" };- case "wallpaper":- return { content: "wallpaper", highlight: "wallpaper" };case "appshots":return { content: "appshots", highlight: "appshots" };case "jarvis-actions":@@ -229,7 +222,7 @@ export function SettingsHubView({ onClose }: { onClose: () => void }) {const matches = (item: NavItem) =>needle === "" || resolveNavLabel(t, item).toLowerCase().includes(needle);- // Eleven entries — filtered inline; no memo needed at this size.+ // Twelve entries — filtered inline; no memo needed at this size.const visibleGroups = HUB_NAV_GROUPS.map((group) => ({...group,items: group.ids.map(findNavItem).filter(matches),@@ -423,7 +416,7 @@ export function SettingsHubView({ onClose }: { onClose: () => void }) {** Centred with `inset-0` + `m-auto` rather than a translate: a transform would* turn the dialog into the containing block of every `position: fixed` layer a- * tab renders inline (the wallpaper preview, view-level dialogs) and trap them+ * tab renders inline (an image preview, view-level dialogs) and trap them* inside the window instead of covering the screen.*/export function SettingsHubDialog({ onClose }: { onClose: () => void }) {diff --git a/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx b/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsxindex 6a3fc9fb82..dfe08c5508 100644--- a/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx+++ b/jarvis/ui/web/frontend/src/views/VisualizationView.test.tsx@@ -372,7 +372,7 @@ describe("VisualizationView", () => {});describe("SectionStage", () => {- it("drops the wallpaper readability halo for the visualization section", () => {+ it("gives the visualization section its own opaque stage", () => {const { container, rerender } = render(<SectionStage visualization={false}><span>section</span>@@ -387,8 +387,7 @@ describe("SectionStage", () => {);const stage = container.firstElementChild;expect(stage?.className).toContain("jarvis-visualization-stage");- // Never both: the halo is inherited by every descendant, which is exactly- // what must not happen over a rendered page.+ // Never both: a rendered page is judged against one flat ground only.expect(stage?.className).not.toContain("jarvis-section-stage");});});diff --git a/jarvis/ui/web/frontend/src/views/WallpaperView.share.test.tsx b/jarvis/ui/web/frontend/src/views/WallpaperView.share.test.tsxdeleted file mode 100644index 1701e65586..0000000000--- a/jarvis/ui/web/frontend/src/views/WallpaperView.share.test.tsx+++ /dev/null@@ -1,112 +0,0 @@-/**- * The Share button in the wallpaper preview: offered for the owner's own- * pictures only, when the wallpaper lane is on, and it opens the publish- * dialog over the picker.- *- * A file of its own because it needs the publish identity endpoint to answer- * something real, which the picker's main harness deliberately leaves blank.- *- * No jest-dom in this repo — assertions use toBeTruthy()/toBeNull().- */-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import { cleanup, fireEvent, render, screen, within } from "@testing-library/react";-import { afterEach, describe, expect, it, vi } from "vitest";--import { ThemeProvider } from "@/hooks/useTheme";-import { WallpaperView } from "@/views/WallpaperView";--const CATALOG = {- available: true,- count: 1,- styles: [{ slug: "03-anime-neon", label: "Cinematic Anime Neon", count: 1 }],- items: [- {- id: "03-anime-neon-01",- title: "Neon Crossing",- style: "03-anime-neon",- styleLabel: "Cinematic Anime Neon",- theme: "dark" as const,- },- ],-};--const OWN = { id: "u000000000000000a", title: "Kitchen Window", theme: "light", createdAt: 1 };-const INSTALLED = {- id: "u000000000000000b",- title: "Rain Antenna City",- theme: "dark",- createdAt: 2,- source: "marketplace",- publisher: "someone",-};--function stubServer(wallpapersEnabled: boolean) {- const json = (body: unknown) => ({ ok: true, status: 200, json: async () => body });- vi.stubGlobal(- "fetch",- vi.fn(async (input: unknown) => {- const url = String(input);- if (url === "/api/wallpapers/uploads") return json({ items: [OWN, INSTALLED] });- if (url === "/api/wallpapers") return json(CATALOG);- if (url === "/api/marketplace/publish/identity") {- return json({- enabled: true,- wallpapers_enabled: wallpapersEnabled,- signed_in: true,- login: "octocat",- });- }- return json({});- }),- );-}--function renderView(wallpapersEnabled = true) {- stubServer(wallpapersEnabled);- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });- return render(- <QueryClientProvider client={client}>- <ThemeProvider>- <WallpaperView />- </ThemeProvider>- </QueryClientProvider>,- );-}--afterEach(() => {- cleanup();- vi.unstubAllGlobals();-});--describe("WallpaperView — share", () => {- it("offers Share on the owner's own picture and opens the publish dialog", async () => {- renderView();- fireEvent.click(await screen.findByAltText("Kitchen Window"));- const preview = await screen.findByTestId("wallpaper-preview");- const share = await within(preview).findByTestId("wallpaper-share");- fireEvent.click(share);- const dialog = await screen.findByTestId("publish-wallpaper-dialog");- expect(dialog.textContent).toContain("Share with the community");- // The title is prefilled from the picker's own name for the picture.- expect((within(dialog).getByTestId("wallpaper-title") as HTMLInputElement).value).toBe(- "Kitchen Window",- );- });-- it("does not offer Share on a picture installed from the community", async () => {- renderView();- fireEvent.click(await screen.findByAltText("Rain Antenna City"));- const preview = await screen.findByTestId("wallpaper-preview");- // Give the identity query a tick to settle, then assert absence.- await new Promise((resolve) => setTimeout(resolve, 50));- expect(within(preview).queryByTestId("wallpaper-share")).toBeNull();- });-- it("does not offer Share when the wallpaper lane is off", async () => {- renderView(false);- fireEvent.click(await screen.findByAltText("Kitchen Window"));- const preview = await screen.findByTestId("wallpaper-preview");- await new Promise((resolve) => setTimeout(resolve, 50));- expect(within(preview).queryByTestId("wallpaper-share")).toBeNull();- });-});diff --git a/jarvis/ui/web/frontend/src/views/WallpaperView.test.tsx b/jarvis/ui/web/frontend/src/views/WallpaperView.test.tsxdeleted file mode 100644index d11b27abdd..0000000000--- a/jarvis/ui/web/frontend/src/views/WallpaperView.test.tsx+++ /dev/null@@ -1,795 +0,0 @@-import { QueryClient, QueryClientProvider } from "@tanstack/react-query";-import {- act,- cleanup,- fireEvent,- render,- screen,- waitFor,- within,-} from "@testing-library/react";-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";--import { ThemeProvider } from "@/hooks/useTheme";-import { WallpaperView } from "@/views/WallpaperView";-import { useWallpaperStore } from "@/store/wallpaper";--const CATALOG = {- available: true,- count: 3,- styles: [- { slug: "01-cinematic-photoreal", label: "Cinematic Photorealistic", count: 2 },- { slug: "03-anime-neon", label: "Cinematic Anime Neon", count: 1 },- ],- items: [- {- id: "01-cinematic-photoreal-01",- title: "Flooded Observatory",- style: "01-cinematic-photoreal",- styleLabel: "Cinematic Photorealistic",- theme: "dark" as const,- },- {- id: "01-cinematic-photoreal-02",- title: "Morning Atrium",- style: "01-cinematic-photoreal",- styleLabel: "Cinematic Photorealistic",- theme: "light" as const,- },- {- id: "03-anime-neon-01",- title: "Neon Crossing",- style: "03-anime-neon",- styleLabel: "Cinematic Anime Neon",- theme: "dark" as const,- },- ],-};--interface Upload {- id: string;- title: string;- theme: "light" | "dark";- createdAt: number;-}--/**- * A stand-in for the two wallpaper endpoints, holding the uploads in memory.- *- * A fake rather than a per-call mock: the section adds, re-themes and removes- * pictures and then re-reads the list, and only something that actually keeps- * state can tell whether those round trips agree with each other.- */-function stubServer(catalog: unknown = CATALOG, uploads: Upload[] = []) {- const state = { uploads: [...uploads], rejectUpload: null as string | null };- const json = (body: unknown, ok = true, status = 200) => ({- ok,- status,- json: async () => body,- });-- vi.stubGlobal(- "fetch",- vi.fn(async (input: unknown, init?: { method?: string; body?: unknown }) => {- const url = String(input);- const method = (init?.method ?? "GET").toUpperCase();-- if (url === "/api/wallpapers/uploads") {- if (method === "POST") {- if (state.rejectUpload) {- return json({ detail: state.rejectUpload }, false, 400);- }- const added: Upload = {- id: `u${String(state.uploads.length).padStart(16, "0")}`,- title: "Harbour At Dawn",- theme: "light",- createdAt: 1_700_000_000 + state.uploads.length,- };- state.uploads = [added, ...state.uploads];- return json(added);- }- return json({ items: state.uploads });- }-- const own = url.match(/^\/api\/wallpapers\/uploads\/([^/]+)$/);- if (own) {- const id = own[1];- if (method === "DELETE") {- state.uploads = state.uploads.filter((item) => item.id !== id);- return json({ removed: id });- }- const theme = JSON.parse(String(init?.body ?? "{}")).theme as Upload["theme"];- state.uploads = state.uploads.map((item) =>- item.id === id ? { ...item, theme } : item,- );- const updated = state.uploads.find((item) => item.id === id);- return updated ? json(updated) : json({ detail: "Not Found" }, false, 404);- }-- if (url === "/api/wallpapers") return json(catalog);- // Everything else the shell asks for while mounted (the appearance- // endpoint, say) is none of this section's business.- return json({});- }),- );- return state;-}--/** The fake behind the current render, for tests that need to poke at it. */-let server: ReturnType<typeof stubServer>;--function renderView(catalog: unknown = CATALOG, uploads: Upload[] = []) {- server = stubServer(catalog, uploads);- const client = new QueryClient({- defaultOptions: { queries: { retry: false } },- });- // A real ThemeProvider, not a stub: applying a wallpaper is supposed to move- // the theme, and the assertion for that is the class on <html>.- return render(- <QueryClientProvider client={client}>- <ThemeProvider>- <WallpaperView />- </ThemeProvider>- </QueryClientProvider>,- );-}--/** True while the app is painted dark. */-function isDark(): boolean {- return document.documentElement.classList.contains("dark");-}--/** Every `<img>` the grid and preview have actually asked the browser for. */-function requestedSources(): string[] {- return Array.from(document.querySelectorAll("img")).map((img) =>- img.getAttribute("src") ?? "",- );-}--beforeEach(() => {- window.localStorage.clear();- useWallpaperStore.setState({- selections: { light: null, dark: null },- favorites: [],- });- document.documentElement.classList.add("dark");-});--afterEach(() => {- cleanup();- vi.unstubAllGlobals();-});--/** The style chip row as labels, from "All styles" onwards. */-function styleChipLabels(): string[] {- const labels = [...document.querySelectorAll("button[aria-pressed]")].map(- (button) => button.textContent?.trim() ?? "",- );- return labels.slice(labels.indexOf("All styles"));-}--describe("WallpaperView", () => {- it("browses on thumbnails alone — no full-size image is requested", async () => {- renderView();-- await screen.findByAltText("Flooded Observatory");- // The two bundled originals ride along as extra tiles, served from the app- // bundle rather than from /api/wallpapers.- const sources = requestedSources().filter((src) => src.includes("/api/"));-- expect(sources).toHaveLength(3);- expect(sources.every((src) => src.endsWith("/thumb"))).toBe(true);- expect(sources.some((src) => src.endsWith("/full"))).toBe(false);- });-- it("pins the bundled pictures to the very first tiles — night, day, black, white", async () => {- renderView();-- await screen.findByAltText("Flooded Observatory");- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];-- expect(tiles).toHaveLength(7);- expect(tiles.slice(0, 4).map((tile) => tile.getAttribute("alt"))).toEqual([- "The Original",- "The Original, by day",- "Black",- "White",- ]);- for (const tile of tiles.slice(0, 4)) {- expect(tile.getAttribute("src")).not.toContain("/api/");- }- // Four different pictures, not the same one over and over.- expect(new Set(tiles.slice(0, 4).map((tile) => tile.getAttribute("src"))).size).toBe(4);- });-- it("draws the plain grounds instead of downloading them", async () => {- renderView();-- const black = await screen.findByAltText("Black");- const white = await screen.findByAltText("White");-- expect(black.getAttribute("src")?.startsWith("data:image/svg+xml,")).toBe(true);- expect(white.getAttribute("src")?.startsWith("data:image/svg+xml,")).toBe(true);- expect(black.getAttribute("src")).toContain(encodeURIComponent("#000000"));- expect(white.getAttribute("src")).toContain(encodeURIComponent("#ffffff"));- // Their chip sits right behind the originals, ahead of the library's.- expect(styleChipLabels().slice(0, 4)).toEqual([- "All styles",- "Original",- "Plain",- "Cinematic Photorealistic",- ]);- fireEvent.click(screen.getByRole("button", { name: "Plain" }));- await waitFor(() => {- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];- expect(tiles.map((tile) => tile.getAttribute("alt"))).toEqual(["Black", "White"]);- });- });-- it("adopting the black ground stores its id under dark and paints dark", async () => {- renderView();- act(() => useWallpaperStore.getState().select("03-anime-neon-01", "dark"));-- fireEvent.click(await screen.findByAltText("Black"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.dark).toBe("plain-black");- });- expect(isDark()).toBe(true);- // Not a default: the black ground is a pick of its own, and the night- // original is no longer the one in use.- expect(await screen.findByRole("button", { name: /In use/ })).toBeTruthy();- });-- it("adopting the white ground switches to light and stores its id there", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("White"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => expect(isDark()).toBe(false));- expect(useWallpaperStore.getState().selections.light).toBe("plain-white");- // The dark pick is untouched — every mode keeps its own.- expect(useWallpaperStore.getState().selections.dark).toBeNull();- // And "Default" from here goes back to the daylight original, not to black.- fireEvent.click(screen.getByRole("button", { name: "Close preview" }));- fireEvent.click(await screen.findByRole("button", { name: "Default" }));- await waitFor(() => {- expect(useWallpaperStore.getState().selections.light).toBeNull();- });- expect(isDark()).toBe(false);- });-- it("keeps the original first when sorting by style", async () => {- renderView();-- fireEvent.click(await screen.findByRole("button", { name: "By style" }));-- await waitFor(() => {- const first = document.querySelector('[data-testid="wallpaper-grid"] img');- expect(first?.getAttribute("alt")).toBe("The Original");- });- });-- it("marks the original as in use while no choice is stored", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("The Original"));-- expect(await screen.findByRole("button", { name: /In use/ })).toBeTruthy();- });-- it("adopting the original clears the stored choice rather than storing an id", async () => {- renderView();- act(() => useWallpaperStore.getState().select("03-anime-neon-01", "dark"));-- fireEvent.click(await screen.findByAltText("The Original"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.dark).toBeNull();- });- expect(window.localStorage.getItem("jarvis.wallpaper.v1")).toBeNull();- expect(isDark()).toBe(true);- });-- it("marks the daylight original as in use only in light mode", async () => {- renderView();-- // Painted dark: the night original is in use, the daylight one is not.- fireEvent.click(await screen.findByAltText("The Original, by day"));- expect(await screen.findByRole("button", { name: "Use this wallpaper" })).toBeTruthy();- expect(screen.queryByRole("button", { name: /In use/ })).toBeNull();- });-- it("adopting the daylight original switches to light and clears the light slot", async () => {- renderView();- act(() => useWallpaperStore.getState().select("01-cinematic-photoreal-02", "light"));-- fireEvent.click(await screen.findByAltText("The Original, by day"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => expect(isDark()).toBe(false));- expect(useWallpaperStore.getState().selections.light).toBeNull();- // The dark pick is untouched — every mode keeps its own.- expect(useWallpaperStore.getState().selections.dark).toBeNull();- // The open preview now says so: the daylight original is the one in use.- expect(await screen.findByRole("button", { name: /In use/ })).toBeTruthy();- });-- it("the Default button returns to the default of the mode on screen", async () => {- renderView();- // Painted dark, with a pick in BOTH modes.- act(() => {- useWallpaperStore.getState().select("03-anime-neon-01", "dark");- useWallpaperStore.getState().select("01-cinematic-photoreal-02", "light");- });-- fireEvent.click(await screen.findByRole("button", { name: "Default" }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.dark).toBeNull();- });- // Light mode's pick survives, and the app did not change mode.- expect(useWallpaperStore.getState().selections.light).toBe("01-cinematic-photoreal-02");- expect(isDark()).toBe(true);- });-- it("downloads the full-size image only once a wallpaper is previewed", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Neon Crossing"));-- await screen.findByTestId("wallpaper-preview");- expect(requestedSources()).toContain("/api/wallpapers/03-anime-neon-01/full");- });-- it("applies the previewed wallpaper and remembers it", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Morning Atrium"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.light).toBe(- "01-cinematic-photoreal-02",- );- });- expect(window.localStorage.getItem("jarvis.wallpaper.light.v1")).toBe(- "01-cinematic-photoreal-02",- );- });-- it("switches the interface to light with a light wallpaper", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Morning Atrium"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => expect(isDark()).toBe(false));- });-- it("switches back to dark when a dark wallpaper is picked next", async () => {- renderView();-- // Go light first, so the second pick is a real transition rather than a- // no-op against the app's dark default.- fireEvent.click(await screen.findByAltText("Morning Atrium"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));- await waitFor(() => expect(isDark()).toBe(false));-- fireEvent.click(screen.getByRole("button", { name: "Close preview" }));- fireEvent.click(await screen.findByAltText("Neon Crossing"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));-- await waitFor(() => expect(isDark()).toBe(true));- });-- it("returns to the daylight default and stays light after a light pick", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Morning Atrium"));- fireEvent.click(await screen.findByRole("button", { name: "Use this wallpaper" }));- await waitFor(() => expect(isDark()).toBe(false));-- fireEvent.click(await screen.findByRole("button", { name: /Default/ }));-- // The default of the mode on screen: light mode keeps its chrome and shows- // the picture bundled for it — it does NOT flip the whole app to dark, and- // it never puts the night scene under light chrome.- await waitFor(() => {- expect(useWallpaperStore.getState().selections.light).toBeNull();- });- expect(isDark()).toBe(false);- });-- it("returns to the bundled default", async () => {- renderView();- act(() => useWallpaperStore.getState().select("03-anime-neon-01", "dark"));-- fireEvent.click(await screen.findByRole("button", { name: /Default/ }));-- expect(useWallpaperStore.getState().selections.dark).toBeNull();- expect(window.localStorage.getItem("jarvis.wallpaper.v1")).toBeNull();- });-- it("filters by style and by theme", async () => {- renderView();-- fireEvent.click(await screen.findByRole("button", { name: "Cinematic Anime Neon" }));- await waitFor(() => expect(requestedSources()).toHaveLength(1));- expect(screen.getByAltText("Neon Crossing")).toBeTruthy();-- fireEvent.click(screen.getByRole("button", { name: "All styles" }));- fireEvent.click(screen.getByRole("button", { name: /Light/ }));- await waitFor(() =>- expect(requestedSources().filter((src) => src.includes("/api/"))).toHaveLength(1),- );- expect(screen.getByAltText("Morning Atrium")).toBeTruthy();- // The daylight original and the white ground are light wallpapers like any- // other; the night scene and the black ground are not.- expect(screen.getByAltText("The Original, by day")).toBeTruthy();- expect(screen.getByAltText("White")).toBeTruthy();- expect(screen.queryByAltText("The Original")).toBeNull();- expect(screen.queryByAltText("Black")).toBeNull();- });-- it("keeps the same shuffled order across renders", async () => {- const first = renderView();- await screen.findByAltText("Flooded Observatory");- const before = requestedSources();- first.unmount();-- renderView();- await screen.findByAltText("Flooded Observatory");-- expect(requestedSources()).toEqual(before);- });-- it("stars a wallpaper from its tile and remembers it", async () => {- renderView();-- await screen.findByAltText("Neon Crossing");- fireEvent.click(- screen.getByRole("button", { name: "Add Neon Crossing to favorites" }),- );-- await waitFor(() => {- expect(useWallpaperStore.getState().favorites).toEqual(["03-anime-neon-01"]);- });- expect(- JSON.parse(window.localStorage.getItem("jarvis.wallpaper.favorites.v1") ?? "[]"),- ).toEqual(["03-anime-neon-01"]);- });-- it("un-stars a wallpaper and clears the storage slot when none are left", async () => {- renderView();-- await screen.findByAltText("Neon Crossing");- fireEvent.click(- screen.getByRole("button", { name: "Add Neon Crossing to favorites" }),- );- fireEvent.click(- await screen.findByRole("button", {- name: "Remove Neon Crossing from favorites",- }),- );-- await waitFor(() => {- expect(useWallpaperStore.getState().favorites).toEqual([]);- });- expect(window.localStorage.getItem("jarvis.wallpaper.favorites.v1")).toBeNull();- });-- it("shows only the starred wallpapers under the Favorites filter", async () => {- renderView();-- await screen.findByAltText("Morning Atrium");- fireEvent.click(- screen.getByRole("button", { name: "Add Morning Atrium to favorites" }),- );- fireEvent.click(screen.getByRole("button", { name: /Favorites/ }));-- await waitFor(() => {- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];- expect(tiles.map((tile) => tile.getAttribute("alt"))).toEqual([- "Morning Atrium",- ]);- });- });-- it("stars the bundled original like any other wallpaper", async () => {- renderView();-- fireEvent.click(- await screen.findByRole("button", { name: "Add The Original to favorites" }),- );- fireEvent.click(screen.getByRole("button", { name: /Favorites/ }));-- await waitFor(() => {- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];- expect(tiles.map((tile) => tile.getAttribute("alt"))).toEqual(["The Original"]);- });- });-- it("explains the empty Favorites filter instead of showing a bare no-match line", async () => {- renderView();-- fireEvent.click(await screen.findByRole("button", { name: /Favorites/ }));-- expect(await screen.findByText(/No favorites yet/)).toBeTruthy();- });-- it("ignores stored favorites the catalog no longer knows", async () => {- // A library that was uninstalled leaves ids behind; they must not be- // counted, and the filter must read as empty rather than as "1 starred".- act(() => useWallpaperStore.setState({ favorites: ["99-vanished-01"] }));- renderView();-- fireEvent.click(await screen.findByRole("button", { name: /Favorites/ }));-- expect(await screen.findByText(/No favorites yet/)).toBeTruthy();- });-- it("keeps the preview open when its wallpaper is un-starred under the filter", async () => {- renderView();-- await screen.findByAltText("Neon Crossing");- fireEvent.click(- screen.getByRole("button", { name: "Add Neon Crossing to favorites" }),- );- fireEvent.click(screen.getByRole("button", { name: /Favorites/ }));- fireEvent.click(await screen.findByAltText("Neon Crossing"));- const preview = await screen.findByTestId("wallpaper-preview");-- fireEvent.click(- within(preview).getByRole("button", {- name: "Remove Neon Crossing from favorites",- }),- );-- expect(screen.getByTestId("wallpaper-preview")).toBeTruthy();- });-- it("stars a wallpaper from the preview", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Flooded Observatory"));- await screen.findByTestId("wallpaper-preview");- const preview = screen.getByTestId("wallpaper-preview");- fireEvent.click(- within(preview).getByRole("button", {- name: "Add Flooded Observatory to favorites",- }),- );-- await waitFor(() => {- expect(useWallpaperStore.getState().favorites).toEqual([- "01-cinematic-photoreal-01",- ]);- });- });-- // ------------------------------------------------------------------- // The owner's own pictures.- // -------------------------------------------------------------------- const OWN: Upload = {- id: "u000000000000000a",- title: "Kitchen Window",- theme: "light",- createdAt: 1_700_000_000,- };-- /** Hand a file to the hidden picker the way the OS dialog would. */- function pickFile(name = "harbour at dawn.png") {- const input = screen.getByTestId("wallpaper-file-input") as HTMLInputElement;- const file = new File([new Uint8Array([1, 2, 3])], name, { type: "image/png" });- fireEvent.change(input, { target: { files: [file] } });- }-- it("lists an uploaded picture right after the bundled ones", async () => {- renderView(CATALOG, [OWN]);-- await screen.findByAltText("Kitchen Window");- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];-- expect(tiles.slice(0, 5).map((tile) => tile.getAttribute("alt"))).toEqual([- "The Original",- "The Original, by day",- "Black",- "White",- "Kitchen Window",- ]);- // Its chip follows the bundled chips too, ahead of the library's.- expect(styleChipLabels().slice(0, 5)).toEqual([- "All styles",- "Original",- "Plain",- "Yours",- "Cinematic Photorealistic",- ]);- });-- it("serves an upload's thumbnail from the uploads endpoint", async () => {- renderView(CATALOG, [OWN]);-- const tile = await screen.findByAltText("Kitchen Window");-- expect(tile.getAttribute("src")).toBe("/api/wallpapers/uploads/u000000000000000a/thumb");- });-- it("gathers uploads under a style chip of their own", async () => {- renderView(CATALOG, [OWN]);-- fireEvent.click(await screen.findByRole("button", { name: "Yours" }));-- await waitFor(() => {- const tiles = [...document.querySelectorAll('[data-testid="wallpaper-grid"] img')];- expect(tiles.map((tile) => tile.getAttribute("alt"))).toEqual(["Kitchen Window"]);- });- });-- it("offers no Yours chip while nothing has been uploaded", async () => {- renderView();-- await screen.findByAltText("Flooded Observatory");-- expect(screen.queryByRole("button", { name: "Yours" })).toBeNull();- });-- it("adds a picked file and opens its preview", async () => {- renderView();- await screen.findByAltText("Flooded Observatory");-- pickFile();-- const preview = await screen.findByTestId("wallpaper-preview");- expect(within(preview).getByText("Harbour At Dawn")).toBeTruthy();- expect(server.uploads).toHaveLength(1);- });-- it("does not apply an upload behind the owner's back", async () => {- renderView();- await screen.findByAltText("Flooded Observatory");-- pickFile();- await screen.findByTestId("wallpaper-preview");-- expect(useWallpaperStore.getState().selections).toEqual({- light: null,- dark: null,- });- });-- it("shows the server's reason when an upload is refused", async () => {- renderView();- await screen.findByAltText("Flooded Observatory");- server.rejectUpload = "That file is not an image the app can read.";-- pickFile("notes.txt");-- expect(- await screen.findByText("That file is not an image the app can read."),- ).toBeTruthy();- });-- it("removes an upload and forgets it everywhere", async () => {- renderView(CATALOG, [OWN]);- act(() => {- useWallpaperStore.getState().select(OWN.id, "light");- useWallpaperStore.getState().toggleFavorite(OWN.id);- });-- fireEvent.click(await screen.findByAltText("Kitchen Window"));- const preview = await screen.findByTestId("wallpaper-preview");- fireEvent.click(within(preview).getByRole("button", { name: "Remove Kitchen Window" }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.light).toBeNull();- });- expect(useWallpaperStore.getState().favorites).toEqual([]);- expect(server.uploads).toEqual([]);- await waitFor(() => {- expect(screen.queryByAltText("Kitchen Window")).toBeNull();- });- });-- it("corrects the light/dark guess on an upload", async () => {- renderView(CATALOG, [OWN]);-- fireEvent.click(await screen.findByAltText("Kitchen Window"));- const preview = await screen.findByTestId("wallpaper-preview");- fireEvent.click(within(preview).getByRole("button", { name: /Dark/ }));-- await waitFor(() => {- expect(server.uploads[0].theme).toBe("dark");- });- });-- it("moves an applied upload into the mode it was re-themed to", async () => {- renderView(CATALOG, [OWN]);-- fireEvent.click(await screen.findByAltText("Kitchen Window"));- const preview = await screen.findByTestId("wallpaper-preview");- fireEvent.click(within(preview).getByRole("button", { name: "Use this wallpaper" }));- await waitFor(() => {- expect(useWallpaperStore.getState().selections.light).toBe(OWN.id);- });-- fireEvent.click(within(preview).getByRole("button", { name: /Dark/ }));-- await waitFor(() => {- expect(useWallpaperStore.getState().selections.dark).toBe(OWN.id);- });- // The old slot must not keep a copy, or toggling back would restore a- // picture that is no longer authored for that mode.- expect(useWallpaperStore.getState().selections.light).toBeNull();- });-- it("offers no remove or re-theme controls on a library wallpaper", async () => {- renderView();-- fireEvent.click(await screen.findByAltText("Neon Crossing"));- const preview = await screen.findByTestId("wallpaper-preview");-- expect(within(preview).queryByRole("button", { name: /^Remove Neon/ })).toBeNull();- expect(within(preview).queryByRole("button", { name: /^Dark$/ })).toBeNull();- });-- it("keeps working when the uploads endpoint is unavailable", async () => {- vi.stubGlobal(- "fetch",- vi.fn(async (input: unknown) =>- String(input) === "/api/wallpapers"- ? { ok: true, status: 200, json: async () => CATALOG }- : { ok: false, status: 500, json: async () => ({}) },- ),- );- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });- render(- <QueryClientProvider client={client}>- <ThemeProvider>- <WallpaperView />- </ThemeProvider>- </QueryClientProvider>,- );-- expect(await screen.findByAltText("Flooded Observatory")).toBeTruthy();- });-- it("still offers the original when the library is absent", async () => {- renderView({ available: false, count: 0, styles: [], items: [] });-- expect(await screen.findByAltText("The Original")).toBeTruthy();- expect(- screen.getByText(/500 more wallpapers are one download away/),- ).toBeTruthy();- expect(screen.getByRole("button", { name: /Download library/ })).toBeTruthy();- });-- it("still offers the original when the catalog request fails", async () => {- vi.stubGlobal("fetch", vi.fn().mockRejectedValue(new Error("backend restarting")));- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });- render(- <QueryClientProvider client={client}>- <ThemeProvider>- <WallpaperView />- </ThemeProvider>- </QueryClientProvider>,- );-- expect(await screen.findByAltText("The Original")).toBeTruthy();- });-- it("offers no Gigi toggle — the wallpaper stays a pure scene", async () => {- renderView();- await screen.findByAltText("The Original");-- expect(- screen.queryByRole("button", { name: "Show Gigi on the wallpaper" }),- ).toBeNull();- expect(screen.queryByRole("button", { name: "Gigi" })).toBeNull();- });-});diff --git a/jarvis/ui/web/frontend/src/views/WallpaperView.tsx b/jarvis/ui/web/frontend/src/views/WallpaperView.tsxdeleted file mode 100644index add99aa929..0000000000--- a/jarvis/ui/web/frontend/src/views/WallpaperView.tsx+++ /dev/null@@ -1,946 +0,0 @@-import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import {- Check,- ChevronLeft,- ChevronRight,- Download,- Heart,- Image as ImageIcon,- Loader2,- Moon,- RotateCcw,- Store,- Sun,- Trash2,- Share2,- Upload,- X,-} from "lucide-react";--import { translate, useLocaleChunk, useT } from "@/i18n";-import { Button } from "@/components/ui/button";-import { ScrollArea } from "@/components/ui/scroll-area";-import { ViewHeader } from "@/views/ChatsView";-import {- BUNDLED_WALLPAPER_ENTRIES,- fullUrlFor,- isBundledStyle,- thumbUrlFor,- useWallpaperCatalog,- type WallpaperEntry,-} from "@/hooks/useWallpaperCatalog";-import {- uploadAsEntry,- useUploadMutations,- useWallpaperUploads,- MARKETPLACE_WALLPAPER_STYLE,- UPLOAD_WALLPAPER_STYLE,-} from "@/hooks/useWallpaperUploads";-import { useApplyWallpaper } from "@/hooks/useApplyWallpaper";-import { usePublishIdentity } from "@/components/marketplace/PublishIdentity";-import { PublishWallpaperDialog } from "@/components/wallpaper/PublishWallpaperDialog";-import {- installRunning,- useWallpaperLibraryInstall,-} from "@/hooks/useWallpaperLibrary";-import { useThemeValue, type Theme } from "@/hooks/useTheme";-import { useWallpaperStore } from "@/store/wallpaper";-import { cn } from "@/lib/utils";--type ThemeFilter = "all" | "light" | "dark";-type Ordering = "mixed" | "style";--/**- * A stable pseudo-random rank for a wallpaper id (FNV-1a).- *- * The default order is shuffled on purpose: the library is stored twenty-five- * wallpapers to a style, and listing it in storage order means scrolling past- * twenty-five variations of the same look before seeing a different one. What- * it must not be is *re*-shuffled — an order that changed on every render, or- * on every visit, would move a tile the moment someone reached for it. Hashing- * the id gives an order that looks random and never moves.- */-function shuffleRank(id: string): number {- let hash = 0x811c9dc5;- for (let index = 0; index < id.length; index += 1) {- hash ^= id.charCodeAt(index);- hash = Math.imul(hash, 0x01000193) >>> 0;- }- return hash;-}--/** Where a wallpaper came from, as the grid orders it: bundled, own, library. */-function originRank(item: WallpaperEntry): number {- if (item.isBundled) return 0;- if (item.isUpload) return 1;- return 2;-}--/** The bundled pictures in the order they ship: night, day, black, white. */-function bundledRank(item: WallpaperEntry): number {- const index = BUNDLED_WALLPAPER_ENTRIES.findIndex((entry) => entry.id === item.id);- return index === -1 ? BUNDLED_WALLPAPER_ENTRIES.length : index;-}--/** The segmented filter/ordering controls share one look. */-function SegmentButton({- active,- onClick,- children,- "aria-label": ariaLabel,- "data-testid": testId,-}: {- active: boolean;- onClick: () => void;- children: React.ReactNode;- "aria-label"?: string;- "data-testid"?: string;-}) {- return (- <button- data-testid={testId}- type="button"- onClick={onClick}- aria-label={ariaLabel}- aria-pressed={active}- className={cn(- "flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors",- active- ? "bg-primary/15 text-primary"- : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",- )}- >- {children}- </button>- );-}--/** Whole megabytes for the download banner — nobody needs decimals here. */-function formatMb(bytes: number): string {- return `${Math.max(1, Math.round(bytes / (1024 * 1024)))} MB`;-}--/**- * The banner a machine without the generated library gets: what is missing,- * how big it is, and the one button that fixes it. While the server downloads- * and unpacks, the button gives way to a progress bar; when the install lands,- * the catalog refetch replaces this banner with five hundred tiles.- */-function LibraryDownloadBanner() {- const { status, start } = useWallpaperLibraryInstall();- const state = status.data ?? undefined;- const running = installRunning(state);- const failed = state?.state === "error";- const percent =- running && state && state.totalBytes > 0- ? Math.min(99, Math.round((state.receivedBytes / state.totalBytes) * 100))- : 0;-- return (- <div className="border-b border-border px-6 py-3">- <div className="flex flex-wrap items-center gap-x-4 gap-y-2">- <div className="min-w-0 flex-1">- <p className="text-xs">- <span className="font-medium text-foreground">- 500 more wallpapers are one download away.- </span>{" "}- <span className="text-muted-foreground">- The generated collection is content, not code — it is fetched once- from the project's releases instead of weighing down every- checkout.- </span>- </p>- {failed && (- <p role="alert" className="mt-1 text-xs text-destructive">- {state?.error ?? "The download failed."}- </p>- )}- </div>- {running ? (- <div className="flex w-56 items-center gap-2">- <div- role="progressbar"- aria-valuenow={percent}- aria-valuemin={0}- aria-valuemax={100}- aria-label="Wallpaper library download"- className="h-1.5 flex-1 overflow-hidden rounded-full bg-secondary"- >- <div- className="h-full rounded-full bg-foreground/70 transition-[width] duration-300"- style={{ width: `${percent}%` }}- />- </div>- <span className="whitespace-nowrap text-xs tabular-nums text-muted-foreground">- {state?.state === "unpacking"- ? "Unpacking…"- : `${formatMb(state?.receivedBytes ?? 0)} / ${formatMb(state?.totalBytes ?? 0)}`}- </span>- </div>- ) : (- <Button- size="sm"- variant="outline"- onClick={() => start.mutate()}- disabled={start.isPending}- >- {start.isPending ? (- <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />- ) : (- <Download className="mr-1.5 h-3.5 w-3.5" />- )}- {failed ? "Try again" : "Download library (~190 MB)"}- </Button>- )}- </div>- </div>- );-}--/** The label the heart carries in both places it appears. */-function favoriteLabel(item: WallpaperEntry, favorite: boolean): string {- return favorite- ? `Remove ${item.title} from favorites`- : `Add ${item.title} to favorites`;-}--/**- * The heart, shared by the tile and the preview.- *- * A favourited wallpaper keeps its filled heart at all times; an unfavourited- * one shows a hollow outline only while the tile is hovered or the button has- * keyboard focus, so five hundred idle tiles are not five hundred pieces of- * chrome competing with the artwork.- */-function FavoriteButton({- item,- favorite,- onToggle,- // "overlay" sits on the artwork itself and needs its own contrast; "surface"- // sits on app chrome and borrows the theme's tokens.- tone = "overlay",- className,-}: {- item: WallpaperEntry;- favorite: boolean;- onToggle: () => void;- tone?: "overlay" | "surface";- className?: string;-}) {- const idle =- tone === "overlay"- ? "border-white/25 bg-black/35 text-white/85 backdrop-blur-sm hover:bg-black/55 hover:text-white"- : "border-border text-muted-foreground hover:bg-secondary/60 hover:text-foreground";- return (- <button- type="button"- onClick={onToggle}- aria-pressed={favorite}- aria-label={favoriteLabel(item, favorite)}- title={favoriteLabel(item, favorite)}- className={cn(- "flex h-7 w-7 items-center justify-center rounded-full border transition-all",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",- favorite- ? "border-transparent bg-rose-500/90 text-white shadow"- : idle,- className,- )}- >- <Heart className={cn("h-3.5 w-3.5", favorite && "fill-current")} />- </button>- );-}--/**- * One grid tile.- *- * The image is the 480 px thumbnail and it is lazy: five hundred tiles must- * cost only what is actually scrolled past. The full-size file is not touched- * here at all — that download belongs to the preview.- *- * The frame is a plain element rather than the button it used to be: the heart- * is a second, independent action on the same tile, and a button inside a- * button is invalid markup that browsers resolve however they like.- */-function WallpaperTile({- item,- active,- favorite,- onOpen,- onToggleFavorite,-}: {- item: WallpaperEntry;- active: boolean;- favorite: boolean;- onOpen: () => void;- onToggleFavorite: () => void;-}) {- return (- <div- className={cn(- "group relative overflow-hidden rounded-lg border transition-all",- active- ? "border-primary ring-2 ring-primary/60"- : "border-border hover:border-primary/50",- )}- >- <button- type="button"- onClick={onOpen}- title={`${item.title} — ${item.styleLabel}`}- className="block w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"- >- <img- src={thumbUrlFor(item)}- alt={item.title}- // The pinned bundled tiles are the first thing on screen and their- // pixels are already in the bundle, so waiting for an intersection- // buys nothing.- loading={item.isBundled ? "eager" : "lazy"}- decoding="async"- width={480}- height={270}- className="aspect-video w-full bg-secondary/40 object-cover transition-transform duration-300 group-hover:scale-[1.03]"- />- <span className="pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/75 to-transparent px-2.5 pb-1.5 pt-6">- <span className="block truncate text-xs font-medium text-white">- {item.title}- </span>- <span className="block truncate text-micro text-white/65">- {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-micro 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>- <FavoriteButton- item={item}- favorite={favorite}- onToggle={onToggleFavorite}- className={cn(- "absolute left-2 top-2",- !favorite &&- "opacity-0 group-hover:opacity-100 focus-visible:opacity-100",- )}- />- {active && (- <span className="pointer-events-none absolute right-2 top-2 flex h-6 w-6 items-center justify-center rounded-full bg-foreground/70 text-primary-foreground shadow">- <Check className="h-3.5 w-3.5" />- </span>- )}- </div>- );-}--/**- * The full-size preview.- *- * This is the only place the real 1920x1080 file is requested, which is the- * whole point of the two-tier delivery: browsing costs thumbnails, and a- * wallpaper is downloaded when someone actually wants to look at it. The- * spinner stays until the image reports itself loaded so the frame never shows- * a half-painted picture.- */-function WallpaperPreview({- item,- applied,- favorite,- busy,- onApply,- onToggleFavorite,- onSetTheme,- onRemove,- onShare,- onClose,- onStep,-}: {- item: WallpaperEntry;- applied: boolean;- favorite: boolean;- busy: boolean;- onApply: () => void;- onToggleFavorite: () => void;- onSetTheme: (theme: Theme) => void;- onRemove: () => void;- /** Absent when this picture cannot be published — see the caller. */- onShare?: () => void;- onClose: () => void;- onStep: (delta: number) => void;-}) {- const [loaded, setLoaded] = useState(false);-- // The preview is keyed on the wallpaper, so a step to the next one remounts- // this state — but an explicit reset keeps that guarantee local.- useEffect(() => setLoaded(false), [item.id]);-- useEffect(() => {- const onKey = (event: KeyboardEvent) => {- if (event.key === "Escape") onClose();- else if (event.key === "ArrowLeft") onStep(-1);- else if (event.key === "ArrowRight") onStep(1);- };- window.addEventListener("keydown", onKey);- return () => window.removeEventListener("keydown", onKey);- }, [onClose, onStep]);-- return (- <div- role="dialog"- aria-modal="true"- aria-label={`${item.title} preview`}- data-testid="wallpaper-preview"- className="fixed inset-0 z-50 flex flex-col bg-background/85 backdrop-blur-xl"- >- <header className="flex items-center gap-3 border-b border-border px-6 py-3">- <div className="min-w-0 flex-1">- <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- from the prompt each picture was painted to, and each bundled- picture is authored for its mode by definition — a night scene, a- daylight one, black, white. */}- {item.isUpload && (- <div className="flex items-center gap-1 rounded-lg border border-border p-0.5">- <SegmentButton- active={item.theme === "light"}- onClick={() => onSetTheme("light")}- >- <Sun className="h-3 w-3" /> Light- </SegmentButton>- <SegmentButton- active={item.theme === "dark"}- onClick={() => onSetTheme("dark")}- >- <Moon className="h-3 w-3" /> Dark- </SegmentButton>- </div>- )}- {onShare && (- <Button- size="sm"- variant="outline"- onClick={onShare}- data-testid="wallpaper-share"- aria-label={`Share ${item.title}`}- >- <Share2 className="mr-1.5 h-3.5 w-3.5" />- {translate("marketplace.share_cta")}- </Button>- )}- {item.isUpload && (- <Button- size="sm"- variant="ghost"- onClick={onRemove}- disabled={busy}- aria-label={`Remove ${item.title}`}- className="text-muted-foreground hover:text-destructive"- >- <Trash2 className="h-4 w-4" />- </Button>- )}- <FavoriteButton- item={item}- favorite={favorite}- onToggle={onToggleFavorite}- tone="surface"- />- <Button- size="sm"- variant={applied ? "secondary" : "default"}- onClick={onApply}- disabled={applied}- >- {applied ? (- <>- <Check className="mr-1.5 h-3.5 w-3.5" /> In use- </>- ) : (- "Use this wallpaper"- )}- </Button>- <Button size="sm" variant="ghost" onClick={onClose} aria-label="Close preview">- <X className="h-4 w-4" />- </Button>- </header>-- <div className="relative flex flex-1 items-center justify-center overflow-hidden p-6">- {!loaded && (- <Loader2 className="absolute h-6 w-6 animate-spin text-muted-foreground" />- )}- <img- key={item.id}- src={fullUrlFor(item)}- alt={item.title}- onLoad={() => setLoaded(true)}- onError={() => setLoaded(true)}- className={cn(- "max-h-full max-w-full rounded-lg object-contain transition-opacity duration-200",- loaded ? "opacity-100" : "opacity-0",- )}- />- <button- type="button"- onClick={() => onStep(-1)}- aria-label="Previous wallpaper"- className="absolute left-3 flex h-10 w-10 items-center justify-center rounded-full border border-border bg-background/70 text-foreground transition-colors hover:bg-background"- >- <ChevronLeft className="h-5 w-5" />- </button>- <button- type="button"- onClick={() => onStep(1)}- aria-label="Next wallpaper"- className="absolute right-3 flex h-10 w-10 items-center justify-center rounded-full border border-border bg-background/70 text-foreground transition-colors hover:bg-background"- >- <ChevronRight className="h-5 w-5" />- </button>- </div>- </div>- );-}--/**- * The Wallpaper section: browse the generated library, preview one at full- * size, and adopt it as the app's ground.- *- * Adopting one also switches light/dark to match the artwork — see- * `useApplyWallpaper`. The bundled default of the mode you are in is always- * one click away again, so trying a wallpaper is meant to feel as reversible- * as it actually is.- */-export function WallpaperView() {- const t = useT();- const { data, isLoading } = useWallpaperCatalog();- const { data: uploads } = useWallpaperUploads();- const { add, setTheme: retheme, remove } = useUploadMutations();- // Each theme keeps its own pick; the grid marks the one worn by the mode- // the app is in right now (adopting a tile switches mode WITH the picture,- // so the check mark always lands on what is actually on screen).- const activeTheme = useThemeValue();- const selectedId = useWallpaperStore((state) => state.selections[activeTheme]);- const favorites = useWallpaperStore((state) => state.favorites);- const background = useWallpaperStore((state) => state.background);- const setBackground = useWallpaperStore((state) => state.setBackground);- const toggleFavorite = useWallpaperStore((state) => state.toggleFavorite);- const forget = useWallpaperStore((state) => state.forget);- const reconcile = useWallpaperStore((state) => state.reconcile);- const apply = useApplyWallpaper();-- const [theme, setTheme] = useState<ThemeFilter>("all");- const [ordering, setOrdering] = useState<Ordering>("mixed");- const [style, setStyle] = useState<string | null>(null);- const [favoritesOnly, setFavoritesOnly] = useState(false);- const [previewId, setPreviewId] = useState<string | null>(null);- const [shareId, setShareId] = useState<string | null>(null);- const fileInput = useRef<HTMLInputElement | null>(null);-- // Only the owner's OWN pictures can be shared. An installed community- // wallpaper is somebody else's work; the server refuses to republish it,- // and offering a button the server will refuse is a trap, not a feature.- // Hidden too when the wallpaper lane is switched off in this deployment.- const publishIdentity = usePublishIdentity();- const shareStringsReady = useLocaleChunk("marketplace");- const canShare = (item: WallpaperEntry): boolean =>- shareStringsReady &&- publishIdentity.data?.wallpapers_enabled === true &&- item.isUpload === true &&- !item.fromMarketplace;-- const ownEntries = useMemo(- () => (uploads ?? []).map(uploadAsEntry),- [uploads],- );-- // The owner's own pictures sit between the bundled pictures and the- // generated library — brought here on purpose, so they are found without- // scrolling.- const items = useMemo(() => {- const catalog = data?.items ?? [];- if (!ownEntries.length) return catalog;- const bundled = catalog.filter((item) => item.isBundled);- const rest = catalog.filter((item) => !item.isBundled);- return [...bundled, ...ownEntries, ...rest];- }, [data?.items, ownEntries]);-- // This view is the one place that knows which mode every picture was- // authored for, so it is where a misfiled pick — the boot migration's wrong- // guess about the pre-per-theme slot, or any older cross-mode leak — is put- // back under its own mode (see `reconcile`). Idempotent, so re-running as- // uploads trickle in costs nothing.- useEffect(() => {- if (!data) return;- 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 ?? [];- 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;- // Right behind the bundled chips (Original, Plain), ahead of the library's.- const bundled = known.filter((chip) => isBundledStyle(chip.slug));- const rest = known.filter((chip) => !isBundledStyle(chip.slug));- return [...bundled, ...chips, ...rest];- }, [data?.styles, ownEntries]);-- const favoriteIds = useMemo(() => new Set(favorites), [favorites]);- // Counted against the catalog, not against the stored list: an id left over- // from a library that is no longer installed must not inflate the badge.- const favoriteCount = useMemo(- () => items.filter((item) => favoriteIds.has(item.id)).length,- [favoriteIds, items],- );-- const visible = useMemo(() => {- const filtered = items.filter(- (item) =>- (theme === "all" || item.theme === theme) &&- (style === null || item.style === style) &&- (!favoritesOnly || favoriteIds.has(item.id)),- );- // Favourites deliberately do NOT float to the top of the mixed grid: a- // tile that jumps away the instant its heart is clicked loses the place- // the reader was looking at. The Favorites filter is where they gather.- return filtered.sort((left, right) => {- // The bundled pictures outrank every ordering and every shuffle: the- // night scene is the first wallpaper this app ever had and stays the- // first tile, its daylight twin sits right beside it, then the plain- // black and white grounds. The owner's own pictures come next, ahead- // of the generated five hundred.- const byOrigin = originRank(left) - originRank(right);- if (byOrigin !== 0) return byOrigin;- if (left.isBundled && right.isBundled) {- return bundledRank(left) - bundledRank(right);- }- if (ordering === "style") {- const byStyle = left.style.localeCompare(right.style);- if (byStyle !== 0) return byStyle;- return left.id.localeCompare(right.id);- }- return shuffleRank(left.id) - shuffleRank(right.id);- });- }, [favoriteIds, favoritesOnly, items, ordering, style, theme]);-- // "No choice stored" and "the original is chosen" are the same state, so the- // pinned tile carries the check mark on a fresh profile — the one authored- // for the mode on screen, since each mode has an original of its own.- const isApplied = (item: WallpaperEntry) =>- item.isDefault- ? item.theme === activeTheme && selectedId === null- : item.id === selectedId;-- const previewIndex = previewId- ? visible.findIndex((item) => item.id === previewId)- : -1;- // Resolved against the whole catalog when the filter no longer contains it:- // un-hearting a wallpaper while its preview is open under the Favorites- // filter must not yank the picture out from under the reader.- const previewItem =- previewIndex >= 0- ? visible[previewIndex]- : (items.find((item) => item.id === previewId) ?? null);-- // Stepping wraps around, so the arrow keys never dead-end at either edge of- // whatever the current filter happens to be showing.- const step = useCallback(- (delta: number) => {- if (visible.length === 0) return;- // A preview that has dropped out of the filter steps back into it rather- // than dead-ending: the next arrow press resumes at the nearest edge.- if (previewIndex < 0) {- setPreviewId(visible[delta < 0 ? visible.length - 1 : 0].id);- return;- }- const next = (previewIndex + delta + visible.length) % visible.length;- setPreviewId(visible[next].id);- },- [previewIndex, visible],- );-- // Adding one opens its preview rather than applying it: the picture arrives- // re-encoded and auto-themed, and seeing it full size before adopting it is- // the difference between a choice and a surprise.- const onFilePicked = (event: React.ChangeEvent<HTMLInputElement>) => {- const file = event.target.files?.[0];- // Clear the input first, so picking the same file twice in a row still- // fires a change event.- event.target.value = "";- if (!file) return;- add.mutate(file, { onSuccess: (upload) => setPreviewId(upload.id) });- };-- const onRemoveUpload = (item: WallpaperEntry) => {- remove.mutate(item.id, {- onSuccess: () => {- // Everything that remembered it goes too, or the shell would keep- // asking for a picture that is no longer on disk.- forget(item.id);- setPreviewId(null);- },- });- };-- const onRethemeUpload = (item: WallpaperEntry, next: Theme) => {- if (item.theme === next) return;- retheme.mutate(- { id: item.id, theme: next },- {- onSuccess: (updated) => {- // A wallpaper in use is filed under the mode it belongs to. Moving it- // to the other mode has to move that filing with it, or the picture- // would come back under a theme it is no longer authored for.- if (isApplied(item)) {- forget(item.id);- apply(uploadAsEntry(updated));- }- },- },- );- };-- const uploadError = add.error?.message ?? remove.error?.message ?? retheme.error?.message;-- const header = (- <ViewHeader- icon={<ImageIcon className="h-4 w-4 text-primary" />}- title="Wallpaper"- subtitle={- data- ? `${data.count} wallpapers · ${styles.length} styles · picking one sets light or dark to match`- : "The app's desktop background"- }- right={- <div className="flex items-center gap-2">- <input- ref={fileInput}- type="file"- accept="image/png,image/jpeg,image/webp,image/gif,image/bmp"- onChange={onFilePicked}- className="hidden"- data-testid="wallpaper-file-input"- />- <Button- size="sm"- variant="outline"- onClick={() => fileInput.current?.click()}- disabled={add.isPending}- >- {add.isPending ? (- <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />- ) : (- <Upload className="mr-1.5 h-3.5 w-3.5" />- )}- Add your own- </Button>- {selectedId && (- <Button size="sm" variant="outline" onClick={() => apply(null)}>- <RotateCcw className="mr-1.5 h-3.5 w-3.5" />- Default- </Button>- )}- </div>- }- />- );-- if (isLoading) {- return (- <div className="flex h-full flex-col">- {header}- <div className="flex flex-1 items-center justify-center">- <Loader2 className="h-5 w-5 animate-spin text-muted-foreground" />- </div>- </div>- );- }-- return (- <div className="flex h-full flex-col">- {header}-- {uploadError && (- <p- role="alert"- className="border-b border-border bg-destructive/10 px-6 py-2.5 text-xs text-destructive"- >- {uploadError}- </p>- )}-- {!data?.libraryAvailable && <LibraryDownloadBanner />}-- {/* The ground itself: a flat theme colour (the default since 2026-08-23)- or the chosen picture. Picking any tile below switches to the- picture; this is the way back. The picks survive either way. */}- <div- className="flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-border px-6 py-3"- data-testid="wallpaper-background-mode"- >- <span className="text-xs font-medium text-foreground">{t("home.background_label")}</span>- <div className="flex items-center gap-1 rounded-lg border border-border p-0.5">- <SegmentButton- active={background === "solid"}- onClick={() => setBackground("solid")}- data-testid="background-solid"- >- {t("home.background_solid")}- </SegmentButton>- <SegmentButton- active={background === "wallpaper"}- onClick={() => setBackground("wallpaper")}- data-testid="background-wallpaper"- >- {t("home.background_wallpaper")}- </SegmentButton>- </div>- <span className="min-w-0 flex-1 text-xs text-muted-foreground">- {t("home.background_hint")}- </span>- </div>-- <div className="flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-border px-6 py-3">- <div className="flex items-center gap-1 rounded-lg border border-border p-0.5">- <SegmentButton active={theme === "all"} onClick={() => setTheme("all")}>- All- </SegmentButton>- <SegmentButton active={theme === "dark"} onClick={() => setTheme("dark")}>- <Moon className="h-3 w-3" /> Dark- </SegmentButton>- <SegmentButton active={theme === "light"} onClick={() => setTheme("light")}>- <Sun className="h-3 w-3" /> Light- </SegmentButton>- </div>-- <div className="flex items-center gap-1 rounded-lg border border-border p-0.5">- <SegmentButton- active={ordering === "mixed"}- onClick={() => setOrdering("mixed")}- >- Mixed- </SegmentButton>- <SegmentButton- active={ordering === "style"}- onClick={() => setOrdering("style")}- >- By style- </SegmentButton>- </div>-- <div className="flex items-center gap-1 rounded-lg border border-border p-0.5">- <SegmentButton- active={favoritesOnly}- onClick={() => setFavoritesOnly((on) => !on)}- >- <Heart- className={cn("h-3 w-3", favoritesOnly && "fill-current")}- />- Favorites- {favoriteCount > 0 && (- <span className="text-micro tabular-nums opacity-70">- {favoriteCount}- </span>- )}- </SegmentButton>- </div>-- <span className="ml-auto text-xs text-muted-foreground">- {visible.length} shown- </span>- </div>-- <div className="flex flex-wrap gap-1.5 border-b border-border px-6 py-2.5">- <SegmentButton active={style === null} onClick={() => setStyle(null)}>- All styles- </SegmentButton>- {styles.map((entry) => (- <SegmentButton- key={entry.slug}- active={style === entry.slug}- onClick={() => setStyle(entry.slug)}- >- {entry.label}- </SegmentButton>- ))}- </div>-- <ScrollArea className="flex-1">- <div- data-testid="wallpaper-grid"- className="grid gap-3 p-6 [grid-template-columns:repeat(auto-fill,minmax(210px,1fr))]"- >- {visible.map((item) => (- <WallpaperTile- key={item.id}- item={item}- active={isApplied(item)}- favorite={favoriteIds.has(item.id)}- onOpen={() => setPreviewId(item.id)}- onToggleFavorite={() => toggleFavorite(item.id)}- />- ))}- </div>- {visible.length === 0 && (- <p className="px-6 pb-6 text-xs text-muted-foreground">- {favoritesOnly && favoriteCount === 0- ? "No favorites yet — click the heart on a wallpaper to keep it here."- : "No wallpaper matches this filter."}- </p>- )}- </ScrollArea>-- {previewItem && (- <WallpaperPreview- item={previewItem}- applied={isApplied(previewItem)}- favorite={favoriteIds.has(previewItem.id)}- busy={remove.isPending || retheme.isPending}- onApply={() => apply(previewItem)}- onToggleFavorite={() => toggleFavorite(previewItem.id)}- onSetTheme={(next) => onRethemeUpload(previewItem, next)}- onRemove={() => onRemoveUpload(previewItem)}- onShare={canShare(previewItem) ? () => setShareId(previewItem.id) : undefined}- onClose={() => setPreviewId(null)}- onStep={step}- />- )}- {shareId && (() => {- // Resolved against the whole catalog, like the preview above: the- // share dialog is a form somebody is filling in, and a filter change- // underneath it must not yank the picture out.- const shareItem = items.find((item) => item.id === shareId) ?? null;- return shareItem ? (- <PublishWallpaperDialog item={shareItem} onClose={() => setShareId(null)} />- ) : null;- })()}- </div>- );-}diff --git a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.tsindex 9b9ab983f1..8c154282b4 100644--- a/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts+++ b/jarvis/ui/web/frontend/src/views/settings/settingsSearch.ts@@ -30,7 +30,6 @@ const SEARCH_PAGES = [{ id: "contacts", keys: ["contacts"] },{ id: "socials", keys: ["socials"] },{ id: "apikeys", keys: ["apikeys_view", "apikeys_voice", "apikeys_model", "apikeys_cu_model"] },- { id: "wallpaper", keys: ["home.background_label", "home.background_hint"] },{ id: "appshots", keys: ["appshots"] },{ id: "jarvis-actions", keys: ["jarvis_actions"] },{ id: "costs", keys: ["costs_view"] },diff --git a/jarvis/ui/web/marketplace_publish_routes.py b/jarvis/ui/web/marketplace_publish_routes.pyindex 6a3e9cb7ba..206e20073b 100644--- a/jarvis/ui/web/marketplace_publish_routes.py+++ b/jarvis/ui/web/marketplace_publish_routes.py@@ -7,7 +7,6 @@ Endpoints:DELETE /api/marketplace/publish/identity — sign out (drop token)POST /api/marketplace/publish/validate — field-level pre-checkPOST /api/marketplace/publish/submit — publish (opens the bot PR)- POST /api/marketplace/publish/submit-wallpaper — publish a picker wallpaperGET /api/marketplace/publish/status — is name@version live in the feedThe heavy lifting lives in ``jarvis/marketplace/publish.py``; this layer only@@ -64,20 +63,12 @@ async def _complete_signin(handler: Any, session: Any) -> dict[str, Any]:@router.get("/identity", openapi_extra={"x-jarvis-readonly": True})async def publish_identity(response: Response) -> dict[str, Any]:"""Signed-in state, plus whether publishing is enabled at all."""- from jarvis.marketplace.publish import (- current_identity,- publish_endpoint,- publish_wallpaper_endpoint,- )+ from jarvis.marketplace.publish import current_identity, publish_endpointresponse.headers["Cache-Control"] = "no-store"enabled = bool(publish_endpoint())- # Reported separately: the two lanes are separate endpoints and a fork may- # run one without the other. The wallpaper picker hides its Share button on- # a false here rather than offering a door that answers 503.- wallpapers_enabled = bool(publish_wallpaper_endpoint())- if not enabled and not wallpapers_enabled:- return {"enabled": False, "wallpapers_enabled": False, "signed_in": False}+ if not enabled:+ return {"enabled": False, "signed_in": False}try:state = await current_identity()except RuntimeError as exc:@@ -87,12 +78,11 @@ async def publish_identity(response: Response) -> dict[str, Any]:log.warning("publish identity: GitHub unreachable: %s", exc)return {"enabled": enabled,- "wallpapers_enabled": wallpapers_enabled,"signed_in": False,# A flag with a fixed sentence; the network error itself is logged."unreachable": "GitHub is unreachable.",}- return {"enabled": enabled, "wallpapers_enabled": wallpapers_enabled, **state}+ return {"enabled": enabled, **state}@router.post("/signin/start")@@ -240,95 +230,6 @@ async def submit(body: SubmissionDraft) -> dict[str, Any]:}-class WallpaperDraft(BaseModel):- """A "share this picture" request from the wallpaper picker.-- The image is named, not uploaded: ``upload_id`` points at a picture the- picker already holds, whose bytes this app re-encoded when they arrived.- That keeps the sanitizing in one place and means the browser cannot hand- the publisher different bytes than the ones the user is looking at.-- There is no ``name`` or ``version``: the endpoint slugifies the title into- a free name and stamps 1.0.0. A client that sent either would be- describing something the server ignores.- """-- upload_id: str- title: str = ""- description: str | None = None- license: str = ""- theme: str | None = None- rights: bool = False---# Dangerous for the same reason as /submit, and more so: this publishes an-# IMAGE publicly under the user's GitHub name, into a lane nobody reviews-# before it goes live.[email protected]("/submit-wallpaper", openapi_extra={"x-jarvis-dangerous": True})-async def submit_wallpaper(body: WallpaperDraft) -> dict[str, Any]:- """Publish one of the picker's own wallpapers to the community feed."""- from jarvis.marketplace.publish import (- SubmitError,- prepare_wallpaper_image,- validate_wallpaper_draft,- )- from jarvis.marketplace.publish import submit_wallpaper as do_submit- from jarvis.ui.web.wallpapers import WallpaperUploads-- fields, errors = validate_wallpaper_draft(body.model_dump())- if fields is None:- first = errors[0]- raise HTTPException(- status_code=422,- detail={"error": first["error"], "field": first["field"], "errors": errors},- )-- item = await asyncio.to_thread(WallpaperUploads().get, body.upload_id)- if item is None:- raise HTTPException(- status_code=404, detail={"error": "that wallpaper is gone", "field": "file"}- )- if item.origin:- # An imported community wallpaper is somebody else's picture. Letting- # it be re-published would launder authorship through the picker and- # put a stranger's name on a stranger's work.- raise HTTPException(- status_code=409,- detail={- "error": "that wallpaper came from the community — only your own pictures "- "can be published",- "field": "file",- },- )- try:- raw = await asyncio.to_thread(item.path.read_bytes)- except OSError as exc:- raise HTTPException(- status_code=500,- detail={"error": f"the image could not be read: {exc}", "field": "file"},- ) from exc-- try:- # Pillow work is CPU-bound: off the event loop, like every other- # image path in the app.- image, filename = await asyncio.to_thread(prepare_wallpaper_image, raw)- result = await do_submit(fields, image, filename)- except SubmitError as exc:- raise HTTPException(- status_code=exc.status, detail={"error": exc.error, "field": exc.field}- ) from exc-- from jarvis.marketplace.install_standard import install_block-- name = result["name"]- return {- "ok": True,- "name": name,- "version": "1.0.0",- "install": install_block(name, "wallpaper") if name else None,- }--@router.get("/status", openapi_extra={"x-jarvis-readonly": True})async def status(name: str, version: str, response: Response, force: bool = Falsediff --git a/jarvis/ui/web/marketplace_routes.py b/jarvis/ui/web/marketplace_routes.pyindex fb310cd306..2533831783 100644--- a/jarvis/ui/web/marketplace_routes.py+++ b/jarvis/ui/web/marketplace_routes.py@@ -42,7 +42,7 @@ from fastapi.responses import HTMLResponsefrom pydantic import BaseModel, Fieldfrom jarvis.core.events import MarketplaceItemInstalled-from jarvis.core.http_guard import InsecureRedirect, https_only_async+from jarvis.core.http_guard import https_only_asyncfrom jarvis.core.process_utils import resolve_executablefrom jarvis.core.uploads import UploadRejected, stage_uploadfrom jarvis.marketplace.auth import (@@ -1038,8 +1038,7 @@ def _community_payload(index: Any, status: str) -> dict[str, Any]:uses, so "shown as installable" and "actually installs" cannot drift: anentry the loader rejects renders as an explicit incompatible card insteadof failing later at install time. Skills carry their install state from- the user skills directory, wallpapers from the recorded origin of the- pictures in the picker's own store.+ the user skills directory."""from jarvis.core.paths import user_skills_dirfrom jarvis.marketplace.agent_plugins_loader import (@@ -1052,7 +1051,6 @@ def _community_payload(index: Any, status: str) -> dict[str, Any]:plugins: list[dict[str, Any]] = []skills: list[dict[str, Any]] = []- wallpapers: list[dict[str, Any]] = []if index is not None:for entry in index.plugins:base = {@@ -1113,43 +1111,12 @@ def _community_payload(index: Any, status: str) -> dict[str, Any]:})- from jarvis.ui.web.wallpapers import WallpaperUploads-- # One listing for the whole loop: the picker's store is a directory- # scan, and asking it once per published wallpaper would turn browsing- # into an O(entries x installed) walk of the data directory.- installed_sources = {- item.origin.source_id for item in WallpaperUploads().list() if item.origin is not None- }- for paper in index.wallpapers:- wallpapers.append(- {- "name": paper.name,- "title": paper.title or paper.name,- "description": paper.description,- "publisher": paper.publisher,- "version": paper.version,- "published_at": paper.published_at,- "categories": list(paper.categories),- "source_url": paper.source_url,- # Both names travel: `image_url` is what the registry- # emits, `raw_url` keeps the shape the other two kinds use.- "image_url": paper.download_url,- "raw_url": paper.download_url,- "thumb_url": paper.thumb_url,- "theme": paper.theme,- "license": paper.license,- "installed": paper.name in installed_sources,- }- )-return {"status": status,"revision": getattr(index, "revision", None),"generated_at": getattr(index, "generated_at", None),"plugins": plugins,"skills": skills,- "wallpapers": wallpapers,}@@ -1179,9 +1146,9 @@ async def community_refresh(response: Response) -> dict[str, Any]:# "Nobody reviewed this" is only an honest warning if the reader can act on# it, and nobody can act on a one-line description plus a URL. So the whole# published package is served as text: the instructions a skill would hand the-# assistant, the manifest that says where a plugin would send the token, the-# picture a wallpaper would install. Reading runs the same fetch the install-# would run, minus writing anything to disk.+# assistant, the manifest that says where a plugin would send the token.+# Reading runs the same fetch the install would run, minus writing anything to+# disk.# ----------------------------------------------------------------------# A SKILL.md is prose. The ceiling exists so a hostile entry cannot stream@@ -1197,9 +1164,9 @@ async def _download_text(raw_url: str, *, transport: Any = None) -> tuple[str, bOversize is cut, not refused: half a hostile file is still readableevidence, while refusing outright would leave the reader with nothing. The- redirect chain is re-checked for the reason ``_download_image`` re-checks- it — the index validator only ever saw the URL it was given, and a 302 to- plain http would put the server back on an SSRF path.+ redirect chain is re-checked: the index validator only ever saw the URL it+ was given, and a 302 to plain http would put the server back on an SSRF+ path."""hit = _content_cache.get(raw_url)if hit is not None and (time.time() - hit[0]) < _CONTENT_TTL_SECONDS:@@ -1348,7 +1315,7 @@ async def plugin_files(plugin_id: str, response: Response) -> dict[str, Any]:@router.get("/community/{item_id}/contents", openapi_extra={"x-jarvis-readonly": True})async def community_contents(item_id: str, response: Response) -> dict[str, Any]:- """What one published entry actually contains — skill, plugin or wallpaper.+ """What one published entry actually contains — a skill or a plugin.Reading is never installing: nothing is written, no registry is touched.A download that fails degrades to an ``error`` string on an otherwise@@ -1359,16 +1326,15 @@ async def community_contents(item_id: str, response: Response) -> dict[str, Any]response.headers["Cache-Control"] = "no-store"index, _ = await community_source.get_index()- plugin = skill = paper = None+ plugin = skill = Noneif index is not None:plugin = next((e for e in index.plugins if e.name == item_id), None)skill = next((s for s in index.skills if s.name == item_id), None)- paper = next((w for w in index.wallpapers if w.name == item_id), None)- entry = plugin or skill or paper+ entry = plugin or skillif entry is None:raise _install_by_name_404(item_id, index)- kind = "plugin" if plugin is not None else "skill" if skill is not None else "wallpaper"+ kind = "plugin" if plugin is not None else "skill"out: dict[str, Any] = {"kind": kind,"name": entry.name,@@ -1378,7 +1344,6 @@ async def community_contents(item_id: str, response: Response) -> dict[str, Any]"source_url": entry.source_url,"root": f"{kind}s/{entry.name}","files": [],- "image_url": None,"error": None,}@@ -1386,17 +1351,6 @@ async def community_contents(item_id: str, response: Response) -> dict[str, Any]out["files"] = _plugin_manifest_files(plugin)return out- if paper is not None:- # A picture has no text to read — the preview IS the content. Both the- # url and the "nothing to show" verdict come from `download_url`, the- # same field the install fetches: judging by `raw_url` alone told every- # wallpaper the registry publishes as `image_url` that it had no image,- # right next to the preview that was already loading.- out["image_url"] = paper.download_url- if not paper.download_url:- out["error"] = "This wallpaper publishes no downloadable image."- return out-if not skill.raw_url:out["error"] = "This skill publishes no direct download — open its source to read it."return out@@ -1560,121 +1514,6 @@ async def _install_community_skill(entry: Any, request: Request) -> dict[str, An}-async def _download_image(raw_url: str, limit_bytes: int, *, transport: Any = None) -> bytes:- """Fetch one image over https, refusing anything bigger than ``limit_bytes``.-- Streamed rather than read whole so an oversized (or endless) body is cut- off mid-flight instead of being absorbed first. The redirect chain is- re-checked: the index validator only sees the URL it was given, and a- 302 to plain http would put the server back on an SSRF path. The guard- refuses that hop BEFORE it is made; the scheme check below stays as the- second pair of eyes on where the chain actually ended up.-- ``transport`` is the injection point tests use (same shape as- ``community_source.get_index``); production passes nothing.- """- async with httpx.AsyncClient(- follow_redirects=True,- timeout=httpx.Timeout(connect=5.0, read=20.0, write=20.0, pool=20.0),- transport=transport,- **https_only_async(),- ) as client:- try:- async with client.stream("GET", raw_url) as resp:- if resp.url.scheme != "https":- raise HTTPException(- status_code=400,- detail=f"refusing a non-https redirect to {resp.url}",- )- resp.raise_for_status()- chunks: list[bytes] = []- total = 0- async for chunk in resp.aiter_bytes():- total += len(chunk)- if total > limit_bytes:- raise HTTPException(- status_code=400,- detail=(f"that image is larger than {limit_bytes // (1024 * 1024)} MB"),- )- chunks.append(chunk)- except InsecureRedirect as exc:- # Not a 502: the registry entry itself is what is wrong, and- # saying "the other end failed" would send the reader looking for- # a network problem that does not exist.- raise HTTPException(status_code=400, detail=str(exc)) from exc- except httpx.HTTPError as exc:- raise HTTPException(- status_code=502, detail=f"download from {raw_url} failed: {exc}"- ) from exc- return b"".join(chunks)---async def _install_community_wallpaper(entry: Any) -> dict[str, Any]:- """Download one wallpaper and store it beside the owner's own uploads.-- It goes through the SAME mill an upload does — Pillow decode, re-encode,- size ceiling — so an installed picture is never more trusted than a- dragged-in one. What it gains is a recorded origin, which is the only- reason the picker can later show where the tile came from.- """- from jarvis.ui.web.wallpapers import (- MAX_UPLOAD_BYTES,- UploadRejected,- WallpaperOrigin,- WallpaperUploads,- )-- download_url = entry.download_url- if not download_url:- # Either absent or dropped by the index validator for not being https.- raise HTTPException(- status_code=400,- detail=f"wallpaper {entry.name!r} has no downloadable image",- )- store = WallpaperUploads()- existing = store.find_by_source(entry.name)- if existing is not None:- raise HTTPException(- status_code=409,- detail=(- f"{entry.name!r} is already in your wallpapers as "- f"{existing.title!r}. Remove it there before installing again."- ),- )- data = await _download_image(download_url, MAX_UPLOAD_BYTES)- try:- item = store.add(- data,- filename=entry.name,- source="marketplace",- title=entry.title or "",- origin=WallpaperOrigin(- source_id=entry.name,- publisher=entry.publisher,- version=entry.version,- source_url=entry.source_url,- ),- )- except UploadRejected as exc:- raise HTTPException(status_code=exc.status_code, detail=exc.message) from exc- return {- "ok": True,- "kind": "wallpaper",- "id": entry.name,- "title": item.title,- "publisher": entry.publisher,- "version": entry.version,- "source_url": entry.source_url,- "location": str(item.path),- "state": "installed",- # A picture needs nothing else to be usable: it is in the picker now.- "ready": True,- "problem": None,- "next_action": "none",- "wallpaper": item.to_json(),- }--async def _announce_install(request: Request, result: dict[str, Any]) -> None:"""Say on the bus that an entry landed, so open windows can catch up.@@ -1714,11 +1553,7 @@ def _install_by_name_404(item_id: str, index: Any) -> HTTPException:names: list[str] = []if index is not None:- names = (- [e.name for e in index.plugins]- + [s.name for s in index.skills]- + [w.name for w in index.wallpapers]- )+ names = [e.name for e in index.plugins] + [s.name for s in index.skills]close = difflib.get_close_matches(item_id, names, n=1, cutoff=0.6)hint = f" Closest match: {close[0]!r}." if close else ""return HTTPException(@@ -1729,11 +1564,11 @@ def _install_by_name_404(item_id: str, index: Any) -> HTTPException:@router.post("/community/install/{item_id}")async def community_install_by_name(item_id: str, request: Request) -> dict[str, Any]:- """Install a marketplace entry by name — skill, plugin or wallpaper, one call.+ """Install a marketplace entry by name — skill or plugin, one call.The one-liner a downloader copies off a marketplace page- (``jarvis marketplace install <name>``) never says which of the three an- entry is, so the KIND is resolved here and all three answer in one shape:+ (``jarvis marketplace install <name>``) never says which of the two an+ entry is, so the KIND is resolved here and both answer in one shape:what landed, where it landed, whether it is usable right now, and what isstill missing. Every surface (CLI, desktop, an agent driving the API) cantherefore report an honest status instead of a bare 200.@@ -1741,18 +1576,15 @@ async def community_install_by_name(item_id: str, request: Request) -> dict[str,from jarvis.marketplace import community_sourceindex, _ = await community_source.get_index()- plugin_entry = skill_entry = wallpaper_entry = None+ plugin_entry = skill_entry = Noneif index is not None:plugin_entry = next((e for e in index.plugins if e.name == item_id), None)skill_entry = next((s for s in index.skills if s.name == item_id), None)- wallpaper_entry = next((w for w in index.wallpapers if w.name == item_id), None)- if plugin_entry is None and skill_entry is None and wallpaper_entry is None:+ if plugin_entry is None and skill_entry is None:raise _install_by_name_404(item_id, index)if skill_entry is not None:result = await _install_community_skill(skill_entry, request)- elif wallpaper_entry is not None:- result = await _install_community_wallpaper(wallpaper_entry)else:item = await _install_community_plugin(item_id)result = {@@ -1774,8 +1606,8 @@ async def community_install_by_name(item_id: str, request: Request) -> dict[str,"plugin": item,}- # One announcement for all three kinds, from the one place that knows the- # install finished — a per-branch publish would be three chances to forget.+ # One announcement for both kinds, from the one place that knows the+ # install finished — a per-branch publish would be two chances to forget.await _announce_install(request, result)return resultdiff --git a/jarvis/ui/web/server.py b/jarvis/ui/web/server.pyindex b032d8adc9..3e44de351e 100644--- a/jarvis/ui/web/server.py+++ b/jarvis/ui/web/server.py@@ -58,7 +58,6 @@ from .schema import ()from .spa_build import build_is_complete, holding_page_html, recover_conflicted_indexfrom .surface_security import SurfaceSecurity, set_browser_login_required-from .wallpapers import register_wallpaper_routesif TYPE_CHECKING:import uvicorn@@ -1588,11 +1587,6 @@ class WebServer:"""return {"shells": [{"id": s.id, "label": s.label} for s in discover_shells()]}- # The wallpaper picker. Registered here, with the REST routes, rather- # than beside the static mounts: those are skipped entirely in dev mode,- # and the picker has to work against the Vite dev server too.- register_wallpaper_routes(app)-# ------------------------------------------------------------------# WebSocket# ------------------------------------------------------------------diff --git a/jarvis/ui/web/wallpapers.py b/jarvis/ui/web/wallpapers.pydeleted file mode 100644index 4ebdecc197..0000000000--- a/jarvis/ui/web/wallpapers.py+++ /dev/null@@ -1,982 +0,0 @@-"""The desktop wallpapers: the generated library, plus the owner's own uploads.--Two stores live here, deliberately kept apart on disk:--* The generated library — five hundred pieces of *content* under- ``data/jarvis-wallpaper-gallery`` (see below).-* Uploads — the pictures the owner brought themselves, under- ``data/jarvis-wallpaper-uploads``. Regenerating or deleting the library must- never touch somebody's own photograph, which is the one thing here that- cannot be produced again.--The 500 generated wallpapers are *content*, not source. They live in a-git-ignored directory and are served from there instead of being copied into-the frontend's ``public/`` folder: 147 MB of artwork in the repository would be-paid for by every clone, every build, and every packaged desktop app, including-the ones whose owner never opens the picker.--Two consequences shape this module:--* The library is *optional*. A checkout without it is normal, not broken, so- the catalog endpoint answers ``available: false`` and the app keeps its- bundled default wallpaper. Nothing here raises on a missing directory.-* The browse grid must never pull full-size art. Every wallpaper is 1920x1080- and averages 300 KB; five hundred of those is a 147 MB scroll. Thumbnails are- derived once, cached on disk, and are what the grid actually requests — the- full image is downloaded only when a visitor previews or applies one.-"""--from __future__ import annotations--import io-import json-import os-import re-import secrets-import shutil-import tempfile-import threading-import time-import urllib.error-import urllib.request-import zipfile-from dataclasses import dataclass, replace-from pathlib import Path-from typing import Any--from fastapi import FastAPI, File, UploadFile-from fastapi.responses import FileResponse, JSONResponse-from loguru import logger--from jarvis.core.config import DATA_DIR--#: Where the generated library lives, relative to the project data directory.-LIBRARY_DIRNAME = "jarvis-wallpaper-gallery"--#: Where the owner's own wallpapers live. A sibling of the library, never a-#: child of it: the library is regenerable content, these are not.-UPLOADS_DIRNAME = "jarvis-wallpaper-uploads"--#: Derived thumbnails are cached beside the originals. The leading dot keeps-#: them out of the manifest builder's ``images/`` scan.-THUMBS_DIRNAME = ".thumbs"--#: Long edge of a grid thumbnail. 480 px covers a 240 px tile on a 2x display,-#: which is the widest the grid goes before it adds a column instead.-THUMB_WIDTH = 480--#: Quality for the derived thumbnails. At tile size the difference from 90 is-#: invisible and the file is roughly a third of the size.-THUMB_QUALITY = 72--#: A wallpaper id as written by the manifest builder, e.g.-#: ``01-cinematic-photoreal-07``. Validating against this *and* against the-#: loaded catalog is what keeps a request from reaching outside the library.-_ID_PATTERN = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*-\d{2}$")--#: An upload id. Random rather than derived from the file name: two photographs-#: called ``IMG_0042.jpg`` are two wallpapers, and a name is not a key.-_UPLOAD_ID_PATTERN = re.compile(r"^u[0-9a-f]{16}$")--#: Ceiling for an accepted upload. Generous enough for a phone photograph or a-#: 4K screenshot, low enough that a mis-drop of a video file fails fast.-MAX_UPLOAD_BYTES = 40 * 1024 * 1024--#: Uploads are re-encoded to at most this width. A wallpaper never needs more-#: pixels than the largest desktop, and a 12-megapixel original would otherwise-#: be decoded on every repaint of the app's background.-UPLOAD_MAX_WIDTH = 3840--#: Quality of the re-encoded upload. Visually indistinguishable at wallpaper-#: distance, and a fraction of the size of the incoming PNG.-UPLOAD_QUALITY = 82--#: Mean luminance (0-255) at or above which an upload is treated as a light-#: picture. The midpoint is the honest guess; the owner can correct it.-_LIGHT_THEME_LUMA = 128--#: Immutable content: the files are generated once and never edited in place.-_CACHE_HEADERS = {"Cache-Control": "public, max-age=31536000, immutable"}--#: Where the packaged library is downloaded from when the owner asks for it.-#: A dedicated asset release with a stable tag, deliberately separate from the-#: product releases so the URL never moves when a new version ships. The ENV-#: override exists for mirrors and for tests.-LIBRARY_ARCHIVE_URL = os.environ.get(- "JARVIS_WALLPAPER_LIBRARY_URL",- "https://github.com/PersonalJarvis/PersonalJarvis/releases/download/"- "wallpaper-library-v1/jarvis-wallpaper-gallery.zip",-)--#: What the download banner promises before the Content-Length is known.-#: Kept as data, not prose, so the frontend formats it for the reader.-LIBRARY_ARCHIVE_APPROX_BYTES = 199 * 1024 * 1024--#: One streamed read of the archive download. Large enough that progress-#: bookkeeping is noise, small enough that a poll sees movement.-_DOWNLOAD_CHUNK = 1024 * 256--#: Ceiling for the accepted archive. The real one is ~190 MB; a server that-#: claims (or streams) several times that is answering with something else.-MAX_ARCHIVE_BYTES = 1024 * 1024 * 1024---@dataclass(frozen=True)-class Wallpaper:- """One entry of the library, as the browse grid needs to know it."""-- id: str- title: str- style: str- style_label: str- theme: str- path: Path---def library_root() -> Path:- """Absolute path of the wallpaper library (may not exist)."""- return DATA_DIR / LIBRARY_DIRNAME---def _humanize(slug: str) -> str:- """Turn a directory slug into a display label.-- Used as the fallback when a manifest's ``style`` field is itself a slug- rather than a written-out name — one of the twenty manifests is, and a- filter chip reading "bright-photoreal" next to "Watercolor & Ink" looks- like a bug to the person reading it.- """- words = slug.split("-", 1)[-1].split("-")- return " ".join(word.capitalize() for word in words if word)---class WallpaperLibrary:- """Loads the manifests once and answers lookups from memory.-- The catalog is read lazily on first request rather than at import time:- boot should not pay for twenty JSON files that most sessions never touch.- """-- def __init__(self, root: Path | None = None) -> None:- self._root = root or library_root()- self._lock = threading.Lock()- self._items: dict[str, Wallpaper] | None = None-- @property- def root(self) -> Path:- return self._root-- def _load(self) -> dict[str, Wallpaper]:- manifests_dir = self._root / "manifests"- images_dir = self._root / "images"- if not manifests_dir.is_dir() or not images_dir.is_dir():- return {}-- items: dict[str, Wallpaper] = {}- for manifest in sorted(manifests_dir.glob("*.json")):- try:- entries = json.loads(manifest.read_text(encoding="utf-8"))- except (OSError, ValueError) as exc:- logger.warning("Skipping unreadable wallpaper manifest {}: {}", manifest, exc)- continue- if not isinstance(entries, list):- continue- style_slug = manifest.stem- for entry in entries:- item = self._parse(entry, style_slug)- if item is not None and item.id not in items:- items[item.id] = item- if items:- logger.debug("Wallpaper library: {} entries from {}", len(items), self._root)- return items-- def _parse(self, entry: Any, style_slug: str) -> Wallpaper | None:- if not isinstance(entry, dict):- return None- item_id = str(entry.get("id", "")).strip()- rel = str(entry.get("file", "")).strip()- theme = str(entry.get("theme", "")).strip()- if not _ID_PATTERN.match(item_id) or theme not in {"light", "dark"}:- return None-- # The manifest's own path is untrusted input as far as this loader is- # concerned — a hand-edited "file" must not be able to point the server- # at an arbitrary file on disk.- if not rel.startswith("images/") or ".." in rel or not rel.endswith(".webp"):- return None- path = (self._root / rel).resolve()- try:- path.relative_to((self._root / "images").resolve())- except ValueError:- # A manifest path that escapes the library is treated as absent.- return None- if not path.is_file():- return None-- style_label = str(entry.get("style", "")).strip()- if not style_label or style_label == style_label.lower().replace(" ", "-"):- style_label = _humanize(style_slug)- return Wallpaper(- id=item_id,- title=str(entry.get("title", "")).strip() or item_id,- style=style_slug,- style_label=style_label,- theme=theme,- path=path,- )-- def items(self) -> dict[str, Wallpaper]:- with self._lock:- if self._items is None:- self._items = self._load()- return self._items-- def reset(self) -> None:- """Forget the cached catalog so the next request re-reads the disk.-- The one caller is the installer: the library appearing on disk is the- only event after which "loaded once, kept forever" stops being true.- """- with self._lock:- self._items = None-- def get(self, item_id: str) -> Wallpaper | None:- if not _ID_PATTERN.match(item_id):- return None- return self.items().get(item_id)-- def catalog(self) -> dict[str, Any]:- """The payload the browse grid is built from — metadata only, no bytes."""- items = list(self.items().values())- styles: dict[str, dict[str, Any]] = {}- for item in items:- bucket = styles.setdefault(- item.style,- {"slug": item.style, "label": item.style_label, "count": 0},- )- bucket["count"] += 1- return {- "available": bool(items),- "count": len(items),- "styles": sorted(styles.values(), key=lambda style: str(style["slug"])),- "items": [- {- "id": item.id,- "title": item.title,- "style": item.style,- "styleLabel": item.style_label,- "theme": item.theme,- }- for item in items- ],- }-- def thumbnail(self, item: Wallpaper) -> Path:- """Return a cached grid thumbnail, deriving it on first request."""- target = self._root / THUMBS_DIRNAME / item.style / f"{item.id}.webp"- return _derive_thumbnail(item.path, target, item.id)---class UploadRejected(Exception):- """An upload the store refuses, with a sentence meant for the owner."""-- def __init__(self, message: str, status_code: int = 400) -> None:- super().__init__(message)- self.message = message- self.status_code = status_code---@dataclass(frozen=True)-class WallpaperOrigin:- """Where a stored wallpaper came from, when it was not the owner's own file.-- Recorded at install time and carried in the sidecar, because "this came- from the marketplace" is something the picker must be able to SHOW — and- nothing about the finished ``.webp`` on disk could tell it apart from a- dragged-in photograph afterwards.- """-- source_id: str- publisher: str | None = None- version: str | None = None- source_url: str | None = None---@dataclass(frozen=True)-class UploadedWallpaper:- """One wallpaper outside the generated library: an upload or an install."""-- id: str- title: str- theme: str- created_at: float- path: Path- #: "own" for a file the owner brought, "marketplace" for an installed one.- source: str = "own"- origin: WallpaperOrigin | None = None-- def to_json(self) -> dict[str, Any]:- payload: dict[str, Any] = {- "id": self.id,- "title": self.title,- "theme": self.theme,- "createdAt": self.created_at,- "source": self.source,- }- if self.origin is not None:- payload["sourceId"] = self.origin.source_id- payload["publisher"] = self.origin.publisher- payload["version"] = self.origin.version- payload["sourceUrl"] = self.origin.source_url- return payload---def _opt_str(value: Any) -> str | None:- """A trimmed, length-capped string from sidecar JSON — or None."""- text = str(value or "").strip()- return text[:200] or None---def _clean_title(filename: str) -> str:- """A display title from an upload's file name.-- The file name is decoration, never a path: only the stem survives, the- separators become spaces, and the result is capped. What lands on disk is- the random id, so a hostile name has nothing to reach.- """- stem = Path(filename or "").stem.strip()- words = re.split(r"[\s._-]+", stem)- title = " ".join(word for word in words if word).strip()- return title[:60] or "Your wallpaper"---class WallpaperUploads:- """The owner's own wallpapers: add, list, retheme, remove.-- Each upload is two files under one directory — ``<id>.webp`` for the- picture and ``<id>.json`` beside it for title and theme. A shared index- file would be a single point of corruption for a store whose whole job is- holding on to something irreplaceable; a sidecar can only ever lose its own- entry, and the directory listing stays the source of truth.-- Nothing is cached in memory: a handful of uploads is a cheap directory- scan, and re-reading means a second window's upload is visible here without- any invalidation protocol between them.- """-- def __init__(self, root: Path | None = None) -> None:- self._root = root or (DATA_DIR / UPLOADS_DIRNAME)- self._lock = threading.Lock()-- @property- def root(self) -> Path:- return self._root-- def _meta_path(self, upload_id: str) -> Path:- return self._root / f"{upload_id}.json"-- def _image_path(self, upload_id: str) -> Path:- return self._root / f"{upload_id}.webp"-- def _read(self, upload_id: str) -> UploadedWallpaper | None:- image = self._image_path(upload_id)- if not image.is_file():- return None- theme = "dark"- title = "Your wallpaper"- created = 0.0- try:- meta = json.loads(self._meta_path(upload_id).read_text(encoding="utf-8"))- except (OSError, ValueError):- # A lost sidecar costs the title, not the picture: the image is the- # part that cannot be reconstructed, so it still gets listed.- meta = {}- if isinstance(meta, dict):- if str(meta.get("theme")) in {"light", "dark"}:- theme = str(meta["theme"])- if str(meta.get("title", "")).strip():- title = str(meta["title"]).strip()[:60]- try:- created = float(meta.get("createdAt", 0.0))- except (TypeError, ValueError):- # A garbled timestamp only costs sort order, never the picture.- created = 0.0- if not created:- try:- created = image.stat().st_mtime- except OSError:- # An unreadable mtime only costs sort order, never the picture.- created = 0.0- source = "own"- origin: WallpaperOrigin | None = None- if isinstance(meta, dict) and str(meta.get("sourceId", "")).strip():- source = "marketplace" if str(meta.get("source")) == "marketplace" else "own"- origin = WallpaperOrigin(- source_id=str(meta["sourceId"]).strip()[:120],- publisher=_opt_str(meta.get("publisher")),- version=_opt_str(meta.get("version")),- source_url=_opt_str(meta.get("sourceUrl")),- )- return UploadedWallpaper(- id=upload_id,- title=title,- theme=theme,- created_at=created,- path=image,- source=source,- origin=origin,- )-- def _write_meta(self, item: UploadedWallpaper) -> None:- _atomic_write(- self._meta_path(item.id),- json.dumps(item.to_json(), ensure_ascii=False, indent=2).encode("utf-8"),- prefix=".meta.",- suffix=".json",- )-- def list(self) -> list[UploadedWallpaper]:- """Every upload, newest first — the one just added is the first tile."""- if not self._root.is_dir():- return []- items: list[UploadedWallpaper] = []- for image in self._root.glob("u*.webp"):- if not _UPLOAD_ID_PATTERN.fullmatch(image.stem):- continue- item = self._read(image.stem)- if item is not None:- items.append(item)- return sorted(items, key=lambda item: (-item.created_at, item.id))-- def get(self, upload_id: str) -> UploadedWallpaper | None:- if not _UPLOAD_ID_PATTERN.fullmatch(upload_id):- return None- return self._read(upload_id)-- def find_by_source(self, source_id: str) -> UploadedWallpaper | None:- """The installed wallpaper carrying this marketplace name, if any.-- The store keys by a random id, so identity across an install is the- recorded ``source_id`` — this is what stops a second install of the- same entry from stacking duplicate tiles in the picker.- """- wanted = str(source_id or "").strip()- if not wanted:- return None- for item in self.list():- if item.origin is not None and item.origin.source_id == wanted:- return item- return None-- def add(- self,- data: bytes,- filename: str = "",- *,- source: str = "own",- origin: WallpaperOrigin | None = None,- title: str = "",- ) -> UploadedWallpaper:- """Validate, re-encode, and store one picture — an upload or an install.-- The incoming bytes are decoded by Pillow rather than trusted by their- declared type, and what is written is the *re-encoded* image — so- whatever else the upload carried (a forged header, an appended- payload, EXIF) does not survive the round trip onto disk. A marketplace- download is put through the exact same mill: an installed wallpaper is- never more trusted than a dragged-in file.- """- if not data:- raise UploadRejected("That file is empty.")- if len(data) > MAX_UPLOAD_BYTES:- raise UploadRejected(- f"That image is larger than {MAX_UPLOAD_BYTES // (1024 * 1024)} MB.",- status_code=413,- )-- try:- from PIL import Image- except ImportError as exc: # pragma: no cover - Pillow is a hard dependency- raise UploadRejected(- "Image support is unavailable on this install.", status_code=503- ) from exc-- try:- with Image.open(io.BytesIO(data)) as probe:- probe.verify()- # Named `decoded`, not `source`: `source` is this method's caller-- # facing parameter, and shadowing it here silently turned every- # marketplace install back into an "own" upload.- with Image.open(io.BytesIO(data)) as decoded:- decoded.load()- prepared = decoded.convert("RGB")- except Exception as exc: # noqa: BLE001 — any decode failure = not an image- raise UploadRejected(- "That file is not an image the app can read (PNG, JPEG, WebP, GIF or BMP)."- ) from exc-- if prepared.width > UPLOAD_MAX_WIDTH:- height = max(1, round(prepared.height * UPLOAD_MAX_WIDTH / prepared.width))- prepared = prepared.resize((UPLOAD_MAX_WIDTH, height), Image.Resampling.LANCZOS)- theme = _detect_theme(prepared)-- buffer = io.BytesIO()- prepared.save(buffer, "WEBP", quality=UPLOAD_QUALITY, method=4)- prepared.close()-- with self._lock:- try:- self._root.mkdir(parents=True, exist_ok=True)- except OSError as exc:- raise UploadRejected(- "The app could not write to its data directory.", status_code=500- ) from exc- upload_id = f"u{secrets.token_hex(8)}"- item = UploadedWallpaper(- id=upload_id,- title=(title.strip()[:60] or _clean_title(filename)),- theme=theme,- created_at=time.time(),- path=self._image_path(upload_id),- source="marketplace" if origin is not None and source == "marketplace" else "own",- origin=origin,- )- try:- _atomic_write(item.path, buffer.getvalue(), prefix=".upload.", suffix=".webp")- self._write_meta(item)- except OSError as exc:- raise UploadRejected(- "The app could not store that image.", status_code=500- ) from exc- logger.info("Wallpaper upload stored: {} ({})", item.id, item.title)- return item-- def set_theme(self, upload_id: str, theme: str) -> UploadedWallpaper | None:- """Correct the light/dark guess made at upload time."""- if theme not in {"light", "dark"}:- raise UploadRejected("Theme must be 'light' or 'dark'.")- with self._lock:- item = self.get(upload_id)- if item is None:- return None- # replace() rather than a fresh construction: a field added later- # (the marketplace origin was exactly that) must not silently fall- # out of the sidecar the first time somebody flips light/dark.- updated = replace(item, theme=theme)- try:- self._write_meta(updated)- except OSError as exc:- raise UploadRejected(- "The app could not save that change.", status_code=500- ) from exc- return updated-- def remove(self, upload_id: str) -> bool:- """Delete one upload, picture and sidecar and thumbnail."""- if not _UPLOAD_ID_PATTERN.fullmatch(upload_id):- return False- with self._lock:- image = self._image_path(upload_id)- existed = image.is_file()- for path in (- image,- self._meta_path(upload_id),- self._root / THUMBS_DIRNAME / f"{upload_id}.webp",- ):- try:- path.unlink()- except OSError:- # Already gone, or held open by a reader on Windows. The- # entry disappears from the listing either way.- pass- return existed-- def thumbnail(self, item: UploadedWallpaper) -> Path:- """A grid thumbnail for an upload, derived and cached like the library's."""- target = self._root / THUMBS_DIRNAME / f"{item.id}.webp"- return _derive_thumbnail(item.path, target, item.id)---def _detect_theme(image: Any) -> str:- """Guess whether a picture belongs to light or dark mode.-- Mean luminance of a thumbnail-sized copy: bright artwork under dark chrome- (or the reverse) is the thing that reads as a bug, and mean brightness is- what that judgement actually turns on. A wrong guess is one click to fix,- so this stays a cheap heuristic rather than a saliency model.- """- try:- from PIL import ImageStat-- small = image.convert("L").resize((32, 32))- mean = ImageStat.Stat(small).mean[0]- except Exception: # noqa: BLE001 — a guess is never worth failing an upload- return "dark"- return "light" if mean >= _LIGHT_THEME_LUMA else "dark"---def _atomic_write(target: Path, payload: bytes, *, prefix: str, suffix: str) -> None:- """Write bytes so a reader sees either the old file or the whole new one."""- target.parent.mkdir(parents=True, exist_ok=True)- fd, tmp_path = tempfile.mkstemp(prefix=prefix, suffix=suffix, dir=str(target.parent))- try:- with os.fdopen(fd, "wb") as handle:- handle.write(payload)- os.replace(tmp_path, target)- except Exception:- try:- os.unlink(tmp_path)- except OSError:- # Best-effort cleanup; the write failure below is what gets raised.- pass- raise---def _derive_thumbnail(source_path: Path, target: Path, label: str) -> Path:- """Shared thumbnail derivation for both stores.-- Falls back to the original file when Pillow is unavailable or the resize- fails: a heavier grid is a far better outcome than an empty one.- """- try:- if target.is_file() and target.stat().st_mtime >= source_path.stat().st_mtime:- return target- except OSError:- # An unstattable cache entry: serve the original, a heavier grid beats- # an empty one.- return source_path-- try:- from PIL import Image- except ImportError:- # No Pillow on this install: the full-size file stands in for its thumb.- return source_path-- try:- with Image.open(source_path) as source:- source.load()- thumb = source.convert("RGB")- height = max(1, round(thumb.height * THUMB_WIDTH / thumb.width))- thumb = thumb.resize((THUMB_WIDTH, height), Image.Resampling.LANCZOS)- buffer = io.BytesIO()- thumb.save(buffer, "WEBP", quality=THUMB_QUALITY, method=4)- # Staged through a temporary name: two browsers scrolling the same row- # must not read a half-written file.- _atomic_write(target, buffer.getvalue(), prefix=".thumb.", suffix=".webp")- return target- except (OSError, ValueError) as exc:- logger.warning("Could not derive wallpaper thumbnail for {}: {}", label, exc)- return source_path---class LibraryInstallError(Exception):- """An install failure, with a sentence meant for the owner."""---class WallpaperLibraryInstaller:- """Downloads the packaged library and unpacks it into the data directory.-- The archive lives on a GitHub asset release rather than in the repository- (see the module docstring for why), so a fresh checkout gets the five- hundred wallpapers as a one-click download instead of a 190 MB clone tax.-- One install at a time, tracked as plain state under a lock: the work runs- on a daemon thread and the frontend polls the status endpoint, which is- all a single-owner desktop app needs — a job queue here would be ceremony.- """-- def __init__(- self,- library: WallpaperLibrary,- url: str | None = None,- ) -> None:- self._library = library- self._url = url or LIBRARY_ARCHIVE_URL- self._lock = threading.Lock()- self._thread: threading.Thread | None = None- self._state = "idle" # idle | downloading | unpacking | done | error- self._received = 0- self._total: int | None = None- self._error: str | None = None-- def status(self) -> dict[str, Any]:- with self._lock:- return {- "installed": self._installed(),- "state": self._state,- "receivedBytes": self._received,- "totalBytes": self._total or LIBRARY_ARCHIVE_APPROX_BYTES,- "error": self._error,- }-- def _installed(self) -> bool:- root = self._library.root- return (root / "manifests").is_dir() and (root / "images").is_dir()-- def start(self) -> dict[str, Any]:- """Begin the install unless one is already running or already done."""- with self._lock:- if self._thread is not None and self._thread.is_alive():- pass # already running; the status below says so- elif self._installed():- self._state = "done"- else:- self._state = "downloading"- self._received = 0- self._error = None- self._thread = threading.Thread(- target=self._run, name="wallpaper-library-install", daemon=True- )- self._thread.start()- return self.status()-- def _set(self, **fields: Any) -> None:- with self._lock:- for key, value in fields.items():- setattr(self, f"_{key}", value)-- def _run(self) -> None:- try:- archive = self._download()- try:- self._set(state="unpacking")- self._unpack(archive)- finally:- try:- archive.unlink()- except OSError:- # The library is installed; a stale temp zip is cosmetic.- pass- self._library.reset()- self._set(state="done")- logger.info("Wallpaper library installed under {}", self._library.root)- except LibraryInstallError as exc:- self._set(state="error", error=str(exc))- logger.warning("Wallpaper library install failed: {}", exc)- except Exception as exc: # noqa: BLE001 — the thread must never die silently- self._set(state="error", error=f"Unexpected error: {exc}")- logger.exception("Wallpaper library install crashed")-- def _download(self) -> Path:- """Stream the archive to a temporary file beside its final home.-- Beside it on purpose: the unpack step renames files into place, and a- temp file on another volume would turn that into a copy.- """- workdir = self._library.root.parent- workdir.mkdir(parents=True, exist_ok=True)- fd, tmp_name = tempfile.mkstemp(- prefix=".wallpaper-library.", suffix=".zip", dir=str(workdir)- )- tmp_path = Path(tmp_name)- # S310: the URL is the module's fixed https constant (or the owner's- # own ENV override / a test's file fixture), never request input.- request = urllib.request.Request( # noqa: S310- self._url, headers={"User-Agent": "PersonalJarvis-wallpaper-installer"}- )- try:- with os.fdopen(fd, "wb") as sink:- # S310: the URL is the module's fixed https constant (or the- # owner's own ENV override / a test's file fixture), never- # request input.- with urllib.request.urlopen(request, timeout=60) as response: # noqa: S310- length = response.headers.get("Content-Length")- if length and length.isdigit():- self._set(total=int(length))- received = 0- while True:- chunk = response.read(_DOWNLOAD_CHUNK)- if not chunk:- break- received += len(chunk)- if received > MAX_ARCHIVE_BYTES:- raise LibraryInstallError(- "The download is far larger than the library archive."- )- sink.write(chunk)- self._set(received=received)- return tmp_path- except (urllib.error.URLError, OSError, TimeoutError) as exc:- try:- tmp_path.unlink()- except OSError:- # Best-effort cleanup; the download error below is the report.- pass- reason = getattr(exc, "reason", None) or exc- raise LibraryInstallError(- f"Could not download the wallpaper library: {reason}"- ) from exc-- def _unpack(self, archive: Path) -> None:- """Extract into a staging directory, then move into the library root.-- Staged so a crash mid-extract cannot leave a half library that would- answer ``available: true`` with a fraction of the catalog. Every member- path is validated before a byte is written — the archive is downloaded- content, and this is the boundary where it could otherwise name a path- outside the library.- """- staging = Path(- tempfile.mkdtemp(- prefix=".wallpaper-library.unpack.", dir=str(self._library.root.parent)- )- )- try:- try:- with zipfile.ZipFile(archive) as bundle:- for member in bundle.infolist():- name = member.filename- parts = Path(name).parts- if (- not parts- or parts[0] not in {"images", "manifests"}- or ".." in parts- or name.startswith(("/", "\\"))- or ":" in name- ):- raise LibraryInstallError(- "The archive contains files it should not — refusing it."- )- if member.is_dir():- continue- target = staging.joinpath(*parts)- target.parent.mkdir(parents=True, exist_ok=True)- with bundle.open(member) as source, target.open("wb") as sink:- shutil.copyfileobj(source, sink)- except zipfile.BadZipFile as exc:- raise LibraryInstallError(- "The downloaded file is not a readable archive."- ) from exc- if not (staging / "manifests").is_dir() or not (staging / "images").is_dir():- raise LibraryInstallError(- "The archive is missing the library's manifests or images."- )-- root = self._library.root- if not root.exists():- os.replace(staging, root)- return- # The root already exists (thumbnails, an aborted earlier attempt):- # move the two content directories into it individually.- for sub in ("manifests", "images"):- target = root / sub- if target.exists():- shutil.rmtree(target, ignore_errors=True)- os.replace(staging / sub, target)- finally:- shutil.rmtree(staging, ignore_errors=True)---def register_wallpaper_routes(- app: FastAPI,- library: WallpaperLibrary | None = None,- uploads: WallpaperUploads | None = None,- installer: WallpaperLibraryInstaller | None = None,-) -> None:- """Mount the wallpaper endpoints under ``/api``.-- Deliberately under ``/api`` rather than a static mount of its own: that- prefix is already proxied by the Vite dev server, so the picker behaves- identically in development and in the packaged app.- """- lib = library or WallpaperLibrary()- own = uploads or WallpaperUploads()- setup = installer or WallpaperLibraryInstaller(lib)-- @app.get("/api/wallpapers")- async def list_wallpapers() -> dict[str, Any]:- return lib.catalog()-- # The library installer: how a fresh machine gets the five hundred- # wallpapers this repository deliberately does not carry.-- @app.get("/api/wallpapers/library")- async def library_status() -> dict[str, Any]:- return setup.status()-- @app.post("/api/wallpapers/library/install")- async def library_install() -> dict[str, Any]:- return setup.start()-- # The upload routes are declared before the ``{item_id}`` ones purely for- # reading order — they never collide, because every upload path carries the- # literal ``uploads`` segment at a depth the catalog routes do not use.-- @app.get("/api/wallpapers/uploads")- async def list_uploads() -> dict[str, Any]:- return {"items": [item.to_json() for item in own.list()]}-- @app.post("/api/wallpapers/uploads", response_model=None)- async def upload_wallpaper(- file: UploadFile = File(...), # noqa: B008 — FastAPI dependency default- ) -> dict[str, Any] | JSONResponse:- # Read with a ceiling rather than whole: UploadFile spools to disk, so- # an oversized upload must be refused before it is fully absorbed.- data = await file.read(MAX_UPLOAD_BYTES + 1)- try:- item = own.add(data, file.filename or "")- except UploadRejected as exc:- # The rejection reaches the owner as the response body itself.- return JSONResponse({"detail": exc.message}, status_code=exc.status_code)- return item.to_json()-- @app.patch("/api/wallpapers/uploads/{upload_id}", response_model=None)- async def retheme_upload(upload_id: str, body: dict[str, Any]) -> dict[str, Any] | JSONResponse:- try:- item = own.set_theme(upload_id, str(body.get("theme", "")))- except UploadRejected as exc:- # The rejection reaches the owner as the response body itself.- return JSONResponse({"detail": exc.message}, status_code=exc.status_code)- if item is None:- return JSONResponse({"detail": "Not Found"}, status_code=404)- return item.to_json()-- @app.delete("/api/wallpapers/uploads/{upload_id}", response_model=None)- async def delete_upload(upload_id: str) -> dict[str, Any] | JSONResponse:- if not own.remove(upload_id):- return JSONResponse({"detail": "Not Found"}, status_code=404)- return {"removed": upload_id}-- @app.get("/api/wallpapers/uploads/{upload_id}/thumb", response_model=None)- async def upload_thumb(upload_id: str) -> FileResponse | JSONResponse:- item = own.get(upload_id)- if item is None:- return JSONResponse({"detail": "Not Found"}, status_code=404)- return FileResponse(- str(own.thumbnail(item)),- media_type="image/webp",- headers=_CACHE_HEADERS,- )-- @app.get("/api/wallpapers/uploads/{upload_id}/full", response_model=None)- async def upload_full(upload_id: str) -> FileResponse | JSONResponse:- item = own.get(upload_id)- if item is None:- return JSONResponse({"detail": "Not Found"}, status_code=404)- return FileResponse(- str(item.path),- media_type="image/webp",- headers=_CACHE_HEADERS,- )-- @app.get("/api/wallpapers/{item_id}/thumb", response_model=None)- async def wallpaper_thumb(item_id: str) -> FileResponse | JSONResponse:- item = lib.get(item_id)- if item is None:- return JSONResponse({"detail": "Not Found"}, status_code=404)- return FileResponse(- str(lib.thumbnail(item)),- media_type="image/webp",- headers=_CACHE_HEADERS,- )-- @app.get("/api/wallpapers/{item_id}/full", response_model=None)- async def wallpaper_full(item_id: str) -> FileResponse | JSONResponse:- item = lib.get(item_id)- if item is None:- return JSONResponse({"detail": "Not Found"}, status_code=404)- return FileResponse(- str(item.path),- media_type="image/webp",- headers=_CACHE_HEADERS,- )diff --git a/scripts/build_wallpaper_thumbs.py b/scripts/build_wallpaper_thumbs.pydeleted file mode 100644index 6bc61e17d2..0000000000--- a/scripts/build_wallpaper_thumbs.py+++ /dev/null@@ -1,46 +0,0 @@-"""Pre-derive the grid thumbnails for the desktop-wallpaper library.--The server derives a missing thumbnail on demand, so this script is an-optimisation, not a prerequisite: it moves five hundred resizes off the first-visit to the Wallpaper section, where they would otherwise trickle in as the-grid scrolls.-- python scripts/build_wallpaper_thumbs.py--Re-running is cheap — thumbnails newer than their source are left alone.-"""--from __future__ import annotations--import sys-from concurrent.futures import ThreadPoolExecutor-from pathlib import Path--sys.path.insert(0, str(Path(__file__).resolve().parents[1]))--from jarvis.ui.web.wallpapers import WallpaperLibrary # noqa: E402---def main() -> int:- library = WallpaperLibrary()- items = list(library.items().values())- if not items:- print(f"No wallpaper library found at {library.root} — nothing to do.")- return 0-- print(f"Deriving thumbnails for {len(items)} wallpapers…")- derived = 0- # Pillow releases the GIL around encode/decode, so threads genuinely help- # here; the work is IO plus C-level image code, not Python bytecode.- with ThreadPoolExecutor() as pool:- for item, thumb in zip(items, pool.map(library.thumbnail, items), strict=True):- if thumb != item.path:- derived += 1- else:- print(f" ! fell back to the full image for {item.id}")- print(f"Done: {derived}/{len(items)} thumbnails available.")- return 0---if __name__ == "__main__":- raise SystemExit(main())diff --git a/tests/unit/marketplace/test_community_contents.py b/tests/unit/marketplace/test_community_contents.pyindex 59c331d6e9..623fc3ba26 100644--- a/tests/unit/marketplace/test_community_contents.py+++ b/tests/unit/marketplace/test_community_contents.py@@ -1,8 +1,8 @@"""Reading a community entry BEFORE installing it.The contents route is what makes the "nobody reviewed this" badge actionable:-it hands over the published bytes themselves. These tests pin the three kinds-(plugin manifests, skill text, wallpaper picture), the size ceiling, and the+it hands over the published bytes themselves. These tests pin both kinds+(plugin manifests, skill text), the size ceiling, and therule that a failed download degrades to an honest message instead of anexception."""@@ -68,14 +68,13 @@ def _index_payload() -> dict[str, Any]:"source_url": "https://github.com/PersonalJarvis/marketplace",}],+ # A registry build from before wallpapers were retired may still+ # publish the section; the contents route must treat it as unknown."wallpapers": [{"name": "rain-antenna-city","title": "Rain Antenna City",- "description": "Neon rooftops in the rain",- "publisher": "octocat","raw_url": "https://raw.example/wallpapers/rain-antenna-city.webp",- "theme": "dark",}],}@@ -165,44 +164,11 @@ async def test_unreachable_skill_file_degrades_to_a_message(@pytest.mark.asyncio-async def test_wallpaper_contents_are_the_picture(community_env: Path) -> None:+async def test_a_wallpaper_left_in_the_feed_has_no_contents(community_env: Path) -> None:+ """Wallpapers are no longer a marketplace kind — an old feed entry is unknown."""async with _client() as client:resp = await client.get("/api/marketplace/community/rain-antenna-city/contents")- data = resp.json()- assert data["kind"] == "wallpaper"- assert data["files"] == []- assert data["image_url"] == "https://raw.example/wallpapers/rain-antenna-city.webp"---async def test_a_wallpaper_published_as_image_url_still_previews(- community_env: Path,-) -> None:- """The published registry emits `image_url`, not `raw_url`.-- Judging the preview by `raw_url` alone told every real wallpaper that it- "publishes no downloadable image" — while the install, which asks for- `download_url`, would have fetched it happily.- """- payload = _index_payload()- payload["wallpapers"] = [- {- "name": "moonlit-wave",- "title": "Moonlit Wave",- "publisher": "octocat",- "image_url": "https://pages.example/wallpapers/moonlit-wave/wallpaper.webp",- }- ]- community_source._CACHE_PATH.write_text(- json.dumps({"fetched_at": time.time(), "index": payload}), encoding="utf-8"- )-- async with _client() as client:- resp = await client.get("/api/marketplace/community/moonlit-wave/contents")-- data = resp.json()- assert data["image_url"].endswith("moonlit-wave/wallpaper.webp")- assert data["error"] is None+ assert resp.status_code == 404@pytest.mark.asynciodiff --git a/tests/unit/marketplace/test_community_install_kinds.py b/tests/unit/marketplace/test_community_install_kinds.pyindex b264ea0993..4d48d0f06f 100644--- a/tests/unit/marketplace/test_community_install_kinds.py+++ b/tests/unit/marketplace/test_community_install_kinds.py@@ -1,7 +1,7 @@-"""Install-by-name across all three published kinds, and the origin it records.+"""Install-by-name across the published kinds, and the origin it records.-A marketplace page prints one line to copy for a plugin, a skill, and a-wallpaper alike. These tests pin the part the user actually sees afterwards:+A marketplace page prints one line to copy for a plugin and a skill alike.+These tests pin the part the user actually sees afterwards:the thing lands in the right store, and it is marked as having come from themarketplace — which is the only way any view can say so later.@@ -11,7 +11,6 @@ redirected into tmp. The network is never touched.from __future__ import annotations-import ioimport jsonimport timefrom pathlib import Path@@ -19,13 +18,10 @@ from typing import Anyimport httpximport pytest-from fastapi import FastAPI, HTTPException+from fastapi import FastAPIfrom jarvis.marketplace import catalog_data, community_sourcefrom jarvis.marketplace.usage_cards import loader as cards_loader-from jarvis.ui.web import marketplace_routes-from jarvis.ui.web import wallpapers as wallpapers_mod-from jarvis.ui.web.marketplace_routes import _download_imagefrom jarvis.ui.web.marketplace_routes import router as market_routerfrom jarvis.ui.web.skills_routes import router as skills_router@@ -60,37 +56,19 @@ def _index_payload() -> dict[str, Any]:"source_url": "https://github.com/PersonalJarvis/marketplace",}],+ # Wallpapers were retired as a marketplace kind. A registry build from+ # before that may still publish the section, so the fixture keeps one+ # entry to prove the app ignores it."wallpapers": [{"name": "moonlit-wave","title": "Moonlit Wave",- "description": "A dark wave under a full moon",- "publisher": "octocat",- "version": "1.0.0",- # The published registry emits `image_url` + `thumb_url` and- # leaves `raw_url` null — pinned here because reading the- # wrong field made every published wallpaper uninstallable."image_url": "https://pages.example/wallpapers/moonlit-wave/wallpaper.webp",- "thumb_url": "https://pages.example/wallpapers/moonlit-wave/thumb.webp",- "raw_url": None,- "license": "CC0-1.0",- "width": 1920,- "height": 1080,- "source_url": "https://github.com/PersonalJarvis/marketplace",- "theme": "dark",}],}-def _png_bytes(size: tuple[int, int] = (32, 18)) -> bytes:- from PIL import Image-- buffer = io.BytesIO()- Image.new("RGB", size, (12, 12, 20)).save(buffer, "PNG")- return buffer.getvalue()--@pytest.fixture()def env(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:"""Every store in tmp, one fresh index in the cache, no network."""@@ -104,9 +82,6 @@ def env(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:monkeypatch.setattr(catalog_data, "_DEFAULT_CATALOG_PATH", tmp_path / "plugin_catalog.json")monkeypatch.setattr(cards_loader, "_DATA_CARDS_DIR", tmp_path / "usage_cards")monkeypatch.setattr("jarvis.core.paths.user_skills_dir", lambda: tmp_path / "skills")- # The picker's own store: DATA_DIR is read when WallpaperUploads is built,- # so patching the module attribute is enough to relocate it.- monkeypatch.setattr(wallpapers_mod, "DATA_DIR", tmp_path / "wpdata")catalog_data.clear_cache()yield tmp_pathcatalog_data.clear_cache()@@ -114,7 +89,7 @@ def env(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:@pytest.fixture()def offline_downloads(monkeypatch: pytest.MonkeyPatch, env: Path) -> None:- """Serve both downloads locally: a SKILL.md and an image."""+ """Serve the SKILL.md download locally."""from jarvis.skills.finder import SkillFinderasync def fake_skill_install(self: Any, candidate: Any) -> Path:@@ -124,11 +99,7 @@ def offline_downloads(monkeypatch: pytest.MonkeyPatch, env: Path) -> None:target.write_text(_SKILL_MD, encoding="utf-8")return target- async def fake_image(raw_url: str, limit_bytes: int, **_: Any) -> bytes:- return _png_bytes()-monkeypatch.setattr(SkillFinder, "install", fake_skill_install)- monkeypatch.setattr(marketplace_routes, "_download_image", fake_image)def _client(env: Path, bus: Any = None) -> httpx.AsyncClient:@@ -160,120 +131,26 @@ class _RecordingBus:# -----------------------------------------------------------------------# Wallpapers+# Wallpapers are no longer a published kind# ----------------------------------------------------------------------@pytest.mark.asyncio-async def test_browse_lists_published_wallpapers(env: Path) -> None:+async def test_a_feed_that_still_lists_wallpapers_is_browsed_without_them(env: Path) -> None:+ """An older registry build may still carry `wallpapers`; the app ignores it."""async with _client(env) as client:resp = await client.get("/api/marketplace/community")- paper = resp.json()["wallpapers"][0]- assert paper["name"] == "moonlit-wave"- assert paper["title"] == "Moonlit Wave"- assert paper["installed"] is False- # The picture the install would fetch, whichever field the publisher used.- assert paper["image_url"].endswith("wallpaper.webp")- assert paper["raw_url"] == paper["image_url"]- assert paper["thumb_url"].endswith("thumb.webp")---async def test_the_download_url_comes_from_the_published_field(env: Path) -> None:- """Regression: the registry emits `image_url`, not `raw_url`.-- Reading only `raw_url` left every published wallpaper with no download at- all — browsable, and refused the moment anyone pressed install.- """- index, _ = await community_source.get_index()- paper = index.wallpapers[0]- assert paper.raw_url is None- assert paper.download_url == paper.image_url---async def test_a_non_https_image_url_is_dropped(monkeypatch: pytest.MonkeyPatch) -> None:- """The server fetches this URL — plain http would be an SSRF primitive."""- from jarvis.marketplace.community_source import CommunityWallpaperEntry-- entry = CommunityWallpaperEntry(- name="x", image_url="http://plain.example/a.webp", thumb_url="http://plain.example/t.webp"- )- assert entry.image_url is None- assert entry.download_url is None+ assert resp.status_code == 200+ body = resp.json()+ assert "wallpapers" not in body+ assert [s["name"] for s in body["skills"]] == ["three-point-check"]@pytest.mark.asyncio-async def test_install_stores_a_wallpaper_with_its_origin(- env: Path, offline_downloads: None-) -> None:- from jarvis.ui.web.wallpapers import WallpaperUploads-+async def test_a_wallpaper_name_is_not_installable(env: Path) -> None:async with _client(env) as client:resp = await client.post("/api/marketplace/community/install/moonlit-wave")- assert resp.status_code == 200- data = resp.json()- assert data["kind"] == "wallpaper"- assert data["title"] == "Moonlit Wave"- # A picture needs no connect step and no validation: usable at once.- assert data["ready"] is True- assert data["next_action"] == "none"-- browse = await client.get("/api/marketplace/community")- assert browse.json()["wallpapers"][0]["installed"] is True-- stored = WallpaperUploads().list()- assert len(stored) == 1- item = stored[0]- assert item.source == "marketplace"- assert item.origin is not None- assert item.origin.source_id == "moonlit-wave"- assert item.origin.publisher == "octocat"- assert item.to_json()["sourceId"] == "moonlit-wave"- # Re-encoded on the way in, exactly like a dragged-in file.- assert item.path.suffix == ".webp"---async def test_installing_the_same_wallpaper_twice_409s(- env: Path, offline_downloads: None-) -> None:- async with _client(env) as client:- first = await client.post("/api/marketplace/community/install/moonlit-wave")- assert first.status_code == 200- second = await client.post("/api/marketplace/community/install/moonlit-wave")- assert second.status_code == 409- assert "already" in second.json()["detail"]---async def test_theme_change_keeps_the_marketplace_origin(- env: Path, offline_downloads: None-) -> None:- """Flipping light/dark rewrites the sidecar — the origin must survive it."""- from jarvis.ui.web.wallpapers import WallpaperUploads-- async with _client(env) as client:- await client.post("/api/marketplace/community/install/moonlit-wave")- store = WallpaperUploads()- installed = store.list()[0]- store.set_theme(installed.id, "light")- reread = store.get(installed.id)- assert reread is not None- assert reread.theme == "light"- assert reread.source == "marketplace"- assert reread.origin is not None- assert reread.origin.source_id == "moonlit-wave"---async def test_an_ordinary_upload_stays_marked_as_the_owners_own(env: Path) -> None:- from jarvis.ui.web.wallpapers import WallpaperUploads-- item = WallpaperUploads().add(_png_bytes(), filename="my-photo.png")- assert item.source == "own"- assert item.origin is None- assert "sourceId" not in item.to_json()+ assert resp.status_code == 404# ----------------------------------------------------------------------@@ -282,9 +159,7 @@ async def test_an_ordinary_upload_stays_marked_as_the_owners_own(env: Path) -> N@pytest.mark.asyncio-async def test_install_writes_a_receipt_for_a_skill(- env: Path, offline_downloads: None-) -> None:+async def test_install_writes_a_receipt_for_a_skill(env: Path, offline_downloads: None) -> None:"""A downloaded SKILL.md says nothing about its origin — the receipt does."""from jarvis.skills.origin import read_origin@@ -327,94 +202,20 @@ def test_an_unreadable_receipt_costs_the_badge_not_the_skill(env: Path) -> None:assert read_origin(folder) is None-# -----------------------------------------------------------------------# The image download itself-# -------------------------------------------------------------------------async def test_download_refuses_an_oversized_image() -> None:- """The ceiling is enforced mid-stream, not after the body is absorbed."""-- def handler(request: httpx.Request) -> httpx.Response:- return httpx.Response(200, content=b"x" * 5000)-- with pytest.raises(HTTPException) as excinfo:- await _download_image(- "https://raw.example/big.png", 1000, transport=httpx.MockTransport(handler)- )- assert excinfo.value.status_code == 400- assert "larger than" in str(excinfo.value.detail)---async def test_download_refuses_a_redirect_off_https() -> None:- """The index checks the URL it was given; the redirect chain needs it too."""-- def handler(request: httpx.Request) -> httpx.Response:- if request.url.scheme == "https":- return httpx.Response(302, headers={"location": "http://plain.example/x.png"})- return httpx.Response(200, content=b"never reached")-- with pytest.raises(HTTPException) as excinfo:- await _download_image(- "https://raw.example/x.png", 10_000, transport=httpx.MockTransport(handler)- )- assert excinfo.value.status_code == 400- assert "non-https" in str(excinfo.value.detail)---async def test_download_returns_the_bytes_it_was_served() -> None:- payload = _png_bytes()-- def handler(request: httpx.Request) -> httpx.Response:- return httpx.Response(200, content=payload)-- got = await _download_image(- "https://raw.example/ok.png", 10_000_000, transport=httpx.MockTransport(handler)- )- assert got == payload--# ----------------------------------------------------------------------# Telling the open window about it# ----------------------------------------------------------------------@pytest.mark.asyncio-async def test_a_wallpaper_install_announces_itself(- env: Path, offline_downloads: None-) -> None:- """An install from a terminal has to reach the window that is already open.+async def test_a_skill_install_announces_its_own_kind(env: Path, offline_downloads: None) -> None:+ """One event per install: the receiver reloads only the lane that moved.- Nothing about `jarvis marketplace install` touches the desktop UI, so- without this announcement the picker kept showing the library the picture- was already in until the app was restarted.+ An install from a terminal has to reach the window that is already open —+ nothing about `jarvis marketplace install` touches the desktop UI."""from jarvis.core.events import MarketplaceItemInstalled- bus = _RecordingBus()- async with _client(env, bus) as client:- resp = await client.post("/api/marketplace/community/install/moonlit-wave")- assert resp.status_code == 200-- announced = [e for e in bus.events if isinstance(e, MarketplaceItemInstalled)]- assert len(announced) == 1- assert announced[0].kind == "wallpaper"- assert announced[0].item_id == "moonlit-wave"- # The picture is usable the moment it lands — the frontend uses this to- # decide whether it can say "done" or has to point at a next step.- assert announced[0].ready is True---async def test_a_skill_install_announces_its_own_kind(- env: Path, offline_downloads: None-) -> None:- """One event, three kinds: the receiver reloads only the lane that moved."""- from jarvis.core.events import MarketplaceItemInstalled-bus = _RecordingBus()async with _client(env, bus) as client:resp = await client.post("/api/marketplace/community/install/three-point-check")@@ -432,6 +233,6 @@ async def test_an_install_still_works_with_nobody_listening() -> None:"""Headless, or early boot: no bus, and the install must not care."""async with _client(env) as client:- resp = await client.post("/api/marketplace/community/install/moonlit-wave")+ resp = await client.post("/api/marketplace/community/install/three-point-check")assert resp.status_code == 200- assert resp.json()["ready"] is True+ assert resp.json()["kind"] == "skill"diff --git a/tests/unit/marketplace/test_publish_routes.py b/tests/unit/marketplace/test_publish_routes.pyindex ad1b9f983e..f02c899915 100644--- a/tests/unit/marketplace/test_publish_routes.py+++ b/tests/unit/marketplace/test_publish_routes.py@@ -88,26 +88,9 @@ async def test_identity_reports_disabled_deployment(client: httpx.AsyncClient, monkeypatch: pytest.MonkeyPatch) -> None:monkeypatch.setattr(publish, "publish_endpoint", lambda: "")- monkeypatch.setattr(publish, "publish_wallpaper_endpoint", lambda: "")async with client:state = (await client.get("/api/marketplace/publish/identity")).json()- assert state == {"enabled": False, "wallpapers_enabled": False, "signed_in": False}---async def test_the_two_lanes_are_reported_separately(- client: httpx.AsyncClient, monkeypatch: pytest.MonkeyPatch-) -> None:- """A fork may run one lane without the other, and each surface hides its- own button accordingly — so one flag cannot speak for both."""- monkeypatch.setattr(publish, "publish_endpoint", lambda: "")- monkeypatch.setattr(publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/w")- async with client:- state = (await client.get("/api/marketplace/publish/identity")).json()- assert state["enabled"] is False- assert state["wallpapers_enabled"] is True- # Still reports sign-in state: the wallpaper lane needs the same identity.- assert "signed_in" in state+ assert state == {"enabled": False, "signed_in": False}@pytest.mark.asynciodiff --git a/tests/unit/marketplace/test_publish_wallpaper.py b/tests/unit/marketplace/test_publish_wallpaper.pydeleted file mode 100644index cc10408a24..0000000000--- a/tests/unit/marketplace/test_publish_wallpaper.py+++ /dev/null@@ -1,426 +0,0 @@-"""The wallpaper publish lane: field rules, byte handling, submit — no network.--The lane's promise is narrower than the package lane's and its failures are-different in kind, so it gets its own file: a wallpaper carries no manifest to-validate, but it does carry bytes a stranger produced, and the rules that-matter most here are the ones about those bytes.-"""--from __future__ import annotations--import io-from typing import Any--import httpx-import pytest--from jarvis.marketplace import publish-from jarvis.marketplace.token_store import Tokens---def _draft(**overrides: Any) -> dict[str, Any]:- draft: dict[str, Any] = {- "title": "Rain Antenna City",- "description": "Neon rooftops in the rain.",- "license": "CC0-1.0",- "theme": "dark",- "rights": True,- }- draft.update(overrides)- return draft---class FakeStore:- def __init__(self, tokens: Tokens | None = None) -> None:- self._tokens = tokens-- def load(self, key: str) -> Tokens | None:- return self._tokens-- def save(self, key: str, tokens: Tokens) -> None:- self._tokens = tokens-- def delete(self, key: str) -> None:- self._tokens = None---def _png(width: int = 64, height: int = 32, *, with_exif: bool = False) -> bytes:- """A real PNG, optionally carrying EXIF, as a browser would hand one over."""- from PIL import Image-- image = Image.new("RGB", (width, height), (40, 60, 90))- buffer = io.BytesIO()- if with_exif:- exif = Image.Exif()- # 0x9286 = UserComment, 0x0001 under GPSInfo would be the interesting- # one in the field; either proves the round trip drops what it carried.- exif[0x9286] = "shot at home"- image.save(buffer, "PNG", exif=exif)- else:- image.save(buffer, "PNG")- return buffer.getvalue()---# --- validate_wallpaper_draft ------------------------------------------------def test_valid_draft_normalizes_to_the_form_the_endpoint_reads() -> None:- fields, errors = publish.validate_wallpaper_draft(_draft())- assert errors == []- assert fields == {- "title": "Rain Antenna City",- "license": "CC0-1.0",- "rights": "yes",- "description": "Neon rooftops in the rain.",- "theme": "dark",- }---def test_optional_fields_are_omitted_rather_than_sent_empty() -> None:- fields, errors = publish.validate_wallpaper_draft(_draft(description="", theme=""))- assert errors == [] and fields is not None- assert "description" not in fields and "theme" not in fields--- ("overrides", "field"),- [- ({"title": ""}, "title"),- ({"title": "x" * (publish.MAX_TITLE_CHARS + 1)}, "title"),- # Slugifies to nothing at the endpoint, which would 422 after the- # upload had already travelled.- ({"title": "!!! ---"}, "title"),- ({"description": "x" * (publish.MAX_DESCRIPTION_CHARS + 1)}, "description"),- ({"license": ""}, "license"),- ({"license": "MIT"}, "license"),- ({"license": "All rights reserved"}, "license"),- ({"theme": "sepia"}, "theme"),- ({"rights": False}, "rights"),- ],-)-def test_rejections_carry_the_field(overrides: dict[str, Any], field: str) -> None:- fields, errors = publish.validate_wallpaper_draft(_draft(**overrides))- assert fields is None- assert any(e["field"] == field for e in errors)---def test_every_advertised_license_is_accepted() -> None:- for license_id in publish.WALLPAPER_LICENSES:- fields, errors = publish.validate_wallpaper_draft(_draft(license=license_id))- assert errors == [] and fields is not None---def test_the_rights_statement_cannot_be_faked_with_a_truthy_string() -> None:- """``"no"`` is truthy in Python — the check must be identity, not truth."""- fields, errors = publish.validate_wallpaper_draft(_draft(rights="no"))- assert fields is None- assert any(e["field"] == "rights" for e in errors)---# --- prepare_wallpaper_image -------------------------------------------------def test_the_published_bytes_are_re_encoded_webp_not_the_originals() -> None:- original = _png()- encoded, filename = publish.prepare_wallpaper_image(original)- assert filename == "wallpaper.webp"- assert encoded[:4] == b"RIFF" and encoded[8:12] == b"WEBP"- assert encoded != original---def test_exif_does_not_survive_the_round_trip() -> None:- from PIL import Image-- carrying = _png(with_exif=True)- with Image.open(io.BytesIO(carrying)) as before:- assert dict(before.getexif()) # the fixture really did carry something-- encoded, _ = publish.prepare_wallpaper_image(carrying)- with Image.open(io.BytesIO(encoded)) as after:- assert not dict(after.getexif())---def test_an_oversized_picture_is_capped_at_4k_rather_than_refused() -> None:- from PIL import Image-- encoded, _ = publish.prepare_wallpaper_image(_png(5000, 2500))- with Image.open(io.BytesIO(encoded)) as result:- assert result.width == 3840---def test_a_picture_under_the_cap_keeps_its_size() -> None:- from PIL import Image-- encoded, _ = publish.prepare_wallpaper_image(_png(1200, 800))- with Image.open(io.BytesIO(encoded)) as result:- assert (result.width, result.height) == (1200, 800)--- ("data", "status"),- [- (b"", 422),- (b"not an image at all", 422),- # A forged header with no image behind it: the declared type never- # decides anything, the decoder does.- (b"\x89PNG\r\n\x1a\n" + b"junk" * 20, 422),- ],-)-def test_bytes_that_are_not_an_image_are_refused(data: bytes, status: int) -> None:- with pytest.raises(publish.SubmitError) as exc:- publish.prepare_wallpaper_image(data)- assert exc.value.status == status- assert exc.value.field == "file"---def test_the_result_stays_inside_the_endpoints_size_cap() -> None:- encoded, _ = publish.prepare_wallpaper_image(_png(3840, 2160))- assert len(encoded) <= publish.MAX_WALLPAPER_BYTES---# --- submit_wallpaper ---------------------------------------------------------async def test_submit_sends_bearer_multipart_and_returns_the_server_name(- monkeypatch: pytest.MonkeyPatch,-) -> None:- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )- seen: dict[str, Any] = {}-- def handler(request: httpx.Request) -> httpx.Response:- seen["auth"] = request.headers.get("Authorization")- seen["type"] = request.headers.get("Content-Type", "")- seen["body"] = request.content- return httpx.Response(201, json={"name": "rain-antenna-city"})-- fields, _ = publish.validate_wallpaper_draft(_draft())- assert fields is not None- result = await publish.submit_wallpaper(- fields,- b"IMAGEBYTES",- store=FakeStore(Tokens(access="tok")), # type: ignore[arg-type]- transport=httpx.MockTransport(handler),- )-- assert result == {"name": "rain-antenna-city"}- assert seen["auth"] == "Bearer tok"- assert seen["type"].startswith("multipart/form-data")- # The rights statement and the picture both have to be in the body — the- # endpoint refuses without either, and a form that quietly dropped one- # would fail far from where it was caused.- assert b'name="rights"' in seen["body"] and b"yes" in seen["body"]- assert b"IMAGEBYTES" in seen["body"]---async def test_the_client_never_claims_a_publisher(monkeypatch: pytest.MonkeyPatch) -> None:- """Identity comes from the token. Anything else would be a claim to check."""- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )- seen: dict[str, Any] = {}-- def handler(request: httpx.Request) -> httpx.Response:- seen["body"] = request.content- return httpx.Response(201, json={"name": "x"})-- fields, _ = publish.validate_wallpaper_draft(_draft())- assert fields is not None- await publish.submit_wallpaper(- fields,- b"IMAGEBYTES",- store=FakeStore(Tokens(access="tok")), # type: ignore[arg-type]- transport=httpx.MockTransport(handler),- )- assert b'name="publisher"' not in seen["body"]- assert b'name="publisher_id"' not in seen["body"]---async def test_submit_without_a_token_is_401(monkeypatch: pytest.MonkeyPatch) -> None:- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )- with pytest.raises(publish.SubmitError) as exc:- await publish.submit_wallpaper({"title": "x"}, b"bytes", store=FakeStore(None)) # type: ignore[arg-type]- assert exc.value.status == 401---async def test_the_quota_refusal_reaches_the_user_verbatim(- monkeypatch: pytest.MonkeyPatch,-) -> None:- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )- with pytest.raises(publish.SubmitError) as exc:- await publish.submit_wallpaper(- {"title": "x"},- b"bytes",- store=FakeStore(Tokens(access="tok")), # type: ignore[arg-type]- transport=httpx.MockTransport(- lambda request: httpx.Response(- 429, json={"error": "daily limit of 3 wallpaper uploads reached"}- )- ),- )- assert exc.value.status == 429- assert "daily limit" in exc.value.error---async def test_a_deployment_without_the_lane_says_so(monkeypatch: pytest.MonkeyPatch) -> None:- monkeypatch.setattr(publish, "publish_wallpaper_endpoint", lambda: "")- with pytest.raises(publish.SubmitError) as exc:- await publish.submit_wallpaper({"title": "x"}, b"bytes", store=FakeStore(None)) # type: ignore[arg-type]- assert exc.value.status == 503---async def test_an_unreachable_endpoint_is_502_not_a_crash(- monkeypatch: pytest.MonkeyPatch,-) -> None:- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )-- def boom(request: httpx.Request) -> httpx.Response:- raise httpx.ConnectError("no route to host")-- with pytest.raises(publish.SubmitError) as exc:- await publish.submit_wallpaper(- {"title": "x"},- b"bytes",- store=FakeStore(Tokens(access="tok")), # type: ignore[arg-type]- transport=httpx.MockTransport(boom),- )- assert exc.value.status == 502---# --- live_status --------------------------------------------------------------async def test_live_status_sees_a_published_wallpaper(monkeypatch: pytest.MonkeyPatch) -> None:- """A wallpaper is live when the same feed the store reads carries it."""- from jarvis.marketplace import community_source-- index = community_source.CommunityIndex(- revision=13,- wallpapers=[- {- "name": "rain-antenna-city",- "version": "1.0.0",- "title": "Rain Antenna City",- "image_url": "https://example.invalid/rain.webp",- }- ],- )-- async def fake_get_index(force: bool = False) -> tuple[Any, str]:- return index, "ok"-- monkeypatch.setattr(community_source, "get_index", fake_get_index)- assert (await publish.live_status("rain-antenna-city", "1.0.0"))["live"] is True- assert (await publish.live_status("rain-antenna-city", "2.0.0"))["live"] is False---# --- POST /api/marketplace/publish/submit-wallpaper ---------------------------def route_client(monkeypatch: pytest.MonkeyPatch, tmp_path: Any) -> Any:- """The route wired to a wallpaper store on disk and a stubbed endpoint."""- from fastapi import FastAPI-- from jarvis.ui.web import marketplace_publish_routes as routes- from jarvis.ui.web.wallpapers import WallpaperUploads-- store = WallpaperUploads(root=tmp_path / "uploads")- monkeypatch.setattr(routes, "TokenStore", lambda: FakeStore(Tokens(access="tok")))- monkeypatch.setattr("jarvis.ui.web.wallpapers.WallpaperUploads", lambda: store)- monkeypatch.setattr(- publish, "publish_wallpaper_endpoint", lambda: "https://pj.example/api/submit-wallpaper"- )-- async def fake_submit(fields: Any, image: bytes, filename: str = "wallpaper.webp") -> Any:- return {"name": "rain-antenna-city"}-- monkeypatch.setattr(publish, "submit_wallpaper", fake_submit)-- app = FastAPI()- app.include_router(routes.router)- client = httpx.AsyncClient(transport=httpx.ASGITransport(app=app), base_url="http://t")- return client, store---async def test_route_publishes_one_of_the_pickers_own_pictures(route_client: Any) -> None:- client, store = route_client- item = store.add(_png(), "my-city.png")- async with client:- resp = await client.post(- "/api/marketplace/publish/submit-wallpaper",- json={**_draft(), "upload_id": item.id},- )- assert resp.status_code == 200- body = resp.json()- assert body["name"] == "rain-antenna-city"- assert body["version"] == "1.0.0"- # The line other people will run to get it — computed by the same module- # the store and the CLI use, never spelled out in the view.- assert body["install"]---async def test_route_refuses_to_republish_an_imported_community_picture(- route_client: Any,-) -> None:- """Someone else's wallpaper must not get a new author by passing through- the picker — that would launder authorship, not share a picture."""- client, store = route_client- from jarvis.ui.web.wallpapers import WallpaperOrigin-- item = store.add(- _png(),- "borrowed.png",- source="marketplace",- origin=WallpaperOrigin(source_id="rain-antenna-city", publisher="someone"),- )- async with client:- resp = await client.post(- "/api/marketplace/publish/submit-wallpaper",- json={**_draft(), "upload_id": item.id},- )- assert resp.status_code == 409- assert "community" in resp.json()["detail"]["error"]---async def test_route_reports_a_vanished_picture_as_404(route_client: Any) -> None:- client, _ = route_client- async with client:- resp = await client.post(- "/api/marketplace/publish/submit-wallpaper",- json={**_draft(), "upload_id": "u0000000000000000"},- )- assert resp.status_code == 404---async def test_route_checks_the_fields_before_it_touches_the_image(- route_client: Any,-) -> None:- client, _ = route_client- async with client:- resp = await client.post(- "/api/marketplace/publish/submit-wallpaper",- # No upload exists under this id — a 422 rather than a 404 proves- # the field check ran first, which is what the form needs.- json={**_draft(), "upload_id": "u0000000000000000", "rights": False},- )- assert resp.status_code == 422- assert resp.json()["detail"]["field"] == "rights"diff --git a/tests/unit/plugins/tool/test_app_command.py b/tests/unit/plugins/tool/test_app_command.pyindex 35678ca624..e0f33d0621 100644--- a/tests/unit/plugins/tool/test_app_command.py+++ b/tests/unit/plugins/tool/test_app_command.py@@ -55,8 +55,8 @@ def _fake_app(calls: dict) -> FastAPI:async def marketplace_install(item_id: str) -> dict:calls["marketplace_install"] = item_idreturn {- "ok": True, "kind": "wallpaper", "id": item_id,- "title": "Rain Antenna City", "state": "installed",+ "ok": True, "kind": "skill", "id": item_id,+ "title": "Three Bullet Brief", "state": "installed","ready": True, "next_action": "none",}@@ -393,7 +393,7 @@ def test_a_one_word_state_is_not_mistaken_for_a_snapshot() -> None:"""from jarvis.plugins.tool.app_command import _without_snapshots- trimmed = _without_snapshots({"ok": True, "kind": "wallpaper", "state": "installed"})+ trimmed = _without_snapshots({"ok": True, "kind": "skill", "state": "installed"})assert trimmed["state"] == "installed"@@ -416,19 +416,19 @@ def test_installing_from_the_marketplace_needs_a_spoken_confirmation() -> None:assert tools["marketplace-browse"].risk_tier == "monitor"-async def test_installing_a_wallpaper_by_name_reports_what_landed() -> None:+async def test_installing_a_skill_by_name_reports_what_landed() -> None:"""The prompt path is the CLI path: same route, same honest answer."""calls: dict = {}tools = _tools(calls)result = await tools["marketplace-install"].execute(- {"item_id": "rain-antenna-city"}, SimpleNamespace()+ {"item_id": "three-bullet-brief"}, SimpleNamespace())assert result.success is True- assert calls["marketplace_install"] == "rain-antenna-city"+ assert calls["marketplace_install"] == "three-bullet-brief"response = result.output["response"]- assert response["kind"] == "wallpaper"+ assert response["kind"] == "skill"# What the user asks next is "did it work" — the answer must carry the# verdict, not just an `ok: true` the model would have to interpret.assert response["state"] == "installed"diff --git a/tests/unit/ui/test_desktop_webview_profile.py b/tests/unit/ui/test_desktop_webview_profile.pyindex 53440d2b22..f456c5f86f 100644--- a/tests/unit/ui/test_desktop_webview_profile.py+++ b/tests/unit/ui/test_desktop_webview_profile.py@@ -2,7 +2,7 @@pywebview defaults to ``private_mode=True`` — a fresh WebView2 profile in``%TEMP%`` per launch — and everything the frontend stores in ``localStorage``-(the wallpaper pick, the deck/classic surface, pane sizes, favourites, the+(the deck/classic surface, pane sizes, favourites, thetheme cache the boot script paints the first frame from) died with theprocess. Forensic 2026-08-18: after every restart the interface wore lightchrome over the dark bundled artwork, because the light pick was gone whilediff --git a/tests/unit/ui/test_wallpaper_routes.py b/tests/unit/ui/test_wallpaper_routes.pydeleted file mode 100644index 4c93bc6959..0000000000--- a/tests/unit/ui/test_wallpaper_routes.py+++ /dev/null@@ -1,553 +0,0 @@-"""Tests for the desktop-wallpaper library endpoints.--Contract (see jarvis/ui/web/wallpapers.py):-- GET /api/wallpapers -> catalog metadata; ``available: false``- instead of an error when the generated- library is not installed.-- GET /api/wallpapers/{id}/thumb -> a small derived WebP for the browse- grid, cached on disk after the first- request. Never the full-size file when- Pillow is available.-- GET /api/wallpapers/{id}/full -> the original 1920x1080 artwork.-- Unknown or malformed ids -> 404, including ids that try to walk out- of the library directory.-- POST /api/wallpapers/uploads -> store one of the owner's own pictures,- re-encoded, with a guessed light/dark.-- GET/PATCH/DELETE .../uploads[/{id}] -> list them, correct the guess, remove one.--The library itself is content living under a git-ignored ``data/`` directory,-so these tests build a miniature one in a tmp_path rather than depending on the-five hundred generated files being present.-"""--from __future__ import annotations--import io-import json-from pathlib import Path--import pytest-from fastapi import FastAPI-from fastapi.testclient import TestClient--from jarvis.ui.web.wallpapers import (- MAX_UPLOAD_BYTES,- THUMB_WIDTH,- UPLOAD_MAX_WIDTH,- WallpaperLibrary,- WallpaperLibraryInstaller,- WallpaperUploads,- register_wallpaper_routes,-)---def _write_wallpaper(path: Path, color: tuple[int, int, int]) -> None:- from PIL import Image-- path.parent.mkdir(parents=True, exist_ok=True)- Image.new("RGB", (1920, 1080), color).save(path, "WEBP", quality=80)---def library(tmp_path: Path) -> WallpaperLibrary:- """A two-entry library with the same shape as the generated one."""- root = tmp_path / "jarvis-wallpaper-gallery"- _write_wallpaper(root / "images" / "01-cinematic-photoreal" / "01.webp", (12, 18, 30))- _write_wallpaper(root / "images" / "03-anime-neon" / "01.webp", (220, 90, 200))-- manifests = root / "manifests"- manifests.mkdir(parents=True)- (manifests / "01-cinematic-photoreal.json").write_text(- json.dumps(- [- {- "id": "01-cinematic-photoreal-01",- "title": "Flooded Observatory",- "style": "Cinematic Photorealistic",- "theme": "dark",- "file": "images/01-cinematic-photoreal/01.webp",- "prompt": "…",- }- ]- ),- encoding="utf-8",- )- # A manifest whose `style` is still a slug — the loader is expected to make- # it presentable rather than show "anime-neon" beside written-out names.- (manifests / "03-anime-neon.json").write_text(- json.dumps(- [- {- "id": "03-anime-neon-01",- "title": "Neon Crossing",- "style": "anime-neon",- "theme": "light",- "file": "images/03-anime-neon/01.webp",- "prompt": "…",- }- ]- ),- encoding="utf-8",- )- return WallpaperLibrary(root)---def uploads(tmp_path: Path) -> WallpaperUploads:- """An empty upload store, well away from the maintainer's real one."""- return WallpaperUploads(tmp_path / "jarvis-wallpaper-uploads")---def client(library: WallpaperLibrary, uploads: WallpaperUploads) -> TestClient:- app = FastAPI()- register_wallpaper_routes(app, library, uploads)- return TestClient(app)---def _image_bytes(- color: tuple[int, int, int],- size: tuple[int, int] = (1920, 1080),- fmt: str = "PNG",-) -> bytes:- from PIL import Image-- buffer = io.BytesIO()- Image.new("RGB", size, color).save(buffer, fmt)- return buffer.getvalue()---def _upload(client: TestClient, data: bytes, name: str = "my holiday_photo.png") -> dict:- response = client.post(- "/api/wallpapers/uploads",- files={"file": (name, data, "image/png")},- )- assert response.status_code == 200, response.text- return response.json()---def test_catalog_lists_every_entry(client: TestClient) -> None:- payload = client.get("/api/wallpapers").json()-- assert payload["available"] is True- assert payload["count"] == 2- assert {item["id"] for item in payload["items"]} == {- "01-cinematic-photoreal-01",- "03-anime-neon-01",- }- assert {style["slug"] for style in payload["styles"]} == {- "01-cinematic-photoreal",- "03-anime-neon",- }---def test_catalog_carries_no_image_bytes(client: TestClient) -> None:- """The grid is built from metadata; the pictures come later, one by one."""- payload = client.get("/api/wallpapers").json()-- assert set(payload["items"][0]) == {"id", "title", "style", "styleLabel", "theme"}---def test_slug_style_labels_are_made_readable(client: TestClient) -> None:- payload = client.get("/api/wallpapers").json()- labels = {item["id"]: item["styleLabel"] for item in payload["items"]}-- assert labels["03-anime-neon-01"] == "Anime Neon"---def test_missing_library_reports_itself_absent(tmp_path: Path) -> None:- app = FastAPI()- register_wallpaper_routes(app, WallpaperLibrary(tmp_path / "nothing-here"))-- payload = TestClient(app).get("/api/wallpapers").json()-- assert payload == {"available": False, "count": 0, "styles": [], "items": []}---def test_thumbnail_is_far_smaller_than_the_original(- client: TestClient, library: WallpaperLibrary-) -> None:- from PIL import Image-- response = client.get("/api/wallpapers/01-cinematic-photoreal-01/thumb")-- assert response.status_code == 200- assert response.headers["content-type"] == "image/webp"- original = library.get("01-cinematic-photoreal-01")- assert original is not None- assert len(response.content) < original.path.stat().st_size-- with Image.open(io.BytesIO(response.content)) as thumb:- assert thumb.width == THUMB_WIDTH---def test_thumbnail_is_cached_on_disk(client: TestClient, library: WallpaperLibrary) -> None:- client.get("/api/wallpapers/01-cinematic-photoreal-01/thumb")-- cached = library.root / ".thumbs" / "01-cinematic-photoreal" / "01-cinematic-photoreal-01.webp"- assert cached.is_file()- # No leftover staging files from the atomic write.- assert not list(cached.parent.glob("*.part"))---def test_full_serves_the_original_artwork(client: TestClient, library: WallpaperLibrary) -> None:- response = client.get("/api/wallpapers/01-cinematic-photoreal-01/full")-- original = library.get("01-cinematic-photoreal-01")- assert original is not None- assert response.status_code == 200- assert response.content == original.path.read_bytes()--- "item_id",- [- "does-not-exist-01",- "../../../etc/passwd",- "01-cinematic-photoreal-01/../../../secret",- "",- ],-)-def test_unknown_ids_are_refused(client: TestClient, item_id: str) -> None:- assert client.get(f"/api/wallpapers/{item_id}/full").status_code == 404---# -----------------------------------------------------------------------# Uploads — the owner's own pictures.-# -------------------------------------------------------------------------def test_upload_is_listed_and_served(client: TestClient) -> None:- item = _upload(client, _image_bytes((10, 12, 20)))-- listed = client.get("/api/wallpapers/uploads").json()["items"]- assert [entry["id"] for entry in listed] == [item["id"]]-- full = client.get(f"/api/wallpapers/uploads/{item['id']}/full")- assert full.status_code == 200- assert full.headers["content-type"] == "image/webp"---def test_upload_keeps_the_library_catalog_untouched(client: TestClient) -> None:- """Two stores, two endpoints: an upload is not a library entry."""- _upload(client, _image_bytes((10, 12, 20)))-- catalog = client.get("/api/wallpapers").json()-- assert catalog["count"] == 2- assert all(not item["id"].startswith("u") for item in catalog["items"])---def test_upload_title_comes_from_the_file_name(client: TestClient) -> None:- item = _upload(client, _image_bytes((10, 12, 20)), name="sunset_over-the_bay.jpg")-- assert item["title"] == "sunset over the bay"---def test_upload_without_a_usable_name_still_gets_a_title(client: TestClient) -> None:- item = _upload(client, _image_bytes((10, 12, 20)), name="___.png")-- assert item["title"] == "Your wallpaper"---def test_dark_and_light_pictures_are_told_apart(client: TestClient) -> None:- """The guess is what decides which mode the app switches into."""- night = _upload(client, _image_bytes((8, 10, 24)))- noon = _upload(client, _image_bytes((238, 236, 228)))-- assert night["theme"] == "dark"- assert noon["theme"] == "light"---def test_the_guess_can_be_corrected(client: TestClient) -> None:- item = _upload(client, _image_bytes((8, 10, 24)))-- response = client.patch(f"/api/wallpapers/uploads/{item['id']}", json={"theme": "light"})-- assert response.status_code == 200- assert response.json()["theme"] == "light"- listed = client.get("/api/wallpapers/uploads").json()["items"]- assert listed[0]["theme"] == "light"---def test_a_nonsense_theme_is_refused(client: TestClient) -> None:- item = _upload(client, _image_bytes((8, 10, 24)))-- response = client.patch(f"/api/wallpapers/uploads/{item['id']}", json={"theme": "sepia"})-- assert response.status_code == 400---def test_oversized_pictures_are_scaled_down_on_the_way_in(client: TestClient) -> None:- """A wallpaper never needs more pixels than the largest desktop."""- from PIL import Image-- item = _upload(client, _image_bytes((30, 40, 50), size=(6000, 3000)))-- full = client.get(f"/api/wallpapers/uploads/{item['id']}/full")- with Image.open(io.BytesIO(full.content)) as stored:- assert stored.width == UPLOAD_MAX_WIDTH---def test_upload_thumbnail_is_derived_and_cached(- client: TestClient, uploads: WallpaperUploads-) -> None:- from PIL import Image-- item = _upload(client, _image_bytes((30, 40, 50)))-- response = client.get(f"/api/wallpapers/uploads/{item['id']}/thumb")-- assert response.status_code == 200- with Image.open(io.BytesIO(response.content)) as thumb:- assert thumb.width == THUMB_WIDTH- assert (uploads.root / ".thumbs" / f"{item['id']}.webp").is_file()---def test_a_file_that_is_not_an_image_is_refused(client: TestClient) -> None:- """A forged content type must not put arbitrary bytes on disk."""- response = client.post(- "/api/wallpapers/uploads",- files={"file": ("payload.png", b"MZ\x90\x00 not a picture", "image/png")},- )-- assert response.status_code == 400- assert client.get("/api/wallpapers/uploads").json()["items"] == []---def test_an_empty_file_is_refused(client: TestClient) -> None:- response = client.post(- "/api/wallpapers/uploads", files={"file": ("empty.png", b"", "image/png")}- )-- assert response.status_code == 400---def test_an_oversized_file_is_refused_rather_than_absorbed(client: TestClient) -> None:- response = client.post(- "/api/wallpapers/uploads",- files={"file": ("huge.png", b"\x00" * (MAX_UPLOAD_BYTES + 1), "image/png")},- )-- assert response.status_code == 413---def test_deleting_an_upload_removes_every_trace(- client: TestClient, uploads: WallpaperUploads-) -> None:- item = _upload(client, _image_bytes((30, 40, 50)))- client.get(f"/api/wallpapers/uploads/{item['id']}/thumb")-- assert client.delete(f"/api/wallpapers/uploads/{item['id']}").status_code == 200-- assert client.get("/api/wallpapers/uploads").json()["items"] == []- assert client.get(f"/api/wallpapers/uploads/{item['id']}/full").status_code == 404- assert list(uploads.root.glob(f"{item['id']}*")) == []- assert not (uploads.root / ".thumbs" / f"{item['id']}.webp").exists()---def test_deleting_something_that_is_not_there_is_a_404(client: TestClient) -> None:- assert client.delete("/api/wallpapers/uploads/u0123456789abcdef").status_code == 404--- "upload_id",- [- "../../../etc/passwd",- "01-cinematic-photoreal-01",- "u00",- "uZZZZZZZZZZZZZZZZ",- "u0123456789abcdef%0A",- ],-)-def test_malformed_upload_ids_are_refused(client: TestClient, upload_id: str) -> None:- assert client.get(f"/api/wallpapers/uploads/{upload_id}/full").status_code == 404- assert client.delete(f"/api/wallpapers/uploads/{upload_id}").status_code == 404---def test_uploads_are_listed_newest_first(client: TestClient) -> None:- """The picture just added is the one being looked for."""- first = _upload(client, _image_bytes((10, 10, 10)), name="one.png")- second = _upload(client, _image_bytes((20, 20, 20)), name="two.png")-- listed = client.get("/api/wallpapers/uploads").json()["items"]-- assert [entry["id"] for entry in listed] == [second["id"], first["id"]]---def test_an_upload_survives_a_lost_sidecar(client: TestClient, uploads: WallpaperUploads) -> None:- """The picture is the irreplaceable half; a missing title must not hide it."""- item = _upload(client, _image_bytes((10, 10, 10)))- (uploads.root / f"{item['id']}.json").unlink()-- listed = client.get("/api/wallpapers/uploads").json()["items"]-- assert [entry["id"] for entry in listed] == [item["id"]]- assert listed[0]["title"] == "Your wallpaper"---def test_a_missing_upload_directory_is_an_empty_list_not_an_error(- tmp_path: Path,-) -> None:- app = FastAPI()- register_wallpaper_routes(- app,- WallpaperLibrary(tmp_path / "nothing-here"),- WallpaperUploads(tmp_path / "no-uploads-either"),- )-- assert TestClient(app).get("/api/wallpapers/uploads").json() == {"items": []}---def test_manifest_paths_pointing_outside_the_library_are_dropped(- tmp_path: Path,-) -> None:- """A hand-edited manifest must not turn the server into a file browser."""- root = tmp_path / "gallery"- _write_wallpaper(root / "images" / "01-style" / "01.webp", (1, 2, 3))- secret = tmp_path / "secret.webp"- _write_wallpaper(secret, (9, 9, 9))-- manifests = root / "manifests"- manifests.mkdir(parents=True)- (manifests / "01-style.json").write_text(- json.dumps(- [- {- "id": "01-style-01",- "title": "Escape",- "style": "Style",- "theme": "dark",- "file": "images/../../secret.webp",- "prompt": "…",- }- ]- ),- encoding="utf-8",- )-- assert WallpaperLibrary(root).items() == {}---# ----------------------------------------------------------------------------# The library installer: how a fresh machine gets the five hundred wallpapers-# the repository deliberately does not carry.-# ------------------------------------------------------------------------------def _library_archive(tmp_path: Path, name: str = "library.zip") -> Path:- """A miniature packaged library, shaped like the released one."""- import zipfile-- image = tmp_path / "src-image.webp"- _write_wallpaper(image, (30, 40, 50))- manifest = [- {- "id": "01-cinematic-photoreal-01",- "title": "Flooded Observatory",- "style": "Cinematic Photorealistic",- "theme": "dark",- "file": "images/01-cinematic-photoreal/01.webp",- }- ]- archive = tmp_path / name- with zipfile.ZipFile(archive, "w") as bundle:- bundle.writestr("manifests/01-cinematic-photoreal.json", json.dumps(manifest))- bundle.write(image, "images/01-cinematic-photoreal/01.webp")- return archive---def _wait_for_install(client: TestClient, timeout: float = 10.0) -> dict:- """Poll the status endpoint until the daemon thread settles."""- import time-- deadline = time.monotonic() + timeout- while time.monotonic() < deadline:- status = client.get("/api/wallpapers/library").json()- if status["state"] in {"done", "error"}:- return status- time.sleep(0.02)- pytest.fail(f"install never settled: {status}")---def _install_client(tmp_path: Path, archive_name: str = "library.zip") -> TestClient:- """An app whose installer pulls from a local archive instead of GitHub."""- library = WallpaperLibrary(tmp_path / "data" / "jarvis-wallpaper-gallery")- installer = WallpaperLibraryInstaller(- library, url=(tmp_path / archive_name).as_uri()- )- app = FastAPI()- register_wallpaper_routes(- app, library, WallpaperUploads(tmp_path / "uploads"), installer- )- return TestClient(app)---def test_installing_the_library_fills_the_catalog(tmp_path: Path) -> None:- _library_archive(tmp_path)- client = _install_client(tmp_path)- assert client.get("/api/wallpapers").json()["available"] is False-- started = client.post("/api/wallpapers/library/install").json()- assert started["state"] in {"downloading", "unpacking", "done"}- assert _wait_for_install(client)["state"] == "done"-- payload = client.get("/api/wallpapers").json()- assert payload["available"] is True- assert payload["items"][0]["id"] == "01-cinematic-photoreal-01"- # The downloaded archive and the staging directory are cleaned up.- leftovers = list((tmp_path / "data").glob(".wallpaper-library*"))- assert leftovers == []---def test_an_already_installed_library_is_not_downloaded_again(- tmp_path: Path, library: WallpaperLibrary-) -> None:- installer = WallpaperLibraryInstaller(library, url="https://127.0.0.1:1/nope.zip")- app = FastAPI()- register_wallpaper_routes(app, library, WallpaperUploads(tmp_path / "u"), installer)- client = TestClient(app)-- assert client.get("/api/wallpapers/library").json()["installed"] is True- # Starting anyway is a no-op answered with "done", not a download attempt.- assert client.post("/api/wallpapers/library/install").json()["state"] == "done"---def test_an_unreachable_archive_is_an_error_state_not_a_crash(tmp_path: Path) -> None:- client = _install_client(tmp_path, archive_name="missing.zip")-- client.post("/api/wallpapers/library/install")- status = _wait_for_install(client)-- assert status["state"] == "error"- assert status["error"]- assert client.get("/api/wallpapers").json()["available"] is False---def test_an_archive_reaching_outside_the_library_is_refused(tmp_path: Path) -> None:- """Zip-slip: a member path must not be able to escape the staging area."""- import zipfile-- archive = tmp_path / "library.zip"- with zipfile.ZipFile(archive, "w") as bundle:- bundle.writestr("manifests/01-style.json", "[]")- bundle.writestr("images/../../evil.txt", "gotcha")- client = _install_client(tmp_path)-- client.post("/api/wallpapers/library/install")- status = _wait_for_install(client)-- assert status["state"] == "error"- assert not (tmp_path / "evil.txt").exists()- assert not (tmp_path / "data" / "jarvis-wallpaper-gallery").exists()---def test_an_archive_that_is_not_a_zip_is_refused(tmp_path: Path) -> None:- (tmp_path / "library.zip").write_bytes(b"this is an html error page")- client = _install_client(tmp_path)-- client.post("/api/wallpapers/library/install")- status = _wait_for_install(client)-- assert status["state"] == "error"- assert "archive" in status["error"]