Signing up refreshes the session, which briefly routes /onboarding to /sign-in without a return path; the sign-in route then sent the new account to /app. The shell's own redirect to onboarding was skipped whenever a focus refresh landed before the bootstrap response, so a fresh account could stay on an empty Today view. /onboarding now sends signed-out visitors to /sign-in?next=/onboarding and sign-in honours it, and the shell redirects an account without any bots or conversations regardless of which refresh landed first. Without a connected model nothing can reply, so the composer shows a "Connect model" action that opens model settings instead of a send error after the fact. Claude-Session: https://claude.ai/code/session_019HKhzQ65ctE5qmkiF9Apxo Co-authored-by: Claude <noreply@anthropic.com>
16 lines
566 B
TypeScript
16 lines
566 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { authReturnPath } from "./auth-next";
|
|
|
|
describe("authReturnPath", () => {
|
|
it("returns to onboarding and integration setup", () => {
|
|
expect(authReturnPath("/onboarding")).toBe("/onboarding");
|
|
expect(authReturnPath("/integrations/setup")).toBe("/integrations/setup");
|
|
});
|
|
|
|
it("sends anything else to the app", () => {
|
|
expect(authReturnPath(null)).toBe("/app");
|
|
expect(authReturnPath("https://example.test")).toBe("/app");
|
|
expect(authReturnPath("//example.test")).toBe("/app");
|
|
});
|
|
});
|