Mirror Creation Progress Steps

okay so we will tweak the mirror creation experience a bit. see this:
17:24:00 $ ENTIRE_DEBUG=1 entire repo mirror create https://github.com/entirehq/entiredb aws-ap-southeast-2.entire.io ✓ Cloning entirehq/entiredb into aws-ap-southeast-2.entire.io Mirror already exists (01KWBMKFNK201QN18BXW3MSHS4) entire://aws-ap-southeast-2.entire.io/gh/entirehq/entiredb
Clone it: git clone entire://aws-ap-southeast-2.entire.io/gh/entirehq/entiredb
what i want is to clearly separate the phases of "CreateMirror" (i.e. placement, which finishes in <15s), and "cloning" which is when we're polling for the mirror's status to become "ready".
The first spinner should be something like "Placing mirror .. into .." which then gets a checkmark, followed by "Cloning ..." as before. Or just short-circuit and show clone instructions if it's already 'ready'
Done. Two-phase progress now separates placement from cloning in the one-shot entire repo mirror create <url> <cluster> path.
What changed (cmd/entire/cli/repo_mirror.go):
- Added
onCreatedcallback tocreateAndAwaitMirror, fired right afterCreateMirrorsucceeds — the seam between the fast placement and the slow clone poll. - One-shot RunE now shows
✓ Placing mirror owner/repo into cluster(the <15sCreateMirrorcall), then a separateCloning ...spinner for the readiness poll. - Already-ready mirrors short-circuit for free: the first poll returns
readyfaster than the spinner's 250ms initial delay, so theCloningline never paints — you jump straight from the placement checkmark to the clone instructions.
New flow examples:
- Fresh:
✓ Placing...→Cloning...(spins) →✓→ clone instructions - Already ready:
✓ Placing...→ clone instructions (no cloning spinner) - Create fails: placement line erased, error surfaces as before
Tradeoffs:
- Wizard (
repo mirror createno-args) passesnilforonCreated— unchanged; its multi-line progress already renderscreating→processing→readyper mirror, so the placement/clone split is less useful there. --no-waitand empty upstreams skip the Cloning spinner entirely (nothing to await).
Lint clean, mirror tests pass. Not committed (per your workflow).
- let's say "mirror exists" rather than "already exists"
- add one newline before "Mirror ..." for breathing room:
✓ Placing mirror entireio/cli into aws-ap-southeast-2.entire.io ✓ Cloning entireio/cli into aws-ap-southeast-2.entire.io Mirror already exists (01KWEE1WHJ5CRZFM497WNKJPCK) entire://aws-ap-southeast-2.entire.io/gh/entireio/cli
Clone it: git clone entire://aws-ap-southeast-2.entire.io/gh/entireio/cli
Done. Both tweaks applied in reportOneShotMirror:
Mirror already exists→Mirror exists- Leading
\nbefore both theMirror existsandRegistered mirrorlines for breathing room after the spinner checkmarks.
Build + mirror tests pass.
Done. https://github.com/entireio/cli/pull/1587
- Committed, lint clean, pushed
elegant-marinating-widget. - PR created against
entireio/climain(had to pass--repo/--headexplicitly sinceoriginis anentire://remote, not a GitHub host).