?
TRCKR-333
Created: 2025-12-15 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-15
## Fix Applied Found and fixed the issue with agent count badges not showing in the issues sidebar. ### Root Cause The `_normalize_git_remote()` function in `server/routes/web.py` (lines 21-56) had outdated normalization logic that didn't handle port numbers in SSH URLs correctly. When matching the working agent's git_remote (`ssh://git@gitea.roboalch.com:2222/roboalchemist/trckr.git`) to the TRCKR project's repo (`git@gitea.roboalch.com:roboalchemist/trckr.git`), the old logic would: 1. Convert `git@host:path` to `git@host/path` (replacing ALL colons with slashes) 2. This incorrectly transformed `gitea.roboalch.com:2222/roboalchemist/trckr` into `gitea.roboalch.com/2222/roboalchemist/trckr` The issue was that commit caa6684 (TRCKR-332) fixed the port handling in `normalize_repo_url()` but not in `_normalize_git_remote()` which is what `_compute_agent_counts_per_project()` actually uses. ### Changes Made Updated `_normalize_git_remote()` in `server/routes/web.py` to match the fix from `normalize_repo_url()`: - Line 40-44: Remove protocol prefixes BEFORE handling git@ format - Line 49-53: Use regex to strip port numbers (`:digits/` → `/`) - Line 53: Replace only the FIRST colon with slash after port removal ### Test Results - `uv run pytest tests/test_server.py`: **75 passed** - Deployed to production at trckr.roboalch.com - Health check: ✅ Passed ### Verification Needed A sub-agent with chrome-devtools should now verify that: 1. Visit https://trckr.roboalch.com/web/issues 2. The TRCKR project in the sidebar shows a green badge with '1' next to it 3. The badge appears between the status icon and project name