?
TRCKR-329
Created: 2025-12-13 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (3)
agent · 2025-12-13
## Work Completed Successfully replaced the plain text tooltip (HTML title attribute) with a styled HTML tooltip element. ### Changes Made **1. Template changes (server/templates/partials/issues_table.html:130-192)** - Added to the agent cell td element for tooltip positioning - Wrapped agent status icon in a div container - Removed attribute from status icons - Added div with structured HTML content: - Shows agent ID, hostname, working duration, and last seen time - Each field is a separate div with bold labels - Tooltip only renders when agent_data exists - Fallback tooltip for status without data shows status name **2. CSS styles (server/templates/base.html:1428-1479)** - : Relative positioning for tooltip anchor - : - Hidden by default (visibility: hidden, opacity: 0) - Positioned absolutely above the icon (bottom: 125%) - Dark theme styling (#1c1f26 background, #c9d1d9 text) - Smooth fade-in transition (0.2s opacity/visibility) - Drop shadow for depth (box-shadow: 0 8px 24px rgba(0,0,0,0.5)) - Border radius of 6px for modern look - : CSS arrow pointer using borders - : Shows tooltip on hover - : Spacing between tooltip rows (2px margin) - : Styled labels (#8b949e color, 600 weight) ### Implementation Details The tooltip is a pure CSS/HTML solution: - No JavaScript required - Smooth fade-in on hover using CSS transitions - Positioned above the icon to avoid obscuring other content - Arrow pointer visually connects tooltip to the icon - Dark theme matches the application's overall aesthetic - pointer-events: none prevents tooltip from interfering with clicks ### Testing - All 88 server tests pass - Deployed to production at https://trckr.roboalch.com - Health check passed - Tooltip displays correctly with agent metadata (ID, host, duration, last seen) ### Visual Behavior When hovering over an agent status icon: 1. Tooltip fades in smoothly (0.2s transition) 2. Appears above the icon with dark background and white text 3. Shows 4 lines of information in a clean format 4. Arrow pointer indicates which icon the tooltip belongs to 5. Fades out smoothly when mouse leaves The HTML element approach provides: - Full styling control (colors, fonts, spacing, shadows) - Multi-line formatted content with proper structure - Smooth animations and transitions - Better visual integration with the application theme
Anonymous · 2025-12-13
make the tooltop an html element instead of a plain textbox
agent · 2025-12-13
## Work Completed Successfully implemented agent tooltip with detailed metadata in the issues table. ### Changes Made **1. Backend changes (server/routes/web.py:168-255)** - Modified `get_agent_status_for_issues()` function to return agent metadata dict instead of just status string - Changed return type from `dict[str, str]` to `dict[str, dict]` - Return structure now: `{issue_id: {"status": str, "agent": dict | None}}` - Agent metadata includes: - `agent_id`: Unique identifier (e.g., "agt_abc12345") - `hostname`: Machine hostname - `started_at`: ISO timestamp when agent started working - `last_seen_at`: ISO timestamp of last heartbeat - `working_duration_seconds`: Seconds since started_at - `last_seen_seconds`: Seconds since last_seen_at **2. Template changes (server/templates/partials/issues_table.html:130-180)** - Updated agent status cell to extract agent data from new dict structure - Added logic to build detailed multi-line tooltip with: - Agent ID (truncated to first 8 chars after "agt_" prefix) - Hostname - Working duration (formatted as seconds/minutes/hours depending on length) - Last seen time (relative if < 1 hour, absolute timestamp otherwise) - Used HTML entity `&#10;` for multi-line display in title attribute - Tooltip only shows "No agent" when status is 'none' **3. Filtering update (server/routes/web.py:508)** - Updated agent status filter to use new dict structure: `.get("status", "none")` ### Tooltip Format Examples **For active agent (< 1 hour):** ``` Agent: abc12345 Host: mini Working for: 23 minutes Last seen: 2 minutes ago ``` **For older agent (> 1 hour):** ``` Agent: abc12345 Host: tortuga Working for: 2h 15m Last seen: 2025-12-13 01:30 ``` ### Testing - All server tests pass (88 passed) - Deployed to production at trckr.roboalch.com - Health check passed ### Implementation Details The tooltip displays: 1. **Agent ID**: Truncated to 8 chars for readability (full ID available in agents tab) 2. **Hostname**: Shows which machine the agent is running on 3. **Working duration**: Time since `started_at`, formatted as: - "X seconds" if < 60 seconds - "X minutes" if < 1 hour - "Xh Ym" if >= 1 hour 4. **Last seen**: Time since last heartbeat, formatted as: - "X seconds ago" if < 60 seconds - "X minutes ago" if < 1 hour - Absolute timestamp (YYYY-MM-DD HH:MM) if >= 1 hour All agent statuses (working, waiting, halted, stopped, done) now show the detailed tooltip when hovering over the icon. The "none" status shows a simple "No agent" tooltip.