Skip to content

add user & device "online" indicator#2409

Merged
wojcik91 merged 14 commits intodevfrom
user_online_indicator
Mar 19, 2026
Merged

add user & device "online" indicator#2409
wojcik91 merged 14 commits intodevfrom
user_online_indicator

Conversation

@wojcik91
Copy link
Contributor

Add an indicator in the users list to mark users and devices with an active VPN session.

Closes #2309

@wojcik91 wojcik91 self-assigned this Mar 19, 2026
@wojcik91 wojcik91 requested a review from Copilot March 19, 2026 12:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI and API support for showing “online” status for users/devices based on active VPN sessions.

Changes:

  • Introduces shared UI helpers to compute user/device online state from network activity flags.
  • Updates Users overview table UI to display online indicators for users (avatar) and devices (dot badge), and adjusts related styling/colors.
  • Updates backend device-network query logic and adds integration/unit tests to expose is_active and preserve last successful connection timestamps.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web/src/shared/utils/userOnlineStatus.ts Adds utility functions to compute online status for devices/users.
web/src/shared/defguard-ui Updates UI submodule to a revision that likely supports the new “online” avatar indicator.
web/src/pages/UsersOverviewPage/style.scss Adds styles for device online dot indicator and wrapper positioning.
web/src/pages/UsersOverviewPage/UsersTable.tsx Wires online status into avatar + adds per-device online dot in expanded rows.
web/src/pages/LocationOverviewPage/LocationOverviewUsersTable.tsx Normalizes device icon color to neutral (no longer always “success” green).
crates/defguard_core/tests/integration/api/user.rs Adds API integration tests validating is_active and last_connected_at behavior.
crates/defguard_common/src/db/models/device.rs Adjusts SQL to derive is_active + last_connected_at from sessions and adds DB-level tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wojcik91 wojcik91 merged commit a218e6a into dev Mar 19, 2026
3 checks passed
@wojcik91 wojcik91 deleted the user_online_indicator branch March 19, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants