-
Notifications
You must be signed in to change notification settings - Fork 10
Feature/improve livecontrol handling #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
LiveControlGateway/LifetimeManager/HubLifetimeManager.cs:71
- Returning null instead of a boolean value changes the method's contract; please update the documentation and verify that all calling code correctly handles a null return value.
return null; // Tell the controller that we are busy right now TODO: Tell the connecting client why it failed
LiveControlGateway/Controllers/LiveControlController.cs:501
- The branch for handling the 'ShockerExclusive' response was changed from checking result.IsT3 to result.IsT2; please verify that this change is intentional and that the correct result type is being handled.
if(result.IsT2)
LiveControlGateway/LifetimeManager/HubLifetime.cs:95
- [nitpick] The log message is ambiguous and suggests uncertainty in the code's logic; consider clarifying the message or adding additional context for actionable troubleshooting.
_logger.LogWarning("Client already registered, not sure how this happened, probably a bug");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
LiveControlGateway/Controllers/LiveControlController.cs:510
- The conditional for checking the OneOf result for a 'ShockerExclusive' response was changed from IsT3 to IsT2. Please verify that the ordering of OneOf types and associated accessors correctly reflects the intended semantics of the response.
if (result.IsT2)
LiveControlGateway/Controllers/LiveControlController.cs:62
- [nitpick] Consider throwing a more specific exception (e.g. InvalidOperationException) instead of a generic Exception so that the error conveys more meaningful context about the absence of a HubLifetime.
private HubLifetime HubLifetime => _hubLifetime ?? throw new Exception("Hub lifetime is null but was accessed");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
LiveControlGateway/Controllers/LiveControlController.cs:495
- The OneOf variant mapping for the result of ReceiveFrame has been changed (from originally checking IsT3 to now using IsT2). Please verify that the updated indices correctly reflect the intended outcomes across all usages.
var result = HubLifetime.ReceiveFrame(frame.Shocker, frame.Type, intensity, _tps);
LiveControlGateway/LifetimeManager/HubLifetime.cs:95
- [nitpick] The log message for a duplicate live control client registration contains ambiguous language. Consider revising it to be more neutral and clear to aid in production troubleshooting.
if (_liveControlClients.Contains(controller)) { _logger.LogWarning("Client already registered, not sure how this happened, probably a bug");
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.