?
TRCKR-331
Created: 2025-12-15 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (2)
agent · 2025-12-15
## Issue Completed TRCKR-331 has been verified as already fully implemented and is working correctly. ### Summary The feature to show working/waiting agent counts per-project on the issues page sidebar was already implemented in the codebase. No code changes were required. ### Implementation Details **Files involved:** 1. `server/routes/web.py` (lines 81-118, 543, 554) - `_normalize_git_remote()` - Normalizes git URLs for matching (SSH/HTTPS) - `_match_agent_to_projects()` - Maps agent git_remote to project repos - `_compute_agent_counts_per_project()` - Counts agents per project by status - Integrated into `list_issues()` route 2. `server/templates/issues.html` (lines 26-36) - Displays agent count badges in project sidebar - Shows working (green) and waiting (yellow) badges - Only displays non-zero counts - Includes tooltip with breakdown 3. `server/templates/base.html` - CSS styling for .agent-counts and .agent-count badges ### How It Works 1. When loading /web/issues, the server calls `_compute_agent_counts_per_project()` 2. Function fetches all agents and projects 3. Excludes stale agents (not seen in 24+ hours) 4. Matches each agent's `git_remote` to projects' `repos` arrays 5. Counts agents by status (working/waiting/halted) for each matching project 6. Returns dict mapping project_id → {working: int, waiting: int, halted: int} 7. Template displays badges next to project names in sidebar ### Verification - Feature is deployed to production (trckr.roboalch.com) - Updated TRCKR project to include repo URL for agent matching - All acceptance criteria met: ✓ Agent counts display next to projects ✓ Only working/waiting agents counted (excludes halted/stale) ✓ Matching via git_remote to project repos ✓ Zero counts show no badge ✓ Consistent visual styling ### Status Marked as **done**. Feature is production-ready and functioning as specified.
agent · 2025-12-15
Investigation complete. The feature described in TRCKR-331 has already been fully implemented. ## Current Implementation **server/routes/web.py (lines 81-118):** - `_compute_agent_counts_per_project()` function computes agent counts per project - Filters agents by status (working/waiting/halted) - Excludes stale agents (not seen in 24+ hours) - Matches agents to projects using `_match_agent_to_projects()` and `_normalize_git_remote()` - Called in `list_issues()` route (line 543) and passed to template as `agent_counts` **server/templates/issues.html (lines 26-36):** - Project sidebar displays agent count badges next to each project - Shows working agents (green badge) and waiting agents (yellow badge) - Only displays non-zero counts - Includes tooltip showing breakdown: "Active agents: X working, Y waiting" **server/templates/base.html (CSS):** - Styling for .agent-counts and .agent-count classes - Green badges (#10b981) for working agents - Yellow badges (#f59e0b) for waiting agents - Small circular badges positioned between status icon and project name ## Verification Needed The code is in place and deployed to production (trckr.roboalch.com). To verify it's working: 1. Need active agents with git_remote matching project repos 2. Agents must have status 'working' or 'waiting' 3. Agents must be seen within last 24 hours The feature matches the acceptance criteria exactly. Will verify with Chrome DevTools.