Skip to content

Commit 6c588e1

Browse files
committed
Streamline claude connect by auto-opening the window
1 parent 751ca99 commit 6c588e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cli/src/components/claude-connect-banner.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ export const ClaudeConnectBanner = () => {
2626
const [isDisconnectHovered, setIsDisconnectHovered] = useState(false)
2727
const [isConnectHovered, setIsConnectHovered] = useState(false)
2828

29-
// Check initial connection status
29+
// Check initial connection status and auto-open browser if not connected
3030
useEffect(() => {
3131
const status = getClaudeOAuthStatus()
3232
if (status.connected) {
3333
setFlowState('connected')
3434
} else {
35-
setFlowState('not-connected')
35+
// Automatically start OAuth flow when not connected
36+
setFlowState('waiting-for-code')
37+
openOAuthInBrowser().catch((err) => {
38+
setError(err instanceof Error ? err.message : 'Failed to open browser')
39+
setFlowState('error')
40+
})
3641
}
3742
}, [])
3843

0 commit comments

Comments
 (0)