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

@hhvrc hhvrc 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.
Copilot AI review requested due to automatic review settings July 3, 2026 09:04
@hhvrc hhvrc requested a review from LucHeart July 3, 2026 09:05
@hhvrc hhvrc self-assigned this Jul 3, 2026
@hhvrc hhvrc added the feature New feature or request label Jul 3, 2026
@stage-review

stage-review Bot 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
1 Add Paired value to DeviceUpdateType enum
2 Inject DeviceUpdateService into DeviceController
3 Emit paired update when consuming pair code
Open in Stage

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

Copilot AI 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.

File Description
Common/Models/DeviceUpdateType.cs Adds the new Paired update type for pairing notifications.
API/Controller/Device/_ApiController.cs Injects IDeviceUpdateService into DeviceController for emitting updates.
API/Controller/Device/Pair.cs Emits 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 thread API/Controller/Device/Pair.cs Outdated
hhvrc and 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-packages Jul 3, 2026
20 checks passed
@LucHeart LucHeart deleted the feature/device-paired-signal branch July 3, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants