Add welcome onboarding and remove default localhost host

This commit is contained in:
Mohamed Boudra
2026-01-24 17:01:12 +07:00
parent f8f37ace58
commit 9b82c02fd2
17 changed files with 1222 additions and 250 deletions
@@ -58,12 +58,15 @@ function ManagedDaemonSession({ daemon }: { daemon: HostProfile }) {
const candidates = useMemo(() => buildCandidateUrls(daemon), [daemon]);
const [activeIndex, setActiveIndex] = useState(0);
const activeUrl = candidates[activeIndex] ?? candidates[0] ?? buildDaemonWebSocketUrl("localhost:6767");
const activeUrl = candidates[activeIndex] ?? candidates[0] ?? null;
const lastAttemptedUrlRef = useRef<string | null>(null);
const pendingMetadataWriteRef = useRef(false);
useEffect(() => {
if (!activeUrl) {
return;
}
// If the active URL fell out of the candidate set (e.g. endpoints updated), snap back.
const idx = candidates.indexOf(activeUrl);
if (idx === -1) {
@@ -72,6 +75,10 @@ function ManagedDaemonSession({ daemon }: { daemon: HostProfile }) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [candidates.join("|")]);
if (!activeUrl) {
return null;
}
const connection = connectionStates.get(daemon.id);
const status = connection?.status ?? "idle";
const lastError = connection?.lastError ?? null;