mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
5057efce1a
The auth demo capped at D4 across integrations because the post-sign-out rejection banner never rendered. The post-sign-out `agent_run_failed` is delivered only on the agent-scoped `<CopilotChat onError>` channel — never the provider-level `<CopilotKit onError>` the demos listened on — so the D5/D6 auth probe's rejection-surface assertion failed and the cell was capped at D4. Fix (applied to all 19 integrations whose auth demo reproduced the bug): wire a stable `handleAuthError` onto the agent-scoped `<CopilotChat onError>` (keeping the provider handler), key the error surface off auth-error STATE alone with a clear-on-auth effect (removing the `&& !isAuthenticated` cross-slice race), and harden the rejection-banner message fallback against nullish error events. Scope: 19 of 20 integrations. built-in-agent already passes (renders via its ChatErrorBoundary); claude-sdk-python adapted to its legacy/error-boundary shape.