- Remove unused imports (Badge, PullRequestCheck)
- Fix React Hook dependency warnings by using useCallback
- Replace 'any' types with proper TypeScript interfaces
- Fix unused variable errors by prefixing with underscore
- Remove placeholder comments
- Consolidate duplicate type definitions at module level
- Add proper type definitions for API responses
- Fix const vs let issues
- Implement NostrGitProvider following GitHostProvider interface
- Support nostr:// URL format (nostr://<pubkey>/<repo-id>)
- Create patches (kind 1617) as Nostr events per NIP-34
- Unified PR dialog works for GitHub, GitLab, and Nostr git
- Auto-detect platform and adapt UI (PR vs Patch terminology)
- No forking/credentials needed for Nostr - uses logged-in signer
- Publish patches to repository's designated relays
- Update detection logic to recognize Nostr git URLs
- Show "Patches" card for Nostr repos in main Git dialog
- Remove duplicate "Create Nostr Patch" button
- Add comprehensive NOSTR_GIT.md documentation
The UI flow is now consistent across all git platforms:
1. Click "Create Pull Request" (or "Create Patch" for Nostr)
2. Fill in title and description in the same form
3. System handles platform-specific logic behind the scenes
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.