Skip to content

GitHub desktop like import feature #454

@jmcte

Description

@jmcte
## Title
Add remote Git URL workspace import (clone to local path) like GitHub Desktop

## Summary
Add a new feature that allows users to import a workspace by providing a remote Git URL (`.git` URL), selecting a local destination folder, and having the app clone the repo locally before adding it as an active workspace.

## Problem
Current workspace onboarding only accepts local paths. Users must pre-clone repositories outside the app before adding them, unlike GitHub Desktop-style workflows.

## Requested Behavior
- Add a dedicated “Add Workspace from URL…” action (separate from existing local path add).
- Prompt for:
  - Remote Git URL (required)
  - Destination parent folder (required, directory picker)
  - Optional target folder name (defaults to repo slug/name)
- App clones the repo to the selected path and then registers the resulting local repo as a workspace.
- New workspace should become the active workspace on success.
- Keep current local path add flow unchanged.
- Reject cloning if target path already exists and is non-empty.
- Use existing system git credential flow (SSH keys / credential helper), no new in-app token fields.
- Surface clear errors for invalid URL, missing destination, permission/network/auth failures, and destination conflicts.

## Acceptance Criteria
- [ ] New Tauri command exists: `add_workspace_from_git_url(url, destination_path, codex_bin?)` (or equivalent naming).
- [ ] Shared workspace core supports remote clone + persistence path.
- [ ] App command + daemon RPC surfaces updated for parity.
- [ ] New frontend service method added and used by workspace action.
- [ ] New UI prompt/modal for URL import.
- [ ] Existing local add action continues to work unchanged.
- [ ] Tests added/updated:
  - [ ] frontend hook/action prompt validation and API invocation
  - [ ] workspace add path + new remote add behavior
  - [ ] backend/core validation for URL/path and destination conflict
- [ ] Manual check: importing `https://github.com/...git` with selected folder creates local repo and adds workspace.

## Tech Notes
- Reuse existing clone-related patterns where available (`run_git_command`, existing clone/core workspace patterns, modal/hook style).
- Menu integration: add new menu item for URL import and map to new modal/action.
- Keep API and event contracts in sync with frontend IPC expectations.

## Out of Scope
- No built-in credential manager UI in v1.
- No bulk remote import.
- No auto-rename collision fallback (reject and ask user).

## Suggested Labels
feature, workspace, tauri, frontend, backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions