fix: call close() in disconnect to reset iframe state#2434
Conversation
After disconnect, the iframe is left in a stale post-disconnect state. When connect() is called again, it reuses the existing iframe but the keychain doesn't render the login UI, showing a blank screen instead. Calling close() triggers the iframe's reset via the onClose callback, ensuring the keychain is in a clean state for the next connect(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @kronosapiens's task —— View job Analyzing PR for Documentation Impact
AnalysisChange Summary: User-facing Impact Assessment:
Documentation Decision: Per the rules:
The existing documentation in |
Summary
When
disconnect()is called, the iframe is left in a stale post-disconnect state. On the nextconnect(), the existing iframe is reused (by design since v0.13.3) but the keychain doesn't render the login UI, showing a blank screen instead.This fix calls
close()after keychain disconnect, which triggerskeychain.reset()via the iframe's onClose callback. This ensures the keychain is in a clean state for the next connect.Root Cause
In v0.13.3, iframe reuse was introduced to prevent re-initialization issues when
ControllerConnectoris instantiated multiple times. However,disconnect()was never updated to account for the iframe now persisting across connect/disconnect cycles. The method still only cleared auth state but left the iframe's internal state stale.Changes
this.close()inControllerProvider.disconnect()after keychain disconnect