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
Fixed ReferenceError caused by missing usePullRequests hook file
and missing imports in GitDialog component.
Errors fixed:
- ReferenceError: isLoadingPRs is not defined
- ReferenceError: pullRequests is not defined
Changes:
- Recreated src/hooks/usePullRequests.ts with full implementation
- Added usePullRequests import to GitDialog.tsx
- Added hook call to fetch pull requests data
- Fetches PRs from GitHub/GitLab APIs
- Filters to show only current user's PRs
The Pull Requests section now loads and displays correctly!
Enhanced the existing Git management dialog and PR system to support upstream contributions through automatic forking:
**Key Changes:**
- Extended PullRequestDialog to detect push permissions and auto-fork when needed
- Added permission checking via GitHub/GitLab APIs
- Created PullRequestForm component for tab-based PR creation
- Added "Pull Request" tab to GitManagementDialog
- Automatic fork creation and management when user lacks push access
- Cross-fork PR support with proper head ref formatting (owner:branch)
- UI indicators showing fork status and repository relationships
**Fork Workflow:**
1. Check if user has push permissions to upstream repo
2. If no access, check if fork exists or create one
3. Configure PR with proper head ref (fork_owner:branch)
4. Create PR from fork to upstream automatically
5. Show clear UI indicating fork-based contribution
**Integration:**
- Reuses existing Git credentials system
- Works with current GitHub/GitLab authentication
- Fits into existing branch management workflow
- No duplicate components - extends what's already there
This enables non-technical users to contribute to upstream projects through the existing Repository management UI without understanding forks or Git internals.
Implements a complete workflow for non-technical users to contribute to open source projects:
**New Features:**
- ContributeButton component shows "Propose Changes" when project has upstream remote
- ContributeWizard guides users through 5-step contribution process
- PRStatusBadge shows existing PR status for current branch
- Automatic forking when user lacks push permissions
- OAuth and PAT authentication for GitHub, GitLab, Gitea/Codeberg
- Pre-submission validation (type check + build)
- Automatic remote configuration (upstream/origin)
- PR creation and updates via Git host APIs
**Git Host Abstraction:**
- GitHostProvider interface for platform-agnostic operations
- GitHubProvider with GitHub REST API v3
- GitLabProvider with GitLab REST API v4
- GiteaProvider for Gitea/Forgejo/Codeberg instances
- Auto-detection of Git host from repository URL
**Components:**
- components/contribute/ContributeButton.tsx - Entry point button
- components/contribute/ContributeWizard.tsx - Multi-step wizard UI
- components/contribute/AuthStep.tsx - Authentication flow
- components/contribute/DiffView.tsx - Changed files review
- components/contribute/PRStatusBadge.tsx - PR status display
**Hooks:**
- hooks/useContribute.ts - Main contribution workflow orchestration
**Context Updates:**
- Extended GitSettings to include hostTokens for API authentication
- Updated GitHubOAuth to save tokens in both formats
**Integration:**
- Added to ProjectView header (mobile and desktop)
- Integrated with existing Git workflow
- Works with existing OAuth callback system
**Documentation:**
- CONTRIBUTING_GUIDE.md with user guide and developer docs
The system handles the entire fork → branch → commit → push → PR flow transparently, making open source contribution accessible to users without Git knowledge.
- Add useAppSubmissions hook to query Nostr events (kind 31733)
- Create AppShowcaseCard component for displaying individual apps
- Add AppShowcase component with search, filtering, and categorization
- Include featured apps, Halloween hackathon apps, templates, and approved apps sections
- Add shuffleArray utility function for randomizing app display order
- Integrate showcase into Index page underneath the prompt text box
- Support moderation controls for authorized users
- Add responsive design with mobile-friendly tag filtering
- Include empty states with relay selector for no results
- Remove unused useErrorDetection.ts hook (154 lines)
- Remove separate console.ts type file, consolidate into ReadConsoleMessagesTool
- Simplify console message state management in PreviewPane
- Remove redundant console clearing logic in ProjectView
- Streamline copy functionality in console UI
- Clean up imports and formatting
Preserves all functionality while reducing code complexity and maintenance burden.