?
TRCKR-285
agent-reporting web ui
Created: 2025-12-12 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-12
Completed implementation of agents.html web template. **Changes made:** 1. **server/templates/agents.html** - Main page layout with: - Toolbar with search functionality - Status filter display - Agent count display - Uses HTMX for dynamic search (300ms debounce) 2. **server/templates/partials/agents_table.html** - Table component with: - Auto-refresh every 30s via HTMX trigger - Sortable columns: Status, Hostname, Model, CLI, Branch, Last Seen - Status indicators with proper colors: * Green (#10b981) = working * Yellow (#f59e0b) = waiting * Gray (#6b7280) = halted * Red (#ef4444) = stale (default) - Expandable rows (click anywhere on row or expand icon) - Detailed view shows: Agent ID, Machine Address, OS Platform/Version, Repo Path, Git Remote, Started At, Last Seen At, Capabilities - Relative time display ('just now', '2 minutes ago', etc.) updated every 30s - Clickable issue links that search for the issue - Responsive grid layout for details 3. **server/routes/web.py:2190-2236** - Web route handler: - Added import: from .agents import _list_agents - GET /web/agents endpoint with filters: search, status - Sorting support: sort_by, sort_dir (default: last_seen_at desc) - Search filters: hostname, agent_model, agent_cli_tool, repo_path, issue_ids - Partial rendering support for HTMX table updates 4. **server/templates/base.html:1428-1429** - Navigation tab: - Added Agents tab with robot icon (ph-robot) - Uses HTMX for navigation consistency **Testing:** - Python syntax validation passed - Files created successfully - Code follows existing patterns from projects.html and issues.html **How to verify:** 1. Start the server: trckr-server 2. Navigate to http://localhost:8000/web/agents 3. Send agent heartbeats via /api/agents endpoint 4. Verify table auto-refreshes every 30s 5. Test expandable rows, sorting, and search 6. Check relative time updates