feat(FN-1899): add login timeout, cancellation, and 409 conflict handling

- Add LoginOutcome type ('pending' | 'success' | 'failed' | 'timeout') with state tracking
- Implement AbortController-based cancellation for OAuth login flows
- Add timeout detection after MAX_POLL_CYCLES (150 polls, ~5 min)
- Handle 409 Conflict when concurrent login is attempted
- Persist login outcomes to onboarding stepData for session recovery
- Add getStepData mock export to App.test.tsx vi.mock
- Fix ToastType: use 'info' instead of invalid 'warning' type
This commit is contained in:
Fusion
2026-04-16 00:26:01 -07:00
committed by gsxdsm
parent dfb0a836be
commit 4fb8be4273
3 changed files with 6 additions and 4 deletions

View File

@@ -1321,7 +1321,7 @@ describe("ModelOnboardingModal", () => {
await waitFor(() => {
expect(addToast).toHaveBeenCalledWith(
"Login already in progress. Please wait or cancel the current attempt.",
"warning"
"info"
);
});
});
@@ -1517,7 +1517,7 @@ describe("ModelOnboardingModal", () => {
});
// Should show timeout toast
expect(addToast).toHaveBeenCalledWith("Login timed out. Please try again.", "warning");
expect(addToast).toHaveBeenCalledWith("Login timed out. Please try again.", "info");
// Cancel button should not be shown after timeout
expect(screen.queryByText("Cancel")).toBeNull();