feat(dashboard): Add Polecat Workers section with activity monitoring

- Add FetchPolecats() to fetch tmux session data for active polecats
- Display polecat name, rig, activity status (green/yellow/red)
- Show status hint from last line of pane output
- Add FetchMergeQueue stub for interface compliance
- Update handler to pass polecats data to template
- Add Polecat Workers table section to convoy.html

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mike Lady
2026-01-03 17:34:22 -08:00
parent 6d4f2c40d1
commit 565b2a0d52
5 changed files with 522 additions and 7 deletions

View File

@@ -8,6 +8,8 @@ import (
// ConvoyFetcher defines the interface for fetching convoy data.
type ConvoyFetcher interface {
FetchConvoys() ([]ConvoyRow, error)
FetchMergeQueue() ([]MergeQueueRow, error)
FetchPolecats() ([]PolecatRow, error)
}
// ConvoyHandler handles HTTP requests for the convoy dashboard.
@@ -37,8 +39,22 @@ func (h *ConvoyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
mergeQueue, err := h.fetcher.FetchMergeQueue()
if err != nil {
// Non-fatal: show convoys even if merge queue fails
mergeQueue = nil
}
polecats, err := h.fetcher.FetchPolecats()
if err != nil {
// Non-fatal: show convoys even if polecats fail
polecats = nil
}
data := ConvoyData{
Convoys: convoys,
Convoys: convoys,
MergeQueue: mergeQueue,
Polecats: polecats,
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")