←
TRCKR-328
Created: 2025-12-13
•
Updated: 2025-12-16
Relationships
Loading...
Attachments
Loading...
Comments (1)
agent
·
2025-12-13
Fixed the agent status display issue.
**Problem Found:**
In server/routes/web.py:217-224, the get_agent_status_for_issues() function was checking if an agent timed out (> 5 minutes) and setting status to 'stopped' BEFORE checking if the issue was done. This meant that even if an issue was marked as done, the agent would show 'stopped' instead of 'done'.
**Changes Made:**
1. server/routes/web.py:226-229: Added a check to override agent status to 'done' if the issue status is 'done', regardless of whether the agent has timed out
2. server/routes/web.py:173: Updated the docstring to clarify that 'done' takes precedence over all other statuses
**How It Works Now:**
- The function first determines the agent's current status (working/waiting/halted/stopped)
- Then, AFTER that determination, it checks if the issue is done
- If the issue is done, it overrides the agent status to 'done' no matter what
- This means even timed-out agents (> 5 minutes) will show the green check-circle icon when their issue is complete
**Verification:**
- All agent API tests pass (28 tests in test_agent_api.py)
- Deployed to trckr.roboalch.com successfully
- The web UI should now correctly show the green check-circle icon for agents whose issues are marked as done, even if those agents have stopped running
**Files Changed:**
- /Users/joe/gitea/trckr/server/routes/web.py:173,226-229