From 1fde723d49094cbec615e559d21151862860ad90 Mon Sep 17 00:00:00 2001 From: Hydra Date: Fri, 21 Aug 2026 19:45:12 +0300 Subject: [PATCH] fix ci test --- apps/dashboard/public/app-logos/mindwire.svg | 6 ++++++ .../src/app/(dashboard)/apps/new/[appId]/page.tsx | 14 ++++++++++++-- apps/dashboard/src/components/AppLogo.tsx | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 apps/dashboard/public/app-logos/mindwire.svg diff --git a/apps/dashboard/public/app-logos/mindwire.svg b/apps/dashboard/public/app-logos/mindwire.svg new file mode 100644 index 000000000..e8c8eb9e1 --- /dev/null +++ b/apps/dashboard/public/app-logos/mindwire.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/apps/dashboard/src/app/(dashboard)/apps/new/[appId]/page.tsx b/apps/dashboard/src/app/(dashboard)/apps/new/[appId]/page.tsx index bad73d2cb..18cd72d71 100644 --- a/apps/dashboard/src/app/(dashboard)/apps/new/[appId]/page.tsx +++ b/apps/dashboard/src/app/(dashboard)/apps/new/[appId]/page.tsx @@ -276,6 +276,11 @@ export default function AppInstallPage() { // from the API) is fetched so a repo-fresh app opens + installs without a redeploy. const bundledTemplate = useMemo(() => getAppTemplate(appId), [appId]); const [template, setTemplate] = useState(bundledTemplate); + // A repo-fresh template is absent from the dashboard bundle by definition. + // Do not treat that initial `undefined` as a 404: wait for the runtime-catalog + // request before redirecting. Without this guard, a newly published catalog + // app flashes the route and immediately returns to the catalog. + const [templateResolved, setTemplateResolved] = useState(Boolean(bundledTemplate)); // The org's existing not-yet-deployed draft of this app, if any. The catalog // tiles link here WITHOUT ?projectId, so without this the wizard had no idea a // draft existed — it showed template defaults while Install landed on the draft. @@ -286,6 +291,7 @@ export default function AppInstallPage() { } | null>(null); useEffect(() => { setTemplate(bundledTemplate); + setTemplateResolved(Boolean(bundledTemplate)); let cancelled = false; appsApi .template(appId) @@ -295,7 +301,10 @@ export default function AppInstallPage() { setOpenDraft(r?.draft ?? null); }) .catch(() => { - /* keep the bundled template */ + /* Keep a bundled fallback if the runtime catalog is temporarily unavailable. */ + }) + .finally(() => { + if (!cancelled) setTemplateResolved(true); }); return () => { cancelled = true; @@ -477,10 +486,11 @@ export default function AppInstallPage() { // Unknown / non-installable / flow apps don't belong here. useEffect(() => { + if (!templateResolved) return; if (!template || template.kind === "flow" || !template.available) { router.replace("/apps/new"); } - }, [template, appId, router]); + }, [templateResolved, template, appId, router]); // ── Draft re-entry: show what's persisted, not the template defaults ─────── /** The project label the installer will build free hostnames from — its slug, diff --git a/apps/dashboard/src/components/AppLogo.tsx b/apps/dashboard/src/components/AppLogo.tsx index 03f4af531..e9455332d 100644 --- a/apps/dashboard/src/components/AppLogo.tsx +++ b/apps/dashboard/src/components/AppLogo.tsx @@ -83,6 +83,9 @@ export const APP_LOGO: Record< // The control plane self-registered as an app (CLI self-deploy) — Openship's // own brand mark, a full-bleed square icon. openship: { src: "/apple-touch-icon.png", fill: true }, + // MindWire's own monochrome mark is vendored so the catalog works offline and + // the brand stays legible on both dashboard themes. + mindwire: { src: "/app-logos/mindwire.svg", fill: true }, }; /**