@@ -344,11 +344,12 @@ func busyCount(cards []*board.Card) int {
344344func (m * model ) renderCard (card * board.Card , colInnerWidth int , selected bool ) string {
345345 textWidth := max (colInnerWidth - 4 , 1 ) // card border + padding
346346
347- // Cards carry their project's accent color on the border and badge, so
348- // each project's work is recognizable at a glance.
347+ // Like the web board, a card's border carries its status color; the
348+ // project badge keeps the project's accent so its work is still
349+ // recognizable at a glance.
349350 accent := m .projectColor (card .Project )
350351 titleStyle := styles .BaseStyle
351- borderColor := accent
352+ borderColor := statusColor ( card . Status )
352353 if selected {
353354 titleStyle = styles .HighlightWhiteStyle
354355 borderColor = styles .BorderPrimary
@@ -390,19 +391,37 @@ func splitTitle(title string, width int) (string, string) {
390391 return toolcommon .TruncateText (line1 , width ), ""
391392}
392393
394+ // statusColor matches the web board's card tinting: starting/loading/
395+ // attaching=blue, running=orange, paused=white, error=red, waiting=green.
396+ func statusColor (status board.CardStatus ) color.Color {
397+ switch status {
398+ case board .StatusStarting , board .StatusLoading , board .StatusAttaching :
399+ return styles .Info
400+ case board .StatusRunning :
401+ return styles .Warning
402+ case board .StatusPaused :
403+ return styles .White
404+ case board .StatusError :
405+ return styles .Error
406+ default : // waiting
407+ return styles .Success
408+ }
409+ }
410+
393411func (m * model ) renderStatus (status board.CardStatus , width int ) string {
412+ style := styles .BaseStyle .Foreground (statusColor (status ))
394413 spinner := spinnerFrames [m .frame % len (spinnerFrames )]
395414 switch status {
396415 case board .StatusStarting , board .StatusLoading , board .StatusAttaching :
397- return styles . WarningStyle .Render (toolcommon .TruncateText (spinner + " " + string (status ), width ))
416+ return style .Render (toolcommon .TruncateText (spinner + " " + string (status ), width ))
398417 case board .StatusRunning :
399- return styles . InfoStyle .Render (toolcommon .TruncateText (spinner + " running" , width ))
418+ return style .Render (toolcommon .TruncateText (spinner + " running" , width ))
400419 case board .StatusPaused :
401- return styles . WarningStyle .Render (toolcommon .TruncateText ("∥ paused" , width ))
420+ return style .Render (toolcommon .TruncateText ("∥ paused" , width ))
402421 case board .StatusError :
403- return styles . ErrorStyle .Render (toolcommon .TruncateText ("✗ failed" , width ))
422+ return style .Render (toolcommon .TruncateText ("✗ failed" , width ))
404423 default : // waiting
405- return styles . SuccessStyle .Render (toolcommon .TruncateText ("● ready" , width ))
424+ return style .Render (toolcommon .TruncateText ("● ready" , width ))
406425 }
407426}
408427
0 commit comments