Skip to content

fix: bring modifications made to plugin over#1239

Merged
ndorin merged 1 commit into
mainfrom
mc-fixes
Apr 2, 2025
Merged

fix: bring modifications made to plugin over#1239
ndorin merged 1 commit into
mainfrom
mc-fixes

Conversation

@andrew-welker
Copy link
Copy Markdown
Contributor

No description provided.

@andrew-welker andrew-welker requested review from Copilot and ndorin April 2, 2025 13:40
Copy link
Copy Markdown
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.

Pull Request Overview

This PR applies modifications made to the plugin by updating logging behavior, error handling, and the registration of actions/endpoints. Key changes include:

  • Adding conditional debug logging and messenger registration after initialization in MobileControlSystemController.cs.
  • Introducing a try-catch block in ISelectableItemsMessenger.cs with new strongly typed state messaging.
  • Updating action endpoint paths in DevicePresetsModelMessenger.cs to remove the "/presets" prefix.

Reviewed Changes

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

File Description
src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs Adds conditional logging for messenger registration and refactors handler selection logic.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs Wraps full status message sending in try-catch and introduces a strongly typed state message class.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs Updates endpoint paths to simplify action registration.
Comments suppressed due to low confidence (2)

src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs:81

  • [nitpick] Consider renaming ISelectableItemsStateMessage to remove the 'I' prefix since class names typically do not start with 'I' (reserved for interfaces).
public class ISelectableItemsStateMessage<TKey> : DeviceStateMessageBase

src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs:74

  • [nitpick] Consider updating the error logging to pass the exception object directly (e.g., using this.LogError("Error sending full status", e)) to capture complete stack trace information.
catch (Exception e)

@ndorin ndorin merged commit 4e43565 into main Apr 2, 2025
2 checks passed
@ndorin ndorin deleted the mc-fixes branch April 2, 2025 14:16
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