Skip to content

Wizard: members and repos are confirmed on separate steps (#104) - #114

Merged
byte2pixel merged 5 commits into
mainfrom
members-and-repos-separate-steps
Sep 19, 2026
Merged

byte2pixel merged 5 commits into
mainfrom
members-and-repos-separate-steps

Conversation

@byte2pixel

Copy link
Copy Markdown
Owner

Closes #104. Plan: .claude/plans/members-and-repos-separate-steps.plan.md (PRD milestone 2). Lands after #108.

The wizard's review step was one scrolling list with the repos under the members, so on a team of any size the repos sat below the fold and enter saved the profile before they were ever seen.

What changed

  • internal/tui/wizard: the review step is two steps, Members · N of M included then Repos · N of M included, each with a footer naming the next step. Enter on the members lands on the repos, not on the name; esc walks back one step at a time. Enter on zero members is refused with keep at least one member; enter on zero repos warns once (no repos included: nothing will sync until you add some to config.yml · enter again to continue) and a second enter in a row goes on, since orgs often assign a team no repos and the README says to add them by hand. Archived repos still start unchecked. The Wizard imports only the first 100 orgs, teams, members and repos, and never says so #103 cut notice renders above whichever step's list was cut, in the team-list wording (Showing 1000 of 1437 members: the list was cut. ...).
  • internal/tui/components: the checklist moves out of overlays as an exported Checklist, unchanged in logic, with SetCursor, SetNote, Checked, Count, Len, and Cursor accessors. The member and repo pickers embed it; the wizard's two steps use it too, which gives them / search, a/n bulk toggles, and scrolling for the 250-member and 150-repo imports Wizard imports only the first 100 orgs, teams, members and repos, and never says so #103 made possible. The only picker test change is two lines reading Cursor() instead of the private field, which an embedded struct from another package cannot expose.
  • CHANGELOG, README ("Teams your way"), and the AGENTS.md architecture row for internal/tui/*.

TDD evidence (full report in .claude/tdd/members-and-repos-separate-steps.tdd.md, local)

Stage Commit Result
RED, checklist tests 5177a7a build failed: undefined: Checklist, NewChecklist
GREEN, checklist move ad60417 5 component tests pass; overlay and app suites pass untouched
RED, wizard tests 61e4b30 build failed: undefined: stepMembers, stepRepos, loadLists, toTeam
GREEN, two steps c2f7091 18 wizard tests pass; TestWizardRepoStepCannotBeSkipped is the PRD metric
Docs 93623ca CHANGELOG, README, AGENTS

Coverage: internal/tui/components 93.2%, internal/tui/overlays 92.4%, internal/tui/wizard 88.3%. golangci-lint run 0 issues, gofmt -l . clean. govulncheck exits 3 on the same four Go 1.26.5 standard-library advisories as #108, fixed in 1.26.6; nothing here touches them.

Known limits

  • The empty-repos warning line is 99 columns wide, so on a terminal narrower than about 100 columns the box overflows sideways.
  • The wizard was rendered at 100×24 and 100×30 through a fake doer (both steps, the warning, and a cut note fit in 21 rows, pinned by TestWizardListsFitTheTerminal), not driven by hand against a scratch config.

Checklist

  • go test ./... and golangci-lint run pass locally
  • User-visible changes have a CHANGELOG.md line under the unreleased version
  • New or changed metrics have golden tests in internal/metrics (no metrics changed)
  • UI changes were eyeballed against the seeded demo team (go run . seed): rendered with a fake doer only; m and R parity rests on the unchanged picker and app tests

)

RED: go test ./internal/tui/components -run Checklist fails to build,
undefined: Checklist, NewChecklist. The type is still the unexported
overlays.checklist.
Moved from overlays unchanged in logic; the pickers embed
components.Checklist and reach the cursor, note, and boxes through
SetCursor, SetNote, Checked, Count, and Cursor. GREEN: go test
./internal/tui/components ./internal/tui/overlays ./internal/tui/app
passes; the only test change is repopicker_test reading Cursor()
instead of the field.
RED: go test ./internal/tui/wizard fails to build: undefined
stepMembers, stepRepos, Model.loadLists, Model.toTeam, and the members
and repos checklists. The flows now expect two enters and a
Repos · N of M included heading before the name step.
The review step was one scrolling list with the repos below the fold,
so enter saved a profile before they were seen. It is now two stops,
each the checklist the app pickers use, headed by its count and with a
footer naming the next step. Enter on an empty members list is refused;
enter on an empty repos list warns once and goes on the second time. A
cut list is reported above the step it belongs to. GREEN: go test
./internal/tui/wizard -v passes all 18 tests; go test ./internal/tui/...
passes.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@byte2pixel
byte2pixel merged commit 04a01f1 into main Sep 19, 2026
6 checks passed
@byte2pixel
byte2pixel deleted the members-and-repos-separate-steps branch September 19, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wizard review step hides repos below the fold; enter saves before they are seen

2 participants