Welcome: Clone Repository quick action#166
Merged
kirich1409 merged 1 commit intomainfrom Apr 17, 2026
Merged
Conversation
Add a third Quick Action on the Welcome screen that opens a sheet to clone a git repository. URL field + destination folder (NSOpenPanel) + Clone/Cancel buttons with a progress indicator while running and an alert on failure. Clone runs via Process on /usr/bin/git with user's existing credentials (SSH/credential helper); task cancellation terminates the subprocess. On success the cloned folder is added to recent projects and opened via the existing projectSelected delegate. Closes #149 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a “Clone Repository” quick action to the Welcome screen, wiring a new sheet-driven clone flow into WelcomeFeature using a cancellable Process-based git runner so successful clones are added to the project repository and opened via the existing delegate path.
Changes:
- Introduces
GitCloneClientdependency +CloneErrorfor running/usr/bin/git clonewith task cancellation support. - Adds
CloneRepositorySheetUI and Welcome screen button/sheet presentation. - Extends
WelcomeFeaturewith transient clone sub-state/actions and adds unit tests for the new flow.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MacApp/Relay/Welcome/GitCloneClient.swift | New dependency wrapping git clone via Process, with cancellation support and error classification. |
| MacApp/Relay/Welcome/CloneRepositorySheet.swift | New SwiftUI sheet for URL/destination inputs, progress display, and error alert. |
| MacApp/Relay/Welcome/WelcomeFeature.swift | Adds clone sub-state/actions, effect wiring, and cancellation handling. |
| MacApp/Relay/Welcome/WelcomeView.swift | Adds “Clone Repository…” quick action and presents the clone sheet. |
| MacApp/RelayTests/WelcomeFeatureTests.swift | Adds coverage for clone sheet state transitions and success/failure paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitCloneClientdependency wrappingProcesson/usr/bin/git. Task cancellation terminates the subprocess viawithTaskCancellationHandlerso TCA's.cancel(id:)aborts the clone.projectRepositoryand opened viadelegate(.projectSelected(URL))— no new routing plumbing.Files
MacApp/Relay/Welcome/GitCloneClient.swift(new) — dependency + liveProcess-based clone runner.MacApp/Relay/Welcome/CloneRepositorySheet.swift(new) — sheet content view.MacApp/Relay/Welcome/WelcomeFeature.swift— addsCloneStatesub-state, clone actions, cancellable effect.MacApp/Relay/Welcome/WelcomeView.swift— new Clone Repository button (Cmd+Shift+C) + sheet presentation.MacApp/RelayTests/WelcomeFeatureTests.swift— 13 new tests for state transitions and effect wiring.Test plan
cd MacApp && swiftlint lint --strict— 0 violations.xcodebuild build -project MacApp/Relay.xcodeproj -scheme Relay -destination 'platform=macOS,arch=arm64' CODE_SIGN_IDENTITY=-— BUILD SUCCEEDED.xcodebuild test ... -only-testing:RelayTests— all 33 unit tests pass (including 13 new clone tests).Pre-existing unrelated failures
RelayUITests (7 tests) fail on the local test runner — they are end-to-end UI tests that require a project to be open and are unrelated to this PR (no UI test files were touched).
Closes #149
🤖 Generated with Claude Code