Severity: P3 · Category: bug · Found by: user report on v0.5.0
Observed behavior
With a Bluetooth-paired DualSense Edge powered OFF, the app shows the controller as connected. The agent API returns connected: true, connection_state: "connected" for id windows-pnp-dualsense-edge, while battery is unknown and the output pipeline has written zero reports.
Expected behavior
A paired-but-offline controller detected only via Windows PnP records should be shown honestly (e.g., "Paired (offline) - configuration available"), not as connected. connected must be false so effect targeting, profile application, and Input Bridge session guards skip it.
Root cause
When hidapi reports zero controllers, controller_registry.rs falls back to windows_pnp::controller_events(), which text-matches SetupDi PnP records. Bluetooth pairing records stay "present" (status OK) while the controller is off, and windows_pnp.rs hardcodes ConnectionState::Connected on the synthesized entry (its own windows_pnp_fallback diagnostic already admits no HID handle exists).
Reproduction
Pair a DualSense/DualSense Edge over Bluetooth, power it off, restart the agent (so hidapi finds nothing), open the app: the controller card shows connected.
Evidence
crates/dscc-agent/src/controller_registry/windows_pnp.rs:321,333 (hardcoded Connected); crates/dscc-agent/src/controller_registry.rs:540-542 (fallback gate); crates/dscc-agent/src/controller_registry.rs:391 (connected derived from connection == Connected). Verified live on v0.5.0: agent reported connected while Windows had only BTHENUM pairing records present.
Suggested fix
Add a Detected variant to ConnectionState (dscc-core), use it for the PnP fallback entries, keep configuration routes working for detected controllers (the fallback purpose), and render the state distinctly in the web UI. Consumers gating on .connected then exclude phantom entries automatically.
Acceptance criteria
Severity: P3 · Category: bug · Found by: user report on v0.5.0
Observed behavior
With a Bluetooth-paired DualSense Edge powered OFF, the app shows the controller as connected. The agent API returns
connected: true,connection_state: "connected"for idwindows-pnp-dualsense-edge, while battery isunknownand the output pipeline has written zero reports.Expected behavior
A paired-but-offline controller detected only via Windows PnP records should be shown honestly (e.g., "Paired (offline) - configuration available"), not as connected.
connectedmust befalseso effect targeting, profile application, and Input Bridge session guards skip it.Root cause
When hidapi reports zero controllers,
controller_registry.rsfalls back towindows_pnp::controller_events(), which text-matches SetupDi PnP records. Bluetooth pairing records stay "present" (status OK) while the controller is off, andwindows_pnp.rshardcodesConnectionState::Connectedon the synthesized entry (its ownwindows_pnp_fallbackdiagnostic already admits no HID handle exists).Reproduction
Pair a DualSense/DualSense Edge over Bluetooth, power it off, restart the agent (so hidapi finds nothing), open the app: the controller card shows connected.
Evidence
crates/dscc-agent/src/controller_registry/windows_pnp.rs:321,333(hardcoded Connected);crates/dscc-agent/src/controller_registry.rs:540-542(fallback gate);crates/dscc-agent/src/controller_registry.rs:391(connectedderived fromconnection == Connected). Verified live on v0.5.0: agent reported connected while Windows had only BTHENUM pairing records present.Suggested fix
Add a
Detectedvariant toConnectionState(dscc-core), use it for the PnP fallback entries, keep configuration routes working for detected controllers (the fallback purpose), and render the state distinctly in the web UI. Consumers gating on.connectedthen exclude phantom entries automatically.Acceptance criteria
connection_state: "detected"andconnected: false