Skip to content

feat(hub): add last seen column to systems table#2000

Open
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:feat/last-seen
Open

feat(hub): add last seen column to systems table#2000
svenvg93 wants to merge 2 commits into
henrygd:mainfrom
svenvg93:feat/last-seen

Conversation

@svenvg93
Copy link
Copy Markdown
Collaborator

@svenvg93 svenvg93 commented May 13, 2026

📃 Description

Adds a Last Seen column to the systems table that shows when the agent last delivered data. This helps users detect stale metrics caused by agent disconnects, network issues, or browser tab backgrounding — addressing #1876.

The timestamp is stored as a Unix epoch (ls) inside the existing info JSON field, set exclusively in createRecords() — the single code path where real agent metrics land. This avoids the pitfall of using PocketBase's updated autodate field, which changes on any record modification (e.g. pause/unpause).

Closes #1876
Closes #836
Closes #1954

🪵 Changelog

➕ Added

  • Last Seen column to the systems table (hidden by default, toggle via column visibility menu)
    • Shows Now when the agent is actively connected
    • Shows relative time (2m ago, 3h ago, …) with an exact datetime tooltip when the agent is offline
  • ls (Unix timestamp) field to the Info struct and SystemInfo TypeScript interface, populated on every successful agent data delivery

✏️ Changed

  • lastSeen defaults to hidden (false) in the column visibility initial state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant