Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(desktop): report one-off notices through the toast stack

vastsa3bb14922b7a3
diff --git a/apps/desktop/src/components/ReviewChangeCard.tsx b/apps/desktop/src/components/ReviewChangeCard.tsx
index 68432e26b..34b5f15a0 100644
--- a/apps/desktop/src/components/ReviewChangeCard.tsx
+++ b/apps/desktop/src/components/ReviewChangeCard.tsx
@@ -2,7 +2,6 @@ import { memo, useId, useState } from "react";
import { useTranslation } from "react-i18next";
import type {
ReviewChangeStatus,
- ReviewRollbackStatus,
UiMessage,
} from "@pi-desktop/shared";
import { reviewChangeFromMessage } from "../lib/workspace-review";
@@ -23,19 +22,16 @@ function DiffBody({ message, compact }: { message: UiMessage; compact: boolean }
const change = reviewChangeFromMessage(message);
const rollback = useAppStore((state) => state.rollbackWorkspaceChange);
const [rollingBack, setRollingBack] = useState(false);
- const [rollbackStatus, setRollbackStatus] = useState<ReviewRollbackStatus | null>(
- null,
- );
if (!change) return null;
const runRollback = async () => {
if (!change.reversible || change.state === "rolledBack" || rollingBack) return;
setRollingBack(true);
- setRollbackStatus(null);
- const result = await rollback(message.id, change.snapshotId);
+ // A conflict or an unavailable snapshot is already reported through the
+ // store's toast; this card owns the rollback action only.
+ await rollback(message.id, change.snapshotId);
setRollingBack(false);
- if (result) setRollbackStatus(result.status);
};
return (
@@ -67,15 +63,6 @@ function DiffBody({ message, compact }: { message: UiMessage; compact: boolean }
)}
<div className={cx("review-change-card-actions", compact && "is-compact")}>
- {rollbackStatus === "conflict" ? (
- <div className="review-change-rollback-note is-warning">
- {t("panel.review.rollbackConflict")}
- </div>
- ) : rollbackStatus === "unavailable" ? (
- <div className="review-change-rollback-note">
- {t("panel.review.rollbackUnavailable")}
- </div>
- ) : null}
{change.state === "rolledBack" ? (
<span className="review-change-state is-rolled-back">
<IconCheck size={13} />
diff --git a/apps/desktop/src/components/Toast.tsx b/apps/desktop/src/components/Toast.tsx
index 86438554e..c0aa20cf4 100644
--- a/apps/desktop/src/components/Toast.tsx
+++ b/apps/desktop/src/components/Toast.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef, useState, type AnimationEvent } from "react";
+import { createPortal } from "react-dom";
import { useTranslation } from "react-i18next";
import { useAppStore, type ToastItem, type ToastVariant } from "../stores/app-store";
import {
@@ -80,10 +81,31 @@ function ToastCard({ item }: { item: ToastItem }) {
);
}
+/**
+ * The toast stack lives on the body, not inside the shell.
+ *
+ * `.app-shell` isolates its own layers, and every dialog is portaled to the
+ * viewport overlay host at `z-dialog` (40). A stack rendered inside the shell
+ * paints inside that isolated context, so the dialog scrim covers it — the one
+ * surface a toast has to be seen above. A body-level host puts it back in the
+ * root stacking context, where its own `z-toast` (50) still outranks a dialog.
+ */
+function useToastHost(): HTMLElement | null {
+ const [host, setHost] = useState<HTMLElement | null>(null);
+ useEffect(() => {
+ const element = document.createElement("div");
+ document.body.append(element);
+ setHost(element);
+ return () => element.remove();
+ }, []);
+ return host;
+}
+
/** Global toast stack — mount once per shell, above dialogs (z-toast). */
export function ToastHost() {
const toasts = useAppStore((s) => s.toasts);
const visibleToastIds = useRef<Set<number>>(new Set());
+ const host = useToastHost();
useEffect(() => {
const nextVisibleIds = new Set<number>();
@@ -96,11 +118,15 @@ export function ToastHost() {
if (shouldPlay) playNotificationChime();
}, [toasts]);
- return (
+ // The host is attached in an effect, so the first render deliberately paints
+ // nothing rather than mounting the stack inside the shell it must outrank.
+ if (!host) return null;
+ return createPortal(
<div className="toast-viewport" aria-live="polite">
{toasts.map((item) => (
<ToastCard key={item.id} item={item} />
))}
- </div>
+ </div>,
+ host,
);
}
diff --git a/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx b/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
index e72794dd2..c9da32d3b 100644
--- a/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
+++ b/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
@@ -73,6 +73,7 @@ export function PluginSettingsSheet({ plugin, platform, onClose, onSaved }: Prop
useBlockingOverlay();
const { t } = useTranslation();
const appKeybindings = useAppStore((state) => state.settings?.keybindings);
+ const showToast = useAppStore((state) => state.showToast);
const settings = plugin.settings ?? [];
const [draft, setDraft] = useState<Record<string, unknown>>(() =>
Object.fromEntries(settings.map((setting) => [setting.key, initialValue(setting)])),
@@ -136,7 +137,7 @@ export function PluginSettingsSheet({ plugin, platform, onClose, onSaved }: Prop
await onSaved();
onClose();
} catch (cause) {
- setError(cause instanceof Error ? cause.message : String(cause));
+ showToast(cause instanceof Error ? cause.message : String(cause), { variant: "error" });
} finally {
setSaving(false);
}
diff --git a/apps/desktop/src/components/settings/ConfigSyncPage.tsx b/apps/desktop/src/components/settings/ConfigSyncPage.tsx
index c463b99a7..ed46d3fb5 100644
--- a/apps/desktop/src/components/settings/ConfigSyncPage.tsx
+++ b/apps/desktop/src/components/settings/ConfigSyncPage.tsx
@@ -14,6 +14,7 @@ import { Badge, Button, Checkbox, Field, Input, PasswordInput, SettingsToggle }
import { IconCloudDown, IconRefresh, IconShield, IconTrash } from "../icons";
import { SettingsCard, SettingsRow } from "../../features/settings/primitives";
import { configSyncProgressView } from "../../features/settings/config-sync-progress";
+import { useAppStore } from "../../stores/app-store";
import {
cacheConfigSyncHistory,
cacheConfigSyncState,
@@ -125,6 +126,7 @@ function statusTone(
export function ConfigSyncPage() {
const { t } = useTranslation();
+ const showToast = useAppStore((state) => state.showToast);
const [initialDraft] = useState(() => readConfigSyncDraft());
const [state, setState] = useState<ConfigSyncState | null>(() =>
getCachedConfigSyncState(),
@@ -151,7 +153,6 @@ export function ConfigSyncPage() {
getCachedConfigSyncHistory(),
);
const [error, setError] = useState<string | null>(null);
- const [notice, setNotice] = useState<string | null>(null);
const [form, setForm] = useState<ConfigSyncForm>(() =>
initialConfigSyncForm(initialDraft),
);
@@ -318,7 +319,6 @@ export function ConfigSyncPage() {
}
setBusy(operation);
setError(null);
- setNotice(null);
try {
if (operation === "test") {
const result = await api.configSyncTest({
@@ -333,14 +333,19 @@ export function ConfigSyncPage() {
automaticSync: true,
remoteMode,
});
- setNotice(
- remoteMode === "appendOnly"
- ? result.appendOnly
- ? t("settings.configSync.testAppendOnlySuccess")
- : t("settings.configSync.testAppendOnlyUnsupported")
- : result.conditionalWrites
- ? t("settings.configSync.testSuccess")
- : t("settings.configSync.testUnsupported"),
+ const supported =
+ remoteMode === "appendOnly" ? result.appendOnly : result.conditionalWrites;
+ showToast(
+ t(
+ remoteMode === "appendOnly"
+ ? supported
+ ? "settings.configSync.testAppendOnlySuccess"
+ : "settings.configSync.testAppendOnlyUnsupported"
+ : supported
+ ? "settings.configSync.testSuccess"
+ : "settings.configSync.testUnsupported",
+ ),
+ { variant: supported ? "success" : "warning" },
);
} else if (operation === "configure") {
clearHistory();
@@ -366,7 +371,7 @@ export function ConfigSyncPage() {
applyState(await api.configSyncSyncNow());
void refreshHistory(false);
setForm((current) => ({ ...current, appPassword: "", backupPassword: "" }));
- setNotice(t("settings.configSync.configured"));
+ showToast(t("settings.configSync.configured"), { variant: "success" });
} else if (operation === "sync") {
applyState(await api.configSyncSyncNow());
void refreshHistory(false);
@@ -396,7 +401,6 @@ export function ConfigSyncPage() {
const changePassword = async () => {
setBusy("password");
setError(null);
- setNotice(null);
try {
applyState(
await api.configSyncChangePassword({
@@ -409,7 +413,7 @@ export function ConfigSyncPage() {
currentBackupPassword: "",
newBackupPassword: "",
}));
- setNotice(t("settings.configSync.passwordChanged"));
+ showToast(t("settings.configSync.passwordChanged"), { variant: "success" });
} catch (cause) {
setError(cause instanceof Error ? cause.message : String(cause));
} finally {
@@ -429,7 +433,7 @@ export function ConfigSyncPage() {
}),
);
await refreshHistory(true);
- setNotice(t("settings.configSync.restoreStarted"));
+ showToast(t("settings.configSync.restoreStarted"), { variant: "success" });
} catch (cause) {
setError(cause instanceof Error ? cause.message : String(cause));
} finally {
@@ -694,11 +698,6 @@ export function ConfigSyncPage() {
</Button>
) : null}
</div>
- {notice ? (
- <div className="settings-config-sync-message" role="status">
- {notice}
- </div>
- ) : null}
</SettingsCard>
{/* A sync this page started reports itself here, above the cards: the
diff --git a/apps/desktop/src/components/settings/FontFamilyRow.tsx b/apps/desktop/src/components/settings/FontFamilyRow.tsx
index 0ffdddfa3..38b55dc7e 100644
--- a/apps/desktop/src/components/settings/FontFamilyRow.tsx
+++ b/apps/desktop/src/components/settings/FontFamilyRow.tsx
@@ -20,6 +20,7 @@ import {
FONT_OPTION_ROW_HEIGHT,
visibleRowRange,
} from "../../lib/font-list";
+import { useAppStore } from "../../stores/app-store";
import { IconCheck, IconChevronDown, IconSearch } from "../icons";
/**
@@ -42,7 +43,7 @@ export function FontFamilyRow({
const [open, setOpen] = useState(false);
const [query, setQuery] = useState("");
const [systemFonts, setSystemFonts] = useState<string[] | null>(null);
- const [loadError, setLoadError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
const [highlight, setHighlight] = useState(-1);
const [menuPosition, setMenuPosition] = useState<{
top: number;
@@ -69,12 +70,17 @@ export function FontFamilyRow({
if (!cancelled) setSystemFonts(fonts);
})
.catch(() => {
- if (!cancelled) setLoadError(true);
+ // Enumerating the families is not something the user asked for and not
+ // something the picker can recover from, so the reason is announced once
+ // as a toast and the list keeps the options it can still offer.
+ if (!cancelled) {
+ showToast(t("settings.fontLoadError"), { variant: "error" });
+ }
});
return () => {
cancelled = true;
};
- }, []);
+ }, [showToast, t]);
useEffect(() => {
if (!open) return;
@@ -351,11 +357,7 @@ export function FontFamilyRow({
onChange={(event) => setQuery(event.target.value)}
/>
</div>
- {loadError && !systemFonts ? (
- <div className="settings-font-empty">
- {t("settings.fontLoadError")}
- </div>
- ) : filtered.length === 0 ? (
+ {filtered.length === 0 ? (
<div className="settings-font-empty">
{t("settings.noResults")}
</div>
diff --git a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx b/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
index 640eec376..9756c1bc5 100644
--- a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
+++ b/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
@@ -44,7 +44,6 @@ import {
customModelSeedBinding,
type CustomModelLookupContext,
} from "./model-custom-lookup";
-import { ModelsFetchErrorMessage } from "./ModelsFetchErrorMessage";
import type { ProviderModelsState } from "./useProviderModels";
import { useModelReorder } from "./useModelReorder";
@@ -403,14 +402,17 @@ export function ModelSelectionPanes({
if (!discovered?.info) void enrichCustomModel(binding);
};
- const fetchFailed = discovery.status === "error";
- const emptyFetchError = fetchFailed && rows.length === 0;
+ // A failed probe leaves an empty pane: the pane says the list is missing and
+ // the toast says why, so the list no longer hosts a classified error box.
+ const emptyFetchError = discovery.status === "error" && rows.length === 0;
const modelListBody =
discovery.status === "idle" ? (
<div className="provider-models-placeholder">{t("settings.modelsEmptyHint")}</div>
) : emptyFetchError ? (
- <ModelsFetchErrorMessage error={discovery.error} variant="placeholder" />
+ <div className="provider-models-placeholder is-error">
+ {t("settings.modelsFetchFailed")}
+ </div>
) : rows.length === 0 ? (
<div className="provider-models-placeholder">
{discovery.status === "loading"
@@ -542,10 +544,6 @@ export function ModelSelectionPanes({
</div>
</div>
- {fetchFailed && !emptyFetchError ? (
- <ModelsFetchErrorMessage error={discovery.error} variant="banner" />
- ) : null}
-
{modelListBody}
</div>
diff --git a/apps/desktop/src/components/settings/ModelsFetchErrorMessage.tsx b/apps/desktop/src/components/settings/ModelsFetchErrorMessage.tsx
deleted file mode 100644
index 6cc3c2a5b..000000000
--- a/apps/desktop/src/components/settings/ModelsFetchErrorMessage.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * The classified copy for a failed model-list probe (`model-fetch-error.ts`).
- *
- * The picker renders it in the empty pane or above a stale list; the service
- * form reuses it under the key, so every surface says the same thing for the
- * same failure.
- */
-import { useTranslation } from "react-i18next";
-import { describeModelsFetchError } from "./model-fetch-error";
-
-export function ModelsFetchErrorMessage({
- error,
- variant,
-}: {
- error?: string;
- /** `status` is the one-line connection status under a service's key. */
- variant: "banner" | "placeholder" | "status";
-}) {
- const { t } = useTranslation();
- const view = describeModelsFetchError(error);
- let summary = t("settings.modelsFetchFailed");
- switch (view.kind) {
- case "unauthorized":
- summary = t("errors.PROVIDER_UNAUTHORIZED");
- break;
- case "notFound":
- summary = t("settings.modelsFetchNotFound");
- break;
- case "rateLimited":
- summary = t("errors.PROVIDER_RATE_LIMITED");
- break;
- case "timeout":
- summary = t("errors.TIMEOUT");
- break;
- case "network":
- summary = t("errors.NETWORK_ERROR");
- break;
- case "invalidResponse":
- summary = t("settings.modelsFetchInvalidResponse");
- break;
- case "http":
- summary = t("settings.modelsFetchFailedStatus", {
- status: view.summaryParams?.status ?? 0,
- });
- break;
- }
- const className =
- variant === "placeholder"
- ? "provider-models-placeholder is-error"
- : variant === "status"
- ? "provider-connection-status is-error"
- : "provider-models-note is-error";
- return (
- <div className={className} role="alert">
- <span className="provider-models-error-summary">{summary}</span>
- {view.detail ? (
- <span className="provider-models-error-detail">{view.detail}</span>
- ) : null}
- {variant === "placeholder" ? (
- <span className="provider-models-error-hint">{t("settings.modelsFetchHint")}</span>
- ) : null}
- </div>
- );
-}
diff --git a/apps/desktop/src/components/settings/NetworkProxySection.tsx b/apps/desktop/src/components/settings/NetworkProxySection.tsx
index b32af3d07..a7bb6dbad 100644
--- a/apps/desktop/src/components/settings/NetworkProxySection.tsx
+++ b/apps/desktop/src/components/settings/NetworkProxySection.tsx
@@ -16,6 +16,7 @@ import {
import { api } from "../../lib/api";
import { Button, Input, SegmentedControl, SettingsToggle, cx } from "../ui";
import { SettingsRow } from "../../features/settings/primitives";
+import { useAppStore } from "../../stores/app-store";
const MODES: NetworkProxyMode[] = ["system", "direct", "custom"];
@@ -37,7 +38,7 @@ export function NetworkProxySection({
saved.bypass ?? DEFAULT_NETWORK_PROXY_BYPASS,
);
const [urlError, setUrlError] = useState(false);
- const [saveError, setSaveError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
const [testState, setTestState] = useState<"idle" | "busy" | "ok" | "fail">(
"idle",
);
@@ -56,11 +57,10 @@ export function NetworkProxySection({
return;
}
setUrlError(false);
- setSaveError(false);
try {
await saveSettings({ networkProxy: validated.value });
} catch {
- setSaveError(true);
+ showToast(t("settings.proxySaveError"), { variant: "error" });
}
};
@@ -149,7 +149,6 @@ export function NetworkProxySection({
* mode is the only thing this switch changes.
*/
const persistNetworkPolicy = async (mode: NetworkPolicyMode) => {
- setSaveError(false);
const next: NetworkPolicySettings = { mode };
if (settings.networkPolicy?.insecureNoticeAcknowledged === true) {
next.insecureNoticeAcknowledged = true;
@@ -157,7 +156,7 @@ export function NetworkProxySection({
try {
await saveSettings({ networkPolicy: next });
} catch {
- setSaveError(true);
+ showToast(t("settings.proxySaveError"), { variant: "error" });
}
};
@@ -265,11 +264,6 @@ export function NetworkProxySection({
</>
) : null}
- {saveError ? (
- <span className="settings-command-shell-state error" role="status">
- {t("settings.proxySaveError")}
- </span>
- ) : null}
</div>
</section>
);
diff --git a/apps/desktop/src/components/settings/OAuthLoginDialog.tsx b/apps/desktop/src/components/settings/OAuthLoginDialog.tsx
index 10a995e9b..983990b15 100644
--- a/apps/desktop/src/components/settings/OAuthLoginDialog.tsx
+++ b/apps/desktop/src/components/settings/OAuthLoginDialog.tsx
@@ -117,12 +117,11 @@ export function OAuthLoginDialog({
useEffect(() => {
const onKeyDown = (event: KeyboardEvent) => {
if (event.key !== "Escape") return;
- if (error) onClose();
- else void cancel();
+ void cancel();
};
window.addEventListener("keydown", onKeyDown);
return () => window.removeEventListener("keydown", onKeyDown);
- }, [cancel, error, onClose]);
+ }, [cancel]);
const copy = (value: string) => {
void navigator.clipboard.writeText(value).then(
@@ -140,7 +139,9 @@ export function OAuthLoginDialog({
setPrompt(null);
void session
.respond(promptId, value)
- .catch((e: unknown) => setError(e instanceof Error ? e.message : String(e)));
+ .catch((e: unknown) =>
+ setError(e instanceof Error ? e.message : String(e)),
+ );
};
const canSubmitAnswer = canSubmitOAuthPrompt(prompt, answer);
@@ -156,135 +157,125 @@ export function OAuthLoginDialog({
{vendor.loginLabel || t("settings.vendorSignInTo", { vendor: vendor.name })}
</h3>
- {error ? (
- <div className="oauth-error">{error}</div>
- ) : (
- <>
- <div className="oauth-status">{status}</div>
+ {error ? <div className="oauth-error">{error}</div> : null}
- {authUrl ? (
- <div className="oauth-block">
- <div className="oauth-block-text">
- {authUrl.instructions ||
- t(
- authUrl.opened
- ? "settings.vendorBrowserOpened"
- : "settings.vendorBrowserFailed",
- )}
- </div>
- <div className="oauth-inline-actions">
- <Button size="sm" variant="ghost" onClick={() => copy(authUrl.url)}>
- <span className="oauth-btn-inner">
- {copied === authUrl.url ? (
- <IconCheck size={13} />
- ) : (
- <IconCopy size={13} />
- )}
- <span>{t("settings.vendorCopyLink")}</span>
- </span>
- </Button>
- <a
- className="oauth-link"
- href={authUrl.url}
- target="_blank"
- rel="noreferrer"
- >
- <IconExternal size={13} />
- <span>{t("settings.vendorOpenAgain")}</span>
- </a>
- </div>
- </div>
- ) : null}
+ <div className="oauth-status">{status}</div>
- {deviceCode ? (
- <div className="oauth-block">
- <div className="oauth-block-text">
- {t("settings.vendorDeviceCodeHint")}
- </div>
- <TooltipButton
- type="button"
- className="oauth-device-code font-mono"
- tooltip={t("settings.vendorCopyCode")}
- ariaLabel={t("settings.vendorCopyCode")}
- onClick={() => copy(deviceCode.userCode)}
- >
- <span>{deviceCode.userCode}</span>
- {copied === deviceCode.userCode ? (
- <IconCheck size={14} />
+ {authUrl ? (
+ <div className="oauth-block">
+ <div className="oauth-block-text">
+ {authUrl.instructions ||
+ t(
+ authUrl.opened
+ ? "settings.vendorBrowserOpened"
+ : "settings.vendorBrowserFailed",
+ )}
+ </div>
+ <div className="oauth-inline-actions">
+ <Button size="sm" variant="ghost" onClick={() => copy(authUrl.url)}>
+ <span className="oauth-btn-inner">
+ {copied === authUrl.url ? (
+ <IconCheck size={13} />
) : (
- <IconCopy size={14} />
+ <IconCopy size={13} />
)}
- </TooltipButton>
- <a
- className="oauth-link"
- href={deviceCode.verificationUri}
- target="_blank"
- rel="noreferrer"
- >
- <IconExternal size={13} />
- <span>{deviceCode.verificationUri}</span>
- </a>
- </div>
- ) : null}
+ <span>{t("settings.vendorCopyLink")}</span>
+ </span>
+ </Button>
+ <a
+ className="oauth-link"
+ href={authUrl.url}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <IconExternal size={13} />
+ <span>{t("settings.vendorOpenAgain")}</span>
+ </a>
+ </div>
+ </div>
+ ) : null}
- {prompt ? (
- <div className="oauth-block">
- <div className="oauth-block-text">{prompt.message}</div>
- {prompt.type === "select" ? (
- <div className="oauth-options">
- {(prompt.options ?? []).map((option) => (
- <button
- key={option.id}
- type="button"
- className="oauth-option"
- onClick={() => submitAnswer(option.id)}
- >
- <span className="oauth-option-label">{option.label}</span>
- {option.description ? (
- <span className="oauth-option-desc">{option.description}</span>
- ) : null}
- </button>
- ))}
- </div>
- ) : (
- <form
- className="oauth-answer"
- onSubmit={(event) => {
- event.preventDefault();
- if (canSubmitAnswer) submitAnswer(answer.trim());
- }}
+ {deviceCode ? (
+ <div className="oauth-block">
+ <div className="oauth-block-text">
+ {t("settings.vendorDeviceCodeHint")}
+ </div>
+ <TooltipButton
+ type="button"
+ className="oauth-device-code font-mono"
+ tooltip={t("settings.vendorCopyCode")}
+ ariaLabel={t("settings.vendorCopyCode")}
+ onClick={() => copy(deviceCode.userCode)}
+ >
+ <span>{deviceCode.userCode}</span>
+ {copied === deviceCode.userCode ? (
+ <IconCheck size={14} />
+ ) : (
+ <IconCopy size={14} />
+ )}
+ </TooltipButton>
+ <a
+ className="oauth-link"
+ href={deviceCode.verificationUri}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <IconExternal size={13} />
+ <span>{deviceCode.verificationUri}</span>
+ </a>
+ </div>
+ ) : null}
+
+ {prompt ? (
+ <div className="oauth-block">
+ <div className="oauth-block-text">{prompt.message}</div>
+ {prompt.type === "select" ? (
+ <div className="oauth-options">
+ {(prompt.options ?? []).map((option) => (
+ <button
+ key={option.id}
+ type="button"
+ className="oauth-option"
+ onClick={() => submitAnswer(option.id)}
>
- <Input
- type={prompt.type === "secret" ? "password" : "text"}
- value={answer}
- onChange={(event) => setAnswer(event.target.value)}
- placeholder={prompt.placeholder}
- className={cx(
- prompt.type === "manual_code" && "font-mono text-sm-plus",
- )}
- autoComplete="off"
- autoFocus
- />
- <Button type="submit" variant="primary" disabled={!canSubmitAnswer}>
- {t("settings.vendorSubmit")}
- </Button>
- </form>
- )}
+ <span className="oauth-option-label">{option.label}</span>
+ {option.description ? (
+ <span className="oauth-option-desc">{option.description}</span>
+ ) : null}
+ </button>
+ ))}
</div>
- ) : null}
- </>
- )}
+ ) : (
+ <form
+ className="oauth-answer"
+ onSubmit={(event) => {
+ event.preventDefault();
+ if (canSubmitAnswer) submitAnswer(answer.trim());
+ }}
+ >
+ <Input
+ type={prompt.type === "secret" ? "password" : "text"}
+ value={answer}
+ onChange={(event) => setAnswer(event.target.value)}
+ placeholder={prompt.placeholder}
+ className={cx(
+ prompt.type === "manual_code" && "font-mono text-sm-plus",
+ )}
+ autoComplete="off"
+ autoFocus
+ />
+ <Button type="submit" variant="primary" disabled={!canSubmitAnswer}>
+ {t("settings.vendorSubmit")}
+ </Button>
+ </form>
+ )}
+ </div>
+ ) : null}
<div className="provider-dialog-actions">
- {error ? (
- <Button variant="ghost" onClick={onClose}>
- {t("settings.close")}
- </Button>
- ) : (
- <Button variant="ghost" disabled={closing} onClick={() => void cancel()}>
- {t("settings.cancel")}
- </Button>
- )}
+ <Button variant="ghost" disabled={closing} onClick={() => void cancel()}>
+ {t("settings.cancel")}
+ </Button>
</div>
</div>
</div>
diff --git a/apps/desktop/src/components/settings/ProviderConnectionFields.tsx b/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
index 8513b49ab..9072f474a 100644
--- a/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
+++ b/apps/desktop/src/components/settings/ProviderConnectionFields.tsx
@@ -3,69 +3,19 @@
* a custom endpoint the name, URL and API format (D310, D625).
*
* The chosen service reads as a settled fact with a Change action rather than
- * an open menu, and a status line under the key says whether the service
- * answered, so pasting a key is visibly the whole job on a named service.
+ * an open menu. Whether the service answered is announced by the probe itself
+ * (`useProbeFeedback`), so pasting a key is visibly the whole job on a named
+ * service without a status row holding the dialog open for it.
*/
-import type { ReactNode, RefObject } from "react";
+import type { RefObject } from "react";
import { useTranslation } from "react-i18next";
import type { CatalogApiStyle } from "@pi-desktop/shared";
import { Field, Input } from "../ui";
-import { IconCheck } from "../icons";
import { SettingsMenuSelect } from "./SettingsMenuSelect";
import { ServiceMonogram } from "./ServiceMonogram";
-import { ModelsFetchErrorMessage } from "./ModelsFetchErrorMessage";
-import { canRecommendFrom } from "./recommended-models";
import { endpointLabel } from "./service-catalog";
-import type { ProviderModelsState } from "./useProviderModels";
import { API_STYLE_LABEL_KEYS, CUSTOM_PROVIDER_API_STYLES } from "./provider-api-style";
-/**
- * One line that answers "did it work?" for the credentials above it. Silent
- * while nothing can be asked yet, then connecting, connected with a count, or
- * the classified failure the model picker would show.
- */
-export function ConnectionStatus({
- active,
- discovery,
- named,
-}: {
- /** Whether the form holds enough to contact the service. */
- active: boolean;
- discovery: ProviderModelsState;
- named: boolean;
-}) {
- const { t } = useTranslation();
- let content: ReactNode;
- let tone: "hint" | "ok" | "error" = "hint";
- if (!active) {
- content = t(named ? "settings.connectionKeyHint" : "settings.connectionUrlHint");
- } else if (
- discovery.status === "idle" ||
- discovery.status === "loading" ||
- discovery.source === "cache"
- ) {
- content = t("settings.connectionChecking");
- } else if (discovery.status === "ready" && !discovery.error) {
- tone = "ok";
- content = t(
- discovery.source === "remote" ? "settings.connectionReady" : "settings.connectionCatalog",
- { count: discovery.models.length },
- );
- } else if (canRecommendFrom(discovery, named)) {
- // A named vendor without a model-list route: the key was not refused.
- tone = "ok";
- content = t("settings.connectionNoModelList", { count: discovery.models.length });
- } else {
- return <ModelsFetchErrorMessage error={discovery.error} variant="status" />;
- }
- return (
- <div className={`provider-connection-status is-${tone}`} aria-live="polite">
- {tone === "ok" ? <IconCheck size={12} aria-hidden /> : null}
- <span>{content}</span>
- </div>
- );
-}
-
export type ProviderConnectionFieldsProps = {
named: boolean;
custom: boolean;
@@ -91,7 +41,6 @@ export type ProviderConnectionFieldsProps = {
apiStyleNote?: string;
accountOnlyApiStyle: boolean;
requiresApiStyleChoice: boolean;
- status: ReactNode;
};
export function ProviderConnectionFields({
@@ -117,7 +66,6 @@ export function ProviderConnectionFields({
apiStyleNote,
accountOnlyApiStyle,
requiresApiStyleChoice,
- status,
}: ProviderConnectionFieldsProps) {
const { t } = useTranslation();
const keyHint = editing ? t("settings.apiKeyKeepHint") : undefined;
@@ -167,7 +115,6 @@ export function ProviderConnectionFields({
onChange={(event) => onApiKeyChange(event.target.value)}
/>
</Field>
- {status}
</div>
) : null}
</div>
@@ -249,7 +196,6 @@ export function ProviderConnectionFields({
/>
</Field>
</div>
- {status}
</>
) : null}
</div>
diff --git a/apps/desktop/src/components/settings/ProviderHeadersEditor.tsx b/apps/desktop/src/components/settings/ProviderHeadersEditor.tsx
index 7be4d9209..e53f1f9a7 100644
--- a/apps/desktop/src/components/settings/ProviderHeadersEditor.tsx
+++ b/apps/desktop/src/components/settings/ProviderHeadersEditor.tsx
@@ -8,6 +8,7 @@ import {
} from "../extensions/KeyValueRows";
import { IconCheck, IconCopy } from "../icons";
import { Button } from "../ui";
+import { useAppStore } from "../../stores/app-store";
import { SettingsMenuSelect } from "./SettingsMenuSelect";
type HeaderPreset = {
@@ -62,17 +63,18 @@ export function ProviderHeadersEditor({
}) {
const { t } = useTranslation();
const fileInputRef = useRef<HTMLInputElement>(null);
- const [importError, setImportError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
const [copied, setCopied] = useState(false);
const copyTimer = useRef<number | undefined>(undefined);
useEffect(() => () => window.clearTimeout(copyTimer.current), []);
- // A value the host folds on save, and one it will refuse, are both said next
- // to the rows — a fullwidth character is an IME slip, not a mystery. Only
- // rows that will actually be persisted count: an unnamed, empty or already
- // refused row has nothing to fold, and saying otherwise would read as if the
- // whole row were fine.
+ // A refused value is still said next to the row it is about, while a value
+ // the host will fold on save is announced once as a toast — a fullwidth
+ // character is an IME slip, not a mystery, and the note that used to sit
+ // above the list took a line of layout for it. Only rows that will actually
+ // be persisted count: an unnamed, empty or already refused row has nothing
+ // to fold, and saying otherwise would read as if the whole row were fine.
const headerRows = pairs.map((pair) => {
const header = inspectHeaderValue(pair.value);
const storable =
@@ -84,6 +86,17 @@ export function ProviderHeadersEditor({
);
const faultyHeaderValue = headerRows.some((row) => row.header.fault !== null);
+ // The toast fires when a foldable value appears, never on mount and never
+ // twice while the same rows stay folded.
+ const foldedReportedRef = useRef(foldedHeaderValue);
+ useEffect(() => {
+ const wasFolded = foldedReportedRef.current;
+ foldedReportedRef.current = foldedHeaderValue;
+ if (foldedHeaderValue && !wasFolded) {
+ showToast(t("settings.headersFullwidthFolded"), { variant: "info" });
+ }
+ }, [foldedHeaderValue, showToast, t]);
+
const addPreset = (key: string) => {
const preset = HEADER_PRESETS.find((item) => item.key === key);
if (!preset) return;
@@ -111,9 +124,8 @@ export function ProviderHeadersEditor({
try {
const imported = parseImportedHeaders(JSON.parse(await file.text()));
onChange(mergeHeaderPairs(pairs, imported));
- setImportError(false);
} catch {
- setImportError(true);
+ showToast(t("settings.headersImportError"), { variant: "error" });
}
};
@@ -168,16 +180,6 @@ export function ProviderHeadersEditor({
/>
</div>
</div>
- {importError ? (
- <div className="provider-setup-header-error" role="alert">
- {t("settings.headersImportError")}
- </div>
- ) : null}
- {foldedHeaderValue ? (
- <div className="provider-setup-header-note" role="status">
- {t("settings.headersFullwidthFolded")}
- </div>
- ) : null}
{faultyHeaderValue ? (
<div className="provider-setup-header-error" role="alert">
{t("settings.headersValueNotLatin1")}
diff --git a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
index 7d3081037..5c873a69f 100644
--- a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
+++ b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
@@ -20,12 +20,14 @@ import {
type ProviderPublic,
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
+import { useAppStore } from "../../stores/app-store";
import { pairsToRecord, recordToPairs } from "../extensions/KeyValueRows";
import { Button, Field, HelpIcon, Input, portalOverlay } from "../ui";
import { ProviderHeadersEditor } from "./ProviderHeadersEditor";
import { useProviderModels } from "./useProviderModels";
import { ModelSelectionPanes, useModelSelection } from "./ModelSelectionPanes";
-import { ConnectionStatus, ProviderConnectionFields } from "./ProviderConnectionFields";
+import { ProviderConnectionFields } from "./ProviderConnectionFields";
+import { useProbeFeedback } from "./useProbeFeedback";
import { ServiceChooser } from "./ServiceChooser";
import { CUSTOM_SERVICE } from "./service-catalog";
import { useRecommendedModelSelection } from "./useRecommendedModelSelection";
@@ -99,8 +101,7 @@ export function ProviderSetupDialog({
const [models, setModels] = useState<ModelBinding[]>(initialDraft?.models ?? provider?.models ?? []);
const [saving, setSaving] = useState(false);
const [testing, setTesting] = useState(false);
- const [error, setError] = useState("");
- const [testResult, setTestResult] = useState("");
+ const showToast = useAppStore((state) => state.showToast);
const [baseUrlTouched, setBaseUrlTouched] = useState(false);
// A format the user picked by hand outranks every inference about this row.
const [apiStyleTouched, setApiStyleTouched] = useState(false);
@@ -156,6 +157,9 @@ export function ProviderSetupDialog({
},
provider,
);
+ // The probe's own answer is reported once as a toast instead of a status row
+ // under the key, which held a line of the dialog open for as long as it stood.
+ useProbeFeedback(discovery, named);
const recommended = useRecommendedModelSelection({
// A copy keeps the models it was copied with.
enabled: !provider && !initialDraft?.models?.length,
@@ -247,26 +251,35 @@ export function ProviderSetupDialog({
if (normalized !== baseUrl) setBaseUrl(normalized);
};
+ /*
+ The outcome of a manual connection test is an event: it is reported through
+ the app toast stack instead of a result line under the credential fields,
+ which used to push the two panes down every time it changed.
+ */
const testConnection = async () => {
if (!provider) return;
setTesting(true);
- setTestResult("");
try {
const result = (await api.testProvider(provider.id)) as {
ok?: boolean;
message?: string;
status?: number;
};
- setTestResult(
- result?.ok
- ? t("settings.testOk")
- : result?.message ||
- (result?.status
- ? t("settings.testFailedStatus", { status: result.status })
- : t("settings.testFailed")),
+ if (result?.ok) {
+ showToast(t("settings.testOk"), { variant: "success" });
+ return;
+ }
+ showToast(
+ result?.message ||
+ (result?.status
+ ? t("settings.testFailedStatus", { status: result.status })
+ : t("settings.testFailed")),
+ { variant: "error" },
);
} catch (cause) {
- setTestResult(cause instanceof Error ? cause.message : String(cause));
+ showToast(cause instanceof Error ? cause.message : String(cause), {
+ variant: "error",
+ });
} finally {
setTesting(false);
}
@@ -298,7 +311,6 @@ export function ProviderSetupDialog({
? remainingImageModels
: undefined;
setSaving(true);
- setError("");
try {
if (provider) {
const result = await api.updateProvider({
@@ -332,7 +344,9 @@ export function ProviderSetupDialog({
await onSaved(result.provider, persisted, imageModelIdsToSave);
}
} catch (cause) {
- setError(cause instanceof Error ? cause.message : String(cause));
+ showToast(cause instanceof Error ? cause.message : String(cause), {
+ variant: "error",
+ });
} finally {
setSaving(false);
}
@@ -401,7 +415,6 @@ export function ProviderSetupDialog({
</div>
<div className="provider-setup-body">
- {error ? <div className="provider-setup-error">{error}</div> : null}
<ProviderEndpointGuidance
baseUrl={resolvedBaseUrl}
@@ -414,8 +427,6 @@ export function ProviderSetupDialog({
setService(preset?.id ?? CUSTOM_SERVICE);
setBaseUrl(suggestion.baseUrl);
setApiStyle(suggestion.apiStyle);
- setError("");
- setTestResult("");
}}
/>
@@ -437,7 +448,6 @@ export function ProviderSetupDialog({
baseUrl={baseUrl}
onBaseUrlChange={(value) => {
setBaseUrl(value);
- setError("");
}}
commitBaseUrl={commitBaseUrl}
baseUrlError={baseUrlError}
@@ -451,14 +461,8 @@ export function ProviderSetupDialog({
apiStyleNote={endpointFormatNote}
accountOnlyApiStyle={accountOnlyApiStyle}
requiresApiStyleChoice={requiresApiStyleChoice}
- status={<ConnectionStatus active={discoveryActive} discovery={discovery} named={named} />}
/>
- {testResult ? (
- <div className="provider-credential-test">
- <span className="provider-credential-test-result">{testResult}</span>
- </div>
- ) : null}
</div>
<ModelSelectionPanes
diff --git a/apps/desktop/src/components/settings/SkillMarketPanel.tsx b/apps/desktop/src/components/settings/SkillMarketPanel.tsx
index c6d9a09c8..b3c916b1b 100644
--- a/apps/desktop/src/components/settings/SkillMarketPanel.tsx
+++ b/apps/desktop/src/components/settings/SkillMarketPanel.tsx
@@ -301,10 +301,27 @@ export function SkillMarketPanel({
// Swallowing this left the sheet on a null body, so the install button
// sat disabled behind the word "Loading…" with no reason and no way to
// try again — the dead end issue #419 reports.
+ const kind = classifySkillMarketFailure(error);
setPreviewFailure({
- kind: classifySkillMarketFailure(error),
+ kind,
detail: skillMarketFailureDetail(error),
});
+ // The reason belongs to one attempt of opening the sheet, or of asking
+ // it to try again, so it is announced once as a toast. What the sheet
+ // keeps is what stays useful: the recovery hint, the host's own detail,
+ // and the retry control that clear the dead end issue #419 reports.
+ showToast(
+ t(
+ kind === "policy"
+ ? "settings.sklm.previewPolicyError"
+ : kind === "fake-ip"
+ ? "settings.sklm.previewFakeIpError"
+ : kind === "unresolved"
+ ? "settings.sklm.previewResolveError"
+ : "settings.sklm.previewError",
+ ),
+ { variant: "error" },
+ );
});
};
@@ -326,7 +343,6 @@ export function SkillMarketPanel({
if (assembled.tooLarge) {
setDocumentBody(assembled.body);
setDocumentTooLarge(true);
- showToast(t("settings.sklm.documentTooLarge"), { variant: "error" });
return;
}
const created = await api.createUserSkill({
@@ -551,19 +567,7 @@ export function SkillMarketPanel({
<div className="ext-field-group">
<div className="ext-field-label">{t("settings.sklm.preview")}</div>
- {previewFailure ? (
- <p className="sklm-note is-error" role="alert">
- {t(
- previewFailure.kind === "policy"
- ? "settings.sklm.previewPolicyError"
- : previewFailure.kind === "fake-ip"
- ? "settings.sklm.previewFakeIpError"
- : previewFailure.kind === "unresolved"
- ? "settings.sklm.previewResolveError"
- : "settings.sklm.previewError",
- )}
- </p>
- ) : (
+ {previewFailure ? null : (
<pre className="sklm-preview">{documentBody ?? t("common.loading")}</pre>
)}
{previewFailure?.kind === "policy" ? (
diff --git a/apps/desktop/src/components/settings/VendorAccountDialog.tsx b/apps/desktop/src/components/settings/VendorAccountDialog.tsx
index 12d5140c1..30b2d81bd 100644
--- a/apps/desktop/src/components/settings/VendorAccountDialog.tsx
+++ b/apps/desktop/src/components/settings/VendorAccountDialog.tsx
@@ -20,6 +20,7 @@ import { pairsToRecord, recordToPairs } from "../extensions/KeyValueRows";
import { Button, Field, Input, portalOverlay } from "../ui";
import { ProviderHeadersEditor } from "./ProviderHeadersEditor";
import { useProviderModels } from "./useProviderModels";
+import { useProbeFeedback } from "./useProbeFeedback";
import { ModelSelectionPanes, useModelSelection } from "./ModelSelectionPanes";
export type VendorAccountForm = {
@@ -67,6 +68,8 @@ export function VendorAccountDialog({
},
provider,
);
+ // The vendored account's own answer is announced once, like the service form's.
+ useProbeFeedback(discovery, true);
const selection = useModelSelection(discovery, models, setModels);
useEffect(() => {
diff --git a/apps/desktop/src/components/settings/models-fetch-error-copy.ts b/apps/desktop/src/components/settings/models-fetch-error-copy.ts
new file mode 100644
index 000000000..72bb3fb6c
--- /dev/null
+++ b/apps/desktop/src/components/settings/models-fetch-error-copy.ts
@@ -0,0 +1,55 @@
+/**
+ * Toast copy for a failed model-list probe (`model-fetch-error.ts`).
+ *
+ * A probe failure is an event, not a state: the picker reports it once through
+ * the app toast stack instead of keeping a classified box inside the dialog,
+ * where it would push the panes down for as long as the failure lasts. Every
+ * surface that probes the endpoint goes through here, so the same failure says
+ * the same thing everywhere.
+ */
+import type { TFunction } from "i18next";
+import { describeModelsFetchError } from "./model-fetch-error";
+
+/**
+ * One line: the classified summary plus the short technical remainder the
+ * classifier considered safe to repeat (`describeModelsFetchError`).
+ *
+ * The keys stay literal — the renderer's i18n contract is checked from the
+ * `t("…")` call sites, and a dynamic key would leave this copy unchecked.
+ */
+export function modelsFetchErrorText(
+ error: string | undefined,
+ t: TFunction,
+): string {
+ const view = describeModelsFetchError(error);
+ let summary: string;
+ switch (view.kind) {
+ case "unauthorized":
+ summary = t("errors.PROVIDER_UNAUTHORIZED");
+ break;
+ case "notFound":
+ summary = t("settings.modelsFetchNotFound");
+ break;
+ case "rateLimited":
+ summary = t("errors.PROVIDER_RATE_LIMITED");
+ break;
+ case "timeout":
+ summary = t("errors.TIMEOUT");
+ break;
+ case "network":
+ summary = t("errors.NETWORK_ERROR");
+ break;
+ case "invalidResponse":
+ summary = t("settings.modelsFetchInvalidResponse");
+ break;
+ case "http":
+ summary = t("settings.modelsFetchFailedStatus", {
+ status: view.summaryParams?.status ?? 0,
+ });
+ break;
+ default:
+ summary = t("settings.modelsFetchFailed");
+ break;
+ }
+ return view.detail ? `${summary} ${view.detail}` : summary;
+}
diff --git a/apps/desktop/src/components/settings/useProbeFeedback.ts b/apps/desktop/src/components/settings/useProbeFeedback.ts
new file mode 100644
index 000000000..a4365f04e
--- /dev/null
+++ b/apps/desktop/src/components/settings/useProbeFeedback.ts
@@ -0,0 +1,95 @@
+/**
+ * Probe outcomes as toasts.
+ *
+ * The line that used to sit under the key is gone: a settled probe — connected,
+ * completed from the catalog, or refused — is the result of asking the
+ * endpoint, so it is announced once and then gets out of the way instead of
+ * holding a row of the dialog open for as long as the answer stands. Nothing
+ * transient is announced: asking, waiting for a key, and the cache-first paint
+ * say nothing about the service yet, and a toast for each of them would turn
+ * typing into a stream of notices.
+ */
+import { useEffect, useRef } from "react";
+import { useTranslation } from "react-i18next";
+import type { TFunction } from "i18next";
+import { useAppStore } from "../../stores/app-store";
+import { canRecommendFrom } from "./recommended-models";
+import { modelsFetchErrorText } from "./models-fetch-error-copy";
+import type { ProviderModelsState } from "./useProviderModels";
+
+export type ProbeOutcome = {
+ message: string;
+ variant: "success" | "error" | "info";
+};
+
+/**
+ * The settled outcome of a probe, or null while nothing is settled: idle, in
+ * flight, and a cache-only answer all leave the question open.
+ */
+export function probeOutcome(
+ discovery: Pick<
+ ProviderModelsState,
+ "status" | "models" | "error" | "source"
+ >,
+ namedService: boolean,
+ t: TFunction,
+): ProbeOutcome | null {
+ if (discovery.status !== "ready" && discovery.status !== "error") return null;
+ if (discovery.source === "cache") return null;
+ const count = discovery.models.length;
+ if (discovery.error) {
+ // A named vendor without a model-list route still accepted the key, so the
+ // catalog answer is news about the service rather than a refusal.
+ if (canRecommendFrom(discovery, namedService)) {
+ return {
+ message: t("settings.connectionNoModelList", { count }),
+ variant: "info",
+ };
+ }
+ return { message: modelsFetchErrorText(discovery.error, t), variant: "error" };
+ }
+ return {
+ message: t(
+ discovery.source === "remote"
+ ? "settings.connectionReady"
+ : "settings.connectionCatalog",
+ { count },
+ ),
+ variant: "success",
+ };
+}
+
+/**
+ * Announce each settled probe once. Every surface that probes the endpoint goes
+ * through this hook, so a refusal is reported once no matter which of the
+ * dialog's parts asked, and a fixed answer is never repeated.
+ */
+export function useProbeFeedback(
+ discovery: ProviderModelsState,
+ namedService: boolean,
+): void {
+ const { t } = useTranslation();
+ const showToast = useAppStore((state) => state.showToast);
+ const reported = useRef<string | null>(null);
+
+ useEffect(() => {
+ const outcome = probeOutcome(discovery, namedService, t);
+ if (!outcome) {
+ // The next settled answer is a new answer.
+ reported.current = null;
+ return;
+ }
+ const key = `${outcome.variant}\u0000${outcome.message}`;
+ if (reported.current === key) return;
+ reported.current = key;
+ showToast(outcome.message, { variant: outcome.variant });
+ }, [
+ discovery.status,
+ discovery.source,
+ discovery.error,
+ discovery.models.length,
+ namedService,
+ showToast,
+ t,
+ ]);
+}
diff --git a/apps/desktop/src/features/chat/composer/ComposerStatus.tsx b/apps/desktop/src/features/chat/composer/ComposerStatus.tsx
index fc14d9aae..bfe1407dc 100644
--- a/apps/desktop/src/features/chat/composer/ComposerStatus.tsx
+++ b/apps/desktop/src/features/chat/composer/ComposerStatus.tsx
@@ -1,3 +1,4 @@
+import { useEffect, useRef } from "react";
import type { TFunction } from "i18next";
import { TooltipButton } from "../../../components/ui";
import {
@@ -14,6 +15,7 @@ import {
type QueuedPrompt,
type QueuedPromptDirection,
} from "../../../lib/queued-prompts";
+import { useAppStore } from "../../../stores/app-store";
export type ComposerStatusProps = {
t: TFunction;
@@ -31,7 +33,8 @@ export type ComposerStatusProps = {
dismissDroppedDirectories: () => void;
};
-/** Non-editor composer status rows: queue, enhancement errors, and folder drops. */
+/** Non-editor composer status rows: queue, folder drops, and the one-shot
+ * enhancement failure, which is reported through the global toast. */
export function ComposerStatus({
t,
queuedPrompts,
@@ -47,6 +50,29 @@ export function ComposerStatus({
insertDroppedDirectoryPaths,
dismissDroppedDirectories,
}: ComposerStatusProps) {
+ const showToast = useAppStore((state) => state.showToast);
+ // A failed enhancement is a one-shot result of the Enhance action: it goes to
+ // the toast stack and the pending error is cleared, so a remount can neither
+ // re-report it nor render the old inline row again.
+ const reportedEnhancementError = useRef<string | null>(null);
+ useEffect(() => {
+ if (!enhancementError) {
+ reportedEnhancementError.current = null;
+ return;
+ }
+ const key = `${enhancementError.code}\u0000${enhancementError.message}`;
+ if (reportedEnhancementError.current === key) return;
+ reportedEnhancementError.current = key;
+ // The store already reads the provider's own answer as either a specific
+ // reason or the generic failure, so the sentence is not prefixed again; the
+ // inline row carried the verbatim code, so the toast keeps it.
+ showToast(
+ `${enhancementError.message} (${enhancementError.code})`,
+ { variant: "error" },
+ );
+ clearEnhancementError();
+ }, [enhancementError, clearEnhancementError, showToast, t]);
+
return (
<>
{queuedPrompts.length ? (
@@ -147,23 +173,6 @@ export function ComposerStatus({
})}
</div>
) : null}
- {enhancementError ? (
- <div className="composer-enhancement-error" role="alert">
- <span className="composer-enhancement-error-message">
- {t("chat.enhancementFailed")}: {enhancementError.message}
- </span>
- <code>{enhancementError.code}</code>
- <TooltipButton
- type="button"
- className="composer-enhancement-error-dismiss"
- tooltip={t("chat.dismissEnhancementError")}
- ariaLabel={t("chat.dismissEnhancementError")}
- onClick={clearEnhancementError}
- >
- <IconX size={13} aria-hidden="true" />
- </TooltipButton>
- </div>
- ) : null}
{droppedDirectories.length ? (
<div className="composer-directory-drop" role="status">
<IconFolder size={13} aria-hidden />
diff --git a/apps/desktop/src/features/settings/developer-sections.tsx b/apps/desktop/src/features/settings/developer-sections.tsx
index 76d5ff942..0aef8b2b7 100644
--- a/apps/desktop/src/features/settings/developer-sections.tsx
+++ b/apps/desktop/src/features/settings/developer-sections.tsx
@@ -56,7 +56,7 @@ export function DeveloperSection({
export function CloseBehaviorSection() {
const { t } = useTranslation();
const [behavior, setBehavior] = useState<CloseBehavior | null>(null);
- const [saveError, setSaveError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
useEffect(() => {
let cancelled = false;
@@ -80,12 +80,11 @@ export function CloseBehaviorSection() {
];
const choose = async (next: CloseBehavior) => {
- setSaveError(false);
try {
await api.setCloseBehavior(next);
setBehavior(next);
} catch {
- setSaveError(true);
+ showToast(t("settings.closeBehaviorSaveError"), { variant: "error" });
}
};
@@ -102,11 +101,6 @@ export function CloseBehaviorSection() {
label={t("settings.closeBehaviorTitle")}
/>
</SettingsRow>
- {saveError ? (
- <span className="settings-command-shell-state error" role="status">
- {t("settings.closeBehaviorSaveError")}
- </span>
- ) : null}
</SettingsCard>
);
}
diff --git a/apps/desktop/src/features/settings/primitives.tsx b/apps/desktop/src/features/settings/primitives.tsx
index 3a025f9a0..0df8482d4 100644
--- a/apps/desktop/src/features/settings/primitives.tsx
+++ b/apps/desktop/src/features/settings/primitives.tsx
@@ -14,6 +14,7 @@ import { api } from "../../lib/api";
import { resolveContextUsageDisplay } from "../../lib/context-usage";
import { HelpIcon, Input, SegmentedControl } from "../../components/ui";
import { SettingsMenuSelect } from "../../components/settings/SettingsMenuSelect";
+import { useAppStore } from "../../stores/app-store";
/**
* One settings decision: the title and its control on a single line.
@@ -106,7 +107,7 @@ export function CommandShellRow({
const { t } = useTranslation();
const [catalog, setCatalog] = useState<CommandShellCatalog | null>(null);
const [loadError, setLoadError] = useState(false);
- const [saveError, setSaveError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
const [selectedOverride, setSelectedOverride] =
useState<CommandShellId | null>(null);
const [saving, setSaving] = useState(false);
@@ -162,7 +163,6 @@ export function CommandShellRow({
const choice = catalog.choices.find((candidate) => candidate.id === value);
if (!choice || !choice.available) return;
setSaving(true);
- setSaveError(false);
setSelectedOverride(choice.id);
try {
await saveSettings({ defaultCommandShell: choice.id });
@@ -178,7 +178,7 @@ export function CommandShellRow({
);
} catch {
setSelectedOverride(null);
- setSaveError(true);
+ showToast(t("settings.commandShellSaveError"), { variant: "error" });
} finally {
setSaving(false);
}
@@ -221,11 +221,6 @@ export function CommandShellRow({
{effectiveStatus ? (
<span className="settings-command-shell-status">{effectiveStatus}</span>
) : null}
- {saveError ? (
- <span className="settings-command-shell-state error" role="status">
- {t("settings.commandShellSaveError")}
- </span>
- ) : null}
</div>
</SettingsRow>
);
@@ -296,7 +291,7 @@ export function LargePasteThresholdRow({
settings.largePasteThreshold,
);
const [draft, setDraft] = useState(String(currentThreshold));
- const [saveError, setSaveError] = useState(false);
+ const showToast = useAppStore((state) => state.showToast);
useEffect(() => {
setDraft(String(currentThreshold));
@@ -312,15 +307,13 @@ export function LargePasteThresholdRow({
: currentThreshold;
setDraft(String(next));
if (next === currentThreshold) {
- setSaveError(false);
return;
}
- setSaveError(false);
try {
await saveSettings({ largePasteThreshold: next });
} catch {
setDraft(String(currentThreshold));
- setSaveError(true);
+ showToast(t("settings.largePasteThresholdSaveError"), { variant: "error" });
}
};
@@ -338,7 +331,6 @@ export function LargePasteThresholdRow({
inputMode="numeric"
value={draft}
aria-label={t("settings.largePasteThreshold")}
- aria-invalid={saveError}
onChange={(event) => setDraft(event.target.value)}
onBlur={() => void commit()}
onKeyDown={(event) => {
@@ -348,11 +340,6 @@ export function LargePasteThresholdRow({
}
}}
/>
- {saveError ? (
- <span className="settings-command-shell-state error" role="status">
- {t("settings.largePasteThresholdSaveError")}
- </span>
- ) : null}
</div>
</SettingsRow>
);
diff --git a/apps/desktop/src/features/settings/voice/LiveVoiceSettings.tsx b/apps/desktop/src/features/settings/voice/LiveVoiceSettings.tsx
index e86ff21db..130bfe386 100644
--- a/apps/desktop/src/features/settings/voice/LiveVoiceSettings.tsx
+++ b/apps/desktop/src/features/settings/voice/LiveVoiceSettings.tsx
@@ -29,8 +29,8 @@ export function LiveVoiceSettings({
const [providersLoadFailed, setProvidersLoadFailed] = useState(false);
const [providersRequest, setProvidersRequest] = useState(0);
const setSettingsTab = useAppStore((state) => state.setSettingsTab);
+ const showToast = useAppStore((state) => state.showToast);
const [saving, setSaving] = useState(false);
- const [saveFailed, setSaveFailed] = useState(false);
const [drafts, setDrafts] = useState<Record<string, { modelId?: string; voice?: string }>>({});
const bindingByAdapter = useMemo(() => {
const result = new Map<Adapter, LiveBinding>();
@@ -61,12 +61,11 @@ export function LiveVoiceSettings({
const save = async (next: LiveVoiceSettings) => {
setSaving(true);
- setSaveFailed(false);
try {
await saveSettings({ liveVoice: next });
await controller.refreshStatus();
} catch {
- setSaveFailed(true);
+ showToast(t("liveVoice.saveFailed"), { variant: "error" });
} finally {
setSaving(false);
}
@@ -243,7 +242,6 @@ export function LiveVoiceSettings({
</Button>
</div>
) : null}
- {saveFailed ? <div className="live-voice-error" role="alert">{t("liveVoice.saveFailed")}</div> : null}
</SettingsCard>
{renderAdapter("codex-live")}
{renderAdapter("gemini-live")}
diff --git a/apps/desktop/src/features/voice/live/LiveVoiceCallBar.tsx b/apps/desktop/src/features/voice/live/LiveVoiceCallBar.tsx
index 44cc79420..cfd366728 100644
--- a/apps/desktop/src/features/voice/live/LiveVoiceCallBar.tsx
+++ b/apps/desktop/src/features/voice/live/LiveVoiceCallBar.tsx
@@ -1,8 +1,9 @@
-import type { RefObject } from "react";
+import { useEffect, useRef, type RefObject } from "react";
import type { TFunction } from "i18next";
import { IconClose, IconInfo, IconMic, IconMicOff, IconPhoneOff, IconSettings, IconVolume, IconWaveform } from "../../../components/icons";
import { TooltipButton } from "../../../components/ui";
import type { LiveVoiceSnapshot } from "./live-call-controller";
+import { useAppStore } from "../../../stores/app-store";
import { liveVoiceMode, type liveVoiceIssue } from "./live-voice-presentation";
type CallBarProps = {
@@ -25,6 +26,32 @@ export function LiveVoiceCallBar({
t, snapshot, issue, detailsOpen, detailsRef, actionPending,
onCancel, onMute, onEnd, onDetails, onResume, onSettings, onDismiss,
}: CallBarProps) {
+ // Live Voice failures are one-shot results of the call actions, so they are
+ // reported through the global toast together with their allow-listed code.
+ // Only call states that outlive a toast stay in the bar: the playback hint and
+ // the quarantine that still has to confirm the microphone was released.
+ const issueStaysInline = !issue || issue.warning || issue.code === "LIVE_MEDIA_RELEASE_UNCONFIRMED";
+ const showToast = useAppStore((state) => state.showToast);
+ const reportedIssue = useRef<string | null>(null);
+ // Starting an action clears the mark: a retry that fails the same way is a new
+ // failure and has to speak up again, not be swallowed as a repeat of the last
+ // one. The call itself is preserved across a reconnect, so the key alone
+ // cannot tell the two apart.
+ const previousActionPending = useRef(actionPending);
+ useEffect(() => {
+ const startedAttempt =
+ actionPending !== null && previousActionPending.current === null;
+ previousActionPending.current = actionPending;
+ if (startedAttempt) reportedIssue.current = null;
+ if (issueStaysInline || !issue) {
+ reportedIssue.current = null;
+ return;
+ }
+ if (reportedIssue.current === issue.key) return;
+ reportedIssue.current = issue.key;
+ showToast(`${t(issue.message)} (${issue.code})`, { variant: "error" });
+ }, [actionPending, issue, issueStaysInline, showToast, t]);
+
const mode = liveVoiceMode(snapshot);
const call = snapshot.call;
const status = mode === "stopping" ? "liveVoice.phase.closing"
@@ -96,7 +123,7 @@ export function LiveVoiceCallBar({
) : null}
</div>
</div>
- {issue ? (
+ {issue && issueStaysInline ? (
<p className={issue.warning ? "live-voice-feedback live-voice-hint" : "live-voice-feedback live-voice-error"} role={issue.warning ? "status" : "alert"}>
{t(issue.message)}
{/* The localized sentence alone cannot say whether authentication,
diff --git a/apps/desktop/src/features/voice/live/LiveVoicePreparation.tsx b/apps/desktop/src/features/voice/live/LiveVoicePreparation.tsx
index 6925ca94d..a15db72b6 100644
--- a/apps/desktop/src/features/voice/live/LiveVoicePreparation.tsx
+++ b/apps/desktop/src/features/voice/live/LiveVoicePreparation.tsx
@@ -21,12 +21,12 @@ export function LiveVoicePreparation({
}) {
const sessions = useAppStore((state) => state.sessions);
const createSession = useAppStore((state) => state.newSession);
+ const showToast = useAppStore((state) => state.showToast);
const [workExpanded, setWorkExpanded] = useState(false);
const [allowWork, setAllowWork] = useState(false);
const [selectedSessionId, setSelectedSessionId] = useState(workSessionId ?? "");
const [contextEnabled, setContextEnabled] = useState(false);
const [creating, setCreating] = useState(false);
- const [createFailed, setCreateFailed] = useState(false);
useEffect(() => {
setSelectedSessionId(workSessionId ?? "");
setContextEnabled(false);
@@ -41,15 +41,14 @@ export function LiveVoicePreparation({
const createWorkSession = async () => {
setCreating(true);
- setCreateFailed(false);
try {
await createSession();
const id = useAppStore.getState().activeSessionId;
if (id) setSelectedSessionId(id);
- else setCreateFailed(true);
+ else showToast(t("liveVoice.sessionCreateFailed"), { variant: "error" });
setContextEnabled(false);
} catch {
- setCreateFailed(true);
+ showToast(t("liveVoice.sessionCreateFailed"), { variant: "error" });
} finally {
setCreating(false);
}
@@ -125,7 +124,6 @@ export function LiveVoicePreparation({
</div>
) : null}
{workUnavailable ? <p className="live-voice-hint" role="status">{t("liveVoice.noWorkSession")}</p> : null}
- {createFailed ? <p className="live-voice-error" role="alert">{t("liveVoice.sessionCreateFailed")}</p> : null}
<Button
type="button"
variant="primary"
diff --git a/apps/desktop/src/pages/PluginsPage.tsx b/apps/desktop/src/pages/PluginsPage.tsx
index 9822c19b0..ede35e84f 100644
--- a/apps/desktop/src/pages/PluginsPage.tsx
+++ b/apps/desktop/src/pages/PluginsPage.tsx
@@ -1,3 +1,4 @@
+import { useEffect, useRef } from "react";
import { Button, TooltipButton, cx } from "../components/ui";
import { IconCloudDown, IconDownload, IconMore, IconPlug } from "../components/icons";
import { AnchoredMenu } from "../components/settings/AnchoredMenu";
@@ -27,9 +28,23 @@ export function PluginsPage() {
setInstalledQuery,
marketLoading,
market,
- applyAutoUpdates,
+ showToast,
} = page;
+ /**
+ * Pending updates are announced once, where the user is looking, instead of
+ * holding a banner open across the route. Applying them keeps its entry on
+ * the header menu (`plugins.applyAutoUpdates`), and a count that was already
+ * on screen when the page opened is not news.
+ */
+ const reportedUpdatesRef = useRef<number | null>(null);
+ useEffect(() => {
+ const reported = reportedUpdatesRef.current;
+ reportedUpdatesRef.current = stats.updates;
+ if (reported === null || reported === stats.updates || stats.updates === 0) return;
+ showToast(t("plugins.updatesReady", { count: stats.updates }), { variant: "info" });
+ }, [stats.updates, showToast, t]);
+
return (
<div className="route-scroll">
<div className="page-frame plugins-page">
@@ -99,22 +114,6 @@ export function PluginsPage() {
</div>
</div>
- {stats.updates > 0 ? (
- <div className="plugins-alert" role="status">
- <span className="plugins-alert-icon" aria-hidden>
- <IconCloudDown size={15} />
- </span>
- <div className="plugins-alert-copy">
- <span className="plugins-alert-title">
- {t("plugins.updatesReady", { count: stats.updates })}
- </span>
- </div>
- <Button variant="secondary" size="sm" onClick={() => void applyAutoUpdates()}>
- {t("plugins.applyAutoUpdates")}
- </Button>
- </div>
- ) : null}
-
<div className="plugins-toolbar">
<div className="plugins-segment" role="tablist" aria-label={t("plugins.title")}>
<button
diff --git a/apps/desktop/src/styles/chrome.css b/apps/desktop/src/styles/chrome.css
index 1b795414c..a7ab01b14 100644
--- a/apps/desktop/src/styles/chrome.css
+++ b/apps/desktop/src/styles/chrome.css
@@ -1087,13 +1087,13 @@
/* Electron resolves app-region hit testing across siblings. The controls must
* be a later compositor layer than Settings, plugin content, or a work-panel
- * drag header. Direct-child overlays (search, toasts, splash) must still win. */
+ * drag header. Direct-child overlays (search, splash) must still win; the toast
+ * stack is not one of them — it lives on the body so a dialog cannot cover it. */
.app-shell > .window-controls {
z-index: 1100;
}
-.app-shell > .search-overlay,
-.app-shell > .toast-viewport {
+.app-shell > .search-overlay {
z-index: 1200;
}
diff --git a/apps/desktop/src/styles/composer.css b/apps/desktop/src/styles/composer.css
index c7def50bb..85d866637 100644
--- a/apps/desktop/src/styles/composer.css
+++ b/apps/desktop/src/styles/composer.css
@@ -449,47 +449,6 @@
color: var(--ds-text-secondary);
}
-.composer-enhancement-error {
- display: flex;
- align-items: center;
- gap: 8px;
- width: 100%;
- margin: 0 0 8px;
- border-radius: var(--radius-lg);
- padding: 8px 10px;
- background: color-mix(in oklab, var(--ds-error) 8%, var(--ds-bg-composer));
- color: var(--ds-text-secondary);
- font-size: var(--text-sm);
-}
-
-.composer-enhancement-error-message {
- min-width: 0;
- flex: 1;
- overflow-wrap: anywhere;
-}
-
-.composer-enhancement-error code {
- color: var(--ds-error);
- font-size: var(--text-xs);
-}
-
-.composer-enhancement-error-dismiss {
- display: inline-flex;
- flex: 0 0 auto;
- align-items: center;
- justify-content: center;
- width: 24px;
- height: 24px;
- border-radius: var(--radius-md);
- color: var(--ds-text-muted);
-}
-
-.composer-enhancement-error-dismiss:hover,
-.composer-enhancement-error-dismiss:focus-visible {
- background: var(--ds-bg-hover);
- color: var(--ds-text-primary);
-}
-
.send-btn:hover:not(:disabled) {
opacity: 0.9;
}
diff --git a/apps/desktop/src/styles/messages.css b/apps/desktop/src/styles/messages.css
index fe8361917..d32271f99 100644
--- a/apps/desktop/src/styles/messages.css
+++ b/apps/desktop/src/styles/messages.css
@@ -851,12 +851,6 @@
font-size: var(--text-xs-plus);
line-height: var(--leading-compact-plus);
}
-
-.review-change-rollback-note.is-warning {
- flex: 1;
- color: var(--ds-warning);
-}
-
.review-change-diff .diff-line-sign {
width: 24px;
padding-block: 3px;
diff --git a/apps/desktop/src/styles/model-config.css b/apps/desktop/src/styles/model-config.css
index c938149a2..9b08cd41e 100644
--- a/apps/desktop/src/styles/model-config.css
+++ b/apps/desktop/src/styles/model-config.css
@@ -247,37 +247,6 @@
min-width: 0;
}
-/* One quiet line under the key: connecting, connected, or why not. */
-.provider-connection-status {
- display: flex;
- align-items: center;
- gap: 5px;
- min-width: 0;
- color: var(--ds-text-muted);
- font-size: var(--text-2xs);
- line-height: var(--leading-relaxed);
- overflow-wrap: anywhere;
-}
-
-.provider-connection-status.is-ok {
- color: var(--ds-text-secondary);
-}
-
-.provider-connection-status.is-ok svg {
- flex: none;
- color: var(--ds-success);
-}
-
-.provider-connection-status.is-error {
- flex-wrap: wrap;
- column-gap: 6px;
- color: var(--ds-warning);
-}
-
-.provider-connection-status.is-error .provider-models-error-detail {
- max-width: none;
-}
-
.provider-service-anchor {
width: 100%;
min-width: 0;
@@ -588,14 +557,6 @@
line-height: var(--leading-relaxed);
}
-/* Quieter than the import error: folding is informational, not a refusal. */
-.provider-setup-header-note {
- margin: 0;
- color: var(--ds-text-muted);
- font-size: var(--text-2xs);
- line-height: var(--leading-relaxed);
-}
-
/* Pick on the left, review on the right; both stretch to the same height. */
.provider-setup-panes {
flex: 1;
@@ -605,30 +566,8 @@
min-height: 0;
}
-.provider-setup-error {
- padding: 8px 10px;
- border-radius: var(--radius-xs);
- background: var(--ds-bg-inset);
- color: var(--ds-warning);
- font-size: var(--text-2xs);
- line-height: var(--leading-relaxed);
-}
-
/* ----------------------------------------------------- credential fields */
-.provider-credential-test {
- display: flex;
- align-items: center;
- gap: 8px;
- flex-wrap: wrap;
-}
-
-.provider-credential-test-result {
- color: var(--ds-text-muted);
- font-size: var(--text-2xs);
- line-height: var(--leading-relaxed);
-}
-
/* ------------------------------------------------- live model list */
/* The service's own answer, so this is a short checkbox list, not a catalog. */
@@ -765,24 +704,6 @@
color: var(--ds-text-faint);
}
-.provider-models-note {
- margin: 0 8px;
- padding: 6px 8px;
- border-radius: var(--radius-xs);
- background: var(--ds-tile);
- color: var(--ds-text-muted);
- font-size: var(--text-2xs);
- line-height: var(--leading-relaxed);
-}
-
-.provider-models-note.is-error {
- display: flex;
- flex-direction: column;
- gap: 2px;
- color: var(--ds-warning);
- overflow-wrap: anywhere;
-}
-
.provider-models-placeholder {
flex: 1;
display: flex;
@@ -805,16 +726,6 @@
overflow-wrap: anywhere;
}
-.provider-models-error-summary {
- font-weight: var(--font-weight-medium);
-}
-
-.provider-models-error-detail,
-.provider-models-error-hint {
- color: var(--ds-text-muted);
- max-width: 36ch;
-}
-
.provider-models-list {
flex: 1;
display: flex;
diff --git a/apps/desktop/src/styles/overlays.css b/apps/desktop/src/styles/overlays.css
index e3481802f..8c15ac09c 100644
--- a/apps/desktop/src/styles/overlays.css
+++ b/apps/desktop/src/styles/overlays.css
@@ -179,6 +179,9 @@
Same floating-surface family as the elevated menus: elevated-opaque plate,
subtle 1px ring, dialog shadow. Variants tint the leading icon only —
surfaces stay neutral (restraint principle).
+ The stack is hosted on the body (Toast.tsx), so `z-toast` outranks the
+ `z-dialog` (40) overlay host the dialogs are portaled into; inside the shell
+ it would paint under their scrim.
*/
.toast-viewport {
position: fixed;
diff --git a/apps/desktop/src/styles/plugins.css b/apps/desktop/src/styles/plugins.css
index 502ddf505..0f99cfcc4 100644
--- a/apps/desktop/src/styles/plugins.css
+++ b/apps/desktop/src/styles/plugins.css
@@ -107,42 +107,6 @@
box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 35%, transparent);
}
-/* Pending-update banner: shown only while updates exist. */
-.plugins-alert {
- display: flex;
- align-items: center;
- gap: 12px;
- border-radius: var(--radius-lg);
- padding: 12px 14px;
- background: color-mix(in oklab, var(--ds-success) 10%, transparent);
-}
-
-.plugins-alert-icon {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 26px;
- height: 26px;
- flex: 0 0 auto;
- border-radius: var(--radius-full);
- background: color-mix(in oklab, var(--ds-success) 18%, transparent);
- color: var(--ds-success);
-}
-
-.plugins-alert-copy {
- display: flex;
- flex-direction: column;
- gap: 2px;
- flex: 1;
- min-width: 0;
-}
-
-.plugins-alert-title {
- color: var(--ds-text-primary);
- font-size: var(--text-md);
- font-weight: var(--font-weight-medium-plus);
-}
-
/* Toolbar: segmented tabs on the left, count + pill search on the right. */
.plugins-toolbar {
display: flex;
@@ -419,6 +383,8 @@
color: var(--ds-text-faint);
}
+/* A plugin that failed to load keeps its own reason on the row: the row stays
+ broken until the user fixes it, so the message is state, not an announcement. */
.plugins-row-error {
margin: 0;
color: var(--ds-error);
diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.css
index 10a61490d..3084755d7 100644
--- a/apps/desktop/src/styles/settings.css
+++ b/apps/desktop/src/styles/settings.css
@@ -526,8 +526,7 @@
overflow-wrap: anywhere;
}
-.settings-config-sync-message.error,
-.settings-config-sync-error {
+.settings-config-sync-message.error {
color: var(--ds-danger);
}
@@ -793,13 +792,6 @@
line-height: var(--leading-compact);
}
-.settings-remote-host-empty-detail {
- flex: 1 1 100%;
- color: var(--ds-text-secondary);
- font-family: var(--font-mono);
- font-size: var(--text-xs-plus);
-}
-
.settings-remote-host-pulse {
width: 8px;
height: 8px;
diff --git a/apps/desktop/test/chat-review-entry.test.mjs b/apps/desktop/test/chat-review-entry.test.mjs
index 9754c5543..4c62b00a7 100644
--- a/apps/desktop/test/chat-review-entry.test.mjs
+++ b/apps/desktop/test/chat-review-entry.test.mjs
@@ -38,6 +38,7 @@ const appSource = await readAppSource();
const storeSource = await readStoreSource();
const appStoreSource = await readStoreModule("app-store.ts");
const eventsSource = await readStoreModule("slices/events-slice.ts");
+const transcriptSliceSource = await readStoreModule("slices/transcript-slice.ts");
const baseReview = {
version: 1,
@@ -181,6 +182,21 @@ test("chat renders one message-owned card immediately after its tool row", () =>
assert.doesNotMatch(storeSource, /workspaceReviewSessions/);
});
+test("rollback outcomes reach the toast instead of a second card row", () => {
+ // The store already reports both outcomes; the card only owns the action.
+ assert.match(
+ transcriptSliceSource,
+ /rollbackConflict[\s\S]{0,120}variant: "warning"/,
+ );
+ assert.match(
+ transcriptSliceSource,
+ /rollbackUnavailable[\s\S]{0,120}variant: "warning"/,
+ );
+ assert.doesNotMatch(cardSource, /rollbackStatus/);
+ assert.doesNotMatch(cardSource, /review-change-rollback-note is-warning/);
+ assert.doesNotMatch(cardSource, /panel\.review\.rollbackConflict/);
+});
+
test("Review is a session change history and no longer refreshes a Git diff", () => {
assert.match(reviewSource, /reviewChangesFromMessages\(messages\)/);
assert.match(reviewSource, /<ReviewChangeCard/);
diff --git a/apps/desktop/test/live-voice-controls.test.mjs b/apps/desktop/test/live-voice-controls.test.mjs
index 5e9d833a1..9adbf005a 100644
--- a/apps/desktop/test/live-voice-controls.test.mjs
+++ b/apps/desktop/test/live-voice-controls.test.mjs
@@ -1,8 +1,16 @@
import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
import test from "node:test";
import { fileURLToPath } from "node:url";
import { createServer } from "vite";
+// The bar owns the call chrome; the failure text and its code are asserted
+// through the source, because the toast itself is the store's surface.
+const callBarSource = readFileSync(
+ new URL("../src/features/voice/live/LiveVoiceCallBar.tsx", import.meta.url),
+ "utf8",
+);
+
const binding = { bindingId: "voice-a", adapterId: "codex-live", configured: true, credentialsPresent: true, selectable: true, providerLabel: "Fixture voice" };
const status = { enabled: true, settingsRevision: 1, selectedBindingId: binding.bindingId, bindings: [binding], call: null };
const call = { callId: "call-a", revision: 1, bindingId: binding.bindingId, adapterId: binding.adapterId, phase: "connected", muted: true, microphoneActive: true, userSpeaking: false, assistantSpeaking: false };
@@ -125,12 +133,22 @@ test("Live Voice separates idle entry and compact call presentation", async (t)
assert.equal(liveVoiceIssue({ ...snapshot, call: { ...call, playbackBlocked: false, notice: { code: "LIVE_PLAYBACK_BLOCKED", retriable: true } } }), null);
assert.equal(liveVoiceIssue({ ...snapshot, call: { ...call, notice: { code: "LIVE_EXECUTION_NOT_CONNECTED", retriable: false } } }).message, "liveVoice.workNotConnected");
});
- await t.test("a stopped call names its real cause and shows the verbatim error code", () => {
+ await t.test("a stopped call names its real cause and carries its code to the toast", () => {
const failed = { ...snapshot, call: { ...call, phase: "failed", error: { code: "LIVE_NETWORK_ERROR", retriable: true } } };
assert.equal(liveVoiceIssue(failed).message, "errors.NETWORK_ERROR");
+ // A transport failure is a one-shot result, so the bar reports it through
+ // the global toast together with the verbatim, allow-listed code.
const html = renderBar(failed);
- assert.match(html, /errors\.NETWORK_ERROR/);
- assert.match(html, /<code class="live-voice-error-code">LIVE_NETWORK_ERROR<\/code>/);
+ assert.doesNotMatch(html, /errors\.NETWORK_ERROR/);
+ assert.doesNotMatch(html, /role="alert"/);
+ assert.match(
+ callBarSource,
+ /showToast\(`\$\{t\(issue\.message\)\} \(\$\{issue\.code\}\)`, \{ variant: "error" \}\)/,
+ );
+ // A retry that fails the same way is a new failure: starting an action drops
+ // the mark, because the call is preserved and the key alone cannot say so.
+ assert.match(callBarSource, /actionPending !== null && previousActionPending\.current === null/);
+ assert.match(callBarSource, /if \(startedAttempt\) reportedIssue\.current = null;/);
// account failures read as account failures, not as generic configuration advice
const auth = liveVoiceIssue({ ...snapshot, call: { ...call, phase: "failed", error: { code: "LIVE_AUTH_REQUIRED", retriable: false } } });
assert.equal(auth.message, "liveVoice.authRequired");
diff --git a/apps/desktop/test/plugin-settings-renderer-surface.test.mjs b/apps/desktop/test/plugin-settings-renderer-surface.test.mjs
index baf5270f5..1eec7926d 100644
--- a/apps/desktop/test/plugin-settings-renderer-surface.test.mjs
+++ b/apps/desktop/test/plugin-settings-renderer-surface.test.mjs
@@ -37,9 +37,12 @@ test("window controls have a compositor layer above Settings destinations", () =
const chrome = read("src/styles/chrome.css");
assert.match(chrome, /\.window-controls\s*\{[\s\S]*?z-index:\s*1000/s);
assert.match(chrome, /\.app-shell\s*>\s*\.window-controls\s*\{[\s\S]*?z-index:\s*1100/s);
- assert.match(
- chrome,
- /\.app-shell\s*>\s*\.search-overlay,\s*\n\.app-shell\s*>\s*\.toast-viewport\s*\{[\s\S]*?z-index:\s*1200/s,
- );
+ assert.match(chrome, /\.app-shell\s*>\s*\.search-overlay\s*\{[\s\S]*?z-index:\s*1200/s);
assert.match(chrome, /\.app-shell\s*>\s*\.startup-splash\s*\{[\s\S]*?z-index:\s*1300/s);
+ // The toast stack is not a shell child any more: the shell isolates its
+ // layers, so a stack inside it would be painted under a dialog scrim. It is
+ // hosted on the body, where z-toast (50) keeps outranking z-dialog (40).
+ const toast = read("src/components/Toast.tsx");
+ assert.match(toast, /document\.body\.append\(element\)/);
+ assert.match(toast, /createPortal\(/);
});
diff --git a/apps/desktop/test/plugin-settings.test.mjs b/apps/desktop/test/plugin-settings.test.mjs
index ba73d809a..45bd77f45 100644
--- a/apps/desktop/test/plugin-settings.test.mjs
+++ b/apps/desktop/test/plugin-settings.test.mjs
@@ -12,6 +12,8 @@ const main = await readMainSource();
const protocol = await read("../../../packages/shared/src/protocol.ts");
const page = await readPluginsSource();
const sheet = await read("../src/components/plugins/PluginSettingsSheet.tsx");
+const installedPanel = await read("../src/features/plugins/InstalledPluginsPanel.tsx");
+const pluginsPage = await read("../src/pages/PluginsPage.tsx");
const app = await readAppSource();
test("plugin settings expose generated fields and plugin-local shortcut metadata", () => {
@@ -61,3 +63,29 @@ test("host plugin modals hide docked native plugin views via blocking-overlay",
assert.match(dialogs, /useBlockingOverlay/);
assert.match(dialogs, /PluginModalBlockingHost/);
});
+
+// These are one-off results of a user action, so they belong to the shared
+// toast host instead of a line that holds layout open inside the surface.
+test("plugin action results report through the toast host, not an inline line", () => {
+ // A failed settings write keeps the dialog's field-level validation line,
+ // which is what tells the user which control to correct.
+ assert.match(sheet, /const showToast = useAppStore\(\(state\) => state\.showToast\);/);
+ assert.match(
+ sheet,
+ /catch \(cause\) \{\s*showToast\(cause instanceof Error \? cause\.message : String\(cause\), \{ variant: "error" \}\);/,
+ );
+
+ // A plugin that failed to load keeps its reason on the row: it stays broken
+ // until the user fixes it, so the row is state rather than a one-off result.
+ assert.match(installedPanel, /className="plugins-row-error">\{plugin\.errorMessage\}/);
+ assert.doesNotMatch(installedPanel, /reportedErrorsRef/);
+
+ // Pending updates are announced; applying them keeps its header-menu entry.
+ assert.match(pluginsPage, /const reportedUpdatesRef = useRef<number \| null>\(null\);/);
+ assert.match(
+ pluginsPage,
+ /showToast\(t\("plugins\.updatesReady", \{ count: stats\.updates \}\), \{ variant: "info" \}\)/,
+ );
+ assert.doesNotMatch(pluginsPage, /plugins-alert/);
+ assert.match(page, /\{ key: "applyAutoUpdates", run: applyAutoUpdates \}/);
+});
diff --git a/apps/desktop/test/prompt-enhancement.test.mjs b/apps/desktop/test/prompt-enhancement.test.mjs
index c24289a94..b86601552 100644
--- a/apps/desktop/test/prompt-enhancement.test.mjs
+++ b/apps/desktop/test/prompt-enhancement.test.mjs
@@ -56,7 +56,12 @@ test("Composer enables enhancement with inline file references and guards stale
assert.match(composer, /enhancementVersionRef\.current !== sourceVersion/);
assert.match(composer, /currentKey !== sourceKey/);
assert.match(composer, /invalidatePromptEnhancement\(\);/);
- assert.match(composer, /className="composer-enhancement-error"/);
+ // The failure is a toast instead of an inline composer row.
+ assert.doesNotMatch(composer, /className="composer-enhancement-error"/);
+ assert.match(
+ composer,
+ /showToast\([\s\S]{0,160}enhancementError\.code[\s\S]{0,80}\{ variant: "error" \}/,
+ );
assert.match(composer, /enhancementError\.code/);
assert.match(composer, /setEnhancementError\(null\)/);
assert.doesNotMatch(composer, /activeInlineFileReferences\.length > 0/);
diff --git a/apps/desktop/test/provider-form-layout.test.mjs b/apps/desktop/test/provider-form-layout.test.mjs
index 0cfe43a27..d0fdb6a04 100644
--- a/apps/desktop/test/provider-form-layout.test.mjs
+++ b/apps/desktop/test/provider-form-layout.test.mjs
@@ -19,7 +19,8 @@ const headerEditorSource = await read("../src/components/settings/ProviderHeader
const vendorDialogSource = await read("../src/components/settings/VendorAccountDialog.tsx");
// The panes themselves live in the picker both dialogs render (D269).
const pickerSource = await read("../src/components/settings/ModelSelectionPanes.tsx");
-const fetchErrorSource = await read("../src/components/settings/ModelsFetchErrorMessage.tsx");
+const fetchErrorCopySource = await read("../src/components/settings/models-fetch-error-copy.ts");
+const probeFeedbackSource = await read("../src/components/settings/useProbeFeedback.ts");
// The credential rows live in their own component since D625.
const fieldsSource = await read("../src/components/settings/ProviderConnectionFields.tsx");
const styles = await loadStyles();
@@ -116,15 +117,21 @@ test("custom Name and Base URL sit on one row without helper copy", () => {
);
});
-test("a failed model list uses a classified error, not a raw dump plus empty copy", () => {
- assert.match(fetchErrorSource, /describeModelsFetchError/);
- assert.match(pickerSource, /ModelsFetchErrorMessage/);
- assert.match(pickerSource, /variant="placeholder"/);
- assert.match(pickerSource, /variant="banner"/);
- assert.match(pickerSource, /emptyFetchError/);
+test("a failed model list is classified once and toasted, not dumped into the pane", () => {
+ assert.match(fetchErrorCopySource, /describeModelsFetchError/);
+ assert.match(probeFeedbackSource, /modelsFetchErrorText\(discovery\.error, t\)/);
+ assert.match(
+ probeFeedbackSource,
+ /showToast\(outcome\.message, \{ variant: outcome\.variant \}\)/,
+ );
+ // The pane keeps one line saying the list is missing; why it failed is the
+ // toast's job, so the classified box and its detail rows are gone.
+ assert.match(pickerSource, /provider-models-placeholder is-error/);
assert.match(styles, /\.provider-models-placeholder\.is-error\s*\{/);
- assert.match(styles, /\.provider-models-error-summary\s*\{/);
- assert.match(styles, /\.provider-models-note\.is-error\s*\{[\s\S]*overflow-wrap: anywhere/);
+ assert.doesNotMatch(pickerSource, /variant="banner"/);
+ assert.doesNotMatch(pickerSource, /variant="placeholder"/);
+ assert.doesNotMatch(styles, /\.provider-models-note\s*\{/);
+ assert.doesNotMatch(styles, /\.provider-models-error-summary\s*\{/);
});
test("list rows carry no box of their own inside the inset pane", () => {
@@ -202,19 +209,22 @@ test("the dialog's actions live in the header, not in a footer bar", () => {
assert.match(head, /disabled=\{!canSave\}/);
});
-test("the connection test reports its result next to the fields", () => {
- // The button moved to the header; its outcome stays where the inputs are.
- const body = setupSource.slice(setupSource.indexOf('className="provider-setup-body"'));
- assert.match(body, /provider-credential-test-result/);
- assert.doesNotMatch(body, /settings\.testConnection/);
+test("the connection test reports its result through the toast stack", () => {
+ // The button sits in the header and its outcome no longer takes a result line
+ // under the credential fields.
+ assert.match(setupSource, /showToast\(t\("settings\.testOk"\), \{ variant: "success" \}\)/);
+ assert.match(setupSource, /settings\.testFailedStatus/);
+ assert.doesNotMatch(setupSource, /provider-credential-test/);
+ assert.doesNotMatch(styles, /\.provider-credential-test\s*\{/);
});
-test("a save error appears next to the fields it refers to", () => {
- const bodyStart = setupSource.indexOf('className="provider-setup-body"');
- const credentials = setupSource.indexOf('className="provider-setup-credentials"');
- const errorLine = setupSource.indexOf('className="provider-setup-error"');
- assert.ok(errorLine > bodyStart && errorLine < credentials,
- "the error line should open the body, above the credential grid");
+test("a save failure is toasted instead of opening the body with an error row", () => {
+ assert.match(
+ setupSource,
+ /showToast\(cause instanceof Error \? cause\.message : String\(cause\), \{[\s\S]*variant: "error"/,
+ );
+ assert.doesNotMatch(setupSource, /provider-setup-error/);
+ assert.doesNotMatch(styles, /\.provider-setup-error\s*\{/);
});
test("picking and reviewing models are two side-by-side panes", () => {
@@ -361,7 +371,9 @@ test("the vendor account dialog hosts the same panes in the same shell", () => {
test("Advanced says a fullwidth value folds and a non-Latin-1 value is refused", () => {
// The rule itself lives in @pi-desktop/shared (unit-tested there) and is
- // mirrored in host-core; this pins that the editor asks it and renders both
+ // mirrored in host-core; this pins that the editor asks it, refuses a bad
+ // value next to the row it is about, and announces a value the host will
+ // fold once as a toast instead of taking a line above the list.
assert.match(headerEditorSource, /import \{ APP_VERSION, inspectHeaderValue \}/);
assert.match(headerEditorSource, /inspectHeaderValue\(pair\.value\)/);
// Only a row that will be persisted may claim it folds: the hint has to
@@ -370,12 +382,17 @@ test("Advanced says a fullwidth value folds and a non-Latin-1 value is refused",
assert.match(headerEditorSource, /header\.value !== ""/);
assert.match(headerEditorSource, /header\.fault === null/);
assert.match(headerEditorSource, /row\.storable && row\.header\.folded/);
- assert.match(headerEditorSource, /provider-setup-header-note/);
- assert.match(headerEditorSource, /role="status"/);
+ assert.match(
+ headerEditorSource,
+ /showToast\(t\("settings\.headersFullwidthFolded"\), \{ variant: "info" \}\)/,
+ );
+ // Announced when a foldable value appears, never on mount and never twice
+ // while the same rows stay folded.
+ assert.match(headerEditorSource, /foldedReportedRef\.current = foldedHeaderValue/);
assert.match(headerEditorSource, /role="alert"/);
assert.match(headerEditorSource, /settings\.headersFullwidthFolded/);
assert.match(headerEditorSource, /settings\.headersValueNotLatin1/);
- assert.match(block(".provider-setup-header-note"), /color: var\(--ds-text-muted\)/);
+ assert.doesNotMatch(styles, /\.provider-setup-header-note\s*\{/);
});
test("both dialogs open straight on the two panes, with no summary to fold (D625)", () => {
diff --git a/apps/desktop/test/service-chooser.test.mjs b/apps/desktop/test/service-chooser.test.mjs
index a62219c67..6f1d2e0d4 100644
--- a/apps/desktop/test/service-chooser.test.mjs
+++ b/apps/desktop/test/service-chooser.test.mjs
@@ -11,6 +11,9 @@ const fieldsSource = await read("../src/components/settings/ProviderConnectionFi
const catalogSource = await read("../src/components/settings/service-catalog.ts");
const hookSource = await read("../src/components/settings/useProviderModels.ts");
const subagentPickerSource = await read("../src/components/settings/SubagentModelPicker.tsx");
+const panesSource = await read("../src/components/settings/ModelSelectionPanes.tsx");
+const probeFeedbackSource = await read("../src/components/settings/useProbeFeedback.ts");
+const vendorDialogSource = await read("../src/components/settings/VendorAccountDialog.tsx");
const menuSource = await read("../src/components/settings/AnchoredMenu.tsx");
const styles = await loadStyles();
@@ -127,16 +130,27 @@ test("named add-path discovery waits for a key and does not flash loading", () =
assert.match(hookSource, /FETCH_DEBOUNCE_MS/);
});
-test("the connection status line answers whether the key worked", () => {
- assert.match(fieldsSource, /export function ConnectionStatus/);
- assert.match(fieldsSource, /aria-live="polite"/);
- assert.match(fieldsSource, /settings\.connectionKeyHint/);
- assert.match(fieldsSource, /settings\.connectionChecking/);
- assert.match(fieldsSource, /settings\.connectionReady/);
- assert.match(fieldsSource, /canRecommendFrom\(discovery, named\)/);
- assert.match(fieldsSource, /<ModelsFetchErrorMessage error=\{discovery\.error\} variant="status" \/>/);
- // The status sits under the key on a named service.
- const keyAt = fieldsSource.indexOf("provider-setup-key");
- const statusAt = fieldsSource.indexOf("{status}", keyAt);
- assert.ok(keyAt !== -1 && statusAt > keyAt, "status follows the key field");
+test("the probe's own answer is toasted instead of parked under the key", () => {
+ assert.match(probeFeedbackSource, /export function useProbeFeedback/);
+ assert.match(probeFeedbackSource, /settings\.connectionReady/);
+ assert.match(probeFeedbackSource, /settings\.connectionCatalog/);
+ assert.match(probeFeedbackSource, /settings\.connectionNoModelList/);
+ assert.match(probeFeedbackSource, /canRecommendFrom\(discovery, namedService\)/);
+ assert.match(
+ probeFeedbackSource,
+ /showToast\(outcome\.message, \{ variant: outcome\.variant \}\)/,
+ );
+ // Nothing is announced before the service answered: idle, in flight and the
+ // cache-first paint all leave the question open.
+ assert.match(
+ probeFeedbackSource,
+ /if \(discovery\.status !== "ready" && discovery\.status !== "error"\) return null;/,
+ );
+ // Both dialogs that probe report through the same hook...
+ assert.match(setupSource, /useProbeFeedback\(discovery, named\)/);
+ assert.match(vendorDialogSource, /useProbeFeedback\(discovery, true\)/);
+ // ...and the credential fields no longer reserve a row for the answer.
+ assert.doesNotMatch(fieldsSource, /ConnectionStatus/);
+ assert.doesNotMatch(fieldsSource, /\{status\}/);
+ assert.doesNotMatch(styles, /\.provider-connection-status\s*\{/);
});
diff --git a/apps/desktop/test/skill-market-panel.test.mjs b/apps/desktop/test/skill-market-panel.test.mjs
index 03481f5cf..72ce0cd6e 100644
--- a/apps/desktop/test/skill-market-panel.test.mjs
+++ b/apps/desktop/test/skill-market-panel.test.mjs
@@ -82,14 +82,19 @@ test("a failed preview is reported instead of silently disabling install", () =>
// no way to try again. The preview-before-save gate itself is intentional and
// stays — what changes is that a failure is now legible and recoverable.
assert.match(panel, /setPreviewFailure\(\{/);
- assert.match(panel, /kind: classifySkillMarketFailure\(error\)/);
+ assert.match(panel, /const kind = classifySkillMarketFailure\(error\)/);
assert.match(panel, /detail: skillMarketFailureDetail\(error\)/);
assert.match(panel, /settings\.sklm\.previewError/);
assert.match(panel, /settings\.sklm\.previewPolicyError/);
assert.match(panel, /settings\.sklm\.proxyHint/);
assert.match(panel, /settings\.sklm\.failureDetail/);
assert.match(panel, /settings\.sklm\.retryPreview/);
- assert.match(panel, /role="alert"/);
+ // Announced once, by the toast host, with the classified copy: the sheet
+ // keeps the hints, the host's detail and its retry rather than an error row.
+ assert.match(
+ panel,
+ /showToast\(\s*t\(\s*kind === "policy"[\s\S]{0,400}\{ variant: "error" \}/,
+ );
assert.match(panel, /disabled=\{installing \|\| documentBody === null \|\| documentTooLarge\}/);
assert.match(panel, /const retryPreview = \(\) => \{/);
assert.match(panel, /if \(installFor\) loadDocument\(installFor\)/);
@@ -117,8 +122,16 @@ test("a resolver with no answer is explained as that, not as an address check",
/if \(hasUnresolvedFailure\(remote\.failureKinds\)\) return t\("settings\.sklm\.remoteErrorUnresolved"\)/,
);
assert.match(panel, /settings\.sklm\.dnsHint/);
- assert.match(panel, /previewFailure\.kind === "unresolved"/);
- assert.match(panel, /settings\.sklm\.previewResolveError/);
+ assert.match(
+ panel,
+ /kind === "unresolved"\s*\? "settings\.sklm\.previewResolveError"/,
+ );
+ // The reason itself is announced by the toast host: the sheet keeps its
+ // recovery hints, its retry control and the host's own detail, and has no
+ // error row left occupying the preview field.
+ assert.match(panel, /showToast\(\s*t\(\s*kind === "policy"/);
+ assert.doesNotMatch(panel, /sklm-note is-error/);
+ assert.match(panel, /onClick=\{retryPreview\}/);
// The refusal names the host it is about, not just the source label: a policy
// refusal is a statement about one address.
assert.match(panel, /settings\.sklm\.failureSourceHost/);
@@ -137,8 +150,10 @@ test("a proxy fake-IP gets its own copy and names the address it came from", ()
panel,
/if \(hasFakeIpFailure\(remote\.failureKinds\)\) return t\("settings\.sklm\.remoteErrorFakeIp"\)/,
);
- assert.match(panel, /previewFailure\.kind === "fake-ip"/);
- assert.match(panel, /settings\.sklm\.previewFakeIpError/);
+ assert.match(
+ panel,
+ /kind === "fake-ip"\s*\? "settings\.sklm\.previewFakeIpError"/,
+ );
assert.match(panel, /settings\.sklm\.fakeIpHint/);
assert.match(panel, /settings\.sklm\.fakeIpHintPlain/);
// The hint names what actually happened: which host, and which address the
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index e621bb801..68c4f59d8 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -473,8 +473,11 @@ a usage tab.
`/messages`, `/chat/completions`, or `/responses` when the field loses
focus. The placeholder is enough — no helper paragraph under the URL.
Invalid URLs show an inline error and block discovery and save. A failed
- model-list probe shows a compact classified error in the empty pane, or a
- one-line banner above a cached list; raw HTTP/JSON dumps are not shown.
+ model-list probe reports one classified sentence through the app toast and
+ leaves a one-line “no list” label in the empty pane, or the rows in place
+ above it; raw HTTP/JSON dumps are shown in neither. A settled probe —
+ connected, catalog, or refused — is announced once instead of holding a
+ status row under the key.
Named display names and optional custom headers stay behind Advanced settings.
The dialog header's upper-right actions include an explicit Advanced settings
button that opens a separate compact modal, keeping the main form focused on
diff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.md
index 720ebb2bf..c476342af 100644
--- a/docs/spec/04-ux/09-interaction-patterns.md
+++ b/docs/spec/04-ux/09-interaction-patterns.md
@@ -1014,6 +1014,11 @@ Running turns and pending approvals continue to gate the controls.
| Manual menu update check failure | Error | 8s | Direct feedback for an explicit command |
| Context checkpoint completed | Info (Warning before overflow retry) | 4s/8s | Confirms a background context transition without altering transcript rows |
| Manual context checkpoint failure | Error | 8s | Direct feedback for explicit `/compact`; automatic terminal failures stay inline |
+| Settings or dialog action failure (save, JSON import, endpoint probe) | Error | 8s | Result of an explicit action; the surface keeps the fields to correct and, when it owns one, the retry control |
+| Vendor sign-in failure | Error | 8s | Result of an explicit sign-in; the dialog keeps its status, link, and Cancel |
+| Config-sync or plugin-settings action result | Success / Warning / Error | 4s/8s | Confirmation or failure of an explicit action |
+| Live Voice session or settings failure | Error | 8s | Result of an explicit action; the retry control stays on the surface |
+| Model-list probe result (connected, catalog, refused) | Success / Info / Error | 4s/8s | One answer per settled probe; idle, in flight, and cache-only results are not announced |
### 6.2 Inline errors (use for)
@@ -1026,6 +1031,9 @@ Running turns and pending approvals continue to gate the controls.
| Provider configuration validation error | Inline in settings form | User needs to see which field is wrong |
| Application update status/error | Settings → Info Updates row | Preserves the latest Main-owned state without interrupting background checks |
| Composer validation (no model) | Disabled state + tooltip on send button | Immediate context |
+| Failed model list | One-line empty state in the picker | Says the list is missing and stays beside the Fetch list action; the reason is toasted |
+| Surface whose own content failed to load and that owns a retry control | Inline state label + retry | The label is what explains the retry; only the one-off reason is toasted |
+| Broken plugin row, permission or consequence warning, app-level backend or update banner | Inline | Persistent state until the user changes it |
### 6.3 Rules
@@ -1037,6 +1045,11 @@ Running turns and pending approvals continue to gate the controls.
- Toasts stack vertically, newest on top, at top-center
- Error toasts require manual dismiss or timeout at 8s (longer than success)
- Success toasts auto-dismiss at 4s
+- One-off results of an explicit action (save, import, probe, sign-in, connection
+ test) report through a toast; the surface they came from keeps the fields,
+ state label, and retry control it needs to stay actionable
+- Persistent state — a plugin that stays broken, a permission or consequence
+ warning, an app-level backend or update banner — stays inline
### 6.4 Icon-only action labels
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index f4a6fe098..027a9db66 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -843,7 +843,7 @@ identify the platform validation still needed.
- **Preconditions**: App running; no provider configured; the models.dev snapshot ships with the build.
- **Steps**: 1) Open Settings → Model configuration and choose Add provider. 2) Confirm the dialog is ONE form with no stepper or Next/Back buttons. The first control is Service — a searchable menu (Choose a service, Custom endpoint, then a flat vendor list from models.dev including Xiaomi), not a native select, region grouping, or vendor-card grid. Open it, type to filter client-side, then choose **Custom endpoint**. Confirm Name and Base URL appear on one row with no helper paragraph under the URL (placeholder only), API Key and API format appear side by side on the next row (not behind Advanced), and that a focused field plus its 2px accent ring stays fully inside the dialog, including on a window narrower than 1040px. 3) Enter a name and a base URL for a service that publishes a `/models` route, then paste an API key. 4) Confirm the models section fills with the models THAT SERVICE returned, not with every model its vendor publishes; confirm a model the deployment does not host is absent. 5) Type in the filter box and confirm the list narrows client-side with no network request per keystroke. 6) Confirm each row shows the models.dev-derived context/output for models the catalog knows, that its compact text tracks the published value instead of a coarser rounded one (a 1,050,000 window reads `1.05M`, never `1.1M`), and that a model with no catalog match still lists with generic defaults. 7) Select two models with the checkboxes. 8) Expand Advanced on one chosen row, override its limits and toggle thinking chips; confirm each numeric field has a five-chip preset ladder for common values, clicking a chip writes the value, hand editing remains possible, and a non-preset value leaves the ladder unselected. Set max output to 8,192 while its context window still follows the catalog. On a model whose published image input is enabled, toggle image input off and then back on before saving, so the explicit choice equals the current catalog value. Confirm the label and optional hint sit above one compact grouped control and do not force the options onto a second row at normal dialog width; confirm all seven canonical levels are available, that published levels start selected for a known reasoning model, and that a non-reasoning or unknown row shows the same chips unselected with the manual-override hint; enable one level on that row and confirm the other row is unaffected. 9) Open the form-level Advanced and confirm the API format is present but pre-derived. 10) Add a free-form model ID the service did not return; confirm it is added with 128,000 / 8,192 / no-thinking defaults, then enable a thinking level if the endpoint supports it; confirm re-adding the same ID in different letter case is rejected as already added. 11) Save.
-- **Expected**: The service is asked first and models.dev only enriches the answer and seeds known-model defaults. Newly fetched or checked model rows stay collapsed until the user opens Advanced, so every selected model ID remains visible in the right pane after a multi-select. The settings picker always offers the seven canonical thinking levels, and the Composer later renders the explicit levels saved in the same model binding; an empty or `off`-only binding resolves to `off`. Discovery is debounced ~600 ms, does not mark loading until that window elapses, and a slow reply from an earlier keystroke never replaces a newer list; named add-path discovery waits for an API key, while an unsaved custom provider is probed with the typed base URL (and key, if any) before it exists. Preset ladders cover common context/output limits while preserving hand-edited values. The explicitly selected 8,192 output remains pinned independently of the catalog-sourced context window, and the image-input choice remains explicitly enabled after it is toggled back to the published value; neither is reinterpreted as "follow catalog" on save/reopen. Later catalog corrections change only values whose own source is `catalog`. Limit text renders through one shared compact formatter, so neighbouring published windows stay distinguishable (`1M` / `1.05M` / `1.1M`) and a compact limit never reads above its published value. Custom endpoint keeps API format beside the key and omits Base URL helper copy; named endpoints do not show format. Point the same custom form at an unreachable or unauthorized URL and confirm the left pane shows a classified error (not a raw JSON/HTML dump and not a second “no models” empty state); with cached rows from a later edit, the same error is a one-line banner above the list. Point a second provider at a base URL with no `/models` route and confirm the list falls back to the catalog, is labelled as coming from models.dev rather than the service, and still saves. The provider appears as a row with its host, model count and secret badge; the key is stored securely (not in plaintext config); `models` contains both bindings and `models[0]` remains the provider default.
+- **Expected**: The service is asked first and models.dev only enriches the answer and seeds known-model defaults. Newly fetched or checked model rows stay collapsed until the user opens Advanced, so every selected model ID remains visible in the right pane after a multi-select. The settings picker always offers the seven canonical thinking levels, and the Composer later renders the explicit levels saved in the same model binding; an empty or `off`-only binding resolves to `off`. Discovery is debounced ~600 ms, does not mark loading until that window elapses, and a slow reply from an earlier keystroke never replaces a newer list; named add-path discovery waits for an API key, while an unsaved custom provider is probed with the typed base URL (and key, if any) before it exists. Preset ladders cover common context/output limits while preserving hand-edited values. The explicitly selected 8,192 output remains pinned independently of the catalog-sourced context window, and the image-input choice remains explicitly enabled after it is toggled back to the published value; neither is reinterpreted as "follow catalog" on save/reopen. Later catalog corrections change only values whose own source is `catalog`. Limit text renders through one shared compact formatter, so neighbouring published windows stay distinguishable (`1M` / `1.05M` / `1.1M`) and a compact limit never reads above its published value. Custom endpoint keeps API format beside the key and omits Base URL helper copy; named endpoints do not show format. Point the same custom form at an unreachable or unauthorized URL and confirm one classified sentence reaches the app toast while the left pane keeps its single “no list” label (not a raw JSON/HTML dump and not a second “no models” empty state); with cached rows from a later edit the same reason is toasted while the rows stay. Point a second provider at a base URL with no `/models` route and confirm the list falls back to the catalog, is labelled as coming from models.dev rather than the service, and still saves. The provider appears as a row with its host, model count and secret badge; the key is stored securely (not in plaintext config); `models` contains both bindings and `models[0]` remains the provider default.
- **Specs linked**: `03-runtime/11-provider-model-system.md`, `03-runtime/12-provider-config-schema.md`, `03-runtime/13-model-catalog-and-selection.md`, `03-runtime/14-secrets-storage.md`, `04-ux/06-settings-ia.md`
- **Acceptance**: B (multi-model provider configuration, save key)
- **Milestone**: M2
@@ -886,7 +886,7 @@ identify the platform validation still needed.
- **Preconditions**: One provider saved with two model bindings; one fixture provider row exists with only the legacy `default_model_id` and no `config_json.models`; one fixture row carries an unknown or legacy `apiStyle` string.
- **Steps**: 1) Reopen the saved provider; confirm the single form opens with its cached model list painted immediately, and that the API key field explains an unchanged key is kept. 2) Confirm the live probe then refreshes that list without a retyped key, because the stored secret is reused. 3) Confirm both existing bindings are still chosen and check-marked, with their limits, thinking chips and defaults intact. 4) Enable a level the fixture catalog does not publish, edit one row's limits and save. 5) Reopen the fixture provider and confirm its legacy model appears as one chosen row with 128,000 context, 8,192 max output and all seven thinking choices available but unselected. 6) Reopen the unknown-style fixture and confirm the editor renders with Chat Completions selected instead of an error boundary; save it and confirm the repaired style is persisted. 7) Save the fixture provider without changing the model. 8) Select the second binding as the app default, reopen the provider and save unchanged; confirm the app default stays on that binding. Save another provider and confirm the app default is unchanged. Reopen the default provider, remove the selected binding, and save; confirm the app default falls back to the first remaining binding. 9) Take the service offline or revoke the key, reopen the provider, and confirm the cached rows stay visible with a compact classified discovery error rather than an empty list or a raw host dump.
-- **Expected**: Editing never drops an unmodified binding. An explicitly enabled level remains saved even when the catalog does not publish it, so the Composer reads the same binding rather than silently narrowing it; a binding whose model discovery is unavailable keeps its stored levels untouched. Legacy read materializes one binding without losing the old model ID; the subsequent write stores `config_json.models` and keeps `defaultModelId` equal to the first binding for older readers. An unknown or legacy `apiStyle` is treated as a compatibility input: the editor falls back to Chat Completions, remains usable, and repairs the stored value on save. Saving the default provider preserves `settings.defaultModelId` while the selected model remains configured; only removal of that model falls back to the first remaining binding. Editing another provider never changes the app default. A failed live probe degrades to the cached list plus a compact classified error, never to a blank picker or a raw HTTP/JSON dump, and a catalog fallback is never written into the model cache.
+- **Expected**: Editing never drops an unmodified binding. An explicitly enabled level remains saved even when the catalog does not publish it, so the Composer reads the same binding rather than silently narrowing it; a binding whose model discovery is unavailable keeps its stored levels untouched. Legacy read materializes one binding without losing the old model ID; the subsequent write stores `config_json.models` and keeps `defaultModelId` equal to the first binding for older readers. An unknown or legacy `apiStyle` is treated as a compatibility input: the editor falls back to Chat Completions, remains usable, and repairs the stored value on save. Saving the default provider preserves `settings.defaultModelId` while the selected model remains configured; only removal of that model falls back to the first remaining binding. Editing another provider never changes the app default. A failed live probe degrades to the cached list, one classified toast sentence and a one-line pane label, never to a blank picker or a raw HTTP/JSON dump, and a catalog fallback is never written into the model cache. Deleting a configured model and saving forgets that model's cached parameters, so the pane no longer paints the deleted id from cache and a later re-add starts from what the service or the catalog says. A probe that no longer publishes a model drops its cached row the same way, unless the row is the user's own (a hand-typed id, a configured binding), and a save that moves the base URL or the API format drops the answer the previous endpoint produced.
- **Specs linked**: `03-runtime/11-provider-model-system.md`, `03-runtime/12-provider-config-schema.md`, `03-runtime/13-model-catalog-and-selection.md`, ADR 0114
- **Acceptance**: F (provider persistence and migration)
- **Milestone**: M2
@@ -1177,7 +1177,7 @@ identify the platform validation still needed.
label while the probe is in flight, and then shows rows. 3) Click Fetch list
again. Confirm it keeps the current rows on screen and replaces them with the
live answer. 4) Take the service offline and click Fetch list; confirm the
- classified error appears and the previous rows remain. 5) Restore the
+ classified error reaches the toast and the previous rows remain. 5) Restore the
service, click Fetch list, and confirm the live list returns. 6) Repeat in
the vendor-account editor.
- **Expected**: The header action probes the service immediately, including
diff --git a/docs/zh-CN/spec/04-ux/06-settings-ia.md b/docs/zh-CN/spec/04-ux/06-settings-ia.md
index bfbccfdf7..0430f8c72 100644
--- a/docs/zh-CN/spec/04-ux/06-settings-ia.md
+++ b/docs/zh-CN/spec/04-ux/06-settings-ia.md
@@ -212,7 +212,7 @@ Token 用量**不是设置目的地**(D335 / ADR 0173)。已完成回合历
全局默认模型
- **提供商**工作室:
- OpenAI 兼容的添加提供程序对话框(从添加提供程序/空状态 CTA 打开)
- - 新建对话框先只显示**服务**。命名端点按厂商平铺(OpenAI、Anthropic、Google、OpenRouter、DeepSeek、通义千问、月之暗面、智谱、硅基流动、火山方舟、MiniMax、MiniMax (OpenAI)、小米、Kimi 编程等),不再分国际 / 国内。选中后显示服务 + API 密钥和主机摘要。自定义端点随后分三行显示服务、名称与接口地址、以及 API 密钥与接口格式,让字段在表单变化时保持稳定对齐;接口地址不附带解释性说明。获取模型失败时,空列表处显示精简分类错误,已有缓存列表时则在上方显示一行提示,不展示原始 HTTP/JSON 报错。名称(命名行)与可选自定义请求头放在高级设置中。对话框右上角提供明确的“高级设置”按钮,点击后打开独立紧凑弹框,主表单只保留端点和模型面板。弹框可直接添加包含 User-Agent 在内的常用请求头,可将与持久化相同的规范化请求头 JSON 复制到剪贴板(忽略空名称,后者覆盖前者),也支持导入直接请求头对象或 `{ "headers": { ... } }` JSON;导入时按名称合并,不重复添加。列表最多显示五行,更多请求头在自身区域滚动;留空则使用适配器默认值。服务是可搜索锚定菜单(按显示名、厂商、主机过滤),不是原生下拉框。
+ - 新建对话框先只显示**服务**。命名端点按厂商平铺(OpenAI、Anthropic、Google、OpenRouter、DeepSeek、通义千问、月之暗面、智谱、硅基流动、火山方舟、MiniMax、MiniMax (OpenAI)、小米、Kimi 编程等),不再分国际 / 国内。选中后显示服务 + API 密钥和主机摘要。自定义端点随后分三行显示服务、名称与接口地址、以及 API 密钥与接口格式,让字段在表单变化时保持稳定对齐;接口地址不附带解释性说明。获取模型失败时,分类结论以一条 toast 报出,空列表处只保留一行「无列表」文案,已有缓存列表时列表原样保留;两种情况都不展示原始 HTTP/JSON 报错。探测结论(已连接、来自目录或被拒绝)只播报一次,密钥下方不再保留状态行。名称(命名行)与可选自定义请求头放在高级设置中。对话框右上角提供明确的“高级设置”按钮,点击后打开独立紧凑弹框,主表单只保留端点和模型面板。弹框可直接添加包含 User-Agent 在内的常用请求头,可将与持久化相同的规范化请求头 JSON 复制到剪贴板(忽略空名称,后者覆盖前者),也支持导入直接请求头对象或 `{ "headers": { ... } }` JSON;导入时按名称合并,不重复添加。列表最多显示五行,更多请求头在自身区域滚动;留空则使用适配器默认值。服务是可搜索锚定菜单(按显示名、厂商、主机过滤),不是原生下拉框。
- 带有头像缩写、主机、默认模型、秘密状态的提供商卡,
和测试/make-default/删除操作
- add/edit 对话框配置连接身份(名称、端点、API 样式、模型 ID 和密码);
diff --git a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
index 2ee805071..e704924c6 100644
--- a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
+++ b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
@@ -830,6 +830,11 @@ Mode/provider/model/permission/shell 配置和新提示仍然存在
| 手动菜单更新检查失败 | 错误 | 8秒 | 对明确命令的直接反馈 |
| 上下文检查点已完成 | 信息(溢出重试前警告) | 4s/8s | 确认后台上下文转换而不更改转录本行 |
| 手动上下文检查点失败 | 错误 | 8秒 | 直接反馈明确的 `/compact`;自动终端故障保持内联 |
+| 设置或对话框操作失败(保存、JSON 导入、端点探测) | 错误 | 8秒 | 明确动作的结果;界面保留需要更正的字段,自带重试入口时一并保留 |
+| 厂商登录失败 | 错误 | 8秒 | 明确登录的结果;对话框保留状态、链接与取消 |
+| 配置同步或插件设置操作结果 | 成功/警告/错误 | 4s/8s | 明确动作的确认或失败 |
+| 实时语音会话或设置失败 | 错误 | 8秒 | 明确动作的结果;重试入口留在原界面 |
+| 模型列表探测结论(已连接、目录、被拒绝) | 成功/信息/错误 | 4s/8s | 每次探测结论只播报一次;空闲、探测中与仅命中缓存不播报 |
### 6. 2 内联错误(用于)
@@ -842,6 +847,9 @@ Mode/provider/model/permission/shell 配置和新提示仍然存在
| 提供商配置验证错误 | 内联设置表单 | 用户需要查看哪个字段是错误的 |
| 应用程序更新 status/error | 设置 → 信息更新行 | 保留最新的 Main-owned 状态而不中断背景检查 |
| 输入框验证(无模型) | 禁用状态+发送按钮上的工具提示 | 直接上下文 |
+| 模型列表获取失败 | 选择器内一行空态 | 说明该面板缺少列表,并与「获取列表」按钮同处;原因走 toast |
+| 自身内容加载失败且自带重试的界面 | 内联状态文案 + 重试 | 该文案是重试的解释;只有一次性原因走 toast |
+| 损坏的插件行、权限或后果警告、应用级后端或更新 banner | 内联 | 在用户改变之前属于持续状态 |
### 6. 3 规则
@@ -853,6 +861,9 @@ Mode/provider/model/permission/shell 配置和新提示仍然存在
- Toast 垂直堆叠,最新的位于顶部中央
- 错误 toast 需要手动关闭或超时 8 秒(比成功长)
- 成功祝酒在 4 秒后自动关闭
+- 明确动作的一次性结果(保存、导入、探测、登录、连接测试)走 toast;来源界面保留其
+ 保持可操作所需的字段、状态文案与重试入口
+- 持续状态——持续损坏的插件、权限或后果警告、应用级后端或更新 banner——保持内联
## 7. 焦点管理
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 03a4feb74..dbabe91c5 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -402,7 +402,7 @@ task-candidate E2E 从请求工作树运行,但使用主工作区已经准备
#### E2E-005I:从选择器标题重新获取服务模型列表
- **前提条件**:添加或编辑服务(或厂商账户)对话框已打开,且该服务可访问并提供 `/models` 列表。
-- **步骤**:1) 确认左侧标题旁有「获取列表」,在有效端点就绪前为禁用。2) 填入有效端点。确认在 600 ms 防抖等待期间「获取列表」已可用。立刻点击;确认它不等待该窗口,探测时显示加载文案,然后列出模型。3) 再次点击「获取列表」。确认加载期间保留当前行,并以实时结果替换。4) 让服务离线后再点「获取列表」;确认出现分类错误且先前的行仍在。5) 恢复服务,再点「获取列表」,确认实时列表回来。6) 在厂商账户编辑对话框重复上述步骤。
+- **步骤**:1) 确认左侧标题旁有「获取列表」,在有效端点就绪前为禁用。2) 填入有效端点。确认在 600 ms 防抖等待期间「获取列表」已可用。立刻点击;确认它不等待该窗口,探测时显示加载文案,然后列出模型。3) 再次点击「获取列表」。确认加载期间保留当前行,并以实时结果替换。4) 让服务离线后再点「获取列表」;确认分类错误以 toast 出现且先前的行仍在。5) 恢复服务,再点「获取列表」,确认实时列表回来。6) 在厂商账户编辑对话框重复上述步骤。
- **预期**:标题上的操作会立刻向服务探测,包括端点刚变为有效后的防抖等待期间。凭据变更触发的自动发现不变。两种凭据都有同一控件,因为两个对话框共用该选择器。
- **链接规格**:`03-runtime/13-model-catalog-and-selection.md`、
`04-ux/06-settings-ia.md`、`04-ux/08-component-spec.md`
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 8c8b472e6..f26b0eadd 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1321,9 +1321,6 @@ sklm: {
"chooserSubscriptions": "Mit einem Abo anmelden",
"chooserApiKeys": "Mit einem API-Schlüssel verbinden",
"customEndpointDesc": "Jede OpenAI- oder Anthropic-kompatible URL",
- "connectionKeyHint": "Fügen Sie einen API-Schlüssel ein, um zu verbinden und Modelle zu laden.",
- "connectionUrlHint": "Geben Sie eine Basis-URL ein, um zu verbinden und Modelle zu laden.",
- "connectionChecking": "Verbindung wird hergestellt…",
"connectionReady_one": "Verbunden · {{count}} Modell gefunden",
"connectionReady_other": "Verbunden · {{count}} Modelle gefunden",
"connectionCatalog_one": "{{count}} bekanntes Modell für diesen Dienst",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index ce6405619..76e75ddfa 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1341,9 +1341,6 @@ sklm: {
chooserSubscriptions: "Sign in with a subscription",
chooserApiKeys: "Connect with an API key",
customEndpointDesc: "Any OpenAI- or Anthropic-compatible URL",
- connectionKeyHint: "Paste an API key to connect and load models.",
- connectionUrlHint: "Enter a base URL to connect and load models.",
- connectionChecking: "Connecting…",
connectionReady_one: "Connected · {{count}} model found",
connectionReady_other: "Connected · {{count}} models found",
connectionCatalog_one: "{{count}} known model for this service",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index bacd38c68..6e1330a43 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1321,9 +1321,6 @@ sklm: {
"chooserSubscriptions": "Iniciar sesión con una suscripción",
"chooserApiKeys": "Conectar con una clave de API",
"customEndpointDesc": "Cualquier URL compatible con OpenAI o Anthropic",
- "connectionKeyHint": "Pegue una clave de API para conectar y cargar los modelos.",
- "connectionUrlHint": "Introduzca una URL base para conectar y cargar los modelos.",
- "connectionChecking": "Conectando…",
"connectionReady_one": "Conectado · {{count}} modelo encontrado",
"connectionReady_other": "Conectado · {{count}} modelos encontrados",
"connectionCatalog_one": "{{count}} modelo conocido para este servicio",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 48411a19e..6eb8224ae 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1321,9 +1321,6 @@ sklm: {
"chooserSubscriptions": "Se connecter avec un abonnement",
"chooserApiKeys": "Se connecter avec une clé API",
"customEndpointDesc": "Toute URL compatible OpenAI ou Anthropic",
- "connectionKeyHint": "Collez une clé API pour vous connecter et charger les modèles.",
- "connectionUrlHint": "Saisissez une URL de base pour vous connecter et charger les modèles.",
- "connectionChecking": "Connexion…",
"connectionReady_one": "Connecté · {{count}} modèle trouvé",
"connectionReady_other": "Connecté · {{count}} modèles trouvés",
"connectionCatalog_one": "{{count}} modèle connu pour ce service",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index a413c9f1b..90d996446 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1334,9 +1334,6 @@ sklm: {
chooserSubscriptions: "구독으로 로그인",
chooserApiKeys: "API 키로 연결",
customEndpointDesc: "OpenAI 또는 Anthropic 호환 URL",
- connectionKeyHint: "API 키를 붙여 넣으면 연결하고 모델을 불러옵니다.",
- connectionUrlHint: "기본 URL을 입력하면 연결하고 모델을 불러옵니다.",
- connectionChecking: "연결 중…",
connectionReady_one: "연결됨 · 모델 {{count}}개 발견",
connectionReady_other: "연결됨 · 모델 {{count}}개 발견",
connectionCatalog_one: "이 서비스의 알려진 모델 {{count}}개",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index 67a1066ff..4029e7d4b 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -1283,9 +1283,6 @@ export const ptBR = {
chooserSubscriptions: "Entrar com uma assinatura",
chooserApiKeys: "Conectar com uma chave de API",
customEndpointDesc: "Qualquer URL compatível com OpenAI ou Anthropic",
- connectionKeyHint: "Cole uma chave de API para conectar e carregar modelos.",
- connectionUrlHint: "Insira uma URL base para conectar e carregar modelos.",
- connectionChecking: "Conectando…",
connectionReady_one: "Conectado · {{count}} modelo encontrado",
connectionReady_other: "Conectado · {{count}} modelos encontrados",
connectionCatalog_one: "{{count}} modelo conhecido para este serviço",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 87d0879c0..1ee7e7f82 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1324,9 +1324,6 @@ sklm: {
chooserSubscriptions: "Abonelikle oturum aç",
chooserApiKeys: "API anahtarıyla bağlan",
customEndpointDesc: "OpenAI veya Anthropic uyumlu herhangi bir URL",
- connectionKeyHint: "Bağlanmak ve modelleri yüklemek için bir API anahtarı yapıştırın.",
- connectionUrlHint: "Bağlanmak ve modelleri yüklemek için bir temel URL girin.",
- connectionChecking: "Bağlanıyor…",
connectionReady_one: "Bağlandı · {{count}} model bulundu",
connectionReady_other: "Bağlandı · {{count}} model bulundu",
connectionCatalog_one: "Bu servis için bilinen {{count}} model",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 65f43d893..dbe0c96b4 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1308,9 +1308,6 @@ sklm: {
chooserSubscriptions: "用订阅登录",
chooserApiKeys: "用 API Key 连接",
customEndpointDesc: "任意 OpenAI 或 Anthropic 兼容地址",
- connectionKeyHint: "粘贴 API Key 后自动连接并获取模型。",
- connectionUrlHint: "填写地址后自动连接并获取模型。",
- connectionChecking: "正在连接…",
connectionReady_one: "已连接 · 发现 {{count}} 个模型",
connectionReady_other: "已连接 · 发现 {{count}} 个模型",
connectionCatalog_one: "该服务已知 {{count}} 个模型",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index a4511aaff..8308c3610 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1308,9 +1308,6 @@ sklm: {
chooserSubscriptions: "用訂閱登入",
chooserApiKeys: "用 API Key 連線",
customEndpointDesc: "任意 OpenAI 或 Anthropic 相容位址",
- connectionKeyHint: "貼上 API Key 後自動連線並取得模型。",
- connectionUrlHint: "填寫位址後自動連線並取得模型。",
- connectionChecking: "正在連線…",
connectionReady_one: "已連線 · 發現 {{count}} 個模型",
connectionReady_other: "已連線 · 發現 {{count}} 個模型",
connectionCatalog_one: "該服務已知 {{count}} 個模型",