authorgravatar for maria@kuuro.netmaria <maria@kuuro.net> 2026-10-04 08:20:34-03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-04 08:20:34-03:00
log5318d054a5eabf85308a086e2fdbef5b6cdfd0ee
tree627a4d328697154163b6462219625bc4e945d7c3
parent5a96895a85b43c838da6c89cf21068b99c003d5a
signature Signed by PGP key B5690EEEBB952194

fix(web): show device diagnostics before hub readiness (#15435)


2 files changed, 14 insertions(+), 3 deletions(-)

apps/web/src/components/device/DeviceSetup.tsx+5-2
......@@ -63,6 +63,9 @@ export function DeviceSetup(props: {
6363 const [step, setStep] = useState(0);
6464 const enabled = props.state.hostStatus !== "disabled";
6565 const busy = props.state.hostStatus === "installing" || props.state.hostStatus === "starting";
66 const localPlatformsUnavailable = props.state.hosts.some(
67 (host) => host.kind === "local" && !host.platforms.some((platform) => platform.available),
68 );
6669
6770 const update = async (
6871 kind: NonNullable<typeof pending>,
......@@ -117,8 +120,8 @@ export function DeviceSetup(props: {
117120 </section>
118121 ) : null}
119122
120 {step === 1 ? (
121 <section className="space-y-3 text-sm">
123 {step === 1 || (step === 0 && enabled && localPlatformsUnavailable) ? (
124 <section className={cn("space-y-3 text-sm", step === 0 && "mt-4")}>
122125 <h3 className="font-medium">Check simulator support</h3>
123126 <DevicePlatformSetup
124127 state={props.state}
apps/web/src/components/settings/IntegrationsSettings.tsx+9-1
......@@ -646,10 +646,18 @@ function DeviceIntegrationControls({
646646 "hub" | "check" | "agent" | "update-hub" | "update-agent" | null
647647 >(null);
648648 const busy = state.hostStatus === "installing" || state.hostStatus === "starting";
649 const localPlatformsUnavailable = state.hosts.some(
650 (host) => host.kind === "local" && !host.platforms.some((platform) => platform.available),
651 );
649652 const [platformsRevealed, setPlatformsRevealed] = useState(false);
650653 // Keep diagnostics visible through subsequent agent setup and refresh phases.
651654 if (platformsRevealed && !enabled) setPlatformsRevealed(false);
652 if (enabled && !platformsRevealed && state.hostStatus === "ready" && pending !== "hub") {
655 if (
656 enabled &&
657 !platformsRevealed &&
658 (state.hostStatus === "ready" || localPlatformsUnavailable) &&
659 pending !== "hub"
660 ) {
653661 setPlatformsRevealed(true);
654662 }
655663