Skip to content

Revert "feat: BLE Monitoring" (#153)#259

Merged
jfversluis merged 1 commit into
mainfrom
revert/ble-monitoring
May 8, 2026
Merged

Revert "feat: BLE Monitoring" (#153)#259
jfversluis merged 1 commit into
mainfrom
revert/ble-monitoring

Conversation

@jfversluis

@jfversluis jfversluis commented May 8, 2026

Copy link
Copy Markdown
Member

Reverts #153 (feat: BLE Monitoring).

BLE monitoring causes macOS app crashes on startup due to missing NSBluetoothAlwaysUsageDescription (CoreBluetooth TCC privacy violation).

See #253 for details.

This reverts commit 6efcc2f, reversing
changes made to 64493b6.
Copilot AI review requested due to automatic review settings May 8, 2026 08:01

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

Reverts the previously introduced BLE monitoring feature across DevFlow (agent, driver, MCP tools, tests, and specs) to prevent macOS app startup crashes caused by CoreBluetooth TCC violations when host apps lack NSBluetoothAlwaysUsageDescription.

Changes:

  • Removed BLE monitor implementation and all BLE HTTP/WebSocket endpoints from Microsoft.Maui.DevFlow.Agent.Core (and platform-specific agent overrides).
  • Removed BLE APIs from the public Microsoft.Maui.DevFlow.Driver surface and unregistered BLE MCP tools.
  • Deleted BLE-related unit tests and removed BLE sections from OpenAPI/AsyncAPI and JSON schemas.

Reviewed changes

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

Show a summary per file
File Description
src/DevFlow/Microsoft.Maui.DevFlow.Tests/WebViewDriverTests.cs Removes BLE WebSocket URL unit tests tied to the removed driver API.
src/DevFlow/Microsoft.Maui.DevFlow.Tests/BleMonitorTests.cs Deletes BLE monitor/endpoint/WebSocket coverage tests.
src/DevFlow/Microsoft.Maui.DevFlow.Driver/AgentClient.cs Removes BLE client methods; keeps network WebSocket URL generation.
src/DevFlow/Microsoft.Maui.DevFlow.Agent/DevFlowAgentService.cs Removes platform BLE monitor creation override (no native BLE hookup).
src/DevFlow/Microsoft.Maui.DevFlow.Agent/Ble/WindowsBleMonitor.cs Deletes Windows BLE monitor implementation.
src/DevFlow/Microsoft.Maui.DevFlow.Agent/Ble/MacOsBleMonitor.cs Deletes macOS BLE monitor implementation that initialized CBCentralManager.
src/DevFlow/Microsoft.Maui.DevFlow.Agent/Ble/AppleBleMonitor.cs Deletes iOS/Mac Catalyst BLE monitor implementation.
src/DevFlow/Microsoft.Maui.DevFlow.Agent/Ble/AndroidBleMonitor.cs Deletes Android BLE monitor implementation.
src/DevFlow/Microsoft.Maui.DevFlow.Agent.Core/DevFlowAgentService.cs Removes BLE monitor property/init, endpoints, capabilities advertising, and disposal logic.
src/DevFlow/Microsoft.Maui.DevFlow.Agent.Core/BleMonitor.cs Deletes the core BLE monitor and event model.
src/Cli/Microsoft.Maui.Cli/DevFlow/Mcp/Tools/BleTools.cs Deletes MCP BLE tools.
src/Cli/Microsoft.Maui.Cli/DevFlow/Mcp/McpServerHost.cs Unregisters BLE MCP tool group.
docs/DevFlow/spec/schemas/device.json Removes BLE schema definitions (status/events/types).
docs/DevFlow/spec/schemas/agent-capabilities.json Removes device.ble capability entry.
docs/DevFlow/spec/openapi.yaml Removes BLE REST/WebSocket endpoints from the published API spec.
docs/DevFlow/spec/asyncapi.yaml Removes BLE event stream channel/spec.

Comment thread src/DevFlow/Microsoft.Maui.DevFlow.Driver/AgentClient.cs
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Expert Code Review — PR #259

Methodology: 3 independent reviewers with adversarial consensus

Result: 2 findings (both minor) · 1 posted inline, 1 listed below (outside diff)

All 3 reviewers confirmed this revert is clean and complete — all BLE source files, platform monitors, MCP tools, API specs, schemas, driver methods, and tests are consistently removed with no orphaned code, broken references, or compilation risks.

Overflow (findings not posted inline)

# Severity Consensus File Line(s) Finding
2 🟢 Minor 2/3 (after follow-up) WebViewDriverTests.cs outside diff File is named WebViewDriverTests.cs but contains zero WebView-related tests — all classes are AgentClientTests, AppDriverFactoryTests, ElementInfoTests, etc. Pre-existing issue made more visible by this revert. Consider renaming in a follow-up.

Discarded findings

  • 🟡 Breaking API change (removing public BLE methods without compatibility shims) — flagged by 1/3 reviewers; both follow-up reviewers disagreed, citing the repo's explicit 0.1.0-preview policy ("breaking changes are acceptable but should be documented") and crash-on-startup severity. The only actionable item is ensuring the PR description documents the removed APIs and carries a breaking-change label.

CI status

  • license/cla — passed
  • 🔄 build / build (macos-latest) — in progress
  • 🔄 build / build (windows-latest) — in progress (×2)

Test coverage

This revert removes BleMonitorTests.cs (351 lines) and BLE-related tests from WebViewDriverTests.cs (18 lines), which is correct — the corresponding production code is also removed. No new tests are needed for a revert.

Generated by Expert Code Review · 3 independent reviewers with adversarial consensus

Generated by Expert Code Review (auto) for issue #259 · ● 12.7M ·

@github-actions github-actions Bot 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.

Expert Code Review: 1 finding posted inline (1 minor). 1 additional finding listed in the summary comment (outside diff). See the lean summary comment for full details.

Generated by Expert Code Review (auto) for issue #259 · ● 12.7M

Comment thread src/DevFlow/Microsoft.Maui.DevFlow.Driver/AgentClient.cs
@jfversluis jfversluis merged commit f047e80 into main May 8, 2026
17 checks passed
@jfversluis jfversluis deleted the revert/ble-monitoring branch May 8, 2026 08:40
Copilot AI pushed a commit that referenced this pull request May 12, 2026
This reverts commit 6efcc2f, reversing
changes made to 64493b6.
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
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