+ {/* Header section with icon and title */}
+
+
+
+
CodeRabbit
+
Connect to CodeRabbit for AI-powered code review
+
+
+
+ {/* Status section */}
+
+
+
+
+ {status?.connected ? 'Connected' : 'Not Connected'}
+
+
+ {status?.connected && status.valid === false && (
+
+ ⚠️ API key appears invalid - click Edit to update
+
+ )}
+ {status?.connected && status.updatedAt && (
+
+ Last updated: {new Date(status.updatedAt).toLocaleString()}
+
+ )}
+
+ Connect to CodeRabbit to enable AI-powered code review across all sessions
+
+
+
+ {/* Connection form */}
+ {showForm && (
+
+
+
+
+ setApiKey(e.target.value)}
+ disabled={connectMutation.isPending}
+ />
+
+
+
+ Create an API key at{' '}
+
+ CodeRabbit Settings
+
+
+
+
+
+
+
+
+ )}
+
+ {/* Action buttons */}
+
+ {status?.connected && !showForm ? (
+ <>
+
+
+ >
+ ) : !showForm ? (
+
+ ) : null}
+
+
+