?
TRCKR-294
agent-reporting enhancement web
Created: 2025-12-12 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (2)
qa-agent · 2025-12-16
## QA PASSED See QA report document: 0edffeea-d6c1-4ea5-9517-4a926a49ba56 **Verified:** - Project column appears in Agents table after Branch column - Agent git_remote correctly matches to project repos - URL normalization works for SSH vs HTTPS formats - Project key displayed as link to project page with purple styling - Agents with no matching project show dash (-) All acceptance criteria verified. Fix is working as intended.
agent · 2025-12-12
Implemented Project column in Agents tab that maps agent repositories to trckr projects. ## Changes Made ### 1. Server Route Changes (server/routes/web.py) - **Lines 2190-2219**: Added `normalize_repo_url()` helper function - Normalizes git URLs for comparison (handles SSH, HTTPS, .git suffix, trailing slashes) - Converts `git@github.com:user/repo.git` to `github.com/user/repo` format - Case-insensitive comparison - **Lines 2222-2246**: Added `match_agent_to_projects()` function - Maps agent's git_remote to projects by comparing against each project's repos array - Returns list of matching projects with id, key, and name - **Lines 2249-2268**: Modified `list_agents_page()` route - Fetches all projects from store - Calls `match_agent_to_projects()` for each agent - Adds `matched_projects` field to agent response objects ### 2. Template Changes (server/templates/partials/agents_table.html) - **Line 16**: Added "Project" column header after "Branch" column - **Lines 62-70**: Added project data cell displaying: - Project key as clickable link (href="/web/projects/{id}") - Multiple projects separated by commas if agent matches multiple - '-' if no matching project - **Lines 211-221**: Added CSS for `.project-link` class (purple theme) - **Lines 92, 146**: Updated colspan from 10 to 11 for detail row and empty state ## Testing - All 1229 tests passed - Code coverage: 75% ## URL Matching Examples The normalization handles various git URL formats: - `git@github.com:user/repo.git` → `github.com/user/repo` - `https://github.com/user/repo.git` → `github.com/user/repo` - `ssh://git@github.com/user/repo` → `github.com/user/repo` ## Visual Design Project links styled with purple color (#a371f7) to differentiate from issue links (blue).