| author | |
| committer | |
| log | 5318d054a5eabf85308a086e2fdbef5b6cdfd0ee |
| tree | 627a4d328697154163b6462219625bc4e945d7c3 |
| parent | 5a96895a85b43c838da6c89cf21068b99c003d5a |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 14 insertions(+), 3 deletions(-)
apps/web/src/components/device/DeviceSetup.tsx+5-2| ... | @@ -63,6 +63,9 @@ export function DeviceSetup(props: { | ... | @@ -63,6 +63,9 @@ export function DeviceSetup(props: { |
| 63 | const [step, setStep] = useState(0); | 63 | const [step, setStep] = useState(0); |
| 64 | const enabled = props.state.hostStatus !== "disabled"; | 64 | const enabled = props.state.hostStatus !== "disabled"; |
| 65 | const busy = props.state.hostStatus === "installing" || props.state.hostStatus === "starting"; | 65 | 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 | ); | ||
| 66 | 69 | ||
| 67 | const update = async ( | 70 | const update = async ( |
| 68 | kind: NonNullable<typeof pending>, | 71 | kind: NonNullable<typeof pending>, |
| ... | @@ -117,8 +120,8 @@ export function DeviceSetup(props: { | ... | @@ -117,8 +120,8 @@ export function DeviceSetup(props: { |
| 117 | </section> | 120 | </section> |
| 118 | ) : null} | 121 | ) : null} |
| 119 | 122 | ||
| 120 | {step === 1 ? ( | 123 | {step === 1 || (step === 0 && enabled && localPlatformsUnavailable) ? ( |
| 121 | <section className="space-y-3 text-sm"> | 124 | <section className={cn("space-y-3 text-sm", step === 0 && "mt-4")}> |
| 122 | <h3 className="font-medium">Check simulator support</h3> | 125 | <h3 className="font-medium">Check simulator support</h3> |
| 123 | <DevicePlatformSetup | 126 | <DevicePlatformSetup |
| 124 | state={props.state} | 127 | state={props.state} |
apps/web/src/components/settings/IntegrationsSettings.tsx+9-1| ... | @@ -646,10 +646,18 @@ function DeviceIntegrationControls({ | ... | @@ -646,10 +646,18 @@ function DeviceIntegrationControls({ |
| 646 | "hub" | "check" | "agent" | "update-hub" | "update-agent" | null | 646 | "hub" | "check" | "agent" | "update-hub" | "update-agent" | null |
| 647 | >(null); | 647 | >(null); |
| 648 | const busy = state.hostStatus === "installing" || state.hostStatus === "starting"; | 648 | 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 | ); | ||
| 649 | const [platformsRevealed, setPlatformsRevealed] = useState(false); | 652 | const [platformsRevealed, setPlatformsRevealed] = useState(false); |
| 650 | // Keep diagnostics visible through subsequent agent setup and refresh phases. | 653 | // Keep diagnostics visible through subsequent agent setup and refresh phases. |
| 651 | if (platformsRevealed && !enabled) setPlatformsRevealed(false); | 654 | 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 | ) { | ||
| 653 | setPlatformsRevealed(true); | 661 | setPlatformsRevealed(true); |
| 654 | } | 662 | } |
| 655 | 663 |