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 <cynarAI@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-09-21 23:41:58 +00:00
parent bb51852c7d
commit 57c968dc8b
2 changed files with 17 additions and 2 deletions

View File

@ -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 ({

View File

@ -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}