Skip to content

feat(app): add clone repository from URL to new project dialog#29836

Open
Ekaanth wants to merge 2 commits into
anomalyco:devfrom
Ekaanth:feat/project-clone-url
Open

feat(app): add clone repository from URL to new project dialog#29836
Ekaanth wants to merge 2 commits into
anomalyco:devfrom
Ekaanth:feat/project-clone-url

Conversation

@Ekaanth
Copy link
Copy Markdown

@Ekaanth Ekaanth commented May 29, 2026

Issue for this PR

#29723

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds the ability to clone a Git repository from a URL directly within the new project dialog, instead of only supporting opening a local folder.

Frontend (packages/app):

  • New DialogNewProject component with a tabbed interface (GitHub URL / Local folder)
  • GitHub tab: URL input field, destination directory picker, and clone button with loading/error states
  • Folder tab: existing folder-open flow preserved as a tab

Backend (packages/opencode):

  • Project.clone effect that runs git clone with the given URL and destination, validates git is installed, derives the repo name from the URL, and checks the target directory doesn't already exist
  • CloneError tagged error for clone failures
  • New POST /project/clone HTTP endpoint that delegates to Project.clone

i18n: Added translation keys for all 19 supported languages for the new dialog labels (URL label, destination, clone button, cloning state, error messages, folder tab text).

How did you verify your code works?

  • Manually tested the dialog UI, switching between GitHub and Folder tabs
  • Tested cloning a public repository via URL and confirming the session opens in the cloned directory
  • Verified error handling: empty URL, empty destination, already-existing target directory, and invalid URL all surface appropriate error messages

Screenshots / recordings

Screen.Recording.2026-05-29.at.10.33.55.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Ekaanth Ekaanth requested a review from adamdotdevin as a code owner May 29, 2026 05:06
@github-actions github-actions Bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title Add clone repository from URL to new project dialog doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@Ekaanth Ekaanth changed the title Add clone repository from URL to new project dialog feat(app): add clone repository from URL to new project dialog May 29, 2026
@github-actions github-actions Bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant