Skip to content

Conversation

@LucHeart
Copy link
Member

No description provided.

@LucHeart LucHeart requested a review from Copilot April 11, 2025 18:45
@LucHeart LucHeart marked this pull request as ready for review April 11, 2025 18:45
Copy link
Contributor

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.

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");

@LucHeart LucHeart requested a review from Copilot April 11, 2025 20:06
Copy link
Contributor

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.

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");

@LucHeart LucHeart requested a review from Copilot April 11, 2025 20:13
Copy link
Contributor

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.

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>
@LucHeart LucHeart merged commit 2922a4a into develop Apr 11, 2025
5 checks passed
@LucHeart LucHeart deleted the feature/improve-livecontrol-handling branch April 11, 2025 20:23
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.

2 participants