diff --git a/src/renderer/src/components/ui/badge.tsx b/src/renderer/src/components/ui/badge.tsx
index 250d239895c..b4bf239f967 100644
--- a/src/renderer/src/components/ui/badge.tsx
+++ b/src/renderer/src/components/ui/badge.tsx
@@ -27,6 +27,11 @@ const badgeVariants = cva(
/** Small uppercase success chip marking the live item in a list (e.g. the active build). */
statusActive:
'h-4 border-status-success-border bg-status-success-background px-1.5 text-[10px] font-semibold tracking-wide text-status-success uppercase',
+ /** Tinted status pills for a check's result inside an error card. */
+ statusFailed:
+ 'border-destructive/20 bg-destructive/10 px-1.5 py-0 text-2xs text-destructive-text dark:border-destructive/30',
+ statusWarning:
+ 'border-status-warning-border bg-status-warning-background px-1.5 py-0 text-2xs text-status-warning-text',
referenceLabel: 'h-3.5 border-border px-1 py-0 text-3xs font-normal text-muted-foreground',
/** An uppercase kind label set before a banner title; takes its color from the parent. */
paneLabel:
diff --git a/src/renderer/src/components/ui/button.tsx b/src/renderer/src/components/ui/button.tsx
index d262046f6d1..06fcfaa9d55 100644
--- a/src/renderer/src/components/ui/button.tsx
+++ b/src/renderer/src/components/ui/button.tsx
@@ -43,7 +43,10 @@ const buttonVariants = cva(
'pane-title-close': 'pane-title-close',
// The worktree card's "rename failed" chip, for a failure the user can open.
'destructive-chip':
- 'border border-destructive/40 bg-destructive/10 text-destructive-text hover:bg-destructive/15 hover:text-destructive-text'
+ 'border border-destructive/40 bg-destructive/10 text-destructive-text hover:bg-destructive/15 hover:text-destructive-text',
+ // A destructive way out set apart from the recovery actions (e.g. "Delete sandbox"): red text, no fill.
+ 'destructive-ghost':
+ 'text-destructive-text hover:bg-destructive/10 hover:text-destructive-text dark:hover:bg-destructive/15'
},
size: {
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
diff --git a/src/renderer/src/components/ui/inline-error.tsx b/src/renderer/src/components/ui/inline-error.tsx
index 9a38d8dc069..47a09051109 100644
--- a/src/renderer/src/components/ui/inline-error.tsx
+++ b/src/renderer/src/components/ui/inline-error.tsx
@@ -1,4 +1,4 @@
-import type React from 'react'
+import React from 'react'
import { CircleAlert, Info, RotateCw } from 'lucide-react'
import { cn } from '@/lib/utils'
import { Button } from './button'
@@ -22,8 +22,12 @@ type InlineErrorProps = {
* (not announced) because it describes something that already happened. */
layout?: 'inline' | 'toast' | 'strip-top' | 'strip-bottom' | 'line'
/** A next step other than retry (e.g. "Sign in"), rendered inside the box after the text.
- * Pass an outline xs Button with a short verb-first label; never a primary button. */
+ * Pass an outline xs Button with a short verb-first label; never a primary button. A card whose recovery is the main
+ * content (e.g. the build-failure card) puts its own action row in children instead. */
action?: React.ReactNode
+ /** Richer content under the detail, aligned with the text (a list of problems, a row of
+ * actions). With children only the title and detail are announced; the rest is read on demand. */
+ children?: React.ReactNode
className?: string
}
@@ -42,9 +46,13 @@ function InlineError({
density = 'default',
layout = 'inline',
action,
+ children,
className
}: InlineErrorProps): React.JSX.Element {
const Icon = tone === 'error' ? CircleAlert : Info
+ const liveRole = tone === 'error' ? 'alert' : 'status'
+ // Why: announcing a whole card would read every button and list row along with the cause.
+ const announceTextOnly = React.Children.toArray(children).length > 0
if (layout === 'line') {
return (
-
-
{title}
- {detail ? (
-
- {detail}
-
- ) : null}
+
+
+ {/* A div, so a caller can pass a focusable heading as the title. */}
+
) : null}
)
diff --git a/src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx b/src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx
index 4fefa20b188..ea94f646b88 100644
--- a/src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx
+++ b/src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx
@@ -11,8 +11,7 @@ import {
PanelLeft,
Pencil,
RotateCcw,
- SquareArrowOutUpRight,
- Trash2
+ SquareArrowOutUpRight
} from 'lucide-react'
import { Button } from '@/components/ui/button'
import {
@@ -174,9 +173,17 @@ function failureActions(
icon: ,
onClick: actions.onOpenAnyway
}
- // Hosted sandboxes have no recipe for an agent or the user to edit.
+ // Hosted sandboxes have no recipe for an agent or the user to edit. Checks rarely pass on a
+ // rerun without a change, so opening the sandbox to fix them in place leads. Two plain text
+ // buttons read as a choice between equals rather than a toolbar.
return cloud
- ? { primary: [retryChecks, openAnyway], more: [] }
+ ? {
+ primary: [
+ { ...openAnyway, icon: undefined },
+ { ...retryChecks, icon: undefined }
+ ],
+ more: []
+ }
: { primary: [fix, retryChecks], more: [openAnyway, editRecipe] }
}
case 'provision':
@@ -298,12 +305,12 @@ export function FailureActionRow({
// Leaving a build that still holds a VM destroys it, so say so on the button.
const destroys = vmKept
return (
-