feat(desktop): pick GitHub repositories to clone
Merged
TH
2mo ago+433+433+012345678901234567890123456789-1-1-0123456789
Summary
- add a searchable picker for repositories available through the active host's GitHub CLI login
- populate the clone URL and project name when a repository is selected
- retain manual URL cloning and show the selected repository in the picker
Imgs
Testing
- bun test packages/host-service/src/trpc/router/project/utils/github-repositories.test.ts
- bunx @biomejs/biome@2.4.2 check (changed files)
- bun run --cwd apps/desktop typecheck
Summary by cubic
Adds a searchable repository picker to the New Project modal so users can clone a GitHub repository from the active host's gh login instead of typing the URL manually.
New Features
- Selecting a repository fills in the clone URL and project name; editing the URL manually clears the selection.
- Manual URL and local path cloning still works as before.
- The list includes repositories the logged-in user owns, collaborates on, or has access to as an organization member, sorted by most recently updated.
- Listing repositories requires
gh auth loginon the host; the picker shows an error when it's missing.
Bug Fixes
- Repository listing now fetches page by page and only the fields the picker needs, so hosts with many repositories no longer fail from exceeding the output buffer.
Summary by CodeRabbit
New Features
-
New Features
- Added a GitHub repository picker when creating projects for V2 Cloud users.
- Selecting a repository automatically fills in its clone URL and project name.
- Repository lists support search, loading states, errors, and empty results.
- Added retrieval of all available repositories through the connected GitHub host, with authentication guidance when needed.
-
Bug Fixes
- Manually editing the clone URL or resetting the modal now clears the selected repository.