diff --git a/.changeset/no-apps-create-first-app-cta-3573.md b/.changeset/no-apps-create-first-app-cta-3573.md new file mode 100644 index 0000000000..6ae29a41cf --- /dev/null +++ b/.changeset/no-apps-create-first-app-cta-3573.md @@ -0,0 +1,26 @@ +--- +'@object-ui/app-shell': patch +--- + +The no-apps empty state's "Create Your First App" CTA now opens the app-creation +flow instead of silently bouncing the user back to the landing page. It called +`navigate('/create-app')` — an ABSOLUTE path, so it resolved against the HOST's +root route tree, which declares no `/create-app`; the reference host's trailing +`` therefore replaced it with `/`. The `create-app` route is +declared by `AppContent` itself, inside the `/apps/:appName/*` subtree (both the +no-active-app branch and the with-app router), so the CTA now builds the +app-scoped `/apps//create-app` — the platform's canonical app URL +(ADR-0048) and the same target the sidebar's add-app entry already links to. On +a fresh zero-app deployment this was the first screen's only route into app +creation, and it read as a button that does nothing (#3573). + +A plain relative `navigate('create-app')` is deliberately NOT the fix, and the +new routing test pins why: under the installed react-router 7, +`getResolveToMatches` resolves a relative target against the LEAF match's full +`pathname` with the splat INCLUDED (in v6 this was the `v7_relativeSplatPath` +future flag; v7 hardcodes it). The empty state renders across a whole URL family +— `/apps/setup` and any deeper `/apps/setup/` — so the relative form is +right only at the shallowest of them and builds +`/apps/setup//create-app` elsewhere, which matches no route and renders +a blank screen instead of the bounce. The sibling "System Settings" CTA is +unchanged. diff --git a/packages/app-shell/src/console/AppContent.tsx b/packages/app-shell/src/console/AppContent.tsx index 9b4973690a..92333202ed 100644 --- a/packages/app-shell/src/console/AppContent.tsx +++ b/packages/app-shell/src/console/AppContent.tsx @@ -573,7 +573,24 @@ export function AppContent({ extraRoutes, extraRoutesNoApp }: AppContentProps = {t('empty.noAppsConfiguredDescription')}
-