diff --git a/apps/rebreak-magic/app/composables/useDeviceStatus.ts b/apps/rebreak-magic/app/composables/useDeviceStatus.ts index 5a8257a..fa026d3 100644 --- a/apps/rebreak-magic/app/composables/useDeviceStatus.ts +++ b/apps/rebreak-magic/app/composables/useDeviceStatus.ts @@ -1,4 +1,4 @@ -import { computed, type Ref } from "vue"; +import { computed, watchEffect, type Ref } from "vue"; import type { MagicDeviceInfo, IphoneDeviceState } from "./useTauri"; export type DeviceStatus = "active" | "cooldown" | "revoked" | "pending" | "unprotected"; @@ -93,6 +93,12 @@ export function useDeviceStatus( }; }); + // DEBUG: log current device matching details + watchEffect(() => { + const ids = devices.value.map((d) => ({ deviceId: d.deviceId, hostname: d.hostname, platform: d.model ?? d.hostname })); + console.log("[useDeviceStatus] local deviceId:", currentDeviceId?.value ?? "(none)", "hostname:", localHostname.value ?? "(none)", "backend ids:", ids, "matched:", currentBackendDevice.value?.deviceId ?? "(none)"); + }); + return { currentBackendDevice, otherDevices,