@@ -79,6 +79,7 @@ type FailedTask = {
7979 failedAt ?: Date ;
8080 status : string ;
8181 failureReason ?: string ;
82+ failureMessage ?: string ;
8283} ;
8384
8485const formatTimeLeft = ( ms : number ) : string => {
@@ -297,13 +298,38 @@ const FailedCard = ({
297298 { task . subtitle }
298299 </ div >
299300 ) }
300- < div className = "mt-1 text-xs font-medium text-red-400" >
301- { statusLabel }
301+ < div className = "mt-1 flex items-center gap-1.5" >
302+ < span className = "rounded bg-red-500/15 px-1.5 py-0 text-[11px] font-medium text-red-400" >
303+ { statusLabel }
304+ </ span >
305+ { task . failureReason && (
306+ < Tooltip
307+ content = { task . failureReason }
308+ position = "bottom"
309+ strategy = "fixed"
310+ className = "max-w-[280px] text-wrap bg-danger text-xs"
311+ zIndex = { 50 }
312+ delay = { 300 }
313+ >
314+ < span className = "truncate text-[11px] text-red-400/60" >
315+ { task . failureReason }
316+ </ span >
317+ </ Tooltip >
318+ ) }
302319 </ div >
303- { task . failureReason && (
304- < div className = "mt-0.5 text-xs text-red-400/60" >
305- { task . failureReason }
306- </ div >
320+ { task . failureMessage && (
321+ < Tooltip
322+ content = { task . failureMessage }
323+ position = "bottom"
324+ strategy = "fixed"
325+ className = "max-w-[280px] text-wrap text-xs"
326+ zIndex = { 50 }
327+ delay = { 200 }
328+ >
329+ < div className = "mt-0.5 cursor-default truncate text-[11px] text-base-fg/40" >
330+ { task . failureMessage }
331+ </ div >
332+ </ Tooltip >
307333 ) }
308334 </ div >
309335 { onDismiss && (
@@ -603,17 +629,20 @@ export const TaskQueue = () => {
603629 const parts = formatTitleParts ( t ) ;
604630 const fr = t . failure_reason ;
605631 const failureReason = fr
606- ? fr . failure_message ||
607- FAILURE_REASON_LABEL [ fr . failure_type ] ||
608- undefined
632+ ? FAILURE_REASON_LABEL [ fr . failure_type ] || undefined
609633 : undefined ;
634+ const failureMessage =
635+ fr ?. failure_message && fr . failure_type !== "unknown"
636+ ? fr . failure_message
637+ : undefined ;
610638 return {
611639 id : t . id ,
612640 title : parts . title || "Task" ,
613641 subtitle : parts . subtitle ,
614642 failedAt : t . completed_at || t . updated_at ,
615643 status : t . task_status ,
616- failureReason,
644+ failureReason : failureReason || fr ?. failure_message || undefined ,
645+ failureMessage,
617646 } ;
618647 } ) ;
619648
0 commit comments