Comprehensive end-to-end tests for convoy dashboard:
- TestE2E_Server_FullDashboard: Full dashboard with all sections
- TestE2E_Server_ActivityColors: Activity color rendering (green/yellow/red)
- TestE2E_Server_MergeQueueEmpty: Always-visible section with empty state
- TestE2E_Server_MergeQueueStatuses: All PR status combinations
- TestE2E_Server_HTMLStructure: HTML document structure validation
- TestE2E_Server_RefineryInPolecats: Refinery appears in workers section
Tests use httptest.NewServer for real HTTP server testing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added 11 new integration tests covering:
- Error handling: FetchConvoys error returns 500
- Merge queue rendering: PR numbers, repos, CI status badges
- Empty merge queue state
- Polecat workers rendering: names, rigs, activity colors, status hints
- Work status rendering: complete/active/stale/stuck/waiting states
- Progress bar rendering with percentage calculation
- HTMX auto-refresh attributes (hx-get, hx-trigger, every 10s)
- Full dashboard integration with all sections
- Non-fatal errors: merge queue/polecat failures don't break convoys
Tests use MockConvoyFetcher interface to simulate various data scenarios.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Refinery Merge Queue section now displays always, even when idle:
- Shows 'No PRs in queue' message when merge queue is empty
- Displays PR table with number, title, CI status, and mergeable when PRs exist
- Added empty-state-inline CSS for consistent styling
Previously the section was hidden entirely when no PRs existed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
session_activity only updates on session-level events. window_activity
tracks actual window activity (keypresses, output) for more accurate
last activity times in the Polecat Workers section.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The status column now shows computed work status based on progress and activity:
- "complete" (green) - all tracked items are done
- "active" (green) - recent polecat activity (within 1 min)
- "stale" (yellow) - older activity (1-5 min)
- "stuck" (red) - stale activity (5+ min)
- "waiting" (gray) - no assignee/activity
Previously the status column always showed "open" since we only fetch
open convoys, making it static and uninformative.
Changes:
- templates.go: Add WorkStatus field to ConvoyRow, add workStatusClass func
- fetcher.go: Add calculateWorkStatus() to compute status from progress/activity
- convoy.html: Add work status badge styling, use WorkStatus in table
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The misspell linter flags "cancelled" but this is the actual value
returned by GitHub's Check Runs API (British spelling). Added nolint
directive with explanation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merges PR #85 (fix/convoy-last-activity) into PR #71 (feature/convoy-dashboard).
Resolved conflict in fetcher.go by taking the simplified tmux-based activity tracking.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
The template was updated to refresh every 10s (2bb1f1e) but the test
still expected 30s. Update test to match the new intended behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Improvements to convoy dashboard last_activity column:
1. When issues have no assignee:
- Fall back to issue's updated_at timestamp
- Show age with "(unassigned)" suffix, e.g., "2m (unassigned)"
2. When issues have assignee but no active tmux session:
- Show "idle" instead of "no activity"
3. Added UpdatedAt field to track issue timestamps
This provides better context for convoys that haven't been assigned yet.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The convoy dashboard last_activity column was showing "no activity" because
the old code looked for agent records in beads databases at wrong paths.
Changed approach:
- Use the issue's assignee field (e.g., "roxas/polecats/dag")
- Parse assignee to get rig and polecat name
- Query tmux for session activity directly (#{session_activity})
This is more reliable since it uses actual tmux session state instead of
trying to find agent records in beads databases.
Fixes hq-kdhf
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete convoy dashboard feature with real-time status tracking:
- Activity package: LastActivity calculation with color thresholds
(green <2min, yellow 2-5min, red >5min)
- Web package: Template, handler, fetcher for convoy list
- CLI: `gt dashboard [--port=8080] [--open]` command
- Browser E2E tests with rod (headless Chrome)
Features:
- Real-time convoy status with htmx auto-refresh (30s)
- Progress tracking for each convoy
- Last activity indicator with color coding
- Empty state handling
Supersedes: PRs #55, #57, #58, #65, #66🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add LastActivity calculation for convoy dashboard (hq-x2xy)
Adds internal/activity package with color-coded activity tracking:
- Green: <2 minutes (active)
- Yellow: 2-5 minutes (stale)
- Red: >5 minutes (stuck)
Features:
- Calculate() function returns Info with formatted age and color class
- Helper methods: IsActive(), IsStale(), IsStuck()
- Handles edge cases: zero time, future time (clock skew)
Tests: 8 test functions with 25 sub-tests covering all thresholds.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add convoy dashboard HTML template with Last Activity (hq-fq1g)
Adds internal/web package with convoy dashboard template:
- convoy.html with Last Activity column and color coding
- Green (<2min), Yellow (2-5min), Red (>5min) activity indicators
- htmx auto-refresh every 30 seconds
- Progress bars for convoy completion
- Status indicators for open/closed convoys
- Empty state when no convoys
Also includes internal/activity package (dependency from hq-x2xy):
- Calculate() returns Info with formatted age and color class
- Helper methods: IsActive(), IsStale(), IsStuck()
Tests: 6 template tests + 8 activity tests, all passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add convoy list handler with activity data (hq-3edt)
Adds HTTP handler that wires convoy dashboard template to real data:
- ConvoyHandler: HTTP handler for GET / rendering convoy dashboard
- LiveConvoyFetcher: Fetches convoys from beads with activity data
- ConvoyFetcher interface: Enables mocking for tests
Features:
- Fetches open convoys from town beads
- Calculates progress (completed/total) from tracked issues
- Gets Last Activity from worker agent beads
- Color codes activity: Green (<2min), Yellow (2-5min), Red (>5min)
Includes dependencies (not yet merged):
- internal/activity: Activity calculation (hq-x2xy)
- internal/web/templates: HTML template (hq-fq1g)
Tests: 5 handler tests + 6 template tests + 8 activity tests = 19 total
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add 'gt dashboard' CLI command (hq-s1bg)
Add dashboard command to start the convoy tracking web server.
Usage: gt dashboard [--port=8080] [--open]
Features:
- --port: Configurable HTTP port (default 8080)
- --open: Auto-open browser on start
- Cross-platform browser launch (darwin/linux/windows)
- Graceful workspace detection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>