mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Add Nostr patch display and enhanced debugging for git operations
Extended usePullRequests hook to fetch and display Nostr patches (kind 1617): - Parse nostr:// URLs with npub/hex pubkey support - Query patches created by current user using #a tag filter - Convert patch events to PullRequest format for unified display - Extract source/target branches from patch content Updated GitDialog to show Nostr patches: - Display "Your Patches" section for Nostr repos (like GitHub/GitLab PRs) - Show patch title, number (first 8 chars of event ID), and branches - Remove external link button for Nostr (event references aren't clickable URLs) Enhanced debugging for troubleshooting patch discovery issues: - Log repository announcement query filter and results - Log event coordinates and relay information - Provide verification instructions after publishing announcements - Warn when repository announcement not found with helpful context This helps diagnose why patches aren't showing in NostrHub - likely due to: 1. Repository announcement not published to same relay 2. Different relays between Shakespeare and NostrHub 3. Relay propagation delays
This commit is contained in:
1 parent
166c2eb72c
commit
37fb176ea1
4 files changed
+167
-22
No files matched your search
@@ -980,9 +980,11 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
|
||||
Loading pull requests...
|
||||
</div>
|
||||
)}
|
||||
{!originUrl.startsWith('nostr://') && !isLoadingPRs && pullRequests && pullRequests.length > 0 && (
|
||||
{!isLoadingPRs && pullRequests && pullRequests.length > 0 && (
|
||||
<div className="space-y-2 mb-3">
|
||||
<div className="text-xs font-medium text-muted-foreground mb-2">Your Open PRs</div>
|
||||
<div className="text-xs font-medium text-muted-foreground mb-2">
|
||||
{originUrl.startsWith('nostr://') ? 'Your Patches' : 'Your Open PRs'}
|
||||
</div>
|
||||
{pullRequests.map((pr) => (
|
||||
<div
|
||||
key={pr.id}
|
||||
@@ -996,17 +998,19 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
|
||||
{pr.title}
|
||||
</h4>
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
#{pr.number} by {pr.author} • {pr.sourceBranch} → {pr.targetBranch}
|
||||
#{pr.number} • {pr.sourceBranch} → {pr.targetBranch}
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-8 shrink-0"
|
||||
onClick={() => window.open(pr.url, '_blank')}
|
||||
>
|
||||
<ExternalLink className="h-3 w-3" />
|
||||
</Button>
|
||||
{!originUrl.startsWith('nostr://') && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-8 shrink-0"
|
||||
onClick={() => window.open(pr.url, '_blank')}
|
||||
>
|
||||
<ExternalLink className="h-3 w-3" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user