fix(FN-2404): scope onboarding first-task creation to active project

- Guard onboarding first-task creation when no project is selected
- Pass projectId to createTask so onboarding tasks are created in the active project
- Update AppModals wiring tests to verify projectId forwarding for selected and unselected states
- Expand onboarding modal and flow regression tests to assert project-scoped task creation calls
This commit is contained in:
Fusion
2026-04-24 03:22:56 -07:00
committed by gsxdsm
parent 380fe9755f
commit bebc7bcff8
4 changed files with 47 additions and 4 deletions

View File

@@ -1476,6 +1476,16 @@ describe("ModelOnboardingModal", () => {
expect(screen.queryByTestId("onboarding-task-error")).toBeNull();
expect(mockCreateTask).toHaveBeenCalledTimes(2);
expect(mockCreateTask).toHaveBeenNthCalledWith(
1,
{ description: "Build auth" },
"proj_123",
);
expect(mockCreateTask).toHaveBeenNthCalledWith(
2,
{ description: "Build auth" },
"proj_123",
);
});
it("disables first-task submit button while creating the task", async () => {