From 48af756a86deffde31f3177f80947714b440d29f Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Wed, 17 Jun 2026 03:19:10 +0200 Subject: [PATCH] tmp(magic): debug logging for current device matching --- apps/rebreak-magic/app/composables/useDeviceStatus.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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,