Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/dashboard/public/app-logos/mindwire.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions apps/dashboard/src/app/(dashboard)/apps/new/[appId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -286,6 +291,7 @@ export default function AppInstallPage() {
} | null>(null);
useEffect(() => {
setTemplate(bundledTemplate);
setTemplateResolved(Boolean(bundledTemplate));
let cancelled = false;
appsApi
.template(appId)
Expand All @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions apps/dashboard/src/components/AppLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};

/**
Expand Down