Similar to the meshcore app...
<img width="915" height="748" alt="Image" src="https://github.com/user-attachments/assets/63b9cf01-a56c-4c2e-a57a-8546feea81f5" />
<!-- github-sync-id:3702030561 -->
@claude Can we add short "last seen" (heard) at the end of the label that appears for each node on the map page. e.g. "(2m)" for 2 mins, "(1h)" for 1 hour etc.
@claude Can we add short "last seen" (heard) at the end of the label that appears for each node on the map page. e.g. "(2m)" for 2 mins, "(1h)" for 1 hour etc.
<!-- github-comment-id:3620703199 -->
I've successfully added the last seen time display to map node labels!
Changes Made:
Added formatRelativeTime() JavaScript function to calculate time difference in a human-friendly format
Updated createNodeIcon() to display relative time next to the public key prefix
Time is shown in short format: "(2m)" for 2 minutes, "(1h)" for 1 hour, "(2d)" for 2 days, etc.
Adjusted icon size from 52px to 82px width to accommodate the additional text
Labels now show: keyPrefix (timeAgo) e.g., ab (5m)
Implementation Details:
The relative time is calculated client-side using the last_seen timestamp from the node data. The format follows the requested pattern:
Less than 1 minute: <1m
Minutes: Xm (e.g., 5m)
Hours: Xh (e.g., 2h)
Days: Xd (e.g., 3d)
Modified Files:
src/meshcore_hub/web/templates/map.html - Added time formatting and display logic
Note on Testing:
The changes are purely frontend JavaScript modifications to the map template and don't affect any Python code or backend logic. I was unable to run the full test suite due to environment setup requirements, but these changes are isolated to the map visualization layer and shouldn't impact existing functionality.
**Claude finished @jinglemansweep's task** —— [View job](https://github.com/ipnet-mesh/meshcore-hub/actions/runs/19991567473) • [`claude/issue-33-20251206-1703`](https://github.com/ipnet-mesh/meshcore-hub/tree/claude/issue-33-20251206-1703) • [Create PR ➔](https://github.com/ipnet-mesh/meshcore-hub/compare/main...claude/issue-33-20251206-1703?quick_pull=1&title=Add%20last%20seen%20time%20to%20map%20node%20labels&body=Display%20relative%20time%20since%20last%20seen%20%28e.g.%2C%20%272m%27%2C%20%271h%27%2C%20%272d%27%29%20in%20node%20labels%20on%20the%20map%20page.%20This%20makes%20it%20easier%20to%20quickly%20identify%20how%20recently%20nodes%20were%20active%20without%20opening%20the%20popup.%0A%0AFixes%20%2333%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A%2F%2Fclaude.ai%2Fcode%29)
---
### Task Complete ✅
I've successfully added the last seen time display to map node labels!
**Changes Made:**
- Added `formatRelativeTime()` JavaScript function to calculate time difference in a human-friendly format
- Updated `createNodeIcon()` to display relative time next to the public key prefix
- Time is shown in short format: "(2m)" for 2 minutes, "(1h)" for 1 hour, "(2d)" for 2 days, etc.
- Adjusted icon size from 52px to 82px width to accommodate the additional text
- Labels now show: `keyPrefix (timeAgo)` e.g., `ab (5m)`
**Implementation Details:**
The relative time is calculated client-side using the `last_seen` timestamp from the node data. The format follows the requested pattern:
- Less than 1 minute: `<1m`
- Minutes: `Xm` (e.g., `5m`)
- Hours: `Xh` (e.g., `2h`)
- Days: `Xd` (e.g., `3d`)
**Modified Files:**
- `src/meshcore_hub/web/templates/map.html` - Added time formatting and display logic
**Note on Testing:**
The changes are purely frontend JavaScript modifications to the map template and don't affect any Python code or backend logic. I was unable to run the full test suite due to environment setup requirements, but these changes are isolated to the map visualization layer and shouldn't impact existing functionality.
--- | [Branch: claude/issue-33-20251206-1703](https://github.com/ipnet-mesh/meshcore-hub/tree/claude/issue-33-20251206-1703)
<!-- github-comment-id:3620703566 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Similar to the meshcore app...
@claude Can we add short "last seen" (heard) at the end of the label that appears for each node on the map page. e.g. "(2m)" for 2 mins, "(1h)" for 1 hour etc.
Claude finished @jinglemansweep's task —— View job •
claude/issue-33-20251206-1703• Create PR ➔Task Complete ✅
I've successfully added the last seen time display to map node labels!
Changes Made:
formatRelativeTime()JavaScript function to calculate time difference in a human-friendly formatcreateNodeIcon()to display relative time next to the public key prefixkeyPrefix (timeAgo)e.g.,ab (5m)Implementation Details:
The relative time is calculated client-side using the
last_seentimestamp from the node data. The format follows the requested pattern:<1mXm(e.g.,5m)Xh(e.g.,2h)Xd(e.g.,3d)Modified Files:
src/meshcore_hub/web/templates/map.html- Added time formatting and display logicNote on Testing:
The changes are purely frontend JavaScript modifications to the map template and don't affect any Python code or backend logic. I was unable to run the full test suite due to environment setup requirements, but these changes are isolated to the map visualization layer and shouldn't impact existing functionality.
--- | Branch: claude/issue-33-20251206-1703
Brilliant works well.