diff --git a/apps/host/src/components/EngineFirstRun.tsx b/apps/host/src/components/EngineFirstRun.tsx index c4678323..aef9a583 100644 --- a/apps/host/src/components/EngineFirstRun.tsx +++ b/apps/host/src/components/EngineFirstRun.tsx @@ -41,7 +41,8 @@ export function useEngineNeeded(): boolean | null { } function gpuLine(info: FirstRunInfo) { - const first = info.gpus[0]; + // a processor's own tiny graphics (no memory of its own) is not "a card" + const first = info.gpus.find(g => (g.vramGb ?? 0) >= 1) ?? info.gpus[0]; if (!first) return ''; const vram = first.vramGb ? `, ${Math.round(first.vramGb)} GB` : ''; const driver = info.driver ? `, driver ${info.driver}` : ''; @@ -122,7 +123,7 @@ export function EngineFirstRun({ onDone }: { onDone: () => void }) { const bytes = info?.offer?.bytes ?? 0; const doneMb = Math.round(mb(bytes) * percent / 100); const eta = useDownloadEta(running && bytes ? { done_gb: bytes * percent / 100 / 1e9, remaining_gb: bytes * (100 - percent) / 100 / 1e9 } : undefined, job?.id); - const cards = info?.gpus.length ?? 0; + const cards = (info?.gpus ?? []).filter(g => (g.vramGb ?? 0) >= 1).length; const hidden = void chosen(e.target.files)}/>; const pick = (label: string) => ; diff --git a/apps/host/src/screens/Setup.tsx b/apps/host/src/screens/Setup.tsx index 3b5f2282..d23c4a64 100644 --- a/apps/host/src/screens/Setup.tsx +++ b/apps/host/src/screens/Setup.tsx @@ -4,14 +4,15 @@ import { useNative } from '../lib/native'; import { useStore } from '../lib/store'; import { useEngineUnpacking } from '../lib/engine-setup'; import { EngineFirstRun, useEngineNeeded } from '../components/EngineFirstRun'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; /** Every setup entry uses the same guided onboarding. */ export function SetupScreen() { const native = useNative(), setup = useStore(s => s.setup); - const needsEngine = useEngineNeeded(), [engineStepDone, setEngineStepDone] = useState(false); + const needsEngine = useEngineNeeded(), [engineStepDone, setEngineStepDone] = useState(false), [cardShown, setCardShown] = useState(false); + useEffect(() => { if (needsEngine) setCardShown(true); }, [needsEngine]); const unpacking = useEngineUnpacking(!native || !setup); // No engine on this PC yet: the first-run card comes before the model steps (it works before the native snapshot has connected). - if (!engineStepDone && !setup?.complete && needsEngine) + if (!engineStepDone && !setup?.complete && (needsEngine || cardShown)) return setEngineStepDone(true)}/>; if (!native || !setup) return

{tr("Getting your setup ready\u2026")}

{unpacking ?

{tr("Unpacking the engine that came with the app. This takes about a minute the first time.")}

: null}
;