fix(statusline): count only polecats in mayor status bar

The mayor tmux status line was counting all gt-* sessions as polecats,
including witnesses, refineries, deacon, and crew workers. Now uses
categorizeSession() to properly identify only actual polecats.

Also removes dead code handling gt-witness-<rig> pattern (only
gt-<rig>-witness is valid).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-20 07:55:54 -08:00
parent 5e36cf09dd
commit 94c25a2981
2 changed files with 7 additions and 15 deletions
+7 -7
View File
@@ -93,17 +93,17 @@ func runMayorStatusLine(t *tmux.Tmux) error {
return nil // Silent fail
}
// Count gt-* sessions (polecats) and rigs
// Count only actual polecats (not witnesses, refineries, deacon, crew)
polecatCount := 0
rigs := make(map[string]bool)
for _, s := range sessions {
if strings.HasPrefix(s, "gt-") && s != "gt-mayor" {
agent := categorizeSession(s)
if agent == nil {
continue
}
if agent.Type == AgentPolecat {
polecatCount++
// Extract rig name: gt-<rig>-<worker>
parts := strings.SplitN(s, "-", 3)
if len(parts) >= 2 {
rigs[parts[1]] = true
}
rigs[agent.Rig] = true
}
}
rigCount := len(rigs)