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): redesign the API-Keys section — instant engine switch, calm cards, model guidance

Ruben Lütke8ea9465e7c59
diff --git a/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts b/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
index a1ac1b941e..f095a5676c 100644
--- a/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useVoiceMode.ts
@@ -19,7 +19,21 @@ export function useVoiceMode() {
if (!r.ok) throw new Error(await r.text());
return r.json();
},
- onSuccess: () => qc.invalidateQueries({ queryKey: ["voice-mode"] }),
+ // Optimistic: flip the cached mode BEFORE the PUT resolves, so the
+ // Pipeline|Realtime segment's filled "live" state follows the click
+ // instantly (the persist can take seconds on a busy backend, and the UI
+ // used to only update after PUT + a full refetch — the switch felt dead).
+ // A failed PUT rolls back to the previous server truth.
+ onMutate: async (mode: string) => {
+ await qc.cancelQueries({ queryKey: ["voice-mode"] });
+ const prev = qc.getQueryData<VoiceModeResp>(["voice-mode"]);
+ if (prev) qc.setQueryData<VoiceModeResp>(["voice-mode"], { ...prev, mode });
+ return { prev };
+ },
+ onError: (_err, _mode, ctx) => {
+ if (ctx?.prev) qc.setQueryData(["voice-mode"], ctx.prev);
+ },
+ onSettled: () => qc.invalidateQueries({ queryKey: ["voice-mode"] }),
});
// Activating a realtime provider CARD (ApiKeysView's ProviderCategory, the
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index c78cb9ccf5..632327f056 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -881,7 +881,9 @@
"mode_active_badge": "Aktiv",
"voice_engine_label": "Sprach-Engine",
"voice_engine_desc": "Wie Jarvis zuhört und spricht — die klassische Pipeline oder ein einzelnes Realtime-Modell.",
- "mode_needs_key": "Schlüssel nötig",
+ "mode_needs_key": "Realtime braucht einen API-Key — unten einen hinzufügen, dann umschalten.",
+ "mode_desc_pipeline": "Drei Schritte: Sprache zu Text, das Brain denkt, Text zu Sprache.",
+ "mode_desc_realtime": "Ein Modell hört zu und antwortet im selben Live-Audiostrom.",
"cat_brain_desc": "Das Modell, das Chat, Routing und Computer-Use antreibt.",
"cat_tts_desc": "Die Stimme, mit der Jarvis spricht.",
"cat_stt_desc": "Wie Jarvis deine Sprache in Text umwandelt.",
@@ -907,7 +909,11 @@
"security_notice": "",
"realtime_model_label": "Realtime-Modell",
"realtime_voice_label": "Stimme",
- "realtime_provider_default": "Anbieter-Standard"
+ "realtime_provider_default": "Anbieter-Standard (empfohlen)",
+ "guide_realtime_title": "Welches Modell soll ich nehmen?",
+ "guide_realtime_body": "OpenAI: GPT Realtime (der Anbieter-Standard) klingt am natürlichsten; GPT Realtime Mini ist die günstige Wahl. Google: Gemini 3.1 Flash Live ist das aktuelle Live-Flaggschiff. „Anbieter-Standard“ löst immer auf das empfohlene Modell auf — du kannst es einfach so lassen.",
+ "guide_computer_use_title": "Welcher Provider soll Computer-Use ausführen?",
+ "guide_computer_use_body": "Computer-Use schaut auf Screenshots deines Bildschirms und braucht deshalb ein Modell, das Bilder versteht — die Auswahl blendet reine Text-Modelle aus. Im Zweifel: beim Haupt-Brain-Provider und seinem Standard-Modell bleiben."
},
"apikeys_test": {
"button": "Testen",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 7640b073b3..23ba9eaad5 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -881,7 +881,9 @@
"mode_active_badge": "Active",
"voice_engine_label": "Voice engine",
"voice_engine_desc": "How Jarvis listens and talks — the classic pipeline, or a single realtime model.",
- "mode_needs_key": "add a key",
+ "mode_needs_key": "Realtime needs an API key — add one below to switch.",
+ "mode_desc_pipeline": "Three steps: speech-to-text, the Brain thinks, text-to-speech.",
+ "mode_desc_realtime": "One model listens and answers in the same live audio stream.",
"cat_brain_desc": "The model that powers chat, routing, and Computer-Use.",
"cat_tts_desc": "The voice Jarvis speaks with.",
"cat_stt_desc": "How Jarvis turns your speech into text.",
@@ -908,7 +910,11 @@
"trademark_notice": "Provider and service names and logos are trademarks of their respective owners, shown only to identify the integrations you can connect. No affiliation or endorsement is implied.",
"realtime_model_label": "Realtime model",
"realtime_voice_label": "Voice",
- "realtime_provider_default": "Provider default"
+ "realtime_provider_default": "Provider default (recommended)",
+ "guide_realtime_title": "Which model should I pick?",
+ "guide_realtime_body": "OpenAI: GPT Realtime (the provider default) sounds the most natural; GPT Realtime Mini is the budget pick. Google: Gemini 3.1 Flash Live is the current Live flagship. \"Provider default\" always resolves to the recommended model, so you can simply leave it.",
+ "guide_computer_use_title": "Which provider should run Computer-Use?",
+ "guide_computer_use_body": "Computer-Use looks at screenshots of your screen, so it needs a model that understands images — the picker hides text-only models. If unsure, keep your main Brain provider and its default model."
},
"apikeys_test": {
"button": "Test",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index e1828a1c89..e1a91b9276 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -881,7 +881,9 @@
"mode_active_badge": "Activo",
"voice_engine_label": "Motor de voz",
"voice_engine_desc": "Cómo escucha y habla Jarvis: la pipeline clásica o un único modelo en tiempo real.",
- "mode_needs_key": "falta una clave",
+ "mode_needs_key": "Tiempo real necesita una clave API — añade una abajo para cambiar.",
+ "mode_desc_pipeline": "Tres pasos: voz a texto, el Brain piensa, texto a voz.",
+ "mode_desc_realtime": "Un solo modelo escucha y responde en el mismo flujo de audio en vivo.",
"cat_brain_desc": "El modelo que impulsa el chat, el enrutamiento y Computer-Use.",
"cat_tts_desc": "La voz con la que habla Jarvis.",
"cat_stt_desc": "Cómo convierte Jarvis tu voz en texto.",
@@ -907,7 +909,11 @@
"security_notice": "",
"realtime_model_label": "Modelo en tiempo real",
"realtime_voice_label": "Voz",
- "realtime_provider_default": "Predeterminado del proveedor"
+ "realtime_provider_default": "Predeterminado del proveedor (recomendado)",
+ "guide_realtime_title": "¿Qué modelo debería elegir?",
+ "guide_realtime_body": "OpenAI: GPT Realtime (el predeterminado del proveedor) suena más natural; GPT Realtime Mini es la opción económica. Google: Gemini 3.1 Flash Live es el buque insignia actual de Live. «Predeterminado del proveedor» siempre resuelve al modelo recomendado, así que puedes dejarlo tal cual.",
+ "guide_computer_use_title": "¿Qué proveedor debería ejecutar Computer-Use?",
+ "guide_computer_use_body": "Computer-Use mira capturas de tu pantalla, así que necesita un modelo que entienda imágenes — el selector oculta los modelos de solo texto. En caso de duda, quédate con tu proveedor Brain principal y su modelo predeterminado."
},
"apikeys_test": {
"button": "Probar",
diff --git a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
index 07b70164c2..cd5e6a1af8 100644
--- a/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+++ b/jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
-import { AlertCircle, Bot, Brain, Check, Copy, KeyRound, Loader2, LogIn, LogOut, Mic, Phone, PlugZap, Radio, SlidersHorizontal, Terminal, Volume2, XCircle } from "lucide-react";
+import { AlertCircle, Bot, Brain, Check, Copy, KeyRound, Loader2, LogIn, LogOut, Mic, Phone, PlugZap, Radio, SlidersHorizontal, Sparkles, Terminal, Volume2, Waypoints, XCircle } from "lucide-react";
import { ViewHeader } from "@/views/ChatsView";
import { AltCredentialNote } from "@/components/AltCredentialNote";
import { ApiKeyForm } from "@/components/ApiKeyForm";
@@ -161,6 +161,11 @@ export function ApiKeysView() {
<CategoryTabs active={active} onSelect={setActive} health={health} tabs={modeTabs} />
<div className="flex-1 overflow-y-auto scrollbar-jarvis p-6">
+ {/* Readability: the provider cards used to stretch across the full
+ window width (2000px+ on wide screens). One centered measure keeps
+ every card scannable; the key prop re-runs the rise animation on
+ each tab/mode change (respects prefers-reduced-motion). */}
+ <div key={`${engineMode}-${active}`} className="profile-rise mx-auto w-full max-w-4xl">
{(active === "brain" || active === "tts" || active === "stt") && (
<ProviderCategory
meta={categories[active]}
@@ -197,6 +202,7 @@ export function ApiKeysView() {
)}
{active === "subagents" && <SubagentCategory />}
{active === "advanced" && <AdvancedCategory />}
+ </div>
</div>
</div>
);
@@ -211,15 +217,18 @@ export function ApiKeysView() {
* the Realtime tab without silently pinning the boot default to a dead
* engine.
*
- * Visual system (one system, two legible states — replaces the old
- * two-color gold-ring + emerald-badge combo):
- * - The segment matching the LIVE `[voice].mode` is the filled solid
- * segment (`bg-primary`) with a leading "●" — unmistakably "this is on".
+ * Visual system (one system, two legible states):
+ * - A sliding gold thumb sits under the segment matching the LIVE
+ * `[voice].mode` — unmistakably "this engine is on". `useVoiceMode` updates
+ * its cache optimistically, so the thumb follows the click INSTANTLY and
+ * only rolls back if the persist fails.
* - The segment currently being VIEWED but not live gets a subtle outline
* only (no fill) — it's a transient look, not "on".
* - Realtime with no key configured anywhere (`!realtimeAvailable`) reads
- * muted with an inline "add a key" hint; it stays clickable (opens the
+ * muted with an "add a key" caption below; it stays clickable (opens the
* Realtime tab so the user can add one) but never gets the fill.
+ * - One caption line under the control describes the VIEWED engine in plain
+ * words, so "Pipeline vs Realtime" needs no prior knowledge.
*/
function EngineModeSwitch({
mode,
@@ -238,10 +247,11 @@ function EngineModeSwitch({
onSetVoiceMode: (mode: string) => void;
}) {
const t = useT();
- const segments: { key: VoiceEngineMode; label: string }[] = [
- { key: "pipeline", label: t("apikeys_view.mode_pipeline") },
- { key: "realtime", label: t("apikeys_view.mode_realtime") },
+ const segments: { key: VoiceEngineMode; label: string; icon: LucideIcon }[] = [
+ { key: "pipeline", label: t("apikeys_view.mode_pipeline"), icon: Waypoints },
+ { key: "realtime", label: t("apikeys_view.mode_realtime"), icon: Radio },
];
+ const liveIndex = liveMode === "realtime" ? 1 : 0;
function handleSelect(seg: VoiceEngineMode) {
onSelect(seg);
@@ -252,48 +262,65 @@ function EngineModeSwitch({
return (
<div className="border-b border-border px-6 pt-4 pb-4">
- <div className="mb-2.5">
- <h2 className="text-sm font-semibold text-foreground">{t("apikeys_view.voice_engine_label")}</h2>
- <p className="text-xs text-muted-foreground">{t("apikeys_view.voice_engine_desc")}</p>
- </div>
- <div className="inline-flex items-center gap-1 rounded-xl border border-border bg-card/40 p-1">
- {segments.map((seg) => {
- const isLive = liveMode === seg.key;
- const isViewedOnly = mode === seg.key && !isLive;
- const needsKey = seg.key === "realtime" && !realtimeAvailable;
- return (
- <div key={seg.key} className="inline-flex items-center gap-1.5">
- <button
- type="button"
- onClick={() => handleSelect(seg.key)}
- aria-pressed={mode === seg.key}
- className={cn(
- "inline-flex items-center gap-1.5 rounded-lg px-3.5 py-1.5 text-sm font-medium transition-colors",
- isLive
- ? "bg-primary text-primary-foreground shadow-sm"
- : isViewedOnly
- ? "text-foreground ring-1 ring-border"
- : needsKey
- ? "text-muted-foreground/60 hover:bg-secondary/40 hover:text-muted-foreground"
- : "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",
- )}
- >
- {isLive && (
- <span aria-hidden="true" className="text-[10px] leading-none">
- ●
- </span>
- )}
- {seg.label}
- {isLive && <span className="sr-only">{t("apikeys_view.mode_active_badge")}</span>}
- </button>
- {needsKey && (
- <span className="pr-2 text-[10px] text-muted-foreground/70">
- {t("apikeys_view.mode_needs_key")}
- </span>
- )}
- </div>
- );
- })}
+ <div className="flex flex-wrap items-start justify-between gap-x-6 gap-y-3">
+ <div className="min-w-0">
+ <h2 className="font-display text-sm font-semibold text-foreground">
+ {t("apikeys_view.voice_engine_label")}
+ </h2>
+ <p className="mt-0.5 text-xs text-muted-foreground">
+ {t("apikeys_view.voice_engine_desc")}
+ </p>
+ </div>
+
+ <div className="shrink-0">
+ {/* Two equal segments over one sliding thumb: the thumb tracks the
+ LIVE engine, so its glide IS the switch feedback. */}
+ <div className="relative grid w-64 grid-cols-2 rounded-xl border border-border bg-card/40 p-1">
+ <span
+ aria-hidden="true"
+ className="absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] rounded-lg bg-primary shadow-[0_0_18px_rgba(255,214,10,0.25)] transition-transform duration-200 ease-out"
+ style={{ transform: `translateX(${liveIndex * 100}%)` }}
+ />
+ {segments.map((seg) => {
+ const isLive = liveMode === seg.key;
+ const isViewedOnly = mode === seg.key && !isLive;
+ const needsKey = seg.key === "realtime" && !realtimeAvailable;
+ const Icon = seg.icon;
+ return (
+ <button
+ key={seg.key}
+ type="button"
+ onClick={() => handleSelect(seg.key)}
+ aria-pressed={mode === seg.key}
+ className={cn(
+ "relative z-10 inline-flex items-center justify-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ isLive
+ ? "text-primary-foreground"
+ : isViewedOnly
+ ? "text-foreground ring-1 ring-border"
+ : needsKey
+ ? "text-muted-foreground/60 hover:text-muted-foreground"
+ : "text-muted-foreground hover:text-foreground",
+ )}
+ >
+ <Icon aria-hidden="true" className="h-3.5 w-3.5" />
+ {seg.label}
+ {isLive && (
+ <span className="sr-only">{t("apikeys_view.mode_active_badge")}</span>
+ )}
+ </button>
+ );
+ })}
+ </div>
+ <p className="mt-1.5 max-w-64 text-right text-[11px] leading-snug text-muted-foreground">
+ {mode === "realtime" && !realtimeAvailable
+ ? t("apikeys_view.mode_needs_key")
+ : mode === "realtime"
+ ? t("apikeys_view.mode_desc_realtime")
+ : t("apikeys_view.mode_desc_pipeline")}
+ </p>
+ </div>
</div>
</div>
);
@@ -475,6 +502,24 @@ function CategoryHero({
);
}
+/**
+ * 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).
+ */
+function GuidancePanel({ title, body }: { title: string; body: string }) {
+ return (
+ <div className="mb-5 flex items-start gap-3 rounded-xl border border-primary/25 bg-primary/[0.05] px-4 py-3">
+ <Sparkles aria-hidden="true" className="mt-0.5 h-4 w-4 shrink-0 text-primary" />
+ <div className="min-w-0 text-xs leading-relaxed">
+ <p className="font-medium text-foreground">{title}</p>
+ <p className="mt-0.5 text-muted-foreground">{body}</p>
+ </div>
+ </div>
+ );
+}
+
/**
* One of the three provider tiers (brain/tts/stt): the hero band plus the
* loading / error / empty / card states. The card list itself is `TierSection`,
@@ -489,6 +534,7 @@ function ProviderCategory({
onChanged,
onActivateOptimistic,
health,
+ intro,
}: {
meta: CategoryMeta;
tier: ProviderTier;
@@ -500,6 +546,8 @@ function ProviderCategory({
/** Live health of this tier's ACTIVE provider — drills the tab's red dot down
* onto the exact card that is failing so the user sees WHICH provider broke. */
health?: SectionHealth;
+ /** Optional guidance band rendered between the hero and the card list. */
+ intro?: React.ReactNode;
}) {
const t = useT();
const tierProviders = providers.filter(
@@ -510,6 +558,8 @@ function ProviderCategory({
<div role="tabpanel">
<CategoryHero icon={meta.icon} title={meta.title} description={meta.description} />
+ {intro}
+
{loading && (
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<Loader2 className="h-4 w-4 animate-spin" /> {t("apikeys_view.loading_providers")}
@@ -573,6 +623,7 @@ function RealtimeCategory({
onActivateOptimistic: (tier: ProviderTier, id: string) => void;
health?: SectionHealth;
}) {
+ const t = useT();
return (
<ProviderCategory
meta={meta}
@@ -583,6 +634,12 @@ function RealtimeCategory({
onChanged={onChanged}
onActivateOptimistic={onActivateOptimistic}
health={health}
+ intro={
+ <GuidancePanel
+ title={t("apikeys_view.guide_realtime_title")}
+ body={t("apikeys_view.guide_realtime_body")}
+ />
+ }
/>
);
}
@@ -619,6 +676,7 @@ function ComputerUseCategory({
onActivateOptimistic: (tier: ProviderTier, id: string) => void;
health?: SectionHealth;
}) {
+ const t = useT();
const cuProviders: ProviderDescriptor[] = providers
.filter((p) => p.tier === "brain" && p.brain_switchable !== false)
.map((p) => ({ ...p, tier: "computer-use", active: !!p.computer_use_active }));
@@ -633,6 +691,12 @@ function ComputerUseCategory({
onChanged={onChanged}
onActivateOptimistic={onActivateOptimistic}
health={health}
+ intro={
+ <GuidancePanel
+ title={t("apikeys_view.guide_computer_use_title")}
+ body={t("apikeys_view.guide_computer_use_body")}
+ />
+ }
/>
);
}
@@ -736,9 +800,17 @@ function TierSection({
health?: SectionHealth;
}) {
const tierHasActive = providers.some((p) => p.active);
+ // Configured providers first — the wall of empty key forms used to bury the
+ // one or two cards the user actually set up. Deliberately NOT sorted by
+ // `active`: activation flips live (optimistically), and a card that jumps
+ // position under the pointer mid-click reads as breakage, while `configured`
+ // only changes on a key save. Stable within each group (Array.sort is stable).
+ const sorted = [...providers].sort(
+ (a, b) => Number(b.configured) - Number(a.configured),
+ );
return (
<ul className="space-y-3">
- {providers.map((p) => (
+ {sorted.map((p) => (
<li key={p.id}>
<ProviderCard
descriptor={p}
@@ -925,11 +997,13 @@ function ProviderCard({
<div className="flex items-start justify-between gap-3">
<div className="min-w-0 flex-1">
<div className="flex flex-wrap items-center gap-2">
- <span className="font-medium">{descriptor.label}</span>
+ <span className="font-display text-sm font-semibold tracking-tight">
+ {descriptor.label}
+ </span>
<StatusBadge descriptor={descriptor} />
{descriptor.recommended && (
<span
- className="rounded-full border border-primary/40 bg-primary/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-primary"
+ 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"
title={
descriptor.recommended_model
? t("apikeys_view.recommended_tooltip").replace(
@@ -939,12 +1013,13 @@ function ProviderCard({
: undefined
}
>
+ <Sparkles aria-hidden="true" className="h-2.5 w-2.5" />
{t("apikeys_view.recommended")}
</span>
)}
{descriptor.caution && (
<span
- className="rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-amber-600 dark:text-amber-400"
+ 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}
>
{t("apikeys_view.not_recommended")}
@@ -1071,7 +1146,11 @@ function ProviderCard({
<RealtimeOptionsControl providerId={descriptor.id} />
)}
- <ProviderTestControl providerId={descriptor.id} />
+ {/* 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} />
+ </div>
</div>
);
}
@@ -1557,28 +1636,49 @@ 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.
+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",
+} as const;
+
+function StateChip({
+ tone,
+ children,
+}: {
+ tone: keyof typeof STATE_CHIP_TONE;
+ children: React.ReactNode;
+}) {
+ return (
+ <span
+ className={cn(
+ "inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium",
+ STATE_CHIP_TONE[tone],
+ )}
+ >
+ {children}
+ </span>
+ );
+}
+
function StatusBadge({ descriptor }: { descriptor: ProviderDescriptor }) {
- if (descriptor.active) return <span className="chip-yellow">active</span>;
+ if (descriptor.active) return <StateChip tone="active">active</StateChip>;
if (descriptor.auth_mode === "codex") {
const status = descriptor.codex_status;
- if (!status?.installed) {
- return <span className="rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-destructive">missing</span>;
- }
- if (descriptor.configured) {
- return <span className="rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-emerald-600">ready</span>;
- }
- return <span className="rounded-full bg-muted px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground">not connected</span>;
+ if (!status?.installed) return <StateChip tone="missing">missing</StateChip>;
+ if (descriptor.configured) return <StateChip tone="ready">ready</StateChip>;
+ return <StateChip tone="neutral">not connected</StateChip>;
}
if (descriptor.auth_mode === "antigravity") {
const status = descriptor.antigravity_status;
- if (!status?.installed) {
- return <span className="rounded-full bg-destructive/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-destructive">missing</span>;
- }
- if (status.connected) {
- return <span className="rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-emerald-600">ready</span>;
- }
- return <span className="rounded-full bg-muted px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground">not connected</span>;
+ if (!status?.installed) return <StateChip tone="missing">missing</StateChip>;
+ if (status.connected) return <StateChip tone="ready">ready</StateChip>;
+ return <StateChip tone="neutral">not connected</StateChip>;
}
- if (descriptor.configured) return <span className="rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] uppercase tracking-wider text-emerald-600">ready</span>;
- return <span className="rounded-full bg-muted px-2 py-0.5 text-[10px] uppercase tracking-wider text-muted-foreground">open</span>;
+ if (descriptor.configured) return <StateChip tone="ready">ready</StateChip>;
+ return <StateChip tone="neutral">open</StateChip>;
}