{"record":{"id":"cdd5054aed0efc94","repo":"AprilNEA/OpenLogi","slug":"a-retained-offline-hid-route-has-no-captured-family","errorCode":null,"errorMessage":"a retained offline HID++ route has no captured {family} capability fact; refusing to guess support (no profile was written)","messagePattern":"a retained offline HID\\+\\+ route has no captured (.+?) capability fact; refusing to guess support \\(no profile was written\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/fixture/record_profile.rs","lineNumber":348,"sourceCode":"        wheel,\n        backlight,\n        lighting: profile_support(capabilities.lighting),\n        light: ProfileSupport::Unsupported,\n    })\n}\n\nfn capability_setting<T>(online: bool, supported: bool) -> Option<ProfileSetting<T>> {\n    if !supported {\n        Some(ProfileSetting::Unsupported)\n    } else if online {\n        None\n    } else {\n        Some(ProfileSetting::Unavailable)\n    }\n}\n\nfn unknown_offline_support(family: &str) -> anyhow::Error {\n    anyhow!(\n        \"a retained offline HID++ route has no captured {family} capability fact; refusing to \\\n         guess support (no profile was written)\"\n    )\n}\n\nasync fn semantic_read<T>(\n    family: &'static str,\n    request: impl Future<Output = Result<Result<T, WriteError>, RpcError>>,\n) -> Result<ProfileSetting<T>> {\n    let result = tokio::time::timeout(READ_TIMEOUT, request)\n        .await\n        .map_err(|_| safe_read_error(family))?\n        .map_err(|_| safe_read_error(family))?;\n    match result {\n        Ok(value) => Ok(ProfileSetting::Supported(value)),\n        Err(WriteError::FeatureUnsupported { .. }) => Ok(ProfileSetting::Unsupported),\n        Err(_) => Err(safe_read_error(family)),\n    }","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/fixture/record_profile.rs#L330-L366","documentation":"Raised by `unknown_offline_support` when a retained device is offline and a required capability fact (SmartShift or backlight) is missing, so its support level cannot be recorded. For online devices the CLI performs a live semantic read; offline devices have no fallback, and the CLI deliberately refuses to guess support, aborting the capture so no profile is written.","triggerScenarios":"Recording a profile where `device.online == false` and either `capabilities.hires_wheel`-style facts are absent (leading `capability_setting` to return `None` paths for offline) or — as coded — SmartShift/backlight are needed while the device is offline: SmartShift always requires an online read; backlight requires one unless RGB capability proves backlight unsupported.","commonSituations":"User selects a mouse/keyboard that is asleep, powered off, or out of wireless range; device in a powered-off state after the agent cached stale capability data; trying to record a profile for a docked device that has gone to sleep.","solutions":["Wake the device (move/click the mouse, press a key) so the agent reports it online, then re-run the capture.","Toggle the device's power switch off/on and let the agent reconnect before recording.","Re-pair or move the device closer to the receiver if it cannot stay connected.","Record the profile while the device is actively connected — offline devices cannot complete semantic reads by design."],"exampleFix":"// before: device asleep, capture aborts\nopenlogi fixture record profile --id mx --name \"MX\" --output mx.json\n// after: wake the device first (click/scroll), confirm online, then\nopenlogi list\nopenlogi fixture record profile --id mx --name \"MX\" --output mx.json","handlingStrategy":"validation","validationCode":"// pre-check: only record when every targeted device is online\nlet all_online = snapshot.inventory.iter().flat_map(|i| &i.paired).all(|d| d.online);\nif !all_online { eprintln!(\"wake all devices before recording\"); }","typeGuard":"fn is_online(d: &PairedDevice) -> bool { d.online }","tryCatchPattern":null,"preventionTips":["Wake and actively use the device just before recording.","Confirm `openlogi list` shows the device online.","Replace batteries / move closer to the receiver if it keeps dropping offline."],"tags":["rust","cli","hidpp","offline-device","capabilities"],"backgroundTag":"device-offline","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}