feat(mirror): cluster picker for interactive one-shot mirror create#1645
Merged
Conversation
When `repo mirror create <github-url>` is run on a terminal without a [cluster-host], fetch the control plane's cluster catalog and offer it as a single-select — pre-selecting the caller's jurisdiction default, and skipping the prompt entirely when only one cluster exists (the same prompt-only-when-there-is-a-choice shape as `repo clone`). Non-interactive invocations keep the fixed defaultClusterHost so scripts stay stable and offline-resolvable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Entire-Checkpoint: 573bbdeb391d
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores interactive cluster selection for the one-shot entire repo mirror create <github-url> flow when [cluster-host] is omitted, matching the “prompt only when there’s a choice” behavior used elsewhere (while preserving the stable non-interactive default for scripts).
Changes:
- Added
resolveOneShotClusterHost/pickOneClusterto prompt for a cluster in interactive terminals (auto-selecting when only one cluster exists). - Updated
repo mirror createhelp text and argument handling to use the new interactive cluster resolution when appropriate. - Added a unit test to lock in the non-interactive behavior (no catalog lookup; fixed
defaultClusterHost).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/repo_mirror.go | Routes one-shot create’s omitted [cluster-host] through interactive cluster resolution; updates help text. |
| cmd/entire/cli/repo_mirror_test.go | Adds a regression test ensuring non-interactive runs keep the fixed default cluster host without dialing the control plane. |
| cmd/entire/cli/repo_mirror_create_wizard.go | Implements interactive one-shot cluster resolution via catalog lookup + single-select picker. |
Match repo clone's picker: an off-list or zero-value selection now exits as a clean cancel instead of surfacing a misleading "invalid [cluster-host]" error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Entire-Checkpoint: 0a9d965f7a2a
Contributor
Author
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit cbffb79. Configure here.
jagregory
approved these changes
Jul 6, 2026
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.
https://entire.io/gh/entireio/cli/trails/764
entire repo mirror create owner/repoon a terminal now offers the available clusters as a picker when[cluster-host]is omitted — pre-selecting your jurisdiction's default, and skipping the prompt when only one cluster exists (same shape asentire repo clone).Non-interactive runs are unchanged: fixed default
aws-us-east-2.entire.io, no network lookup, so scripts stay stable.Restores the interactive half of what #1519 walked back, without reintroducing catalog guessing for scripts.
🤖 Generated with Claude Code
Note
Low Risk
CLI UX and cluster selection only; explicit cluster args and non-interactive defaults are preserved, with no auth or mirror API behavior changes.
Overview
When
entire repo mirror create <github-url>runs without[cluster-host], an interactive terminal now loads clusters from the control plane and picks one (single-select, jurisdiction default pre-selected, prompt skipped if only one cluster)—aligned withentire repo clone.Non-interactive use is unchanged:
aws-us-east-2.entire.iowith no catalog fetch. Explicit[cluster-host]still wins.resolveOneShotClusterHost/pickOneClusterhandle fetch, auto-pick, and cancel guards; a test locks the script path.Reviewed by Cursor Bugbot for commit cbffb79. Configure here.