From 57c968dc8bc3c64b36c238b9082db474bd3eff3d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 21 Sep 2026 23:41:58 +0000 Subject: [PATCH] fix(web): keep project create in shell, not onboarding Projekte + shared the new-space post-create path and always sent users to /onboarding. Route project variant to /app with the new space selected; keep /onboarding for global New space when a first bot is still needed. Co-authored-by: cynarAI --- apps/web/e2e/spaces.spec.ts | 13 +++++++++++++ apps/web/src/pages/Shell.tsx | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/web/e2e/spaces.spec.ts b/apps/web/e2e/spaces.spec.ts index e3b7ec6..06b560a 100644 --- a/apps/web/e2e/spaces.spec.ts +++ b/apps/web/e2e/spaces.spec.ts @@ -8,12 +8,25 @@ test("Projekte + opens new project dialog instead of group form", async ({ page await page.goto("/app"); await page.waitForURL(/\/app\/[^/]+$/); + const sidebar = page.locator("aside").first(); const projekte = page.locator(".sidebar-projekte"); await projekte.getByRole("button", { name: "Create a project" }).click(); await expect(page.getByRole("dialog", { name: "New project" })).toBeVisible(); await expect(page.getByRole("button", { name: "Create project", exact: true })).toBeVisible(); await expect(page.getByTestId("side-panel")).not.toHaveAttribute("data-panel", "create-group"); await expect(page.getByText("New group", { exact: true })).toHaveCount(0); + + const dialog = page.getByRole("dialog", { name: "New project" }); + await dialog.getByLabel("Name").fill("Customer project"); + await dialog.getByRole("button", { name: "Create project", exact: true }).click(); + await expect(page).not.toHaveURL(/\/onboarding/); + await page.waitForURL(/\/app/); + await expect(sidebar.getByText("Customer project", { exact: true })).toBeVisible({ + timeout: 15_000, + }); + await expect( + page.locator("main").getByRole("button", { name: "Create new Bot", exact: true }), + ).toBeVisible(); }); test("spaces stay invisible by default and chat creation requires approval", async ({ diff --git a/apps/web/src/pages/Shell.tsx b/apps/web/src/pages/Shell.tsx index 052f545..3703d92 100644 --- a/apps/web/src/pages/Shell.tsx +++ b/apps/web/src/pages/Shell.tsx @@ -4793,12 +4793,14 @@ export function ShellPage() { onCancel={() => setNewSpaceOpen(false)} onConfirm={async (name) => { const space = await rpc.spaces.create({ name }); + setNewSpaceOpen(false); if (!selectSpace(space.id)) { - setNewSpaceOpen(false); await refreshBots(); return; } - window.location.assign("/onboarding"); + window.location.assign( + newSpaceDialogVariant === "project" ? "/app" : "/onboarding", + ); }} /> ) : null}