Skip to content

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

feat(realtime-ui): show the precise Codex setup diagnosis on the card

Ruben Lütke75ab2efeadfc
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
index 81de04f477..3cb93da66b 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.test.tsx
@@ -442,6 +442,59 @@ describe("ProviderCard: ChatGPT subscription Realtime", () => {
},
);
+ it("renders a transient busy status as a neutral check, never as a defect", () => {
+ installFetchMock();
+ renderCard(
+ codexRealtimeCard({
+ configured: false,
+ codex_status: {
+ installed: false,
+ connected: false,
+ mode: "not_connected",
+ message: "Dedicated subscription voice status is being checked or changed.",
+ reason_code: "busy",
+ },
+ }),
+ );
+
+ expect(
+ screen.getByText("Checking the ChatGPT voice status — one moment."),
+ ).toBeTruthy();
+ // Busy means "state unknown for a moment" — the card must not fall back
+ // to the install invitation or the reconnect warning.
+ expect(screen.queryByText("npm i -g @openai/codex")).toBeNull();
+ expect(
+ screen.queryByText(
+ "The protected Codex voice profile needs attention. Review the setup guide, then reconnect.",
+ ),
+ ).toBeNull();
+ });
+
+ it("surfaces the precise backend diagnosis on a real setup defect", () => {
+ installFetchMock();
+ renderCard(
+ codexRealtimeCard({
+ configured: false,
+ codex_status: {
+ installed: true,
+ connected: false,
+ mode: "not_connected",
+ message: "Subscription voice requires Codex CLI codex-cli 0.146.0.",
+ reason_code: "setup_invalid",
+ },
+ }),
+ );
+
+ expect(
+ screen.getByText(
+ "The protected Codex voice profile needs attention. Review the setup guide, then reconnect.",
+ ),
+ ).toBeTruthy();
+ expect(screen.getByTestId("codex-setup-detail").textContent).toBe(
+ "Subscription voice requires Codex CLI codex-cli 0.146.0.",
+ );
+ });
+
it("asks for a ChatGPT subscription login without suggesting an API key", () => {
installFetchMock();
renderCard(
diff --git a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
index 3ce8f808d4..4e236d75a6 100644
--- a/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
+++ b/jarvis/ui/web/frontend/src/components/providers/ProviderTierSection.tsx
@@ -1741,6 +1741,19 @@ function CodexAuthWidget({
<code className="rounded bg-muted px-1.5 py-0.5 font-mono">{status.version}</code>
)}
</div>
+ {/* A real setup problem carries a precise backend diagnosis (for
+ example the exact required Codex version). Hiding it behind the
+ generic sentence left users guessing what to fix. */}
+ {subscriptionOnly &&
+ status?.reason_code === "setup_invalid" &&
+ status.message && (
+ <div
+ data-testid="codex-setup-detail"
+ className="mt-2 break-words border-t border-border/60 pt-2 font-mono text-[11px]"
+ >
+ {status.message}
+ </div>
+ )}
</div>
{!status?.installed && status?.reason_code !== "busy" && (