Skip to content

feat: emit DeviceUpdateType.Paired when a device consumes a pair code - #331

Merged
LucHeart merged 3 commits into
feature/consume-internal-packagesfrom
feature/device-paired-signal
Jul 3, 2026
Merged

feat: emit DeviceUpdateType.Paired when a device consumes a pair code#331
LucHeart merged 3 commits into
feature/consume-internal-packagesfrom
feature/device-paired-signal

Conversation

@hhvrc

@hhvrchhvrc commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Adds a Paired value to the DeviceUpdateType enum and emits it when a device consumes a pair code, so clients are notified when a device pairs.

This is useful for closing the pairing dialog automatically after device has paired


Open in Stage

Add a Paired value to DeviceUpdateType and emit it to the device owner
after a pair code is consumed, so clients are notified when a device pairs.
CopilotAI review requested due to automatic review settings July 3, 2026 09:04
@hhvrc
hhvrc requested a review from LucHeartJuly 3, 2026 09:05
@hhvrchhvrc self-assigned this Jul 3, 2026
@hhvrchhvrc added the feature New feature or request label Jul 3, 2026
@ghost

ghost commented Jul 3, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 3 individual chapters for you:

Title
1Add Paired value to DeviceUpdateType enum
2Inject DeviceUpdateService into DeviceController
3Emit paired update when consuming pair code
Open in Stage

Chapters generated by Stage for commit b221847 on Jul 3, 2026 10:13am UTC.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 adds a new device update event (DeviceUpdateType.Paired) and emits it when a device consumes a pair code, enabling clients to react to device pairing via the existing device-update delivery mechanisms (SignalR + Redis pub/sub).

Changes:

  • Add DeviceUpdateType.Paired to the shared update-type enum.
  • Inject IDeviceUpdateService into DeviceController and emit a Paired device update after pair-code consumption.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

FileDescription
Common/Models/DeviceUpdateType.csAdds the new Paired update type for pairing notifications.
API/Controller/Device/_ApiController.csInjects IDeviceUpdateService into DeviceController for emitting updates.
API/Controller/Device/Pair.csEmits DeviceUpdateType.Paired after consuming a pair code (targeting the device owner).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadAPI/Controller/Device/Pair.cs Outdated
hhvrcand others added 2 commits July 3, 2026 12:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@LucHeart
LucHeart merged commit cbfce0f into feature/consume-internal-packagesJul 3, 2026
20 checks passed
@LucHeart
LucHeart deleted the feature/device-paired-signal branch July 3, 2026 10:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

featureNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hhvrc@LucHeart