@@ -699,6 +699,19 @@ def _bar(pct: int, width: int = BAR_W) -> str:
699699 return "█" * filled + "░" * (width - filled )
700700
701701
702+ def _tc (s : str ) -> str :
703+ """Title-Case a snake_case identifier for display.
704+
705+ ``aider_local`` → ``Aider Local`` ; ``board_worker`` → ``Board Worker``.
706+ Preserves internal capitalisation so PascalCase stays intact:
707+ ``OperationsCenter`` → ``OperationsCenter``. Empty input returns empty.
708+ """
709+ if not s :
710+ return s
711+ parts = s .split ("_" )
712+ return " " .join (p [:1 ].upper () + p [1 :] if p else p for p in parts )
713+
714+
702715def _uptime (start : float ) -> str :
703716 e = int (time .time () - start )
704717 if e < 60 :
@@ -811,10 +824,10 @@ def _build_sections(
811824 rb = f" ↺{ rc } " if rc else ""
812825 if alive :
813826 up = _uptime (info ["mtime" ]) if info .get ("mtime" ) else "?"
814- line = f" ✓ { role :<11 } up { up } { rb } "
827+ line = f" ✓ { _tc ( role ):<14 } Up { up } { rb } "
815828 attr = C ["RUN" ]
816829 else :
817- line = f" ✗ { role :<11 } STOPPED{ rb } "
830+ line = f" ✗ { _tc ( role ):<14 } STOPPED{ rb } "
818831 attr = C ["ERR" ]
819832 if i == sel :
820833 role_sel_local = len (role_lines )
@@ -832,9 +845,9 @@ def _build_sections(
832845 (f" Active ({ len (active_tasks )} Running)" , C ["HEAD" ] | curses .A_BOLD ),
833846 ]
834847 for item in active_tasks :
835- repo = item .get ("repo" , "?" )[: 10 ]
836- title = item .get ("title" , "?" )[:max (w - 16 , 8 )]
837- active_lines .append ((f" ▶ { repo :<11 } { title } " , C ["RUN" ]))
848+ repo = _tc ( item .get ("repo" , "?" ))[: 14 ]
849+ title = item .get ("title" , "?" )[:max (w - 20 , 8 )]
850+ active_lines .append ((f" ▶ { repo :<14 } { title } " , C ["RUN" ]))
838851 sections .append ({"id" : "active" , "lines" : active_lines , "sel_local" : - 1 })
839852
840853 # ── recent activity (worker logs) ──
@@ -858,7 +871,7 @@ def _build_sections(
858871 else :
859872 icon , attr = "·" , C ["DIM" ]
860873 tag = f"{ action } ({ status } )" if status else action
861- recent_lines .append ((f" { icon } { ts } { role :<8 } { tag :<22} { title } " , attr ))
874+ recent_lines .append ((f" { icon } { ts } { _tc ( role ):<10 } { tag :<22} { title } " , attr ))
862875 sections .append ({"id" : "recent" , "lines" : recent_lines , "sel_local" : - 1 })
863876
864877 # ── board ──
@@ -868,11 +881,11 @@ def _build_sections(
868881 (f" Board ({ len (board_items )} Queued)" , C ["HEAD" ] | curses .A_BOLD ),
869882 ]
870883 for item in board_items :
871- repo = item .get ("repo" , "?" )[: 10 ]
884+ repo = _tc ( item .get ("repo" , "?" ))[: 14 ]
872885 state = item .get ("state" , "" )
873886 icon = "·" if "backlog" in state .lower () else "→"
874- title = item .get ("title" , "?" )[:max (w - 16 , 8 )]
875- board_lines .append ((f" { icon } { repo :<11 } { title } " , C ["DIM" ]))
887+ title = item .get ("title" , "?" )[:max (w - 20 , 8 )]
888+ board_lines .append ((f" { icon } { repo :<14 } { title } " , C ["DIM" ]))
876889 sections .append ({"id" : "board" , "lines" : board_lines , "sel_local" : - 1 })
877890
878891 # ── campaigns ──
@@ -907,10 +920,10 @@ def _build_sections(
907920 (f" Queue ({ n_q } Pending)" , q_attr | curses .A_BOLD ),
908921 ]
909922 for item in queue :
910- typ = ( item .get ("task_type" ) or "?" )[: 4 ]
911- repo = ( item .get ("repo_name" ) or "?" )[: 10 ]
912- goal = (item .get ("goal" ) or "" )[:max (w - 20 , 8 )]
913- queue_lines .append ((f" { typ :<5 } { repo :<11 } { goal } " , C ["DIM" ]))
923+ typ = _tc (( item .get ("task_type" ) or "?" ))[: 6 ]
924+ repo = _tc (( item .get ("repo_name" ) or "?" ))[: 14 ]
925+ goal = (item .get ("goal" ) or "" )[:max (w - 24 , 8 )]
926+ queue_lines .append ((f" { typ :<7 } { repo :<14 } { goal } " , C ["DIM" ]))
914927 sections .append ({"id" : "queue" , "lines" : queue_lines , "sel_local" : - 1 })
915928
916929 # ── execution budget (global hourly/daily caps) ──
@@ -989,14 +1002,14 @@ def _build_sections(
9891002 if mem_avail_mb and mem_avail_mb < ram_floor :
9901003 worst_attr = C ["ERR" ]
9911004 cells .append (f"RAM ≥{ ram_floor } MB" )
992- row = " " .join (cells ) if cells else "(No Caps )"
993- bc_lines .append ((f" { backend :<10 } { row } " , worst_attr ))
1005+ row = " " .join (cells ) if cells else "(No Limits )"
1006+ bc_lines .append ((f" { _tc ( backend ):<14 } { row } " , worst_attr ))
9941007 if worst_attr is C ["ERR" ]:
9951008 bc_section_worst = C ["ERR" ]
9961009 elif worst_attr is C ["YLW" ] and bc_section_worst is C ["RUN" ]:
9971010 bc_section_worst = C ["YLW" ]
9981011 sections .append ({"id" : "backend_caps" , "lines" : [
999- (" Backend Caps " , bc_section_worst | curses .A_BOLD ),
1012+ (" Backend Limits " , bc_section_worst | curses .A_BOLD ),
10001013 * bc_lines ,
10011014 ], "sel_local" : - 1 })
10021015
@@ -1414,16 +1427,17 @@ def put(r, t, a=0):
14141427 stdscr .erase ()
14151428
14161429 alive = info .get ("alive" , False )
1417- status = f"running pid { info ['pid' ]} " if alive else "STOPPED"
1430+ status = f"Running PID { info ['pid' ]} " if alive else "STOPPED"
14181431 status_attr = (C ["HEAD" ] | curses .A_BOLD ) if alive else (C ["ERR" ] | curses .A_BOLD )
1419- put (0 , f" { role } [ { status } ]" , status_attr )
1432+ put (0 , f" { _tc ( role ) } [ { status } ]" , status_attr )
14201433 _sep (stdscr , 1 , h , w , C ["DIM" ])
14211434
14221435 for i , action in enumerate (_ACTIONS ):
1436+ label = _tc (action .replace (" " , "_" ))
14231437 if i == sel :
1424- put (i + 2 , f" ▶ { action } " , C ["SEL" ] | curses .A_BOLD )
1438+ put (i + 2 , f" ▶ { label } " , C ["SEL" ] | curses .A_BOLD )
14251439 else :
1426- put (i + 2 , f" { action } " , 0 )
1440+ put (i + 2 , f" { label } " , 0 )
14271441
14281442 _sep (stdscr , len (_ACTIONS ) + 2 , h , w , C ["DIM" ])
14291443 put (h - 1 , " ↑↓ Select ↵ Run Esc Back" , C ["DIM" ])
@@ -1438,7 +1452,7 @@ def put(r, t, a=0):
14381452 return _put (stdscr , r , h , w , t , a )
14391453 stdscr .erase ()
14401454
1441- put (0 , f" Circuit Breaker — { role } (Last { LOG_TAIL_LINES } Lines)" , C ["HEAD" ] | curses .A_BOLD )
1455+ put (0 , f" Circuit Breaker — { _tc ( role ) } (Last { LOG_TAIL_LINES } Lines)" , C ["HEAD" ] | curses .A_BOLD )
14421456 _sep (stdscr , 1 , h , w , C ["DIM" ])
14431457
14441458 for i , line in enumerate (lines [- (h - 3 ):]):
0 commit comments