Merged
Conversation
There was a problem hiding this comment.
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_activeand 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.
filipslezaklab
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an indicator in the users list to mark users and devices with an active VPN session.
Closes #2309