Skip to content

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

feat(ui): provider rows with original brand marks on the API Keys screen

rubenluetke10-beep2f8caafecd85
diff --git a/jarvis/ui/web/frontend/src/assets/providers/LOGOS.md b/jarvis/ui/web/frontend/src/assets/providers/LOGOS.md
new file mode 100644
index 0000000000..0c0614011d
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/LOGOS.md
@@ -0,0 +1,64 @@
+# Bundled provider marks
+
+The **original** mark of each AI provider family, bundled so the API-Keys &
+Providers screen renders offline and on a headless host without calling any
+third party at render time. Same rules and same gate as the plugin marks in
+`../brands/LOGOS.md` (`scripts/ci/check_brand_logos.py` covers both folders).
+
+Every mark belongs to its owner. They are used **solely to identify the service
+a provider card connects to** — nominative use — and never to imply that the
+owner endorses, sponsors or is affiliated with this project. If you own a mark
+listed here and want it removed, open an issue and it will be taken out.
+
+> A CC0 or MIT licence on an SVG settles the **copyright in the drawing**. It
+> does not grant **trademark** rights, and no entry below claims otherwise.
+
+## How a card picks a mark
+
+`ProviderLogo.tsx` maps a provider id to a **family** (every Gemini card —
+brain, STT, TTS, Live — draws the one Gemini mark) and the family to a file
+here. A family with no file, and the on-device engines (Whisper, Piper,
+Nemotron, a self-hosted server) that are capabilities rather than brands, draw
+a neutral glyph or monogram on the same tile, so adding a provider never
+produces a broken image.
+
+Two render paths, chosen per file and recorded in the table:
+
+* **colour** — the vendor's full-colour mark (Gemini's gradient spark, the
+ Google Cloud hexagon, NVIDIA's green eye). Drawn as an `<img>` on a neutral
+ tile; the colours are the brand and are never recoloured.
+* **mono** — a single-colour glyph whose own brand is black-on-white or
+ white-on-black (OpenAI, xAI, OpenRouter, Groq, Ollama, ElevenLabs). Drawn as
+ a CSS mask over the current text ink, so it follows the theme by itself:
+ near-white on the dark app, near-black on paper, from one asset.
+* **own ground** — a lockup that carries its own background (Cartesia's green
+ square, Inworld's transparent PNG). Drawn as an `<img>` untouched.
+
+## Adding one
+
+1. Take the mark from the vendor's own brand/press page, or from a
+ permissively-licensed collection that redistributes vendor originals
+ (lobehub/lobe-icons is MIT and covers nearly every AI provider).
+2. Prefer the **icon** variant over the wordmark.
+3. Strip scripts, external references and embedded raster images; keep a
+ roughly square `viewBox`. Root-level `width`/`height`/`style` go too — the
+ tile sizes the mark.
+4. Save it as `<family>.svg` and add the family to `PROVIDER_FAMILY_LOGOS` in
+ `ProviderLogo.tsx`.
+5. Add a row below. An entry without a row is a licence gap, not a shortcut.
+
+| family | Source | Legal basis | Render | Added |
+| --- | --- | --- | --- | --- |
+| antigravity | lobehub/lobe-icons `antigravity-color.svg` | MIT | colour | 2026-08-23 |
+| cartesia | Cartesia's own site icon, `https://cartesia.ai/favicon.svg` | vendor asset | own ground | 2026-08-23 |
+| claude | lobehub/lobe-icons `claude-color.svg` | MIT | colour | 2026-08-23 |
+| elevenlabs | lobehub/lobe-icons `elevenlabs.svg` | MIT | mono | 2026-08-23 |
+| gemini | lobehub/lobe-icons `gemini-color.svg` | MIT | colour | 2026-08-23 |
+| google-cloud | lobehub/lobe-icons `googlecloud-color.svg` (Vertex AI cards) | MIT | colour | 2026-08-23 |
+| groq | lobehub/lobe-icons `groq.svg` | MIT | mono | 2026-08-23 |
+| inworld | Inworld's own site icon, `https://inworld.ai/icon.png` (PNG, 180 px) | vendor asset | own ground | 2026-08-23 |
+| nvidia | lobehub/lobe-icons `nvidia-color.svg` | MIT | colour | 2026-08-23 |
+| ollama | lobehub/lobe-icons `ollama.svg` | MIT | mono | 2026-08-23 |
+| openai | lobehub/lobe-icons `openai.svg` (also Codex cards) | MIT | mono | 2026-08-23 |
+| openrouter | lobehub/lobe-icons `openrouter.svg` | MIT | mono | 2026-08-23 |
+| xai | lobehub/lobe-icons `grok.svg` (xAI Grok cards) | MIT | mono | 2026-08-23 |
diff --git a/jarvis/ui/web/frontend/src/assets/providers/antigravity.svg b/jarvis/ui/web/frontend/src/assets/providers/antigravity.svg
new file mode 100644
index 0000000000..d21bcf74d2
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/antigravity.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><mask height="23" id="lobe-icons-antigravity-0-_R_0_" maskUnits="userSpaceOnUse" width="24" x="0" y="1"><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z" fill="#fff"></path></mask><g mask="url(#lobe-icons-antigravity-0-_R_0_)"><g filter="url(#lobe-icons-antigravity-1-_R_0_)"><path d="M-1.018-3.992c-.408 3.591 2.686 6.89 6.91 7.37 4.225.48 7.98-2.043 8.387-5.633.408-3.59-2.686-6.89-6.91-7.37-4.225-.479-7.98 2.043-8.387 5.633z" fill="#FFE432"></path></g><g filter="url(#lobe-icons-antigravity-2-_R_0_)"><path d="M15.269 7.747c1.058 4.557 5.691 7.374 10.348 6.293 4.657-1.082 7.575-5.653 6.516-10.21-1.058-4.556-5.691-7.374-10.348-6.292-4.657 1.082-7.575 5.653-6.516 10.21z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-3-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-4-_R_0_)"><path d="M-12.443 10.804c1.338 4.703 7.36 7.11 13.453 5.378 6.092-1.733 9.947-6.95 8.61-11.652C8.282-.173 2.26-2.58-3.833-.848-9.925.884-13.78 6.1-12.443 10.804z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-5-_R_0_)"><path d="M-7.608 14.703c3.352 3.424 9.126 3.208 12.896-.483 3.77-3.69 4.108-9.459.756-12.883C2.69-2.087-3.083-1.871-6.853 1.82c-3.77 3.69-4.108 9.458-.755 12.883z" fill="#00B95C"></path></g><g filter="url(#lobe-icons-antigravity-6-_R_0_)"><path d="M9.932 27.617c1.04 4.482 5.384 7.303 9.7 6.3 4.316-1.002 6.971-5.448 5.93-9.93-1.04-4.483-5.384-7.304-9.7-6.301-4.316 1.002-6.971 5.448-5.93 9.93z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-7-_R_0_)"><path d="M2.572-8.185C.392-3.329 2.778 2.472 7.9 4.771c5.122 2.3 11.042.227 13.222-4.63 2.18-4.855-.205-10.656-5.327-12.955-5.122-2.3-11.042-.227-13.222 4.63z" fill="#FBBC04"></path></g><g filter="url(#lobe-icons-antigravity-8-_R_0_)"><path d="M-3.267 38.686c-5.277-2.072 3.742-19.117 5.984-24.83 2.243-5.712 8.34-8.664 13.616-6.592 5.278 2.071 11.533 13.482 9.29 19.195-2.242 5.713-23.613 14.298-28.89 12.227z" fill="#3186FF"></path></g><g filter="url(#lobe-icons-antigravity-9-_R_0_)"><path d="M28.71 17.471c-1.413 1.649-5.1.808-8.236-1.878-3.135-2.687-4.531-6.201-3.118-7.85 1.412-1.649 5.1-.808 8.235 1.878s4.532 6.2 3.119 7.85z" fill="#749BFF"></path></g><g filter="url(#lobe-icons-antigravity-10-_R_0_)"><path d="M18.163 9.077c5.81 3.93 12.502 4.19 14.946.577 2.443-3.612-.287-9.727-6.098-13.658-5.81-3.931-12.502-4.19-14.946-.577-2.443 3.612.287 9.727 6.098 13.658z" fill="#FC413D"></path></g><g filter="url(#lobe-icons-antigravity-11-_R_0_)"><path d="M-.915 2.684c-1.44 3.473-.97 6.967 1.05 7.804 2.02.837 4.824-1.3 6.264-4.772 1.44-3.473.97-6.967-1.05-7.804-2.02-.837-4.824 1.3-6.264 4.772z" fill="#FFEE48"></path></g></g><defs><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="17.587" id="lobe-icons-antigravity-1-_R_0_" width="19.838" x="-3.288" y="-11.917"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="1.117"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="38.565" id="lobe-icons-antigravity-2-_R_0_" width="38.9" x="4.251" y="-13.493"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="5.4"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-3-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.517" id="lobe-icons-antigravity-4-_R_0_" width="40.955" x="-21.889" y="-10.592"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="36.595" id="lobe-icons-antigravity-5-_R_0_" width="36.632" x="-19.099" y="-10.278"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.591"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="34.087" id="lobe-icons-antigravity-6-_R_0_" width="33.533" x=".981" y="8.758"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="4.363"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="35.276" id="lobe-icons-antigravity-7-_R_0_" width="35.978" x="-6.143" y="-21.659"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.954"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="46.523" id="lobe-icons-antigravity-8-_R_0_" width="45.114" x="-11.96" y="-.46"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.531"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="24.054" id="lobe-icons-antigravity-9-_R_0_" width="25.094" x="10.485" y=".58"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.159"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="30.007" id="lobe-icons-antigravity-10-_R_0_" width="33.508" x="5.833" y="-12.467"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="2.669"></feGaussianBlur></filter><filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="26.151" id="lobe-icons-antigravity-11-_R_0_" width="22.194" x="-8.355" y="-8.876"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_977_115" stdDeviation="3.303"></feGaussianBlur></filter></defs></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/cartesia.svg b/jarvis/ui/web/frontend/src/assets/providers/cartesia.svg
new file mode 100644
index 0000000000..dcdcd96d34
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/cartesia.svg
@@ -0,0 +1 @@
+<svg width="416" height="426" viewBox="0 0 416 426" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="415.632" height="425.055" fill="#004E23"/><path d="M317.301 182.114V237.681H289.766L286.153 232.679L277.49 220.689L271.591 212.526L261.508 198.571L264.557 212.526L268.964 232.679L270.056 237.681L273.37 252.833L277.49 271.685L277.774 272.987L282.178 293.138L286.585 313.292H224.406L219.999 293.138L217.769 282.929L215.595 272.987L211.189 252.833L207.877 237.681L204.565 252.833L200.158 272.987L197.864 283.481L195.754 293.138L191.347 313.292H129.048L133.455 293.138L137.738 273.533V273.53L138.143 273.231L138.475 272.987L158.05 258.489L165.69 252.833L177.957 243.747L186.149 237.681H98.332V182.114H157.722L158.05 180.617L159.887 172.221L164.291 152.067L168.698 131.914L173.102 111.763H242.531L246.935 131.914L247.858 136.131L237.676 143.671L226.336 152.067L217.769 158.413L199.123 172.221L197.864 173.152L185.764 182.114H317.301Z" fill="#F9F9F8"/></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/claude.svg b/jarvis/ui/web/frontend/src/assets/providers/claude.svg
new file mode 100644
index 0000000000..ee6af4258b
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/claude.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Claude</title><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" fill="#D97757" fill-rule="nonzero"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/elevenlabs.svg b/jarvis/ui/web/frontend/src/assets/providers/elevenlabs.svg
new file mode 100644
index 0000000000..1499860370
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/elevenlabs.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>ElevenLabs</title><path d="M5 0h5v24H5V0zM14 0h5v24h-5V0z"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/gemini.svg b/jarvis/ui/web/frontend/src/assets/providers/gemini.svg
new file mode 100644
index 0000000000..6628f545bf
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/gemini.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/google-cloud.svg b/jarvis/ui/web/frontend/src/assets/providers/google-cloud.svg
new file mode 100644
index 0000000000..c66d75fc9a
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/google-cloud.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GoogleCloud</title><path d="M15.961 7.327l2.086-2.086.14-.879C14.384.905 8.34 1.297 4.913 5.18A9.643 9.643 0 002.88 8.991l.747-.105 4.172-.688.322-.33c1.856-2.038 4.994-2.312 7.137-.578l.703.037z" fill="#EA4335"></path><path d="M21.02 8.93a9.399 9.399 0 00-2.834-4.568L15.258 7.29a5.204 5.204 0 011.91 4.129v.52a2.606 2.606 0 012.607 2.605c0 1.44-1.167 2.577-2.606 2.577h-5.22l-.512.556v3.126l.513.49h5.219c3.743.03 6.802-2.952 6.83-6.695a6.778 6.778 0 00-2.98-5.668z" fill="#4285F4"></path><path d="M6.738 21.293h5.212v-4.172H6.738c-.371 0-.731-.08-1.069-.234l-.74.227-2.1 2.086-.183.71a6.763 6.763 0 004.092 1.383z" fill="#34A853"></path><path d="M6.738 7.759A6.778 6.778 0 002.646 19.91l3.023-3.023a2.606 2.606 0 113.448-3.448l3.023-3.023a6.771 6.771 0 00-5.402-2.657z" fill="#FBBC05"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/groq.svg b/jarvis/ui/web/frontend/src/assets/providers/groq.svg
new file mode 100644
index 0000000000..2a6677b1c4
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/groq.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/inworld.png b/jarvis/ui/web/frontend/src/assets/providers/inworld.png
new file mode 100644
index 0000000000..6805b76bca
Binary files /dev/null and b/jarvis/ui/web/frontend/src/assets/providers/inworld.png differ
diff --git a/jarvis/ui/web/frontend/src/assets/providers/nvidia.svg b/jarvis/ui/web/frontend/src/assets/providers/nvidia.svg
new file mode 100644
index 0000000000..7fc796ffe3
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/nvidia.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Nvidia</title><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/ollama.svg b/jarvis/ui/web/frontend/src/assets/providers/ollama.svg
new file mode 100644
index 0000000000..337397fafa
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/ollama.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Ollama</title><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/openai.svg b/jarvis/ui/web/frontend/src/assets/providers/openai.svg
new file mode 100644
index 0000000000..a116eabf23
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/openai.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/openrouter.svg b/jarvis/ui/web/frontend/src/assets/providers/openrouter.svg
new file mode 100644
index 0000000000..b3abb505bd
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/openrouter.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/assets/providers/xai.svg b/jarvis/ui/web/frontend/src/assets/providers/xai.svg
new file mode 100644
index 0000000000..e617b032e1
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/assets/providers/xai.svg
@@ -0,0 +1 @@
+<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Grok</title><path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"></path></svg>
diff --git a/jarvis/ui/web/frontend/src/components/AltCredentialNote.tsx b/jarvis/ui/web/frontend/src/components/AltCredentialNote.tsx
index 030dd1ec81..e17003ed7c 100644
--- a/jarvis/ui/web/frontend/src/components/AltCredentialNote.tsx
+++ b/jarvis/ui/web/frontend/src/components/AltCredentialNote.tsx
@@ -1,39 +1,50 @@
-import { ExternalLink, GitFork } from "lucide-react";
+import { ChevronDown, ExternalLink, GitFork } from "lucide-react";
import type { AltCredential } from "@/hooks/useProviders";
-import { ProviderBillingBadge } from "@/components/ProviderBillingBadge";
+import { useT } from "@/i18n";
/**
* Renders a provider's ALTERNATIVE credential path. Gemini's AI-Studio-vs-Vertex
* split is the only one today: the primary key form sits above, and this note
* makes the Vertex route — a separate Google Cloud billing project — explicit
* so a user does not top up one account while Jarvis bills the other.
+ *
+ * A disclosure, closed by default: the alternative is named on one line and
+ * its (long) instructions open on demand. Open, it was the tallest thing on
+ * the card — eight lines of Cloud-project setup shown to everyone, including
+ * the many who pasted an AI Studio key and were done.
*/
export function AltCredentialNote({ alt }: { alt: AltCredential }) {
+ const t = useT();
return (
- <div className="rounded-md border border-dashed border-border bg-muted/20 p-2.5">
- <div className="mb-1 flex items-center gap-1.5">
- <GitFork className="h-3 w-3 text-muted-foreground" />
- <span className="text-[11px] font-medium text-foreground">
- Alternative: {alt.label}
+ <details className="group text-xs">
+ <summary className="inline-flex cursor-pointer list-none items-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden">
+ <GitFork aria-hidden="true" className="h-3 w-3" />
+ <span className="font-medium text-foreground/90">
+ {t("apikeys_view.alt_credential_title").replace("{0}", alt.label)}
</span>
- <ProviderBillingBadge billing={alt.billing} />
+ <span className="text-muted-foreground">· {t(`provider_billing.${alt.billing}`)}</span>
+ <ChevronDown
+ aria-hidden="true"
+ className="h-3 w-3 transition-transform group-open:rotate-180 motion-reduce:transition-none"
+ />
+ </summary>
+ <div className="mt-1.5 space-y-1 pl-[18px]">
+ <p className="max-w-prose leading-relaxed text-muted-foreground">{alt.credential_help}</p>
+ {alt.credential_path_hint && (
+ <p className="font-mono text-muted-foreground/80">{alt.credential_path_hint}</p>
+ )}
+ {alt.dashboard_url && (
+ <a
+ href={alt.dashboard_url}
+ target="_blank"
+ rel="noreferrer"
+ className="inline-flex items-center gap-1 text-muted-foreground hover:text-primary"
+ >
+ <ExternalLink aria-hidden="true" className="h-3 w-3" />{" "}
+ {t("apikeys_view.alt_credential_setup").replace("{0}", alt.label)}
+ </a>
+ )}
</div>
- <p className="text-[11px] leading-relaxed text-muted-foreground">{alt.credential_help}</p>
- {alt.credential_path_hint && (
- <p className="mt-1 font-mono text-[10px] text-muted-foreground/80">
- {alt.credential_path_hint}
- </p>
- )}
- {alt.dashboard_url && (
- <a
- href={alt.dashboard_url}
- target="_blank"
- rel="noreferrer"
- className="mt-1 inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-primary"
- >
- <ExternalLink className="h-3 w-3" /> Set up {alt.label}
- </a>
- )}
- </div>
+ </details>
);
}
diff --git a/jarvis/ui/web/frontend/src/components/ApiKeyForm.tsx b/jarvis/ui/web/frontend/src/components/ApiKeyForm.tsx
index f69cfcad91..a702ada438 100644
--- a/jarvis/ui/web/frontend/src/components/ApiKeyForm.tsx
+++ b/jarvis/ui/web/frontend/src/components/ApiKeyForm.tsx
@@ -148,7 +148,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
href={dashboardUrl}
target="_blank"
rel="noreferrer"
- className="inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-primary"
+ className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-primary"
>
<ExternalLink className="h-3 w-3" />{" "}
{dashboardHost
@@ -158,8 +158,8 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
) : null;
const sharedDeleteConfirm = confirmingDelete ? (
- <div className="space-y-2 rounded-md border border-destructive/40 bg-destructive/10 p-2">
- <p className="flex items-start gap-1 text-[11px] text-destructive">
+ <div className="space-y-2 rounded-control border border-destructive/40 bg-destructive/[0.06] px-3 py-2">
+ <p className="flex items-start gap-1.5 text-xs text-destructive">
<AlertTriangle className="mt-0.5 h-3 w-3 shrink-0" />
<span>
{t("apikeys_view.shared_delete_prefix")} {(sharedWith ?? []).join(", ")}.{" "}
@@ -186,23 +186,26 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
// The saved state says so in words, not only in dots: a masked row alone
// reads as "there is SOMETHING here", while "Key saved" + a green check
// answers the actual question ("am I done with this field?") at a glance.
+ // One field-shaped row that carries its own state and actions: the check
+ // and "Key saved" on the left, the masked value, then "Replace" as a text
+ // link and a quiet trash icon on the right. Two free-standing buttons
+ // beside a box read as three controls for one fact.
return (
<div className="space-y-2">
- <div className="flex items-center gap-2">
- <div className="flex min-w-0 flex-1 items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-1.5">
- <CheckCircle2 aria-hidden="true" className="h-3.5 w-3.5 shrink-0 text-emerald-500" />
- <span className="shrink-0 text-xs font-medium text-foreground">
- {t("apikeys_view.key_saved_label")}
- </span>
- <code className="truncate font-mono text-xs text-muted-foreground">
- {"\u2022".repeat(12)}
- </code>
- </div>
+ <div className="flex h-9 min-w-0 items-center gap-2.5 rounded-control border border-border bg-background/60 pl-3 pr-1.5">
+ <CheckCircle2 aria-hidden="true" className="h-3.5 w-3.5 shrink-0 text-emerald-500" />
+ <span className="shrink-0 text-xs font-medium text-foreground">
+ {t("apikeys_view.key_saved_label")}
+ </span>
+ <code className="min-w-0 flex-1 truncate font-mono text-xs tracking-[0.2em] text-muted-foreground">
+ {"\u2022".repeat(12)}
+ </code>
<Button
size="sm"
variant="ghost"
onClick={() => setEditing(true)}
title={t("apikeys_view.replace_tooltip")}
+ className="h-7 px-2 text-xs text-muted-foreground hover:text-foreground"
>
{t("apikeys_view.replace")}
</Button>
@@ -213,7 +216,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
disabled={pending}
aria-label={`Delete ${secretKey}`}
title={t("apikeys_view.delete_key_tooltip")}
- className="text-destructive hover:text-destructive"
+ className="h-7 w-7 p-0 text-muted-foreground hover:text-destructive"
>
<Trash2 className="h-3.5 w-3.5" />
</Button>
@@ -231,7 +234,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
// with the dedicated key as an explicit optional upgrade.
return (
<div className="space-y-2">
- <p className="text-[11px] leading-relaxed text-muted-foreground">
+ <p className="text-xs leading-relaxed text-muted-foreground">
{coveredNote || t("apikeys_view.shared_key_covered")}
</p>
<Button size="sm" variant="ghost" onClick={() => setEditing(true)}>
@@ -245,7 +248,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
return (
<div className="space-y-2">
{credentialHelp && (
- <p className="text-[11px] leading-relaxed text-muted-foreground">{credentialHelp}</p>
+ <p className="text-xs leading-relaxed text-muted-foreground">{credentialHelp}</p>
)}
<div className="flex gap-2">
<div className="relative flex-1">
@@ -259,7 +262,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
// assistive tech (and tests) still identify the exact field.
placeholder={t("apikeys_view.paste_key_placeholder")}
className={cn(
- "w-full rounded-md border border-input bg-background px-3 py-1.5 pr-9 font-mono text-xs",
+ "h-9 w-full rounded-control border border-input bg-background px-3 pr-9 font-mono text-xs",
"focus:outline-none focus:ring-1 focus:ring-primary",
)}
onKeyDown={(e) => {
@@ -276,18 +279,28 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
{reveal ? <EyeOff className="h-3.5 w-3.5" /> : <Eye className="h-3.5 w-3.5" />}
</button>
</div>
- <Button size="sm" onClick={handleSave} disabled={pending || !value.trim()}>
+ <Button
+ size="sm"
+ onClick={handleSave}
+ disabled={pending || !value.trim()}
+ className="h-9 rounded-control"
+ >
{pending ? "…" : t("common.save")}
</Button>
{(configured || coveredByShared) && (
- <Button size="sm" variant="ghost" onClick={() => setEditing(false)}>
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={() => setEditing(false)}
+ className="h-9 rounded-control"
+ >
{t("common.cancel")}
</Button>
)}
</div>
{fmt && !fmt.match && fmt.detected && (
<div className="space-y-1">
- <p className="flex items-start gap-1 text-[11px] text-amber-500">
+ <p className="flex items-start gap-1 text-xs text-amber-500">
<AlertTriangle className="mt-0.5 h-3 w-3 shrink-0" />
<span>
{t("apikeys_view.format_mismatch").replace("{0}", fmt.detected.label)}
@@ -297,7 +310,7 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
Vertex service-account file, not an AI Studio key") — most useful
exactly here, in the mismatch case, not only on a match. */}
{fmt.detected.note && (
- <p className="text-[11px] text-muted-foreground">{fmt.detected.note}</p>
+ <p className="text-xs text-muted-foreground">{fmt.detected.note}</p>
)}
</div>
)}
@@ -306,13 +319,13 @@ export function ApiKeyForm({ secretKey, dashboardUrl, configured, credentialHelp
random string has no way to tell "right kind of key" from "garbage" —
this answers it before they hit Save. Format only, never validity. */}
{fmt && keyFormatConfirmed(fmt) && (
- <p className="flex items-start gap-1 text-[11px] text-emerald-600 dark:text-emerald-400">
+ <p className="flex items-start gap-1 text-xs text-emerald-600 dark:text-emerald-400">
<CheckCircle2 className="mt-0.5 h-3 w-3 shrink-0" />
<span>{t("apikeys_view.format_match_hint")}</span>
</p>
)}
{fmt && fmt.match && fmt.detected?.note && (
- <p className="text-[11px] text-muted-foreground">{fmt.detected.note}</p>
+ <p className="text-xs text-muted-foreground">{fmt.detected.note}</p>
)}
{dashboardLink}
</div>
diff --git a/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx b/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx
index ce8e0adec3..09913d9830 100644
--- a/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx
+++ b/jarvis/ui/web/frontend/src/components/BrainModelSelector.tsx
@@ -394,7 +394,7 @@ export function BrainModelSelector({
onClick={(e) => e.stopPropagation()}
onDoubleClick={(e) => e.stopPropagation()}
>
- <span className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="text-[11px] uppercase tracking-wide text-muted-foreground">
{headingLabel ??
(selects === "voice" ? t("apikeys_model.heading_voice") : t("apikeys_model.heading"))}
</span>
@@ -413,7 +413,7 @@ export function BrainModelSelector({
onDoubleClick={(e) => e.stopPropagation()}
>
<div className="flex items-center justify-between gap-2">
- <span className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="text-[11px] uppercase tracking-wide text-muted-foreground">
{headingLabel ??
(selects === "voice" ? t("apikeys_model.heading_voice") : t("apikeys_model.heading"))}
</span>
@@ -506,7 +506,7 @@ export function BrainModelSelector({
aria-label={t(`apikeys_model.filter_${f}`)}
title={t(`apikeys_model.filter_hint_${f}`)}
className={cn(
- "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition-colors",
+ "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] transition-colors",
isActive
? "border-primary/40 bg-primary/20 text-primary"
: "border-border bg-muted text-muted-foreground hover:text-foreground",
@@ -521,7 +521,7 @@ export function BrainModelSelector({
})}
</div>
{filter !== "all" && (
- <p className="px-2.5 pb-1.5 text-[10px] leading-snug text-muted-foreground">
+ <p className="px-2.5 pb-1.5 text-[11px] leading-snug text-muted-foreground">
{t(`apikeys_model.filter_hint_${filter}`)}
</p>
)}
@@ -564,12 +564,12 @@ export function BrainModelSelector({
)}
{m.label}
{recommendedModel && m.id === recommendedModel && (
- <span className="shrink-0 rounded-full bg-primary px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide text-primary-foreground">
+ <span className="shrink-0 rounded-full bg-primary px-1.5 py-0.5 text-[11px] font-medium uppercase tracking-wide text-primary-foreground">
{t("apikeys_model.recommended_tag")}
</span>
)}
</span>
- <span className="shrink-0 font-mono text-[10px] text-muted-foreground">
+ <span className="shrink-0 font-mono text-[11px] text-muted-foreground">
{m.id}
</span>
</button>
@@ -615,7 +615,7 @@ export function BrainModelSelector({
</ul>
{matched.length > 0 && (
- <div className="border-t border-border px-2.5 py-1 text-[10px] text-muted-foreground">
+ <div className="border-t border-border px-2.5 py-1 text-[11px] text-muted-foreground">
{t("apikeys_model.count_hint").replace("{0}", String(matched.length))}
</div>
)}
diff --git a/jarvis/ui/web/frontend/src/components/CuModelSelector.tsx b/jarvis/ui/web/frontend/src/components/CuModelSelector.tsx
index 4047298377..863723c513 100644
--- a/jarvis/ui/web/frontend/src/components/CuModelSelector.tsx
+++ b/jarvis/ui/web/frontend/src/components/CuModelSelector.tsx
@@ -102,11 +102,11 @@ export function CuModelSelector({
return res;
}}
/>
- <p className="text-[10px] text-muted-foreground/80">
+ <p className="text-[11px] text-muted-foreground/80">
{t("apikeys_cu_model.vision_note")}
</p>
<div className="flex items-center justify-between gap-2">
- <span className="text-[10px] text-muted-foreground">
+ <span className="text-[11px] text-muted-foreground">
{usesMain
? t("apikeys_cu_model.using_main")
: `${t("apikeys_cu_model.effective")}: ${effective || cuModel}`}
diff --git a/jarvis/ui/web/frontend/src/components/OpenRouterTtsVoicePicker.tsx b/jarvis/ui/web/frontend/src/components/OpenRouterTtsVoicePicker.tsx
index 3fe25621ae..8e98a47f2e 100644
--- a/jarvis/ui/web/frontend/src/components/OpenRouterTtsVoicePicker.tsx
+++ b/jarvis/ui/web/frontend/src/components/OpenRouterTtsVoicePicker.tsx
@@ -103,7 +103,7 @@ function LanguageChip({ code }: { code: string }) {
const t = useT();
const { flag, label } = languageChip(t, code);
return (
- <span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-border bg-muted px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground">
+ <span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-border bg-muted px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted-foreground">
{flag && <span aria-hidden>{flag}</span>}
{label}
</span>
@@ -281,7 +281,7 @@ function VoicePicker({
onDoubleClick={(e) => e.stopPropagation()}
>
<div className="flex items-center justify-between gap-2">
- <span className="text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="text-[11px] uppercase tracking-wide text-muted-foreground">
{t("apikeys_voice.heading")}
</span>
{/* Preview-language toggle (the sample sentence's language). */}
@@ -290,7 +290,7 @@ function VoicePicker({
role="group"
aria-label={t("apikeys_voice.preview_language")}
>
- <span className="text-[10px] text-muted-foreground">
+ <span className="text-[11px] text-muted-foreground">
{t("apikeys_voice.preview_in")}
</span>
{(["de", "en", "es"] as const).map((lng) => (
@@ -300,7 +300,7 @@ function VoicePicker({
onClick={() => setPreviewLang(lng)}
aria-pressed={previewLang === lng}
className={cn(
- "rounded-full border px-1.5 py-0.5 text-[10px] uppercase tracking-wide transition-colors",
+ "rounded-full border px-1.5 py-0.5 text-[11px] uppercase tracking-wide transition-colors",
previewLang === lng
? "border-primary/40 bg-primary/20 text-primary"
: "border-border bg-muted text-muted-foreground hover:text-foreground",
@@ -403,7 +403,7 @@ function VoicePicker({
)}
</ul>
{voices.length > 0 && (
- <div className="border-t border-border px-2.5 py-1 text-[10px] text-muted-foreground">
+ <div className="border-t border-border px-2.5 py-1 text-[11px] text-muted-foreground">
{t("apikeys_voice.count_hint").replace("{0}", String(voices.length))}
</div>
)}
diff --git a/jarvis/ui/web/frontend/src/components/RealtimeOptionsControl.tsx b/jarvis/ui/web/frontend/src/components/RealtimeOptionsControl.tsx
index 8662e3e01d..38a3a1e760 100644
--- a/jarvis/ui/web/frontend/src/components/RealtimeOptionsControl.tsx
+++ b/jarvis/ui/web/frontend/src/components/RealtimeOptionsControl.tsx
@@ -252,22 +252,22 @@ function RealtimeModelRow({
if (managed) {
return (
<div className="flex items-start gap-2">
- <span className="w-14 shrink-0 pt-1.5 text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="w-14 shrink-0 pt-1.5 text-[11px] uppercase tracking-wide text-muted-foreground">
{label}
</span>
<div
aria-label={label}
- className="min-w-0 flex-1 rounded-md border border-primary/20 bg-primary/[0.06] px-2.5 py-1.5"
+ className="min-w-0 flex-1 rounded-control border border-border bg-background/40 px-2.5 py-1.5"
>
<div className="flex items-center gap-2 text-xs">
<span className="min-w-0 flex-1 truncate font-medium">
{options[0].label}
</span>
- <span className="rounded-full border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-primary">
+ <span className="rounded-[4px] border border-border px-1.5 text-[10.5px] font-semibold uppercase leading-[18px] tracking-[0.06em] text-muted-foreground">
{t("apikeys_view.realtime_model_managed")}
</span>
</div>
- <p className="mt-0.5 text-[10px] leading-snug text-muted-foreground">
+ <p className="mt-0.5 text-[11px] leading-snug text-muted-foreground">
{t("apikeys_view.realtime_model_managed_hint")}
</p>
</div>
@@ -282,7 +282,7 @@ function RealtimeModelRow({
return (
<div ref={rootRef} className="relative flex items-center gap-2">
- <span className="w-14 shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="w-14 shrink-0 text-[11px] uppercase tracking-wide text-muted-foreground">
{label}
</span>
<button
@@ -496,7 +496,7 @@ function RealtimeVoiceRow({
return (
<div ref={rootRef} className="space-y-1.5">
<div className="flex items-center gap-2">
- <span className="w-14 shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground">
+ <span className="w-14 shrink-0 text-[11px] uppercase tracking-wide text-muted-foreground">
{label}
</span>
<button
@@ -554,7 +554,7 @@ function RealtimeVoiceRow({
role="group"
aria-label={t("apikeys_voice.preview_language")}
>
- <span className="text-[10px] text-muted-foreground">
+ <span className="text-[11px] text-muted-foreground">
{t("apikeys_voice.preview_in")}
</span>
{(["de", "en", "es"] as const).map((lng) => (
@@ -564,7 +564,7 @@ function RealtimeVoiceRow({
onClick={() => setPreviewLang(lng)}
aria-pressed={previewLang === lng}
className={cn(
- "rounded-full border px-1.5 py-0.5 text-[10px] uppercase tracking-wide transition-colors",
+ "rounded-full border px-1.5 py-0.5 text-[11px] uppercase tracking-wide transition-colors",
previewLang === lng
? "border-primary/40 bg-primary/20 text-primary"
: "border-border bg-muted text-muted-foreground hover:text-foreground",
@@ -640,7 +640,7 @@ function RealtimeVoiceRow({
})}
</ul>
{options.length > 0 && (
- <div className="border-t border-border px-2.5 py-1 text-[10px] text-muted-foreground">
+ <div className="border-t border-border px-2.5 py-1 text-[11px] text-muted-foreground">
{t("apikeys_voice.count_hint").replace("{0}", String(options.length))}
</div>
)}
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx
new file mode 100644
index 0000000000..9cf7fa1603
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderLogo.tsx
@@ -0,0 +1,151 @@
+import { HardDrive, Server } from "lucide-react";
+
+import { cn } from "@/lib/utils";
+
+/**
+ * The brand mark on a provider row.
+ *
+ * Every card that talks to the same company draws the same mark: the Gemini
+ * spark on the Gemini brain, STT, TTS and Live cards alike, the OpenAI knot on
+ * the OpenAI, Whisper, Realtime and Codex cards. The mapping therefore goes
+ * provider id -> FAMILY -> file, and the family table is the only place a new
+ * provider needs an entry. Presentation only: nothing here decides behaviour
+ * (AP-21) — a provider with no row in the table still works, it just draws a
+ * neutral glyph.
+ *
+ * Three render paths, recorded per file in `src/assets/providers/LOGOS.md`:
+ * `colour` is the vendor's full-colour mark as an <img>; `mono` is a
+ * single-colour glyph drawn as a CSS mask over the current text ink so it
+ * follows the theme by itself; `own` is a lockup that carries its own ground
+ * (Cartesia's green square) and is drawn untouched.
+ */
+type Render = "colour" | "mono" | "own";
+
+interface FamilyLogo {
+ file: string;
+ render: Render;
+}
+
+const PROVIDER_FAMILY_LOGOS: Record<string, FamilyLogo> = {
+ antigravity: { file: "antigravity.svg", render: "colour" },
+ cartesia: { file: "cartesia.svg", render: "own" },
+ claude: { file: "claude.svg", render: "colour" },
+ elevenlabs: { file: "elevenlabs.svg", render: "mono" },
+ gemini: { file: "gemini.svg", render: "colour" },
+ "google-cloud": { file: "google-cloud.svg", render: "colour" },
+ groq: { file: "groq.svg", render: "mono" },
+ inworld: { file: "inworld.png", render: "own" },
+ nvidia: { file: "nvidia.svg", render: "colour" },
+ ollama: { file: "ollama.svg", render: "mono" },
+ openai: { file: "openai.svg", render: "mono" },
+ openrouter: { file: "openrouter.svg", render: "mono" },
+ xai: { file: "xai.svg", render: "mono" },
+};
+
+// Bundled at build time (hashed URLs), so a mark renders offline and never
+// calls a third party. The glob keeps the folder the single source of truth:
+// dropping a file in and adding a family row is the whole wiring.
+const BUNDLED = import.meta.glob("../../assets/providers/*.{svg,png}", {
+ eager: true,
+ query: "?url",
+ import: "default",
+}) as Record<string, string>;
+
+function assetUrl(file: string): string | undefined {
+ return BUNDLED[`../../assets/providers/${file}`];
+}
+
+/**
+ * Which family a provider id belongs to.
+ *
+ * Ids are catalog strings like "gemini-live", "vertex-stt", "openai-realtime"
+ * or "claude-cli"; the family is the brand the card connects to, so the test
+ * is "does the id name that company", in a fixed order where two could match
+ * (a "vertex" card is Google Cloud, never Gemini, even though Vertex serves
+ * Gemini models).
+ */
+export function providerFamily(providerId: string): string | null {
+ const id = providerId.toLowerCase();
+ if (id.includes("vertex")) return "google-cloud";
+ if (id.includes("antigravity")) return "antigravity";
+ if (id.includes("gemini")) return "gemini";
+ if (id.includes("codex") || id.startsWith("openai")) return "openai";
+ if (id.includes("claude")) return "claude";
+ if (id.includes("grok")) return "xai";
+ if (id.includes("openrouter")) return "openrouter";
+ if (id.includes("groq")) return "groq";
+ if (id.includes("ollama")) return "ollama";
+ if (id.includes("elevenlabs")) return "elevenlabs";
+ if (id.includes("cartesia")) return "cartesia";
+ if (id.includes("inworld")) return "inworld";
+ if (id.includes("nvidia") || id.includes("nemotron")) return "nvidia";
+ return null;
+}
+
+/** An on-device engine or a self-hosted server: a capability, not a brand. */
+function localGlyph(providerId: string): "device" | "server" | null {
+ const id = providerId.toLowerCase();
+ if (id.startsWith("local-")) return "server";
+ if (id.includes("faster-whisper") || id.includes("piper")) return "device";
+ return null;
+}
+
+export function ProviderLogo({
+ providerId,
+ label,
+ className,
+}: {
+ providerId: string;
+ /** The card's display name — its initial is the monogram fallback. */
+ label: string;
+ className?: string;
+}) {
+ const family = providerFamily(providerId);
+ const entry = family ? PROVIDER_FAMILY_LOGOS[family] : undefined;
+ const url = entry ? assetUrl(entry.file) : undefined;
+ const local = localGlyph(providerId);
+ const monogram = label.trim().slice(0, 1).toUpperCase() || "?";
+
+ return (
+ <span
+ aria-hidden="true"
+ data-testid={`provider-logo-${providerId}`}
+ data-family={family ?? undefined}
+ className={cn(
+ // One neutral tile for every mark, so a row of providers reads as one
+ // list rather than a row of differently shaped app icons.
+ "inline-flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-surface border border-border/80 bg-background/70",
+ className,
+ )}
+ >
+ {url && entry?.render === "mono" ? (
+ <span
+ className="block h-5 w-5 bg-foreground"
+ style={{
+ WebkitMaskImage: `url("${url}")`,
+ maskImage: `url("${url}")`,
+ WebkitMaskRepeat: "no-repeat",
+ maskRepeat: "no-repeat",
+ WebkitMaskPosition: "center",
+ maskPosition: "center",
+ WebkitMaskSize: "contain",
+ maskSize: "contain",
+ }}
+ />
+ ) : url && entry?.render === "own" ? (
+ // A lockup with its own ground fills the tile; its corners are ours.
+ <img src={url} alt="" className="block h-full w-full object-cover" />
+ ) : url ? (
+ <img src={url} alt="" className="block h-5 w-5 object-contain" />
+ ) : local === "server" ? (
+ <Server className="h-4 w-4 text-muted-foreground" />
+ ) : local === "device" ? (
+ <HardDrive className="h-4 w-4 text-muted-foreground" />
+ ) : (
+ <span className="font-display text-xs font-semibold text-muted-foreground">
+ {monogram}
+ </span>
+ )}
+ </span>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
index dddc5ca1de..d722778250 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
@@ -191,7 +191,7 @@ describe("ProviderCard — dictation polish activation", () => {
const calls = installFetchMock();
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
// "openai", never "openai-polish": the chain ignores a family id it does
@@ -205,7 +205,7 @@ describe("ProviderCard — dictation polish activation", () => {
const calls = installFetchMock();
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
expect(polishPin(calls).persist).toBe(true);
@@ -216,7 +216,7 @@ describe("ProviderCard — dictation polish activation", () => {
const calls = installFetchMock();
renderCard(dictationCard({ polish_family: null }));
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
// Not the ideal value, but a live one: the route translates the card
@@ -229,7 +229,7 @@ describe("ProviderCard — dictation polish activation", () => {
const calls = installFetchMock();
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => expect(calls.length).toBeGreaterThan(0));
// The realtime/STT/TTS switch routes rebuild the live voice pipeline. A
@@ -254,7 +254,7 @@ describe("ProviderCard — a switched-to polish provider proves it works", () =>
const calls = installFetchMock();
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
// A stored key is not a working provider, and this pass is INVISIBLE when
// it fails — it just delivers the raw transcript. Without this probe an
@@ -278,7 +278,7 @@ describe("ProviderCard — a switched-to polish provider proves it works", () =>
});
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
const warnings = toastsOf("warning");
@@ -293,7 +293,7 @@ describe("ProviderCard — a switched-to polish provider proves it works", () =>
installFetchMock();
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => expect(toastsOf("success").length).toBe(1));
expect(toastsOf("warning")).toEqual([]);
@@ -324,7 +324,7 @@ describe("ProviderCard — a switched-to polish provider proves it works", () =>
failingProbe as unknown as typeof fetch;
renderCard(dictationCard());
- fireEvent.click(screen.getByText("OpenAI: dictation polish"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
expect(
@@ -516,7 +516,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
// Clicking the card during busy must not demand a redo of a working
// login — it answers with the same neutral "checking" note.
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
expect(toastsOf("warning")).toEqual([]);
expect(toastsOf("info")).toEqual([
"Checking the ChatGPT voice status — one moment.",
@@ -677,7 +677,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
// The backend's live account gate is the ONLY judge that can clear the
// sticky block — the click must reach it instead of dead-ending in a
// local toast.
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() =>
expect(
@@ -733,7 +733,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
}),
);
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
expect(toastsOf("warning")).toEqual([
"This voice provider needs a ChatGPT subscription login. Connect with ChatGPT below.",
@@ -773,7 +773,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
window.localStorage.setItem(EXPERIMENTAL_CONSENT_KEY, "1");
renderCard(codexRealtimeCard());
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() => {
const call = calls.find(
@@ -794,7 +794,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
const optimistic = vi.fn();
renderCard(codexRealtimeCard(), () => {}, optimistic);
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
// An in-app dialog, not window.confirm: the desktop shell renders that as
// a raw "127.0.0.1 says" box and it blocks the whole window.
@@ -817,7 +817,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
const optimistic = vi.fn();
renderCard(codexRealtimeCard(), () => {}, optimistic);
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
const accept = await screen.findByText("Yes");
expect(optimistic).not.toHaveBeenCalled();
@@ -837,7 +837,7 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
const optimistic = vi.fn();
renderCard(codexRealtimeCard(), () => {}, optimistic);
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
// Straight through: re-asking every time taught the user to click the
// notice away unread, which defeats the point of showing it at all.
@@ -899,12 +899,14 @@ describe("ProviderCard — an unavailable card does not build a warning wall", (
installFetchMock();
renderCard(unconnectedSubscriptionCard());
- const title = screen.getByText("ChatGPT subscription (Codex)");
- // Exactly what a user does: a real double click delivers two click events
- // plus one dblclick. Only the clicks may reach the handler now.
- fireEvent.click(title);
- fireEvent.click(title);
- fireEvent.doubleClick(title);
+ // The row's "Use" control is the one thing that activates — the row
+ // itself only opens and closes the editor, so a click on the title is no
+ // longer a switch at all. Exactly what a user does on the control: a real
+ // double click delivers two click events plus one dblclick.
+ const useControl = screen.getByRole("radio");
+ fireEvent.click(useControl);
+ fireEvent.click(useControl);
+ fireEvent.doubleClick(useControl);
await waitFor(() =>
expect(useEventStore.getState().toasts.length).toBeGreaterThan(0),
@@ -919,7 +921,7 @@ describe("ProviderCard — an unavailable card does not build a warning wall", (
const calls = installFetchMock();
renderCard(unconnectedSubscriptionCard());
- fireEvent.click(screen.getByText("ChatGPT subscription (Codex)"));
+ fireEvent.click(screen.getByRole("radio"));
await waitFor(() =>
expect(useEventStore.getState().toasts.length).toBe(1),
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
index c2249d8639..3b1ec12fa3 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
@@ -6,7 +6,7 @@ import { BrainModelSelector } from "@/components/BrainModelSelector";
import { OpenRouterTtsControls } from "@/components/OpenRouterTtsVoicePicker";
import { CuModelSelector } from "@/components/CuModelSelector";
import { RealtimeOptionsControl } from "@/components/RealtimeOptionsControl";
-import { ProviderBillingBadge } from "@/components/ProviderBillingBadge";
+import { ProviderLogo } from "@/components/providers/ProviderLogo";
import { Button } from "@/components/ui/button";
import { BrandedSelect } from "@/components/ui/select";
import {
@@ -287,18 +287,28 @@ export function EngineModeSwitch({
}
}
+ // The guidance ("Recommended" / "Not recommended" / "you only set up one
+ // engine") stays — as the tooltip and for assistive tech. What went was the
+ // 8 px badge inside each segment and the caption under the control: a
+ // header control carries its state, not its manual.
+ const pickOneHint = t("apikeys_view.mode_pick_one_hint");
+
return (
<div
data-testid="voice-engine-header-control"
role="group"
aria-label={t("apikeys_view.voice_engine_label")}
+ title={pickOneHint}
className="shrink-0"
>
- <div className="relative grid min-w-56 grid-cols-2 rounded-lg border border-border bg-card/40 p-0.5">
+ <span data-testid="voice-engine-pick-one-hint" className="sr-only">
+ {pickOneHint}
+ </span>
+ <div className="relative grid min-w-48 grid-cols-2 rounded-surface border border-border bg-card/40 p-0.5">
<span
data-testid="voice-engine-selection-thumb"
aria-hidden="true"
- className="absolute inset-y-0.5 left-0.5 w-[calc(50%-0.125rem)] rounded-md bg-primary shadow-[0_0_14px_rgba(255,214,10,0.22)] transition-transform duration-200 ease-out"
+ className="absolute inset-y-0.5 left-0.5 w-[calc(50%-0.125rem)] rounded-control bg-primary transition-transform duration-200 ease-out motion-reduce:transition-none"
style={{ transform: `translateX(${selectedIndex * 100}%)` }}
/>
{segments.map((seg) => {
@@ -308,6 +318,11 @@ export function EngineModeSwitch({
const needsKey = seg.key === "realtime" && !realtimeAvailable;
const isRecommended = seg.key === "realtime";
const Icon = seg.icon;
+ const guidance = t(
+ isRecommended
+ ? "apikeys_view.mode_recommended"
+ : "apikeys_view.not_recommended",
+ );
return (
<button
key={seg.key}
@@ -315,8 +330,9 @@ export function EngineModeSwitch({
onClick={() => handleSelect(seg.key)}
aria-pressed={isSelected}
data-live={isLive ? "true" : "false"}
+ title={guidance}
className={cn(
- "relative z-10 inline-flex items-center justify-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",
+ "relative z-10 inline-flex h-7 items-center justify-center gap-1.5 rounded-control px-3 text-xs font-medium transition-colors",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
isSelected
? "text-primary-foreground"
@@ -325,26 +341,20 @@ export function EngineModeSwitch({
: "text-muted-foreground hover:text-foreground",
)}
>
- <Icon aria-hidden="true" className="h-3 w-3" />
+ <Icon aria-hidden="true" className="h-3.5 w-3.5" />
<span className="whitespace-nowrap">{seg.label}</span>
- <span
- className={cn(
- "whitespace-nowrap rounded-full px-1 py-px text-[8px] font-semibold uppercase tracking-wide",
- isRecommended
- ? isSelected
- ? "bg-primary-foreground/20 text-primary-foreground"
- : "bg-primary/15 text-primary"
- : isSelected
- ? "border border-primary-foreground/30 bg-primary-foreground/10 text-primary-foreground"
- : "border border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",
- )}
- >
- {t(
- isRecommended
- ? "apikeys_view.mode_recommended"
- : "apikeys_view.not_recommended",
- )}
- </span>
+ {/* The recommendation as a 5 px dot, not a capsule: enough to
+ say "this one", quiet enough to live inside a button. */}
+ {isRecommended && (
+ <span
+ aria-hidden="true"
+ className={cn(
+ "h-1.5 w-1.5 rounded-full",
+ isSelected ? "bg-primary-foreground/80" : "bg-primary",
+ )}
+ />
+ )}
+ <span className="sr-only">{` (${guidance})`}</span>
{isLive && (
<span className="sr-only">{t("apikeys_view.mode_active_badge")}</span>
)}
@@ -352,15 +362,6 @@ export function EngineModeSwitch({
);
})}
</div>
- {/* One discreet reminder right where the choice is made: you configure
- exactly one engine, never both. The per-mode key details live in the
- VoiceEngineContext copy below, so this stays a single short line. */}
- <p
- data-testid="voice-engine-pick-one-hint"
- className="mt-1 text-right text-[10px] leading-tight text-muted-foreground/70"
- >
- {t("apikeys_view.mode_pick_one_hint")}
- </p>
</div>
);
}
@@ -385,45 +386,46 @@ export function LocalModeSwitch({
onToggle: (next: boolean) => void;
}) {
const t = useT();
+ // A real switch: the knob's position IS the state, so no "ON"/"OFF" capsule
+ // has to spell it out. The one-line explanation lives in the tooltip and
+ // for assistive tech — not as a caption under the header.
+ const hint = t("apikeys_view.local_mode_hint");
return (
- <div className="shrink-0">
+ <div className="flex shrink-0 items-center">
<button
type="button"
data-testid="local-mode-switch"
aria-pressed={enabled}
onClick={() => onToggle(!enabled)}
- title={t(
+ title={`${t(
enabled ? "apikeys_view.local_mode_title_on" : "apikeys_view.local_mode_title_off",
- )}
+ )} — ${hint}`}
className={cn(
- "inline-flex items-center gap-1.5 rounded-lg border px-2.5 py-[0.4375rem] text-xs font-medium transition-colors",
+ "group inline-flex h-8 items-center gap-2 rounded-control px-1.5 text-xs font-medium transition-colors",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
- enabled
- ? "border-primary/40 bg-primary/15 text-primary"
- : "border-border bg-card/40 text-muted-foreground hover:text-foreground",
+ enabled ? "text-foreground" : "text-muted-foreground hover:text-foreground",
)}
>
- <HardDrive aria-hidden="true" className="h-3.5 w-3.5" />
- <span className="whitespace-nowrap">{t("apikeys_view.local_mode_label")}</span>
<span
+ aria-hidden="true"
className={cn(
- "whitespace-nowrap rounded-full px-1 py-px text-[8px] font-semibold uppercase tracking-wide",
- enabled
- ? "bg-primary/25 text-primary"
- : "border border-border bg-background/60 text-muted-foreground/80",
+ "relative inline-block h-[18px] w-[30px] shrink-0 rounded-full transition-colors",
+ enabled ? "bg-primary" : "bg-border group-hover:bg-muted-foreground/40",
)}
>
- {t(enabled ? "apikeys_view.local_mode_on" : "apikeys_view.local_mode_off")}
+ <span
+ className={cn(
+ "absolute left-0.5 top-0.5 h-3.5 w-3.5 rounded-full bg-background shadow-sm transition-transform motion-reduce:transition-none",
+ enabled && "translate-x-3",
+ )}
+ />
+ </span>
+ <HardDrive aria-hidden="true" className="h-3.5 w-3.5 opacity-80" />
+ <span className="whitespace-nowrap">{t("apikeys_view.local_mode_label")}</span>
+ <span className="sr-only">
+ {` — ${t(enabled ? "apikeys_view.local_mode_on" : "apikeys_view.local_mode_off")}. ${hint}`}
</span>
</button>
- {/* Mirrors the engine switch's one-line hint so the two controls sit on
- the same baseline and the header stays a single tidy row. */}
- <p
- data-testid="local-mode-hint"
- className="mt-1 text-right text-[10px] leading-tight text-muted-foreground/70"
- >
- {t("apikeys_view.local_mode_hint")}
- </p>
</div>
);
}
@@ -450,7 +452,7 @@ export function LocalModeNotice({
// is a translated template, so this is the one place a test (or a support
// screenshot) can read the number without depending on wording.
data-hidden-count={hiddenCount}
- className="mb-3 flex items-start gap-2.5 rounded-xl border border-primary/25 bg-primary/[0.05] px-3 py-2"
+ className="mb-3 flex items-start gap-2.5 rounded-surface border border-border bg-card/40 px-3 py-2"
>
<HardDrive aria-hidden="true" className="mt-0.5 h-4 w-4 shrink-0 text-primary" />
<p className="min-w-0 text-xs leading-relaxed text-muted-foreground">
@@ -562,63 +564,90 @@ export function VoiceEngineContext({
? t("apikeys_view.mode_desc_realtime")
: t("apikeys_view.mode_desc_pipeline");
+ const attention = transitioning || connecting || !runtimeMatchesSelection;
+
+ // One line, not a box: what is running right now (dot + words), what the
+ // selected engine means, and an "i" that opens the longer explanation on
+ // demand. The previous band restated the section three times before the
+ // first card; everything it said is still here, one click deeper.
return (
<section
data-testid="voice-engine-context"
- className="mx-auto mb-4 w-full max-w-4xl rounded-xl border border-border bg-card/25 px-3 py-2"
+ className="mx-auto mb-2 w-full max-w-4xl"
aria-label={t("apikeys_view.voice_engine_label")}
>
- <div className="flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5">
+ <div className="flex min-w-0 items-center gap-2.5 py-1.5 text-xs">
<div
- className="flex min-w-64 flex-1 items-center gap-2 overflow-hidden text-xs"
- title={`${t("apikeys_view.voice_engine_desc")} ${modeDescription}`}
- >
- <Volume2 aria-hidden="true" className="h-3.5 w-3.5 shrink-0 text-primary" />
- <span className="shrink-0 font-medium text-foreground">
- {t("apikeys_view.voice_engine_label")}
- </span>
- <span aria-hidden="true" className="text-border">·</span>
- <span className="min-w-0 truncate text-muted-foreground">
- {modeDescription}
- {mode === "realtime" && (
- <span className="text-amber-500/90">
- {` · ${t("apikeys_view.mode_realtime_preview")}`}
- </span>
- )}
- </span>
- </div>
- <div
- className="flex shrink-0 items-center gap-1.5 text-[11px] leading-snug"
+ className="flex min-w-0 shrink-0 items-center gap-2"
aria-live="polite"
data-testid="voice-engine-runtime-status"
>
<span
aria-hidden="true"
className={cn(
- "h-1.5 w-1.5 shrink-0 rounded-full",
+ "h-[7px] w-[7px] shrink-0 rounded-full",
transitioning || connecting
- ? "animate-pulse bg-amber-400 motion-reduce:animate-none"
+ ? "animate-pulse bg-amber-500 motion-reduce:animate-none"
: runtimeMatchesSelection
- ? "bg-emerald-400"
- : "bg-amber-400",
+ ? "bg-emerald-500 shadow-[0_0_0_3px_rgb(16_185_129/0.18)]"
+ : "bg-amber-500",
)}
/>
<span
className={cn(
- runtimeMatchesSelection && !transitioning && !connecting
- ? "text-muted-foreground"
- : "text-amber-300",
+ "font-medium",
+ attention ? "text-amber-600 dark:text-amber-400" : "text-foreground",
)}
>
{runtimeText}
</span>
</div>
+ <span aria-hidden="true" className="text-border">·</span>
+ <span
+ className="min-w-0 flex-1 truncate text-muted-foreground"
+ title={`${t("apikeys_view.voice_engine_desc")} ${modeDescription}`}
+ >
+ {modeDescription}
+ </span>
+ {/* The research-preview caveat as a tag; the full sentence is its
+ tooltip and is read out in full — a one-line status has no room
+ for a second sentence, and truncating a warning is worse than
+ shortening it. */}
+ {mode === "realtime" && (
+ <Tag tone="warn" title={t("apikeys_view.mode_realtime_preview")}>
+ {t("apikeys_view.mode_realtime_preview_short")}
+ <span className="sr-only">{` — ${t("apikeys_view.mode_realtime_preview")}`}</span>
+ </Tag>
+ )}
+ <details className="group relative shrink-0">
+ <summary
+ className="inline-flex cursor-pointer list-none items-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden"
+ title={t("apikeys_view.voice_engine_desc")}
+ >
+ <span
+ aria-hidden="true"
+ className="inline-flex h-4 w-4 items-center justify-center rounded-full border border-border text-xs font-semibold leading-none"
+ >
+ i
+ </span>
+ <span className="hidden sm:inline">{t("apikeys_view.voice_engine_label")}</span>
+ </summary>
+ <div className="absolute right-0 top-full z-20 mt-2 w-80 rounded-surface border border-border bg-card p-3 text-xs leading-relaxed text-muted-foreground shadow-lg">
+ <p className="font-medium text-foreground">
+ {t("apikeys_view.voice_engine_desc")}
+ </p>
+ <p data-testid="voice-engine-keys-hint" className="mt-1.5">
+ {t("apikeys_view.mode_keys_hint")}
+ </p>
+ <p className="mt-1.5">{t("apikeys_view.mode_pick_one_hint")}</p>
+ </div>
+ </details>
</div>
{offerDetail && (
<p
data-testid="voice-engine-transport-offer-detail"
- className="mt-1 text-[11px] leading-snug text-amber-600 dark:text-amber-400"
+ className="pb-1 text-xs leading-snug text-amber-600 dark:text-amber-400"
aria-live="polite"
>
{offerDetail}
@@ -628,7 +657,7 @@ export function VoiceEngineContext({
{liveMode === "realtime" && lastStartError && (
<p
data-testid="voice-engine-last-start-error"
- className="mt-1 text-[11px] leading-snug text-amber-600 dark:text-amber-400"
+ className="pb-1 text-xs leading-snug text-amber-600 dark:text-amber-400"
aria-live="polite"
>
{t("voice_state.connect_failed")
@@ -637,13 +666,6 @@ export function VoiceEngineContext({
</p>
)}
- <p
- data-testid="voice-engine-keys-hint"
- className="mt-1 text-[11px] leading-snug text-muted-foreground/80"
- >
- {t("apikeys_view.mode_keys_hint")}
- </p>
-
{mode === "realtime" && (
<RecommendedSetupPanel onOpenTab={onOpenRecommendedTab} />
)}
@@ -703,13 +725,15 @@ function RecommendedSetupPanel({
return (
<div
data-testid="recommended-setup-panel"
- className="mt-2 flex min-w-0 items-center gap-2 border-t border-primary/20 pt-2"
+ className="flex min-w-0 items-center gap-3 border-t border-border/60 py-1.5 text-xs"
>
- <p className="flex shrink-0 items-center gap-1.5 text-[11px] font-medium text-foreground">
+ <p className="flex shrink-0 items-center gap-1.5 text-muted-foreground">
<Sparkles aria-hidden="true" className="h-3.5 w-3.5 shrink-0 text-primary" />
{t("apikeys_view.reco_title")}
</p>
- <ul className="flex min-w-0 flex-1 items-center gap-1 overflow-x-auto scrollbar-jarvis">
+ {/* Text links, not capsules: three picks in a row already read as a
+ set; a frame around each of them adds nothing but frames. */}
+ <ul className="flex min-w-0 flex-1 items-center gap-x-4 overflow-x-auto scrollbar-jarvis">
{rows.map((row) => {
const Icon = row.icon;
return (
@@ -720,14 +744,13 @@ function RecommendedSetupPanel({
data-testid={`reco-row-${row.tab}`}
aria-label={`${t("apikeys_view.reco_title")}: ${row.label} — ${row.pick}. ${row.why}`}
title={row.why}
- className="inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-primary/15 bg-primary/[0.04] px-2 py-1 text-[11px] leading-none transition-colors hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ className="group inline-flex items-center gap-1.5 whitespace-nowrap rounded-control leading-none transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
- <Icon
- aria-hidden="true"
- className="h-3 w-3 shrink-0 text-primary/80"
- />
- <span className="text-muted-foreground">{row.label}:</span>
- <span className="font-medium text-foreground">{row.pick}</span>
+ <Icon aria-hidden="true" className="h-3 w-3 shrink-0 text-muted-foreground" />
+ <span className="text-muted-foreground">{row.label}</span>
+ <span className="font-medium text-foreground underline-offset-4 group-hover:underline">
+ {row.pick}
+ </span>
</button>
</li>
);
@@ -751,36 +774,45 @@ export function CategoryHero({
title: string;
description: string;
}) {
+ // The tab already names the category, so the heading here is a kicker, not
+ // a hero: icon, title and the one-line description on a single baseline.
return (
- <div className="mb-4 flex items-start gap-2.5">
- <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border bg-secondary/40 text-primary">
- <Icon className="h-4 w-4" />
- </div>
- <div className="min-w-0">
- <h3 className="font-display text-base font-semibold tracking-tight">
- {title}
- </h3>
- <p className="mt-0.5 text-xs text-muted-foreground">{description}</p>
- </div>
+ <div className="mb-3 flex min-w-0 items-center gap-2 pt-1">
+ <Icon aria-hidden="true" className="h-4 w-4 shrink-0 text-primary" />
+ <h3 className="shrink-0 font-display text-sm font-semibold tracking-tight">
+ {title}
+ </h3>
+ <span aria-hidden="true" className="text-border">·</span>
+ <p className="min-w-0 truncate text-xs text-muted-foreground" title={description}>
+ {description}
+ </p>
</div>
);
}
/**
- * A soft, gold-tinted "which one should I pick?" band — the one place a
- * category speaks up with an opinion. Used by the Realtime and Computer-Use
- * tabs, where the model choice genuinely confuses people; the calmer tiers
- * carry their guidance on the cards themselves (Recommended badges).
+ * The "which one should I pick?" guidance — the one place a category speaks
+ * up with an opinion. Used by the Realtime and Computer-Use tabs, where the
+ * model choice genuinely confuses people; the calmer tiers carry their
+ * guidance on the cards themselves (Recommended tags).
+ *
+ * A disclosure, closed by default: the question is the visible part, the
+ * answer opens on demand. It used to be a permanently open tinted band above
+ * every card list — advice nobody asked for, on every visit.
*/
export function GuidancePanel({ title, body }: { title: string; body: string }) {
return (
- <div className="mb-3 flex items-start gap-2.5 rounded-xl border border-primary/25 bg-primary/[0.05] px-3 py-2">
- <Sparkles aria-hidden="true" className="mt-0.5 h-4 w-4 shrink-0 text-primary" />
- <p className="min-w-0 text-xs leading-relaxed">
- <span className="font-medium text-foreground">{title}</span>
- <span className="text-muted-foreground"> · {body}</span>
- </p>
- </div>
+ <details className="group mb-3 text-xs">
+ <summary className="inline-flex cursor-pointer list-none items-center gap-1.5 font-medium text-foreground/90 transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden">
+ <Sparkles aria-hidden="true" className="h-3.5 w-3.5 shrink-0 text-primary" />
+ {title}
+ <ChevronDown
+ aria-hidden="true"
+ className="h-3 w-3 text-muted-foreground transition-transform group-open:rotate-180 motion-reduce:transition-none"
+ />
+ </summary>
+ <p className="mt-1.5 max-w-prose pl-5 leading-relaxed text-muted-foreground">{body}</p>
+ </details>
);
}
@@ -925,8 +957,19 @@ export function TierSection({
const rank = (p: ProviderDescriptor) =>
p.id === leadId ? 2 : Number(p.configured || p.active);
const sorted = [...providers].sort((a, b) => rank(b) - rank(a));
+ // One row open at a time. The list opens on the provider this tier RUNS on
+ // (or, in an empty tier, on the first card, so there is a key field on
+ // screen to paste into); every other provider is a scannable one-line row
+ // until it is clicked. This is what turns 2 000 px of stacked forms into a
+ // list the eye can read top to bottom.
+ const [expandedId, setExpandedId] = useState<string | null>(
+ () => leadId ?? sorted[0]?.id ?? null,
+ );
return (
- <ul className="space-y-3">
+ <ul
+ data-testid="provider-list"
+ className="divide-y divide-border/70 overflow-hidden rounded-surface border border-border bg-card/50"
+ >
{sorted.map((p) => (
<li key={p.id}>
<ProviderCard
@@ -935,6 +978,10 @@ export function TierSection({
onActivateOptimistic={onActivateOptimistic}
autoActivateOnSave={!tierHasActive}
health={p.active ? sectionHealthForSubject(health, p.id) : undefined}
+ expanded={expandedId === p.id}
+ onToggleExpanded={() =>
+ setExpandedId((current) => (current === p.id ? null : p.id))
+ }
/>
</li>
))}
@@ -948,6 +995,8 @@ export function ProviderCard({
onActivateOptimistic,
autoActivateOnSave,
health,
+ expanded = true,
+ onToggleExpanded,
}: {
descriptor: ProviderDescriptor;
onChanged: () => void;
@@ -957,6 +1006,12 @@ export function ProviderCard({
* status of "error" turns the card red and surfaces the cause inline — the
* tab dot says "something here is broken", this says exactly WHAT/WHERE. */
health?: SectionHealth;
+ /** Whether the editor body (key, model, test) is open under the row. A
+ * caller that renders a single card leaves it open; the tier list opens
+ * one row at a time. */
+ expanded?: boolean;
+ /** Toggles `expanded`; absent means the row is not collapsible. */
+ onToggleExpanded?: () => void;
}) {
const t = useT();
const [activating, setActivating] = useState(false);
@@ -1185,22 +1240,14 @@ export function ProviderCard({
}
}
- // A click anywhere on the card activates the provider. There is deliberately
- // NO separate onDoubleClick: a double click already delivers two `click`
- // events, and binding both handlers made it fire activate() THREE times —
- // on a card that only answers with "connect this provider first", that meant
- // three identical warnings per double click (six after two), stacked into a
- // wall over the connect button itself.
- //
- // We explicitly filter clicks on interactive sub-elements (inputs, buttons,
- // links) so that a click into the password field or on the
- // "Replace"/trash icon does NOT accidentally trigger a switch. The radio
- // also has its own stopPropagation for historical reasons
- // (belt and suspenders).
- function handleCardActivate(e: React.MouseEvent<HTMLDivElement>) {
- // Codex is connection-only — a card click must never trigger a brain switch.
- if (isCodexBrain) return;
- if (!isBrainSwitchable) return;
+ // A click on the row opens or closes the editor body. Activation is the job
+ // of the "Use" control on the row — not of the row itself, which used to
+ // switch providers on any click, including a double click that fired
+ // activate() three times and stacked three identical warnings. Clicks on
+ // the row's own controls (the Use radio, a tag's tooltip target) are left to
+ // those controls.
+ function handleRowClick(e: React.MouseEvent<HTMLDivElement>) {
+ if (!onToggleExpanded) return;
const target = e.target as HTMLElement | null;
if (
target &&
@@ -1211,7 +1258,7 @@ export function ProviderCard({
) {
return;
}
- void activate();
+ onToggleExpanded();
}
// Called by ApiKeyForm as soon as a key has been saved for a previously
@@ -1272,52 +1319,76 @@ export function ProviderCard({
</div>
) : null;
+ // The one-line summary under the name: how the card is paid for, in human
+ // words. It used to be "gemini-live · API key auth" — the catalog id and
+ // developer vocabulary; the id still travels on the row's testid and for
+ // assistive tech, and the billing line already says how you sign in.
+ const summary = t(`provider_billing.${descriptor.billing}`);
+ const collapsible = Boolean(onToggleExpanded);
+ const rowTitle = descriptor.active
+ ? t("apikeys_view.active_tooltip")
+ : !isBrainSwitchable
+ ? t("apikeys_view.agents_only_short").replace("{0}", agentsBrand(assistantName))
+ : descriptor.configured
+ ? t("apikeys_view.click_to_activate")
+ : descriptor.auth_mode === "codex"
+ ? t("apikeys_view.needs_codex")
+ : descriptor.auth_mode === "antigravity"
+ ? t("apikeys_view.needs_login")
+ : t("apikeys_view.needs_key");
+
return (
<>
{consentDialog}
<div
- onClick={handleCardActivate}
- title={
- descriptor.active
- ? t("apikeys_view.active_tooltip")
- : !isBrainSwitchable
- ? t("apikeys_view.agents_only_short").replace(
- "{0}",
- agentsBrand(assistantName),
- )
- : descriptor.configured
- ? t("apikeys_view.click_to_activate")
- : descriptor.auth_mode === "codex"
- ? t("apikeys_view.needs_codex")
- : descriptor.auth_mode === "antigravity"
- ? t("apikeys_view.needs_login")
- : t("apikeys_view.needs_key")
- }
+ data-testid={`provider-card-${descriptor.id}`}
+ data-expanded={expanded ? "true" : "false"}
className={cn(
- "card-outline space-y-3 p-4 transition-colors",
- // A broken active provider wins the card's frame — red outline + faint
- // red wash — so the eye lands on the exact card behind the tab's red dot.
+ "relative transition-colors",
+ // The active provider gets a 3 px gold rule on the left edge and a
+ // faint wash — said once, at the edge, instead of three times
+ // (chip + frame + tint). A broken active provider turns that rule red.
cardError
- ? "border-destructive/70 bg-destructive/[0.05] ring-1 ring-destructive/30"
+ ? "bg-destructive/[0.04] before:absolute before:inset-y-2 before:left-0 before:w-[3px] before:rounded-r before:bg-destructive"
: descriptor.active
- ? "border-primary bg-primary/[0.06] ring-1 ring-primary/30"
- : descriptor.configured
- ? isBrainSwitchable
- ? "cursor-pointer hover:border-primary/40 hover:bg-primary/[0.02]"
- : ""
- : "opacity-95",
+ ? "bg-primary/[0.035] before:absolute before:inset-y-2 before:left-0 before:w-[3px] before:rounded-r before:bg-primary"
+ : "",
)}
>
- <div className="flex items-start justify-between gap-3">
+ {/* ROW — logo, name, summary, state, the "Use" control, chevron. */}
+ <div
+ role={collapsible ? "button" : undefined}
+ tabIndex={collapsible ? 0 : undefined}
+ aria-expanded={collapsible ? expanded : undefined}
+ aria-controls={collapsible ? `provider-body-${descriptor.id}` : undefined}
+ data-testid={`provider-row-${descriptor.id}`}
+ onClick={handleRowClick}
+ onKeyDown={(e) => {
+ if (!collapsible) return;
+ if (e.target !== e.currentTarget) return;
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ onToggleExpanded?.();
+ }
+ }}
+ title={rowTitle}
+ className={cn(
+ "flex items-center gap-3 px-3.5 py-3 outline-none",
+ collapsible && "cursor-pointer hover:bg-secondary/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
+ !isBrainSwitchable && "opacity-80",
+ )}
+ >
+ <ProviderLogo providerId={descriptor.id} label={descriptor.label} />
+
<div className="min-w-0 flex-1">
- <div className="flex flex-wrap items-center gap-2">
- <span className="font-display text-sm font-semibold tracking-tight">
+ <div className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1">
+ <span className="truncate font-display text-[13.5px] font-semibold tracking-tight">
{descriptor.label}
</span>
- <StatusBadge descriptor={descriptor} />
+ {!descriptor.active && <StatusBadge descriptor={descriptor} />}
{descriptor.recommended && (
- <span
- className="inline-flex items-center gap-1 rounded-full border border-primary/40 bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary"
+ <Tag
+ tone="accent"
title={
descriptor.recommended_model
? t("apikeys_view.recommended_tooltip").replace(
@@ -1327,45 +1398,37 @@ export function ProviderCard({
: undefined
}
>
- <Sparkles aria-hidden="true" className="h-2.5 w-2.5" />
{t("apikeys_view.recommended")}
- </span>
+ </Tag>
)}
{descriptor.experimental && (
- <span
+ <Tag
+ tone="neutral"
data-testid={`provider-experimental-${descriptor.id}`}
- className="rounded-full border border-violet-500/40 bg-violet-500/10 px-2 py-0.5 text-[10px] font-medium text-violet-600 dark:text-violet-300"
+ title={t("apikeys_view.experimental_note")}
>
{t("apikeys_view.experimental")}
- </span>
+ </Tag>
)}
{descriptor.caution && (
- <span
- className="rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400"
- title={descriptor.caution}
- >
+ <Tag tone="warn" title={descriptor.caution}>
{t("apikeys_view.not_recommended")}
- </span>
+ </Tag>
)}
- {/* Neutral, never amber: an unset optional key is not a warning.
- The chip is what makes the whole section read as "recommended",
- so a user scanning for what still needs doing can skip it. */}
+ {/* Neutral, never amber: an unset optional key is not a warning. */}
{descriptor.optional && (
- <span
+ <Tag
+ tone="neutral"
data-testid={`provider-optional-${descriptor.id}`}
- className="rounded-full border border-border bg-muted/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground"
title={t("apikeys_view.optional_tooltip")}
>
{t("apikeys_view.optional")}
- </span>
+ </Tag>
)}
</div>
- <p className="mt-0.5 text-[11px] text-muted-foreground">
- <code className="font-mono">{descriptor.id}</code>
- {" · "}
- <span>
- {t(`apikeys_view.auth_mode_${descriptor.auth_mode}`)}
- </span>
+ <p className="mt-0.5 truncate text-xs text-muted-foreground">
+ {summary}
+ <span className="sr-only">{` · ${descriptor.id}`}</span>
</p>
</div>
@@ -1391,144 +1454,165 @@ export function ProviderCard({
: undefined
}
/>
+
+ {collapsible && (
+ <ChevronDown
+ aria-hidden="true"
+ className={cn(
+ "h-4 w-4 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",
+ expanded && "rotate-180",
+ )}
+ />
+ )}
</div>
- {/* The precise "this card is the problem" banner: only on the active card,
- only when the live check actually failed. Names the cause in plain
- words instead of leaving the user to guess behind the tab's red dot. */}
- {cardError && (
+ {/* BODY — everything that edits the provider. Mounted only while open,
+ so a collapsed list neither polls nor paints forty key forms. */}
+ {expanded && (
<div
- data-testid={`provider-health-error-${descriptor.id}`}
- role="status"
- className="flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/[0.07] px-3 py-2 text-[11px] leading-relaxed text-destructive"
+ id={`provider-body-${descriptor.id}`}
+ data-testid={`provider-body-${descriptor.id}`}
+ className="space-y-3 border-t border-border/60 bg-background/30 px-3.5 pb-3.5 pl-[3.75rem] pt-3"
>
- <XCircle className="mt-0.5 h-3.5 w-3.5 shrink-0" />
- <span className="min-w-0 break-words">
- <span className="font-medium">{t("apikeys_view.health_error")}</span>
- {cardErrorDetail ? ` — ${cardErrorDetail}` : ""}
- </span>
- </div>
- )}
+ {/* The precise "this card is the problem" banner: only on the active card,
+ only when the live check actually failed. Names the cause in plain
+ words instead of leaving the user to guess behind the tab's red dot. */}
+ {cardError && (
+ <div
+ data-testid={`provider-health-error-${descriptor.id}`}
+ role="status"
+ className="flex items-start gap-2 rounded-control border border-destructive/40 bg-destructive/[0.07] px-3 py-2 text-xs leading-relaxed text-destructive"
+ >
+ <XCircle className="mt-0.5 h-3.5 w-3.5 shrink-0" />
+ <span className="min-w-0 break-words">
+ <span className="font-medium">{t("apikeys_view.health_error")}</span>
+ {cardErrorDetail ? ` — ${cardErrorDetail}` : ""}
+ </span>
+ </div>
+ )}
- <AuthWidget
- descriptor={descriptor}
- onChanged={onChanged}
- onSavedActivate={handleSavedActivate}
- />
+ <AuthWidget
+ descriptor={descriptor}
+ onChanged={onChanged}
+ onSavedActivate={handleSavedActivate}
+ />
- {!isBrainSwitchable && (
- <p className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-[11px] leading-relaxed text-amber-700">
- {t("apikeys_view.agents_only_note").replace(
- "{0}",
- agentBrand(assistantName),
+ {!isBrainSwitchable && (
+ <p className="rounded-control border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:text-amber-400">
+ {t("apikeys_view.agents_only_note").replace(
+ "{0}",
+ agentBrand(assistantName),
+ )}
+ </p>
)}
- </p>
- )}
- {/* Model / voice picker. Every switchable brain provider shows its model
- picker — even before a key is set — because the catalog falls back to
- the provider's curated family without a key (no network, no error), so
- a model can be pre-picked. TTS/STT share a single global [tts]/[stt]
- block, so the picker only WRITES from the ACTIVE provider and sets the
- voice (Grok/Gemini/OpenAI/Google) or model (Cartesia/STT). */}
- {((descriptor.tier === "brain" && isBrainSwitchable) ||
- ((descriptor.tier === "tts" || descriptor.tier === "stt") &&
- descriptor.active &&
- descriptor.configured)) &&
- // OpenRouter TTS is the one provider where the user also picks a VOICE
- // (per model, language-tagged, with an audio preview) — render the
- // combined model + voice controls; every other tier keeps the plain
- // model/voice picker.
- (descriptor.id === "openrouter-tts" ? (
- <OpenRouterTtsControls
- providerId={descriptor.id}
- recommendedModel={descriptor.recommended_model}
- healthActive={descriptor.active}
- />
- ) : (
- <BrainModelSelector
- providerId={descriptor.id}
- recommendedModel={descriptor.recommended_model}
- healthSection={descriptor.tier}
- healthActive={descriptor.active}
- // An on-device provider's list is what is installed here, so there
- // is nothing to type — and with a single entry, nothing to pick.
- fixedCatalog={Boolean(descriptor.local_runtime)}
- />
- ))}
-
- {/* TTS/STT model/voice is a single global value, so a configured-but-
- inactive provider can't own it — make the capability discoverable with
- a hint instead of silently hiding the picker. */}
- {(descriptor.tier === "tts" || descriptor.tier === "stt") &&
- descriptor.configured &&
- !descriptor.active && (
- <p className="text-[11px] text-muted-foreground">
- {t("apikeys_view.model_picker_activate_hint")}
- </p>
- )}
+ {/* Model / voice picker. Every switchable brain provider shows its model
+ picker — even before a key is set — because the catalog falls back to
+ the provider's curated family without a key (no network, no error), so
+ a model can be pre-picked. TTS/STT share a single global [tts]/[stt]
+ block, so the picker only WRITES from the ACTIVE provider and sets the
+ voice (Grok/Gemini/OpenAI/Google) or model (Cartesia/STT). */}
+ {((descriptor.tier === "brain" && isBrainSwitchable) ||
+ ((descriptor.tier === "tts" || descriptor.tier === "stt") &&
+ descriptor.active &&
+ descriptor.configured)) &&
+ // OpenRouter TTS is the one provider where the user also picks a VOICE
+ // (per model, language-tagged, with an audio preview) — render the
+ // combined model + voice controls; every other tier keeps the plain
+ // model/voice picker.
+ (descriptor.id === "openrouter-tts" ? (
+ <OpenRouterTtsControls
+ providerId={descriptor.id}
+ recommendedModel={descriptor.recommended_model}
+ healthActive={descriptor.active}
+ />
+ ) : (
+ <BrainModelSelector
+ providerId={descriptor.id}
+ recommendedModel={descriptor.recommended_model}
+ healthSection={descriptor.tier}
+ healthActive={descriptor.active}
+ // An on-device provider's list is what is installed here, so there
+ // is nothing to type — and with a single entry, nothing to pick.
+ fixedCatalog={Boolean(descriptor.local_runtime)}
+ />
+ ))}
- {/* Phase 3: a dedicated Computer-Use model, selectable per brain provider
- (defaults to the provider's main model — no automatic escalation).
- Also shown under the Computer-Use tab (synthetic "computer-use"
- tier, same underlying brain id) — but never the plain
- BrainModelSelector above, which stays Brain-tab-only. */}
- {(descriptor.tier === "brain" || descriptor.tier === "computer-use") &&
- descriptor.configured &&
- isBrainSwitchable && (
- <CuModelSelector
- providerId={descriptor.id}
- recommendedModel={descriptor.recommended_model}
- healthActive={
- descriptor.tier === "computer-use"
- ? descriptor.active
- : Boolean(descriptor.computer_use_active)
- }
- />
- )}
+ {/* TTS/STT model/voice is a single global value, so a configured-but-
+ inactive provider can't own it — make the capability discoverable with
+ a hint instead of silently hiding the picker. */}
+ {(descriptor.tier === "tts" || descriptor.tier === "stt") &&
+ descriptor.configured &&
+ !descriptor.active && (
+ <p className="text-xs text-muted-foreground">
+ {t("apikeys_view.model_picker_activate_hint")}
+ </p>
+ )}
- {/* Realtime needs BOTH a model AND a voice pinned per provider — a
- dedicated compact control (two dropdowns), gated on the card
- already having a stored credential like the other tiers' pickers
- above. */}
- {descriptor.tier === "realtime" &&
- (descriptor.configured ||
- // Keep the model/voice pickers mounted through a transient busy
- // probe so the card does not visibly flicker while saying
- // "one moment".
- descriptor.codex_status?.reason_code === "busy") && (
- <RealtimeOptionsControl
- providerId={descriptor.id}
- healthActive={descriptor.active}
- />
- )}
+ {/* Phase 3: a dedicated Computer-Use model, selectable per brain provider
+ (defaults to the provider's main model — no automatic escalation).
+ Also shown under the Computer-Use tab (synthetic "computer-use"
+ tier, same underlying brain id) — but never the plain
+ BrainModelSelector above, which stays Brain-tab-only. */}
+ {(descriptor.tier === "brain" || descriptor.tier === "computer-use") &&
+ descriptor.configured &&
+ isBrainSwitchable && (
+ <CuModelSelector
+ providerId={descriptor.id}
+ recommendedModel={descriptor.recommended_model}
+ healthActive={
+ descriptor.tier === "computer-use"
+ ? descriptor.active
+ : Boolean(descriptor.computer_use_active)
+ }
+ />
+ )}
- {/* Footer: the live connectivity test, visually separated from the
- configuration body so "set up" and "verify" read as two steps. */}
- <div className="border-t border-border/60 pt-2.5">
- <ProviderTestControl
- providerId={descriptor.id}
- providerLabel={descriptor.label}
- section={descriptor.tier}
- active={descriptor.active}
- />
- </div>
+ {/* Realtime needs BOTH a model AND a voice pinned per provider — a
+ dedicated compact control (two dropdowns), gated on the card
+ already having a stored credential like the other tiers' pickers
+ above. */}
+ {descriptor.tier === "realtime" &&
+ (descriptor.configured ||
+ // Keep the model/voice pickers mounted through a transient busy
+ // probe so the card does not visibly flicker while saying
+ // "one moment".
+ descriptor.codex_status?.reason_code === "busy") && (
+ <RealtimeOptionsControl
+ providerId={descriptor.id}
+ healthActive={descriptor.active}
+ />
+ )}
+
+ {/* Footer: the live connectivity test, visually separated from the
+ configuration body so "set up" and "verify" read as two steps. */}
+ <div className="border-t border-border/60 pt-2.5">
+ <ProviderTestControl
+ providerId={descriptor.id}
+ providerLabel={descriptor.label}
+ section={descriptor.tier}
+ active={descriptor.active}
+ />
+ </div>
+ </div>
+ )}
</div>
</>
);
}
// Tone per status: green = works; amber = reached but key/account/model blocks
-// (integration is fine); red = couldn't reach / integration bug.
-const TEST_STATUS_TONE: Record<ProviderTestStatus, string> = {
- ok: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600",
- not_configured: "border-border bg-muted text-muted-foreground",
- bad_key: "border-amber-500/30 bg-amber-500/10 text-amber-600",
- no_credits: "border-amber-500/30 bg-amber-500/10 text-amber-600",
- rate_limited: "border-amber-500/30 bg-amber-500/10 text-amber-600",
- model_unavailable: "border-amber-500/30 bg-amber-500/10 text-amber-600",
- unreachable: "border-destructive/30 bg-destructive/10 text-destructive",
- error: "border-destructive/30 bg-destructive/10 text-destructive",
+// (integration is fine); red = couldn't reach / integration bug. A dot and a
+// word — the same vocabulary as the row's state, never a filled capsule.
+const TEST_STATUS_TONE: Record<ProviderTestStatus, { dot: string; text: string }> = {
+ ok: { dot: "bg-emerald-500", text: "text-emerald-600 dark:text-emerald-400" },
+ not_configured: { dot: "bg-muted-foreground/50", text: "text-muted-foreground" },
+ bad_key: { dot: "bg-amber-500", text: "text-amber-600 dark:text-amber-400" },
+ no_credits: { dot: "bg-amber-500", text: "text-amber-600 dark:text-amber-400" },
+ rate_limited: { dot: "bg-amber-500", text: "text-amber-600 dark:text-amber-400" },
+ model_unavailable: { dot: "bg-amber-500", text: "text-amber-600 dark:text-amber-400" },
+ unreachable: { dot: "bg-destructive", text: "text-destructive" },
+ error: { dot: "bg-destructive", text: "text-destructive" },
};
/**
@@ -1591,24 +1675,26 @@ export function ProviderTestControl({
}
}
- const tone = result ? TEST_STATUS_TONE[result.status] : "";
+ const tone = result ? TEST_STATUS_TONE[result.status] : null;
const note = result
? (result.integration_ok
? t("apikeys_test.integration_ok_note")
: t("apikeys_test.integration_bad_note"))
: "";
+ // Footer layout: the action on the left, its last answer on the right —
+ // "set up" above the line, "verify" below it.
return (
- <div className="flex flex-wrap items-center gap-2 pt-0.5">
+ <div className="flex flex-wrap items-center justify-between gap-2">
<Button
size="sm"
- variant="outline"
+ variant="ghost"
onClick={(e) => {
e.stopPropagation();
void run();
}}
disabled={running}
- className="h-7 gap-1.5 text-xs"
+ className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
>
{running ? (
<Loader2 className="h-3.5 w-3.5 animate-spin" />
@@ -1618,24 +1704,15 @@ export function ProviderTestControl({
{running ? t("apikeys_test.running") : t("apikeys_test.button")}
</Button>
- {result && (
+ {result && tone && (
<span
data-testid={`provider-test-result-${providerId}`}
- className={cn(
- "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px]",
- tone,
- )}
+ className={cn("inline-flex items-center gap-1.5 text-xs", tone.text)}
title={[note, result.detail, result.latency_ms ? `${Math.round(result.latency_ms)} ms` : ""]
.filter(Boolean)
.join("\n")}
>
- {result.status === "ok" ? (
- <Check className="h-3 w-3" />
- ) : result.integration_ok ? (
- <AlertCircle className="h-3 w-3" />
- ) : (
- <XCircle className="h-3 w-3" />
- )}
+ <span aria-hidden="true" className={cn("h-[7px] w-[7px] rounded-full", tone.dot)} />
{t(`apikeys_test.status_${result.status}`)}
{result.status === "ok" && result.latency_ms
? ` · ${Math.round(result.latency_ms)} ms`
@@ -1693,21 +1770,23 @@ export function ActiveControl({
)
: t("apikeys_view.needs_credentials");
+ // Visually a state word ("In use") or a quiet action ("Use"); semantically
+ // still a radio in a per-tier group, so browsers, screen readers and the
+ // tests keep the native exclusivity. The native control itself is hidden —
+ // the old radio-inside-a-pill read as a 2012 form element.
return (
<label
// The radio owns its own activation; letting the click bubble would run
- // the card handler for the same gesture and send a second API call.
- // (The card no longer binds onDoubleClick, so there is nothing else to
- // stop here.)
+ // the row handler for the same gesture and toggle the body.
onClick={(e) => e.stopPropagation()}
className={cn(
- "inline-flex shrink-0 select-none items-center gap-1.5 rounded-full border px-2.5 py-1.5 text-xs transition-colors focus-within:ring-2 focus-within:ring-primary focus-within:ring-offset-2 focus-within:ring-offset-background",
+ "inline-flex h-7 shrink-0 select-none items-center gap-2 whitespace-nowrap rounded-control px-2.5 text-xs transition-colors focus-within:ring-2 focus-within:ring-ring",
disabled ? "cursor-not-allowed" : "cursor-pointer",
descriptor.active
- ? "border-primary/40 bg-primary/10 font-semibold text-primary"
+ ? "font-medium text-foreground"
: descriptor.configured
- ? "border-border bg-background text-muted-foreground hover:border-primary/40 hover:text-foreground"
- : "border-border/60 text-muted-foreground/70",
+ ? "border border-border bg-background/60 text-muted-foreground hover:border-primary/50 hover:text-foreground"
+ : "border border-dashed border-border/80 text-muted-foreground/80 hover:text-foreground",
)}
title={labelTitle}
>
@@ -1717,8 +1796,17 @@ export function ActiveControl({
checked={descriptor.active}
onChange={() => onActivate()}
disabled={activating || disabled}
- className="accent-primary"
+ className="sr-only"
/>
+ {descriptor.active && (
+ <span
+ aria-hidden="true"
+ className={cn(
+ "h-[7px] w-[7px] rounded-full bg-primary",
+ activating && "animate-pulse motion-reduce:animate-none",
+ )}
+ />
+ )}
{activating
? t("apikeys_view.provider_activating")
: descriptor.active
@@ -1768,7 +1856,7 @@ export function BaseUrlField({
return (
<div className="space-y-1">
- <label className="text-[10px] uppercase tracking-wider text-muted-foreground">
+ <label className="text-xs uppercase tracking-wider text-muted-foreground">
{t("apikeys_base_url.label")}
</label>
<div className="flex gap-2">
@@ -1790,7 +1878,7 @@ export function BaseUrlField({
{saving ? t("apikeys_base_url.saving") : t("apikeys_base_url.save")}
</Button>
</div>
- <p className="text-[11px] leading-relaxed text-muted-foreground">
+ <p className="text-xs leading-relaxed text-muted-foreground">
{descriptor.default_base_url
? t("apikeys_base_url.hint_default")
: t("apikeys_base_url.hint_required")}
@@ -1910,7 +1998,7 @@ function LocalRuntimePanel({
const showAccelerator =
accelerator !== null && accelerator.reason !== "not_requested" && accelerator.reason !== "";
return (
- <div className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3">
+ <div className="space-y-2 border-t border-border/60 pt-3">
<div className="flex items-start gap-2 text-xs">
{status.ready ? (
<Check className="mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-500" />
@@ -1961,11 +2049,11 @@ function LocalRuntimePanel({
</Button>
)}
{gpuRunning && (
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_view.gpu_libraries_install_hint")}
</p>
)}
- {gpuError && <p className="text-[11px] text-destructive">{gpuError}</p>}
+ {gpuError && <p className="text-xs text-destructive">{gpuError}</p>}
{!status.ready && (
<Button
size="sm"
@@ -1987,12 +2075,12 @@ function LocalRuntimePanel({
</Button>
)}
{running && (
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_view.local_install_hint")}
</p>
)}
{error && (
- <p className="text-[11px] text-destructive">{error}</p>
+ <p className="text-xs text-destructive">{error}</p>
)}
</div>
);
@@ -2367,7 +2455,7 @@ function ManagedServerPanel({
.includes(normalizedVoiceQuery);
});
return (
- <div className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3">
+ <div className="space-y-2 border-t border-border/60 pt-3">
<div className="flex items-start gap-2 text-xs">
{status.ready ? (
<Check className="mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-500" />
@@ -2381,7 +2469,7 @@ function ManagedServerPanel({
{!running && installed && runtimeBadge && (
<div
- className="flex items-center gap-2 text-[11px]"
+ className="flex items-center gap-2 text-xs"
data-testid="managed-server-runtime"
aria-live="polite"
>
@@ -2429,7 +2517,7 @@ function ManagedServerPanel({
variant="secondary"
onClick={startServer}
disabled={lifecycleBusy}
- className="h-6 gap-1.5 px-2 text-[11px]"
+ className="h-6 gap-1.5 px-2 text-xs"
>
{lifecycleBusy ? (
<Loader2 className="h-3 w-3 animate-spin" />
@@ -2445,7 +2533,7 @@ function ManagedServerPanel({
variant="ghost"
onClick={stopServer}
disabled={lifecycleBusy}
- className="h-6 gap-1.5 px-2 text-[11px]"
+ className="h-6 gap-1.5 px-2 text-xs"
>
{lifecycleBusy ? (
<Loader2 className="h-3 w-3 animate-spin" />
@@ -2459,7 +2547,7 @@ function ManagedServerPanel({
)}
{setupNote && (
- <p className="text-[11px] text-muted-foreground" aria-live="polite">
+ <p className="text-xs text-muted-foreground" aria-live="polite">
{setupNote}
</p>
)}
@@ -2467,19 +2555,19 @@ function ManagedServerPanel({
{!running && catalog && (
<div className="space-y-3" data-testid="managed-model-picker">
<div className="grid gap-2 sm:grid-cols-3">
- <label className="space-y-1 rounded-md border border-border/60 bg-background/50 p-2">
- <span className="flex items-center gap-1.5 text-[11px] font-medium">
+ <label className="space-y-1.5">
+ <span className="flex items-center gap-1.5 text-xs font-medium">
<Mic className="h-3.5 w-3.5 text-muted-foreground" />
{t("apikeys_view.managed_hearing_title")}
</span>
<span className="block text-xs">{catalog.hearing.label}</span>
- <span className="block text-[10px] leading-snug text-muted-foreground">
+ <span className="block text-xs leading-snug text-muted-foreground">
{t("apikeys_view.managed_hearing_note")}
</span>
</label>
- <label className="space-y-1 rounded-md border border-border/60 bg-background/50 p-2">
- <span className="flex items-center gap-1.5 text-[11px] font-medium">
+ <label className="space-y-1.5">
+ <span className="flex items-center gap-1.5 text-xs font-medium">
<Brain className="h-3.5 w-3.5 text-muted-foreground" />
{t("apikeys_view.managed_thinking_title")}
</span>
@@ -2505,8 +2593,8 @@ function ManagedServerPanel({
/>
</label>
- <label className="space-y-1 rounded-md border border-border/60 bg-background/50 p-2">
- <span className="flex items-center gap-1.5 text-[11px] font-medium">
+ <label className="space-y-1.5">
+ <span className="flex items-center gap-1.5 text-xs font-medium">
<Volume2 className="h-3.5 w-3.5 text-muted-foreground" />
{t("apikeys_view.managed_speaking_title")}
</span>
@@ -2551,8 +2639,12 @@ function ManagedServerPanel({
</Button>
)}
- <details className="rounded-md border border-border/50 bg-background/30 p-2">
- <summary className="cursor-pointer text-[11px] font-medium">
+ <details className="group text-xs">
+ <summary className="inline-flex cursor-pointer list-none items-center gap-1.5 font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden">
+ <ChevronDown
+ aria-hidden="true"
+ className="h-3 w-3 -rotate-90 transition-transform group-open:rotate-0 motion-reduce:transition-none"
+ />
{t("apikeys_view.managed_full_catalog")}
</summary>
<LibraryBrowser
@@ -2566,11 +2658,12 @@ function ManagedServerPanel({
/>
</details>
- <details
- data-testid="managed-voice-catalog"
- className="rounded-md border border-border/50 bg-background/30 p-2"
- >
- <summary className="cursor-pointer text-[11px] font-medium">
+ <details data-testid="managed-voice-catalog" className="group text-xs">
+ <summary className="inline-flex cursor-pointer list-none items-center gap-1.5 font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden">
+ <ChevronDown
+ aria-hidden="true"
+ className="h-3 w-3 -rotate-90 transition-transform group-open:rotate-0 motion-reduce:transition-none"
+ />
{t("apikeys_view.managed_voice_catalog_title")}
</summary>
<div className="mt-2 space-y-2">
@@ -2590,7 +2683,7 @@ function ManagedServerPanel({
</label>
{voiceResults.length === 0 ? (
- <p className="px-1 py-2 text-[11px] text-muted-foreground">
+ <p className="px-1 py-2 text-xs text-muted-foreground">
{t("apikeys_view.managed_voice_catalog_empty")}
</p>
) : (
@@ -2610,18 +2703,18 @@ function ManagedServerPanel({
<div className="flex flex-wrap items-center gap-1.5">
<span className="text-xs font-medium">{choice.label}</span>
{choice.frontier && (
- <span className="rounded-full bg-primary/15 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wide text-primary">
+ <span className="rounded-full bg-primary/15 px-1.5 py-px text-xs font-semibold uppercase tracking-wide text-primary">
{t("apikeys_view.managed_voice_frontier")}
</span>
)}
{choice.streaming && (
- <span className="rounded-full border border-border px-1.5 py-px text-[9px] text-muted-foreground">
+ <span className="rounded-full border border-border px-1.5 py-px text-xs text-muted-foreground">
{t("apikeys_view.managed_voice_streaming")}
</span>
)}
<span
className={cn(
- "rounded-full border px-1.5 py-px text-[9px]",
+ "rounded-full border px-1.5 py-px text-xs",
choice.selectable
? "border-emerald-500/30 bg-emerald-500/10 text-emerald-500"
: "border-amber-500/30 bg-amber-500/10 text-amber-500",
@@ -2634,13 +2727,13 @@ function ManagedServerPanel({
)}
</span>
</div>
- <p className="break-all font-mono text-[10px] text-muted-foreground">
+ <p className="break-all font-mono text-xs text-muted-foreground">
{choice.model}
</p>
- <p className="text-[10px] leading-snug text-muted-foreground">
+ <p className="text-xs leading-snug text-muted-foreground">
{choice.note}
</p>
- <div className="flex flex-wrap items-center gap-1 text-[9px] text-muted-foreground">
+ <div className="flex flex-wrap items-center gap-1 text-xs text-muted-foreground">
{(choice.languages ?? []).slice(0, 12).map((language) => (
<span key={language} className="rounded bg-muted px-1 py-px uppercase">
{language}
@@ -2670,7 +2763,7 @@ function ManagedServerPanel({
variant={choice.id === selectedVoice ? "secondary" : "outline"}
disabled={setupBusy || !selectedBrain}
onClick={() => void applyVoiceChoice(choice)}
- className="h-7 shrink-0 gap-1 px-2 text-[10px]"
+ className="h-7 shrink-0 gap-1 px-2 text-xs"
>
{setupBusy && choice.id === selectedVoice ? (
<Loader2 className="h-3 w-3 animate-spin" />
@@ -2701,7 +2794,7 @@ function ManagedServerPanel({
style={{ width: `${Math.max(2, progress?.percent ?? 0)}%` }}
/>
</div>
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_view.managed_hint")}
</p>
</div>
@@ -2773,7 +2866,10 @@ function ManagedServerPanel({
size="sm"
variant="ghost"
onClick={remove}
- className="gap-2 text-destructive hover:text-destructive"
+ className={cn(
+ "gap-2 text-muted-foreground hover:text-destructive",
+ confirmRemove && "text-destructive",
+ )}
>
<XCircle className="h-3.5 w-3.5" />
{confirmRemove
@@ -2782,7 +2878,7 @@ function ManagedServerPanel({
</Button>
)}
- {error && <p className="text-[11px] text-destructive">{error}</p>}
+ {error && <p className="text-xs text-destructive">{error}</p>}
</div>
);
}
@@ -2888,7 +2984,7 @@ function OllamaRuntimePanel({
return (
<div
- className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3"
+ className="space-y-2 border-t border-border/60 pt-3"
data-testid="ollama-runtime-panel"
>
<div className="flex items-start gap-2 text-xs">
@@ -2915,7 +3011,7 @@ function OllamaRuntimePanel({
? t("apikeys_view.ollama_install_confirm")
: t("apikeys_view.ollama_install_cta")}
</Button>
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_view.ollama_install_hint")}
</p>
</div>
@@ -2938,7 +3034,7 @@ function OllamaRuntimePanel({
</Button>
)}
- {error && <p className="text-[11px] text-destructive">{error}</p>}
+ {error && <p className="text-xs text-destructive">{error}</p>}
</div>
);
}
@@ -3078,17 +3174,17 @@ function LibraryBrowser({
{browsing && (
<div className="space-y-1.5">
{searching && !results && (
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_model_pull.library_searching")}
</p>
)}
{/* An unreachable catalog is a note, never a blocker — the field
above still downloads by exact name. */}
{libraryError && (
- <p className="text-[11px] text-amber-500">{libraryError}</p>
+ <p className="text-xs text-amber-500">{libraryError}</p>
)}
{results && results.length === 0 && !libraryError && (
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_model_pull.library_no_results")}
</p>
)}
@@ -3108,13 +3204,13 @@ function LibraryBrowser({
<p className="truncate text-xs font-medium">
{model.name}
{model.installed && (
- <span className="ml-1.5 text-[10px] font-normal text-emerald-500">
+ <span className="ml-1.5 text-xs font-normal text-emerald-500">
{t("apikeys_model_pull.installed")}
</span>
)}
</p>
{model.description && (
- <p className="text-[11px] leading-snug text-muted-foreground">
+ <p className="text-xs leading-snug text-muted-foreground">
{model.description}
</p>
)}
@@ -3122,7 +3218,7 @@ function LibraryBrowser({
{model.capabilities.map((cap) => (
<span
key={cap}
- className="rounded bg-primary/10 px-1 py-px text-[9px] font-medium uppercase tracking-wide text-primary"
+ className="rounded bg-primary/10 px-1 py-px text-xs font-medium uppercase tracking-wide text-primary"
>
{cap}
</span>
@@ -3130,7 +3226,7 @@ function LibraryBrowser({
{model.sizes.slice(0, 6).map((size) => (
<span
key={size}
- className="rounded bg-muted px-1 py-px text-[9px] font-medium text-muted-foreground"
+ className="rounded bg-muted px-1 py-px text-xs font-medium text-muted-foreground"
>
{size}
</span>
@@ -3151,12 +3247,12 @@ function LibraryBrowser({
// whole settings page down by several screens.
<div className="max-h-56 space-y-1 overflow-y-auto border-t border-border/40 px-2 py-1.5">
{loadingTags && !tags[model.name] && (
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{t("apikeys_model_pull.library_loading_versions")}
</p>
)}
{tagsError && (
- <p className="text-[11px] text-amber-500">{tagsError}</p>
+ <p className="text-xs text-amber-500">{tagsError}</p>
)}
{(tags[model.name] ?? []).map((tag) => (
<div
@@ -3165,7 +3261,7 @@ function LibraryBrowser({
className="flex items-center justify-between gap-2"
>
<div className="min-w-0">
- <p className="truncate text-[11px]">
+ <p className="truncate text-xs">
<span className="font-mono">{tag.id}</span>{" "}
<span className="text-muted-foreground">
{tag.size_gb
@@ -3180,7 +3276,7 @@ function LibraryBrowser({
</span>
</p>
{tag.fit === "tight" && tag.fit_note && (
- <p className="text-[10px] leading-snug text-amber-500">
+ <p className="text-xs leading-snug text-amber-500">
{tag.fit_note}
</p>
)}
@@ -3188,14 +3284,14 @@ function LibraryBrowser({
{/* A hosted tag has no weights to fetch. Offering
"Download" for it would fail at the server. */}
{tag.cloud ? (
- <span className="shrink-0 text-[10px] text-muted-foreground">
+ <span className="shrink-0 text-xs text-muted-foreground">
{t("apikeys_model_pull.library_hosted")}
</span>
) : tag.installed && onInstalledSelect ? (
<Button
size="sm"
variant="secondary"
- className="h-6 shrink-0 gap-1 px-2 text-[10px]"
+ className="h-6 shrink-0 gap-1 px-2 text-xs"
disabled={disabled || pullingModel !== null}
onClick={() => onInstalledSelect(tag.id)}
>
@@ -3207,7 +3303,7 @@ function LibraryBrowser({
{installedActionLabel ?? t("apikeys_model_pull.installed")}
</Button>
) : tag.installed ? (
- <span className="flex shrink-0 items-center gap-1 text-[10px] text-emerald-500">
+ <span className="flex shrink-0 items-center gap-1 text-xs text-emerald-500">
<Check className="h-3 w-3" />
{t("apikeys_model_pull.installed")}
</span>
@@ -3215,7 +3311,7 @@ function LibraryBrowser({
<Button
size="sm"
variant="secondary"
- className="h-6 shrink-0 gap-1 px-2 text-[10px]"
+ className="h-6 shrink-0 gap-1 px-2 text-xs"
disabled={disabled || pullingModel !== null}
onClick={() => onPull(tag.id)}
>
@@ -3370,14 +3466,14 @@ export function LocalModelDownloadPanel({
return (
<div
data-testid={`provider-model-pull-${descriptor.id}`}
- className="space-y-2 rounded-md border border-border/60 bg-muted/30 p-3"
+ className="space-y-2 border-t border-border/60 pt-3"
>
<div className="flex items-center justify-between gap-2">
<p className="text-xs font-medium">{t("apikeys_model_pull.title")}</p>
{hardwareNote ? (
<span
data-testid="model-pull-hardware"
- className="text-[11px] text-muted-foreground"
+ className="text-xs text-muted-foreground"
>
{hardwareNote}
</span>
@@ -3385,13 +3481,13 @@ export function LocalModelDownloadPanel({
</div>
{catalog && !catalog.server_reachable && (
- <p className="text-[11px] text-amber-500">{catalog.message}</p>
+ <p className="text-xs text-amber-500">{catalog.message}</p>
)}
{groups.map((group) => (
<div key={group.role ?? "all"} className="space-y-1.5">
{group.role && (
- <p className="pt-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/80">
+ <p className="pt-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground/80">
{t(`apikeys_model_pull.role_${group.role}`)}
</p>
)}
@@ -3417,12 +3513,12 @@ export function LocalModelDownloadPanel({
)}
</span>
{row.recommended && (
- <span className="ml-1.5 whitespace-nowrap rounded-full bg-primary/15 px-1.5 py-px text-[9px] font-semibold uppercase tracking-wide text-primary">
+ <span className="ml-1.5 whitespace-nowrap rounded-full bg-primary/15 px-1.5 py-px text-xs font-semibold uppercase tracking-wide text-primary">
{t("apikeys_model_pull.best_for_machine")}
</span>
)}
</p>
- <p className="text-[11px] leading-snug text-muted-foreground">
+ <p className="text-xs leading-snug text-muted-foreground">
{row.purpose}
</p>
{/* The honest half of a recommendation: the comfortable note
@@ -3431,7 +3527,7 @@ export function LocalModelDownloadPanel({
{(row.fit === "tight" || row.recommended) && (
<p
className={cn(
- "text-[11px] leading-snug",
+ "text-xs leading-snug",
row.fit === "tight" ? "text-amber-500" : "text-muted-foreground/80",
)}
>
@@ -3440,7 +3536,7 @@ export function LocalModelDownloadPanel({
)}
</div>
{row.installed ? (
- <span className="flex shrink-0 items-center gap-1 text-[11px] text-emerald-500">
+ <span className="flex shrink-0 items-center gap-1 text-xs text-emerald-500">
<Check className="h-3.5 w-3.5" />
{t("apikeys_model_pull.installed")}
</span>
@@ -3477,7 +3573,7 @@ export function LocalModelDownloadPanel({
{progress && progress.state !== "idle" && (
<div className="space-y-1">
- <p className="text-[11px] text-muted-foreground">
+ <p className="text-xs text-muted-foreground">
{progress.model}: {progress.message}
</p>
{running && (
@@ -3490,7 +3586,7 @@ export function LocalModelDownloadPanel({
)}
</div>
)}
- {error && <p className="text-[11px] text-destructive">{error}</p>}
+ {error && <p className="text-xs text-destructive">{error}</p>}
</div>
);
}
@@ -3511,11 +3607,14 @@ export function AuthWidget({
descriptor.billing === "subscription" && descriptor.secret_keys.length === 0;
return (
<div className="space-y-2">
- <ProviderBillingBadge billing={descriptor.billing} />
+ {/* Billing now reads on the row summary line; the body starts with what
+ the user can DO. An experimental route keeps its one-paragraph note,
+ as plain text — the violet box said "warning" about a sentence that
+ never changes. */}
{descriptor.experimental && (
<div
data-testid={`provider-experimental-note-${descriptor.id}`}
- className="rounded-md border border-violet-500/30 bg-violet-500/[0.06] px-2.5 py-1.5 text-[11px] leading-snug text-muted-foreground"
+ className="text-xs leading-relaxed text-muted-foreground"
>
<p>
{/* The subscription wording ("uses the ChatGPT plan…") belongs to
@@ -3537,8 +3636,12 @@ export function AuthWidget({
<LocalRuntimePanel descriptor={descriptor} onChanged={onChanged} />
<ManagedServerPanel descriptor={descriptor} onChanged={onChanged} />
{descriptor.supports_base_url && descriptor.managed_server && (
- <details className="rounded-md border border-border/50 bg-muted/20 px-3 py-2">
- <summary className="cursor-pointer text-xs text-muted-foreground">
+ <details className="group text-xs">
+ <summary className="inline-flex cursor-pointer list-none items-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden">
+ <ChevronDown
+ aria-hidden="true"
+ className="h-3 w-3 -rotate-90 transition-transform group-open:rotate-0 motion-reduce:transition-none"
+ />
{t("apikeys_view.managed_advanced_connection")}
</summary>
<div className="pt-2">
@@ -3805,7 +3908,7 @@ function CodexAuthWidget({
status.message && (
<div
data-testid="codex-setup-detail"
- className="mt-2 break-words border-t border-border/60 pt-2 font-mono text-[11px]"
+ className="mt-2 break-words border-t border-border/60 pt-2 font-mono text-xs"
>
<span className="mr-1 font-sans">
{t("apikeys_codex.setup_detail_label")}
@@ -4018,11 +4121,24 @@ function AntigravityAuthWidget({
// One calm chip vocabulary for every card state. Sentence-case, small, and
// tonally consistent (gold = on, green = ready, neutral = untouched, red =
// broken) — replaces the earlier mix of shouting uppercase badges.
+/**
+ * Status as a dot and a word, not a tinted capsule.
+ *
+ * `active` is the one chip that still frames itself (gold text, hairline),
+ * because it is the one a user scans a list for. Everything else is a 7 px
+ * dot in the semantic colour beside muted text — green means works, red means
+ * blocked, grey means nothing to report — so six colours of pills collapse
+ * into one quiet vocabulary. Semantic colour stays separate from the gold
+ * accent: gold is "selected", never "healthy".
+ */
const STATE_CHIP_TONE = {
- active: "border-primary/40 bg-primary/15 text-primary font-semibold",
- ready: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600",
- missing: "border-destructive/30 bg-destructive/10 text-destructive",
- neutral: "border-border bg-muted text-muted-foreground",
+ active: {
+ wrap: "rounded-[4px] border border-primary/40 px-1.5 text-[10.5px] font-semibold uppercase tracking-[0.06em] text-primary",
+ dot: null,
+ },
+ ready: { wrap: "text-muted-foreground", dot: "bg-emerald-500" },
+ missing: { wrap: "text-destructive", dot: "bg-destructive" },
+ neutral: { wrap: "text-muted-foreground", dot: "bg-muted-foreground/50" },
} as const;
export function StateChip({
@@ -4031,12 +4147,48 @@ export function StateChip({
}: {
tone: keyof typeof STATE_CHIP_TONE;
children: React.ReactNode;
+}) {
+ const meta = STATE_CHIP_TONE[tone];
+ return (
+ <span
+ className={cn(
+ "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap text-xs leading-5",
+ meta.wrap,
+ )}
+ >
+ {meta.dot && (
+ <span aria-hidden="true" className={cn("h-[7px] w-[7px] rounded-full", meta.dot)} />
+ )}
+ {children}
+ </span>
+ );
+}
+
+/**
+ * A small uppercase label for a property of the row — Recommended, Beta,
+ * Optional, Not recommended. Hairline and text, no fill: at most one of these
+ * per row carries meaning, and a row of filled capsules carried none.
+ */
+export function Tag({
+ tone,
+ title,
+ children,
+ ...rest
+}: {
+ tone: "accent" | "neutral" | "warn";
+ title?: string;
+ children: React.ReactNode;
+ "data-testid"?: string;
}) {
return (
<span
+ {...rest}
+ title={title}
className={cn(
- "inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium",
- STATE_CHIP_TONE[tone],
+ "inline-flex shrink-0 items-center rounded-[4px] border px-1.5 text-[10.5px] font-semibold uppercase leading-[18px] tracking-[0.06em]",
+ tone === "accent" && "border-primary/40 text-primary",
+ tone === "neutral" && "border-border text-muted-foreground",
+ tone === "warn" && "border-amber-500/40 text-amber-600 dark:text-amber-400",
)}
>
{children}
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index d5da7a3b68..911ab0e965 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -1513,6 +1513,9 @@
"mode_pick_one_hint": "Du musst nur einen Sprachmodus einrichten.",
"mode_keys_hint": "Realtime braucht einen aktiven Anbieter mit Subscription-Login oder API-Key. Die Pipeline braucht eigene Zugangsdaten für Spracheingabe, Sprachausgabe und Brain. Tool Model und {name}-Agents gelten für beide Modi.",
"mode_realtime_preview": "Research-Preview – noch nicht fertig. Viele Tools und Funktionen laufen im Realtime-Modus noch nicht.",
+ "mode_realtime_preview_short": "Research-Preview",
+ "alt_credential_title": "Alternative: {0}",
+ "alt_credential_setup": "{0} einrichten",
"runtime_switching": "Die aktuelle Sprach-Session wird mit der ausgewählten Engine neu gestartet…",
"runtime_idle": "Keine Sprach-Session ist aktiv. Die Auswahl gilt für die nächste Session.",
"runtime_realtime": "Aktuelle Session: Realtime",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 0b51c2e5fe..1970c2c7f5 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -1513,6 +1513,9 @@
"mode_pick_one_hint": "You only need to set up one voice mode.",
"mode_keys_hint": "Realtime needs one live provider, using either a subscription login or an API key. Pipeline needs its own Voice Input, Voice Output and Brain credentials. Tool Model and {name}-Agents apply to both modes.",
"mode_realtime_preview": "Research preview — not finished yet. Many tools and features don't work in realtime mode.",
+ "mode_realtime_preview_short": "Research preview",
+ "alt_credential_title": "Alternative: {0}",
+ "alt_credential_setup": "Set up {0}",
"runtime_switching": "Restarting the current voice session with the selected engine…",
"runtime_idle": "No voice session is active. This selection applies to the next one.",
"runtime_realtime": "Current session: Realtime",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 36bd152a9c..e09d1cfa3f 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -1513,6 +1513,9 @@
"mode_pick_one_hint": "Solo necesitas configurar un modo de voz.",
"mode_keys_hint": "Tiempo real necesita un proveedor activo, con una suscripción o una clave API. La pipeline necesita sus propias credenciales de Entrada de voz, Salida de voz e IA. Tool Model y {name}-Agents valen para ambos modos.",
"mode_realtime_preview": "Research preview: aún sin terminar. Muchas herramientas y funciones todavía no funcionan en modo realtime.",
+ "mode_realtime_preview_short": "Research preview",
+ "alt_credential_title": "Alternativa: {0}",
+ "alt_credential_setup": "Configurar {0}",
"runtime_switching": "Reiniciando la sesión de voz actual con el motor seleccionado…",
"runtime_idle": "No hay ninguna sesión de voz activa. Esta selección se aplicará a la siguiente.",
"runtime_realtime": "Sesión actual: Tiempo real",
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
index 45aa1781b3..bddd75b8a1 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
@@ -139,7 +139,7 @@ export function ApiKeysView() {
title={t("apikeys_view.title")}
subtitle={t("apikeys_view.subtitle")}
right={
- <div className="flex items-start gap-2">
+ <div className="flex items-center gap-3">
<LocalModeSwitch enabled={localMode} onToggle={setLocalMode} />
<EngineModeSwitch
mode={engineMode}
@@ -156,7 +156,7 @@ export function ApiKeysView() {
<div
data-testid="api-keys-provider-scroll"
- className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis px-4 py-4"
+ className="min-h-0 flex-1 overflow-y-auto scrollbar-jarvis px-6 py-3"
>
<VoiceEngineContext
mode={engineMode}
@@ -272,24 +272,25 @@ function CategoryTabs({
return (
<div
data-testid="api-keys-category-tabs"
- className="shrink-0 overflow-x-auto border-b border-border px-4 py-2 scrollbar-jarvis"
+ className="shrink-0 overflow-x-auto border-b border-border px-6 scrollbar-jarvis"
>
- <div role="tablist" className="flex min-w-max flex-nowrap items-center gap-1.5">
- <div className="flex flex-nowrap items-center gap-1 rounded-xl border border-border bg-card/40 p-1">
- {coreTabs.map((key) => (
- <TabButton
- key={key}
- icon={tabMeta[key].icon}
- label={tabMeta[key].label}
- selected={active === key}
- onClick={() => onSelect(key)}
- health={health[key]}
- />
- ))}
- </div>
+ {/* Underline tabs on the header's own rule — no pill group inside a
+ frame inside a bar. The core tabs and the two secondary ones share
+ one baseline; a hairline separates them. */}
+ <div role="tablist" className="flex min-w-max flex-nowrap items-center gap-1">
+ {coreTabs.map((key) => (
+ <TabButton
+ key={key}
+ icon={tabMeta[key].icon}
+ label={tabMeta[key].label}
+ selected={active === key}
+ onClick={() => onSelect(key)}
+ health={health[key]}
+ />
+ ))}
{(showJarvisKey || showAdvanced) && (
<span
- className="mx-1 hidden h-6 w-px bg-border/70 sm:block"
+ className="mx-2 hidden h-4 w-px bg-border sm:block"
aria-hidden="true"
/>
)}
@@ -365,33 +366,31 @@ function TabButton({
onClick={onClick}
title={title}
className={cn(
- "relative inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",
- muted
- ? selected
- ? "bg-secondary text-foreground ring-1 ring-border"
- : "text-muted-foreground/70 hover:bg-secondary/50 hover:text-foreground"
- : selected
- ? "bg-primary/10 text-primary ring-1 ring-primary/30"
- : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",
- // A faint red outline echoes the "rot umrandet" cue for a broken section,
- // independent of the selection ring so the two never fight.
- indicator === "error" && "outline outline-1 outline-destructive/70",
+ "relative -mb-px inline-flex h-10 shrink-0 items-center gap-2 whitespace-nowrap border-b-2 px-3 text-[13px] font-medium transition-colors",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
+ selected
+ ? "border-primary text-foreground"
+ : muted
+ ? "border-transparent text-muted-foreground/70 hover:text-foreground"
+ : "border-transparent text-muted-foreground hover:text-foreground",
)}
>
- <Icon className="h-4 w-4" />
- {label}
- {indicator && (
- <>
- <span
- aria-hidden="true"
- className={cn(
- "absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-background",
- indicator === "error" ? "bg-destructive" : "bg-amber-500",
- )}
- />
- <span className="sr-only">{` (${statusLabel})`}</span>
- </>
+ {/* The attention dot sits where the icon would: it is the only colour in
+ the bar besides the gold underline, so a dot always means "look here"
+ — red for "set up but broken", amber for "still to set up". */}
+ {indicator ? (
+ <span
+ aria-hidden="true"
+ className={cn(
+ "h-[7px] w-[7px] shrink-0 rounded-full",
+ indicator === "error" ? "bg-destructive" : "bg-amber-500",
+ )}
+ />
+ ) : (
+ <Icon className="h-4 w-4 opacity-80" />
)}
+ {label}
+ {indicator && <span className="sr-only">{` (${statusLabel})`}</span>}
</button>
);
}
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx
index b5f210eb35..f7ba25e275 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.two-mode.test.tsx
@@ -145,7 +145,9 @@ describe("ApiKeysView two-mode", () => {
it("shows a research-preview disclaimer when Realtime is selected", () => {
render(<ApiKeysView />);
fireEvent.click(screen.getByRole("button", { name: /^realtime/i }));
- expect(screen.getByText(/research preview/i)).toBeTruthy();
+ // The caveat is a tag with the full sentence for assistive tech, so the
+ // phrase appears more than once — what matters is that it is on screen.
+ expect(screen.getAllByText(/research preview/i).length).toBeGreaterThan(0);
});
it("shows when the selected Realtime mode is still served by Pipeline", () => {
diff --git a/scripts/ci/check_brand_logos.py b/scripts/ci/check_brand_logos.py
index d9ea613b80..4f3e01ca09 100644
--- a/scripts/ci/check_brand_logos.py
+++ b/scripts/ci/check_brand_logos.py
@@ -23,8 +23,13 @@ import sys
from pathlib import Path
_ROOT = Path(__file__).resolve().parents[2]
-_BRANDS = _ROOT / "jarvis" / "ui" / "web" / "frontend" / "src" / "assets" / "brands"
-_LEDGER = _BRANDS / "LOGOS.md"
+_FRONTEND_ASSETS = _ROOT / "jarvis" / "ui" / "web" / "frontend" / "src" / "assets"
+# Two folders, one rulebook: the plugin-store marks and the provider-card
+# marks. Each keeps its own LOGOS.md ledger next to the files it records.
+_FOLDERS = (
+ _FRONTEND_ASSETS / "brands",
+ _FRONTEND_ASSETS / "providers",
+)
# Generous: a real icon is square, but a few legitimate marks are slightly
# rectangular. Anything past this is a logotype.
@@ -51,16 +56,13 @@ def _aspect(svg: str) -> float | None:
return parts[2] / parts[3]
-def main() -> int:
- if not _BRANDS.is_dir():
- print("check_brand_logos: no brands folder - nothing to check.")
- return 0
-
- ledger = _LEDGER.read_text(encoding="utf-8") if _LEDGER.exists() else ""
- problems: list[str] = []
-
- for path in sorted(_BRANDS.glob("*.svg")):
- plugin_id = path.stem
+def _check_folder(folder: Path, problems: list[str]) -> int:
+ """Append findings for one folder; return how many marks it holds."""
+ ledger_path = folder / "LOGOS.md"
+ ledger = ledger_path.read_text(encoding="utf-8") if ledger_path.exists() else ""
+ marks = sorted(folder.glob("*.svg"))
+ for path in marks:
+ mark_id = path.stem
svg = path.read_text(encoding="utf-8", errors="replace")
where = path.relative_to(_ROOT).as_posix()
@@ -84,23 +86,40 @@ def main() -> int:
"use the vendor's icon variant"
)
- if f"| {plugin_id} |" not in ledger:
+ if f"| {mark_id} |" not in ledger:
problems.append(
f"{where}: no row in LOGOS.md - every bundled mark needs its "
"source and legal basis recorded"
)
+ # A raster mark is allowed only as a standalone file (a vendor that ships
+ # no vector icon), and it still needs its row.
+ for path in sorted(folder.glob("*.png")):
+ if f"| {path.stem} |" not in ledger:
+ where = path.relative_to(_ROOT).as_posix()
+ problems.append(f"{where}: no row in LOGOS.md - record source and legal basis")
+ return len(marks) + len(list(folder.glob("*.png")))
+
+
+def main() -> int:
+ problems: list[str] = []
+ count = 0
+ checked = 0
+ for folder in _FOLDERS:
+ if not folder.is_dir():
+ continue
+ checked += 1
+ count += _check_folder(folder, problems)
+ if checked == 0:
+ print("check_brand_logos: no brand folders - nothing to check.")
+ return 0
if problems:
print("BRAND-LOGO GATE FAILED\n")
for problem in problems:
print(f" [x] {problem}")
- print(
- f"\n{len(problems)} finding(s). See "
- "jarvis/ui/web/frontend/src/assets/brands/LOGOS.md for the rules."
- )
+ print(f"\n{len(problems)} finding(s). See the LOGOS.md next to the files for the rules.")
return 1
- count = len(list(_BRANDS.glob("*.svg")))
print(f"check_brand_logos: OK - {count} bundled marks, all safe and recorded.")
return 0