+
+
+
setPrUrl(e.target.value)}
+ placeholder="https://github.com/owner/repo/pull/123"
+ autoFocus
+ className="border-white/10 bg-black/25"
+ />
+ {prUrl && !isValidUrl && (
+
Enter a valid https:// URL
+ )}
+
+
+ {previewQuery.isLoading && debouncedUrl && (
+
+
+ Loading PR preview...
+
+ )}
+
+ {previewError && debouncedUrl && !previewQuery.isLoading && (
+
+ Failed to load PR preview: {previewError.message}
+
+ )}
+
+ {isRepoMismatch && (
+
+
+
+ This PR belongs to a different repository than the rig. Cannot babysit.
+
+
+ )}
+
+ {isPrClosed && (
+
+
+
+ This PR is {preview.state}. Only open PRs can be babysat.
+
+
+ )}
+
+ {preview && preview.repo_matches && preview.state !== 'unknown' && !isRepoMismatch && (
+
+
+
+
+
+
+ {preview.title ?? 'Untitled PR'}
+
+
+
+ {preview.head_branch && (
+
+
+ {preview.head_branch}
+
+ )}
+ {preview.head_branch && preview.base_branch && →}
+ {preview.base_branch && {preview.base_branch}}
+
+
+
+ {preview.state}
+
+
+
+
+ View Pull Request
+
+
+ )}
+
+
+
+
{
+ setTitleOverride(e.target.value);
+ setUserEditedTitle(true);
+ }}
+ placeholder={defaultTitle || 'Babysit:
'}
+ className="border-white/10 bg-black/25"
+ />
+
+
+
+
+
+
+
+
+
+
+
+