[PR #10107] feat (app): Add Extensive Project Support with GitHub Integration #13336

Closed
opened 2026-02-16 18:18:12 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10107

State: closed
Merged: No


Summary

This PR implements comprehensive project support through a provider-based architecture, enabling users to work with projects from multiple sources. The initial implementation focuses on GitHub integration while establishing the foundation for additional providers. Fixes #10104

Key Features Added

🏗️ Provider-Based Architecture

  • Provider abstraction system: Unified interface for different project sources
  • Extensible provider registry: Easy to add new project providers
  • Provider-specific UI components: Custom interfaces for different provider types

🔐 GitHub Provider (Primary Implementation)

  • Repository browsing: Direct access to GitHub repositories with search and pagination
  • Secure authentication: Support for both classic and fine-grained GitHub tokens
  • Branch management: Select branches with protection status indicators
  • Automatic cloning: Streamlined repository setup with working branch creation
  • Project metadata tracking: Store GitHub-specific project information and PR data

📁 Enhanced Local Project Support

  • Unified project selection: Consolidated directory and provider selection
  • Improved file operations: Enhanced file search and directory listing APIs
  • Better navigation: Enhanced directory browsing with search capabilities

🎨 User Interface Enhancements

  • Redesigned project opening flow: Provider selection before project browsing
  • GitHub-specific dialogs: Repository selection, branch choosing, and authentication setup
  • Comprehensive internationalization: Support for all new features across languages
  • Git actions integration: Repository operations available in the prompt interface

Technical Implementation

Backend Changes:

  • Provider routes: New /github/* routes for GitHub operations
  • GitHub key management: Secure token storage with Zod validation
  • Enhanced file routes: Improved /search/file and /find/file endpoints
  • Git operations: GitHub API integration with Octokit

Frontend Changes:

  • Provider context system: GitHubProjectsProvider for project metadata management
  • Unified project dialogs: DialogSelectProject replacing DialogSelectDirectory
  • Provider-specific components: GitHub repository and branch selection UIs
  • Updated application structure: Provider providers integrated into app context

Security Implementation:

  • Encrypted token storage with restricted file permissions (0o600)
  • Token validation with proper error handling
  • Secure API communication with GitHub

Breaking Changes

  • DialogSelectDirectory component removed in favor of provider-based DialogSelectProject
  • File search API endpoint changed from find.files to search.files for consistency
  • Project opening flow now includes mandatory provider selection step

Future Extensibility

This implementation establishes the foundation for additional project providers:

  • GitLab integration: Similar API-based repository access
  • Bitbucket support: Atlassian repository integration
  • Cloud storage providers: AWS S3, Google Drive, etc.
  • Enterprise Git solutions: Self-hosted GitLab, Gitea, etc.
  • Archive/project imports: Support for ZIP files, exported projects

The provider architecture makes it straightforward to add new project sources while maintaining a consistent user experience.

Testing

Comprehensive error handling covers:

  • Authentication failures: Invalid or expired tokens
  • Network issues: Connectivity problems and API rate limits
  • Repository access: Permission and visibility restrictions
  • Git operations: Clone failures and branch conflicts
  • File system operations: Permission and disk space issues

All new UI components include full internationalization support and responsive design.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10107 **State:** closed **Merged:** No --- ### Summary This PR implements comprehensive project support through a provider-based architecture, enabling users to work with projects from multiple sources. The initial implementation focuses on GitHub integration while establishing the foundation for additional providers. Fixes #10104 ### Key Features Added **🏗️ Provider-Based Architecture** - Provider abstraction system: Unified interface for different project sources - Extensible provider registry: Easy to add new project providers - Provider-specific UI components: Custom interfaces for different provider types **🔐 GitHub Provider (Primary Implementation)** - Repository browsing: Direct access to GitHub repositories with search and pagination - Secure authentication: Support for both classic and fine-grained GitHub tokens - Branch management: Select branches with protection status indicators - Automatic cloning: Streamlined repository setup with working branch creation - Project metadata tracking: Store GitHub-specific project information and PR data **📁 Enhanced Local Project Support** - Unified project selection: Consolidated directory and provider selection - Improved file operations: Enhanced file search and directory listing APIs - Better navigation: Enhanced directory browsing with search capabilities **🎨 User Interface Enhancements** - Redesigned project opening flow: Provider selection before project browsing - GitHub-specific dialogs: Repository selection, branch choosing, and authentication setup - Comprehensive internationalization: Support for all new features across languages - Git actions integration: Repository operations available in the prompt interface ### Technical Implementation **Backend Changes:** - Provider routes: New `/github/*` routes for GitHub operations - GitHub key management: Secure token storage with Zod validation - Enhanced file routes: Improved `/search/file` and `/find/file` endpoints - Git operations: GitHub API integration with Octokit **Frontend Changes:** - Provider context system: `GitHubProjectsProvider` for project metadata management - Unified project dialogs: `DialogSelectProject` replacing `DialogSelectDirectory` - Provider-specific components: GitHub repository and branch selection UIs - Updated application structure: Provider providers integrated into app context **Security Implementation:** - Encrypted token storage with restricted file permissions (0o600) - Token validation with proper error handling - Secure API communication with GitHub ### Breaking Changes - `DialogSelectDirectory` component removed in favor of provider-based `DialogSelectProject` - File search API endpoint changed from `find.files` to `search.files` for consistency - Project opening flow now includes mandatory provider selection step ### Future Extensibility This implementation establishes the foundation for additional project providers: - **GitLab integration**: Similar API-based repository access - **Bitbucket support**: Atlassian repository integration - **Cloud storage providers**: AWS S3, Google Drive, etc. - **Enterprise Git solutions**: Self-hosted GitLab, Gitea, etc. - **Archive/project imports**: Support for ZIP files, exported projects The provider architecture makes it straightforward to add new project sources while maintaining a consistent user experience. ### Testing Comprehensive error handling covers: - **Authentication failures**: Invalid or expired tokens - **Network issues**: Connectivity problems and API rate limits - **Repository access**: Permission and visibility restrictions - **Git operations**: Clone failures and branch conflicts - **File system operations**: Permission and disk space issues All new UI components include full internationalization support and responsive design.
yindo added the pull-request label 2026-02-16 18:18:12 -05:00
yindo closed this issue 2026-02-16 18:18:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13336