chore: added latency tooltips on workspaces#134
Merged
Conversation
|
|
||
| // For compatibility with older deployments, we assume that if the | ||
| // last ping is null, the agent is healthy. | ||
| var isLatencyAcceptable = agent.LastPing != null ? agent.LastPing.Latency.ToTimeSpan() < HealthyPingThreshold : true; |
Member
There was a problem hiding this comment.
Did you check that the behavior of the C# protobuf library does this? They usually just use a zero value when it's not set to be consistent with other protobuf implementations
Contributor
Author
There was a problem hiding this comment.
Yes, for reference types it will be null.
ethanndickson
approved these changes
Jun 26, 2025
| : AgentConnectionStatus.Yellow; | ||
| var connectionStatus = AgentConnectionStatus.Healthy; | ||
|
|
||
| if (agent.LastHandshake != null && agent.LastHandshake.ToDateTime() != default && agent.LastHandshake.ToDateTime() < DateTime.UtcNow) |
| description.Append(ConnectionStatus.ToDisplayString()); | ||
| } | ||
| if (LastHandshake != null) | ||
| description.Append($"\n\nLast handshake: {LastHandshake?.ToString()}"); |
Member
There was a problem hiding this comment.
I have a relative timestamp (i.e. 5 seconds ago) here but I actually gotta get rid of it, so this is fine.
( Have to get rid of it cause it only gets rendered once, and doesn't update on tooltip re-hovers 😦 )
Contributor
Author
There was a problem hiding this comment.
Yeah, I check for Default and set to null in the viewmodel cause showing a made up handshake just felt wrong.
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.
Fixes: #106