From 7f958275a9da60d2d778e48cf0ad8327d5cb9132 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Tue, 14 Oct 2025 23:28:22 -0500 Subject: [PATCH] Restore Pull Requests section with open PR list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restored the Pull Requests card that displays open pull requests from GitHub/GitLab. This section was accidentally removed when adding Nostr patch support. Changes: - Restored Pull Requests card with PR list display - Shows loading state while fetching PRs - Lists all open PRs with title, number, author, and branches - Includes "View PR" button with ExternalLink icon - Shows "Create Pull Request" button at bottom - Only displays for non-Nostr remotes (GitHub/GitLab) - Added ExternalLink icon import Now users can see their open PRs again! 🎉 --- src/components/GitDialog.tsx | 71 ++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/src/components/GitDialog.tsx b/src/components/GitDialog.tsx index 32ac9e9a..c0c3462e 100644 --- a/src/components/GitDialog.tsx +++ b/src/components/GitDialog.tsx @@ -45,6 +45,7 @@ import { Save, Settings2, GitPullRequest, + ExternalLink, } from 'lucide-react'; import { useGitStatus } from '@/hooks/useGitStatus'; import { useGitSettings } from '@/hooks/useGitSettings'; @@ -953,6 +954,69 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog )} + {/* Pull Requests Card */} + {gitStatus?.isGitRepo && gitStatus.remotes.length > 0 && originUrl && !originUrl.startsWith('nostr://') && ( + + + Pull Requests + + Manage pull requests for this repository + + + + {/* Open Pull Requests List */} + {isLoadingPRs ? ( +
+ + Loading pull requests... +
+ ) : pullRequests && pullRequests.length > 0 ? ( +
+ {pullRequests.map((pr) => ( +
+ +
+
+
+

+ {pr.title} +

+

+ #{pr.number} by {pr.author} • {pr.sourceBranch} → {pr.targetBranch} +

+
+ +
+
+
+ ))} +
+ ) : ( +
+ You have no open pull requests +
+ )} + + {/* Create PR Button */} + +
+
+ )} + {/* Branch Operations */} {gitStatus?.isGitRepo && gitStatus.currentBranch && ( @@ -965,13 +1029,6 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog currentBranch={gitStatus.currentBranch} onMergeComplete={() => refetchGitStatus()} /> - {gitStatus.remotes.length > 0 && originUrl && !originUrl.startsWith('nostr://') && ( - - )} {gitStatus.remotes.length > 0 && originUrl?.startsWith('nostr://') && (