Skip to content

v0.6.2 — actually fix the picker + regression tests

Choose a tag to compare

@colinc86 colinc86 released this 22 Apr 02:14
· 20 commits to main since this release

Sorry — v0.6.1 only half-fixed the picker regression. The auto-advance
short-circuit was still there, and it fired precisely when a freshly-
bootstrapped machine joined a single-profile repo. So machine #2+
setups still silently joined "default" instead of showing the picker.

v0.6.2 removes the auto-advance entirely — the picker always renders,
always asks. One keystroke of friction on the very first machine is
the right price for not silently mis-routing the second.

Regression tests

Two new tests in internal/tui — the first TUI-package tests in this
codebase. Both were written after the fix and verified by
re-introducing the bug to prove they catch it.

  • TestProfilePickerNeverAutoAdvances — constructs the picker
    across four configurations (single default with/without active
    profile set, multiple profiles with/without active). Asserts
    Init() returns nil (no auto-finish Cmd) AND View() contains
    the "create a new profile" affordance. With the v0.6.0/v0.6.1 bug
    in place, the single-profile subtests fail with "picker Init
    returned a non-nil Cmd; user may never see the picker."

  • TestBootstrapWizardSuccessTransitionsToProfilePicker — drives
    the wizard to stepDone + enter, walks the returned tea.Sequence
    via reflection (the internal message type is unexported but it's a
    named []Cmd), and asserts the switchTo target is a
    *profilePickerModel. Swapping the destination back to
    newSyncPreview makes the test fail with the precise error: "got
    *tui.syncPreviewModel" — catching the shape of the v0.6.0
    regression directly.

Going forward, any change to the bootstrap → picker → sync handoff
has to pass these tests before it can ship, so "I moved the target
and didn't notice" becomes a compile-time / test-time failure instead
of a you-hit-it-on-machine-#2 failure.

What to do on your machine

curl -fsSL -H "Authorization: Bearer $(gh auth token)" \
  https://raw.githubusercontent.com/colinc86/ccsync/main/scripts/install.sh | bash
ccsync uninstall --yes    # clear the bad state
# re-run ccsync and the picker will now show properly

(uninstall removes ~/.ccsync + keychain, not ~/.claude — your
local setup is safe.)