Simplify adapter environment check: animate pass, show debug only on fail

- When the adapter probe passes, show a clean animated "Passed" badge with
  a checkmark icon instead of verbose check details
- Only show the "Manual debug" section when the test fails, reducing noise
  for successful flows

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Dotta
2026-03-11 14:16:23 -05:00
parent 7df74b170d
commit 5f3f354b3a

View File

@@ -940,9 +940,14 @@ export function OnboardingWizard() {
</div> </div>
)} )}
{adapterEnvResult && ( {adapterEnvResult && adapterEnvResult.status === "pass" ? (
<div className="flex items-center gap-2 rounded-md border border-green-300 dark:border-green-500/40 bg-green-50 dark:bg-green-500/10 px-3 py-2 text-xs text-green-700 dark:text-green-300 animate-in fade-in slide-in-from-bottom-1 duration-300">
<Check className="h-3.5 w-3.5 shrink-0" />
<span className="font-medium">Passed</span>
</div>
) : adapterEnvResult ? (
<AdapterEnvironmentResult result={adapterEnvResult} /> <AdapterEnvironmentResult result={adapterEnvResult} />
)} ) : null}
{shouldSuggestUnsetAnthropicApiKey && ( {shouldSuggestUnsetAnthropicApiKey && (
<div className="rounded-md border border-amber-300/60 bg-amber-50/40 px-2.5 py-2 space-y-2"> <div className="rounded-md border border-amber-300/60 bg-amber-50/40 px-2.5 py-2 space-y-2">
@@ -962,53 +967,58 @@ export function OnboardingWizard() {
</div> </div>
)} )}
<div className="rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 text-[11px] space-y-1.5"> {adapterEnvResult && adapterEnvResult.status === "fail" && (
<p className="font-medium">Manual debug</p> <div className="rounded-md border border-border/70 bg-muted/20 px-2.5 py-2 text-[11px] space-y-1.5">
<p className="text-muted-foreground font-mono break-all"> <p className="font-medium">Manual debug</p>
{adapterType === "cursor" <p className="text-muted-foreground font-mono break-all">
? `${effectiveAdapterCommand} -p --mode ask --output-format json \"Respond with hello.\"` {adapterType === "cursor"
: adapterType === "codex_local" ? `${effectiveAdapterCommand} -p --mode ask --output-format json \"Respond with hello.\"`
? `${effectiveAdapterCommand} exec --json -` : adapterType === "codex_local"
: adapterType === "gemini_local" ? `${effectiveAdapterCommand} exec --json -`
? `${effectiveAdapterCommand} --output-format json \"Respond with hello.\"` : adapterType === "gemini_local"
: adapterType === "opencode_local" ? `${effectiveAdapterCommand} --output-format json "Respond with hello."`
? `${effectiveAdapterCommand} run --format json "Respond with hello."` : adapterType === "opencode_local"
: `${effectiveAdapterCommand} --print - --output-format stream-json --verbose`} ? `${effectiveAdapterCommand} run --format json "Respond with hello."`
</p> : `${effectiveAdapterCommand} --print - --output-format stream-json --verbose`}
<p className="text-muted-foreground"> </p>
Prompt:{" "}
<span className="font-mono">Respond with hello.</span>
</p>
{adapterType === "cursor" || adapterType === "codex_local" || adapterType === "gemini_local" || adapterType === "opencode_local" ? (
<p className="text-muted-foreground"> <p className="text-muted-foreground">
If auth fails, set{" "} Prompt:{" "}
<span className="font-mono"> <span className="font-mono">Respond with hello.</span>
{adapterType === "cursor" </p>
? "CURSOR_API_KEY" {adapterType === "cursor" ||
: adapterType === "gemini_local" adapterType === "codex_local" ||
? "GEMINI_API_KEY" adapterType === "gemini_local" ||
: "OPENAI_API_KEY"} adapterType === "opencode_local" ? (
</span>{" "} <p className="text-muted-foreground">
in If auth fails, set{" "}
env or run{" "} <span className="font-mono">
<span className="font-mono"> {adapterType === "cursor"
{adapterType === "cursor" ? "CURSOR_API_KEY"
? "agent login"
: adapterType === "codex_local"
? "codex login"
: adapterType === "gemini_local" : adapterType === "gemini_local"
? "gemini auth" ? "GEMINI_API_KEY"
: "opencode auth login"} : "OPENAI_API_KEY"}
</span>. </span>{" "}
</p> in
) : ( env or run{" "}
<p className="text-muted-foreground"> <span className="font-mono">
If login is required, run{" "} {adapterType === "cursor"
<span className="font-mono">claude login</span> and ? "agent login"
retry. : adapterType === "codex_local"
</p> ? "codex login"
)} : adapterType === "gemini_local"
</div> ? "gemini auth"
: "opencode auth login"}
</span>.
</p>
) : (
<p className="text-muted-foreground">
If login is required, run{" "}
<span className="font-mono">claude login</span> and
retry.
</p>
)}
</div>
)}
</div> </div>
)} )}