@@ -17,10 +17,12 @@ import {
1717} from "@/lib/task-error-display" ;
1818import {
1919 getFailedFileCount ,
20- getFailedFileEntries ,
2120 getSuccessfulFileCount ,
2221 getTaskFileName ,
22+ getTaskIssueFileEntries ,
23+ getWarningFileEntries ,
2324 isCompletedTotalFailure ,
25+ isTaskFileWarning ,
2426 isTerminalFailedTask ,
2527} from "@/lib/task-utils" ;
2628import { formatTaskTimestamp , parseTimestamp } from "@/lib/time-utils" ;
@@ -48,15 +50,20 @@ export function TaskErrorContent({
4850 ) ;
4951 const isExpanded = accordionValue === "failed-files" ;
5052
51- const failedEntries = useMemo ( ( ) => getFailedFileEntries ( task ) , [ task ] ) ;
53+ const issueEntries = useMemo ( ( ) => getTaskIssueFileEntries ( task ) , [ task ] ) ;
5254
5355 const failedCount = getFailedFileCount ( task ) ;
56+ const warningCount = getWarningFileEntries ( task ) . length ;
5457 const successCount = getSuccessfulFileCount ( task ) ;
5558 const timestamp =
5659 parseTimestamp ( task . created_at ) ?? parseTimestamp ( task . updated_at ) ;
5760 const isFailedStatus =
5861 isTerminalFailedTask ( task ) || isCompletedTotalFailure ( task ) ;
59- const statusLabel = isFailedStatus ? "Failed" : "Complete" ;
62+ const statusLabel = isFailedStatus
63+ ? "Failed"
64+ : warningCount > 0
65+ ? "Warning"
66+ : "Complete" ;
6067 // Pill colors: failed (red) vs partial success (amber/orange), each with IBM tokens or OSS borders.
6168 const statusPillClassName = cn (
6269 "shrink-0 rounded-full px-2 py-1 text-xs" ,
@@ -69,7 +76,7 @@ export function TaskErrorContent({
6976 : "border border-brand-amber-30 bg-brand-amber-10 text-brand-amber" ,
7077 ) ;
7178
72- if ( failedCount <= 0 && failedEntries . length === 0 ) {
79+ if ( failedCount <= 0 && issueEntries . length === 0 ) {
7380 return null ;
7481 }
7582
@@ -78,7 +85,9 @@ export function TaskErrorContent({
7885 const accordionSummary = (
7986 < div className = "flex min-w-0 flex-1 items-center gap-1" >
8087 < span className = "text-xs" >
81- { successCount } success · { failedCount } failed
88+ { successCount } success
89+ { warningCount > 0 ? ` · ${ warningCount } warning` : "" }
90+ { failedCount > 0 ? ` · ${ failedCount } failed` : "" }
8291 </ span >
8392 < ChevronDown className = "size-4 shrink-0 transition-transform group-data-[state=open]:rotate-180" />
8493 </ div >
@@ -174,19 +183,30 @@ export function TaskErrorContent({
174183 { accordionHeader }
175184 < AccordionContent className = "w-full p-0 pt-2" >
176185 < div className = "flex w-full flex-col gap-2" >
177- { failedEntries . map ( ( [ filePath , fileInfo ] , index ) => {
186+ { issueEntries . map ( ( [ filePath , fileInfo ] , index ) => {
178187 const fileName = getTaskFileName ( filePath , fileInfo ) ;
179188 const line = resolveTaskFileError ( fileInfo , task . error ) ;
180189 const componentCause = formatApiComponent ( fileInfo . component ) ;
190+ const isWarning = isTaskFileWarning ( fileInfo ) ;
181191
182192 return (
183193 < div
184194 key = { `${ task . task_id } -${ filePath } -${ index } ` }
185195 className = { cn (
186196 "task-failed-file-card min-w-0" ,
187197 isCloudBrand
188- ? "flex flex-col items-start gap-2 self-stretch rounded-none rounded-r border-l-[1.5px] border-l-destructive bg-border p-2"
189- : "flex flex-col gap-1 rounded border-destructive/20 bg-failure-soft py-mmd px-4" ,
198+ ? cn (
199+ "flex flex-col items-start gap-2 self-stretch rounded-none rounded-r border-l-[1.5px] bg-border p-2" ,
200+ isWarning
201+ ? "border-l-brand-amber"
202+ : "border-l-destructive" ,
203+ )
204+ : cn (
205+ "flex flex-col gap-1 rounded py-mmd px-4" ,
206+ isWarning
207+ ? "border border-brand-amber-30 bg-brand-amber-10"
208+ : "border-destructive/20 bg-failure-soft" ,
209+ ) ,
190210 ) }
191211 >
192212 < p
0 commit comments