# Fix region picker clamped to one visible option

`65d2dee`→[main](/content/gh/entireio/cli/commits/main/index.html)·

toothbrush·3w ago·1 file·+14 added/-0 removed

huh sizes an unset multi-select height to (rendered option lines − title/
description rows), so a short list (3 regions) collapsed to ~1 visible row while
a long repo list looked fine. Set an explicit Height = option count + header
slack on both pickers so every option is visible (still scrolls past the
terminal). Region picker is no longer stuck showing one option at a time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

## Sessions

6e993f6cd3aaView transcript

[?\
Interactive Repo Mirror Onboarding WizardClaude Code·2 steps](/content/gh/entireio/cli/session/b1f77cad-1b19-4ba8-bc01-a412c9c54e2a#timeline-6e993f6cd3aa/index.html)

## Changes

1

- cmd/entire/cli

- Mrepo_mirror_create_wizard.go+14

```
135 unmodified lines

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
197 unmodified lines

351
352
353
354
355
356
357
33 unmodified lines

391
392
393
394
395
396
397

135 unmodified lines

return out
}

// multiSelectHeight returns an explicit huh multi-select Height that keeps every
// option visible. huh auto-sizes an unset height to (rendered option lines −
// title/description rows), which collapses to ~1 visible row for short lists
// (e.g. 3 regions vs. a long repo list) — the cause of the region picker
// appearing clamped to one option. We set it to the option count plus slack for
// the title + (possibly wrapped) description so the whole list shows; huh still
// scrolls if the list outgrows the terminal.
func multiSelectHeight(n int) int {
	const headerSlack = 3 // title (1) + description (1–2 when wrapped)
	return n + headerSlack
}

// clusterChoices maps regions to multi-select options (value = bare host),
// listing every cluster, and returns the host(s) that should start checked:
// the default cluster for the caller's jurisdiction. is_default is
197 unmodified lines

Title("Select repos to mirror").
			Description("Space to select, enter to confirm.").
			Options(options...).
			Height(multiSelectHeight(len(options))).
			Validate(func(s []string) error {
				if len(s) == 0 {
					return errors.New("select at least one repo")
				}
33 unmodified lines

Title("Select regions to mirror into").
				Description("Each repo is mirrored into every selected region.").
				Options(opts...).
				Height(multiSelectHeight(len(opts))).
				Validate(func(s []string) error {
					if len(s) == 0 {
						return errors.New("select at least one region")
					}
```
