?
TRCKR-335
Created: 2025-12-15 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-15
Fixed by implementing a TemplatesWithContext wrapper class that automatically injects agent_counts into all template contexts. ## Changes Made **File: server/routes/web.py (lines 127-147)** - Created TemplatesWithContext wrapper class around Jinja2Templates - The wrapper's TemplateResponse method automatically adds agent_counts to the context if not already present - This ensures get_agent_status_counts() is called for every template render ## How It Works The wrapper intercepts all template render calls and injects: - agent_counts: {"working": N, "waiting": N, "halted": N} The base.html template (lines 1555-1568) already had the logic to display these badges, but only worked when routes explicitly passed agent_counts. Now it works on ALL pages automatically. ## Verification Tested on production (https://trckr.roboalch.com) and confirmed agent count badges appear in the header on: - Issues page ✓ - Projects page ✓ (shows "10" working, "1" waiting) - Milestones page ✓ - All other pages ✓ The badges show as circular indicators with: - Green/teal badge: working agents count - Orange badge: waiting agents count Screenshot evidence saved to /tmp/trckr-{issues,projects,milestones}-page.png