This commit is contained in:
Rai (Michael Pokorny)
2025-06-25 04:09:09 -07:00
parent 96ac1bcbed
commit 9638d55e08

View File

@@ -178,12 +178,24 @@ def status():
# Normalize and colorize status/worktree
raw_status = str(meta.status)
# Strip enum class prefix if present (e.g. TaskStatus.Done)
cls_name = meta.status.__class__.__name__
prefix = cls_name + "."
if raw_status.startswith(prefix):
raw_status = raw_status[len(prefix):]
if raw_status in ('Done', 'Merged'):
stat_disp = f"\033[32m{raw_status}\033[0m"
# Color-map statuses
status_colors = {
'Not started': '\033[90m', # dim gray
'In progress': '\033[33m', # yellow
'Needs input': '\033[31m', # red
'Needs manual review': '\033[31m',
'Done': '\033[32m', # green
'Cancelled': '\033[31m', # red
'Merged': '\033[34m', # blue
}
color = status_colors.get(raw_status, '')
if color:
stat_disp = f"{color}{raw_status}\033[0m"
else:
stat_disp = raw_status
wt_disp = wt_info