mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
67df4e0137
Starting the /demos/auth cell unauthenticated meant the initial `/info` handshake from CopilotKit returned 401 before any React error handler could attach, crashing the page on load. Flip the default so the demo mounts already signed in — the chat is immediately usable — and expose Sign out / Sign in as the toggle for exercising the 401 path. - use-demo-auth: default state flipped from unauthed to authed so the page mounts with a valid Bearer header. - page.tsx: add a ChatErrorBoundary around <CopilotChat /> that catches any render-time throw from chat internals after signing out and shows a friendly in-page message instead of white-screening. The boundary resets on auth transitions so signing back in restores a live chat. - auth-banner: rename Authenticate -> Sign in; status copy updated to Signed in / Signed out to match the inverted default. - tests/e2e/auth.spec.ts: flip assertions — page loads authenticated, sign out triggers 401 on next send with banner still mounted, and sign in clears the error and restores successful sends. - qa/auth.md: refreshed checklist for the authenticated-default flow.