fix: close clarification overlay when agent moves on (#608)

This commit is contained in:
Carlos Florêncio
2026-04-16 15:58:01 +01:00
committed by GitHub
parent 8ce34da1b7
commit 99a8407dd8
8 changed files with 378 additions and 18 deletions
@@ -68,16 +68,25 @@ function ClarificationOptions({
disabled={isSubmitting}
data-testid="clarification-option"
className={cn(
"flex items-start gap-2 w-full text-left text-xs rounded px-1.5 py-0.5 -ml-1.5 transition-colors",
"flex items-start gap-2 w-full text-left text-xs rounded px-1.5 py-1 -ml-1.5 transition-colors",
"hover:bg-blue-500/15 hover:text-blue-600 dark:hover:text-blue-400",
isSubmitting ? "opacity-50 cursor-not-allowed" : "text-foreground/80 cursor-pointer",
)}
>
<span className="text-muted-foreground flex-shrink-0">•</span>
<span>{option.label}</span>
{option.description && (
<span className="text-muted-foreground/60">— {option.description}</span>
)}
<span className="text-muted-foreground flex-shrink-0 leading-5">•</span>
<span className="flex-1 min-w-0">
<span data-testid="clarification-option-label" className="block leading-5">
{option.label}
</span>
{option.description && (
<span
data-testid="clarification-option-description"
className="block text-muted-foreground/70 mt-0.5 leading-snug"
>
{option.description}
</span>
)}
</span>
</button>
))}
</div>
@@ -98,7 +98,10 @@ export function ClarificationRequestMessage({ comment }: ClarificationRequestMes
</div>
)}
{isExpired && (
<div className="mt-1 ml-3 flex items-center gap-1.5 text-xs text-orange-500/80">
<div
data-testid="clarification-expired-notice"
className="mt-1 ml-3 flex items-center gap-1.5 text-xs text-orange-500/80"
>
{getStatusIndicator()}
Timed out (agent moved on)
</div>