Skip to content

feat(tui): put every command in the wizard, not just new - #13

Merged
ttncode merged 1 commit into
mainfrom
feat/wizard-offers-every-command
Sep 11, 2026
Merged

ttncode merged 1 commit into
mainfrom
feat/wizard-offers-every-command

Conversation

@ttncode

@ttncode ttncode commented Sep 11, 2026

Copy link
Copy Markdown
Owner

What this changes

A bare scaffold walked to a scaffold new command and nothing else. The two commands added since — update and publish — existed only for someone who already knew to type them, and the wizard is how a first-time user finds a command in the first place.

It now asks what to do first:

? What do you want to do?
    new (generate a project)
  » update (bring this project up to this toolbox)
    publish (create its GitHub repository and apply its settings)

update and publish both act on a project that already exists, so outside one they are not offered at all — the same reasoning docs/tour/09-wizard.md already gives for never asking a web project about a database: a refusal the user can walk into is worse than one they cannot. With one action to choose from the screen is skipped, because a menu with one answer asks nothing and costs a keystroke.

publish asks its one real question (visibility, private first, matching what the flag defaults to unset). update asks nothing — it takes only a directory, and the wizard already knows which.

Two smaller things, both while passing:

  • is_scaffold_project comes out of scaffold. The same two-line check was written out three times and the wizard needed a fourth.
  • The single y/N gate is now one function rather than three copies.

How it was verified

  • Five pure-function tests: what the menu holds inside and outside a project, that every action carries a description, that private is offered first, and that the answer column still fits the widest question — measured from the prompts, so a new screen widens the column rather than overflowing it.
  • One test asserts every action the menu offers is one scaffold's own main has a case for, so the menu and the dispatch cannot drift. This repository has shipped a second copy of a list that then drifted twice (scripts/adapter-matrix.sh exists because of the first).
  • A pty test drives the real screens from inside a project, reaches scaffold publish --public, and asserts the name prompt — which belongs to new — was never shown.
  • One existing pty test needed relaxing: it matched the collapsed answer line with two literal spaces, and the new prompt is one character wider, so the answer column moved. It now matches a run of spaces; it is about there being exactly one collapsed line, not about the column's width.

Checklist

  • mise run lint passes
  • mise run test-runner passes
  • New behaviour has a test that fails without the change
  • Docs that describe changed behaviour were updated in the same commit
  • No unrelated changes

A bare `scaffold` walked to a `scaffold new` command and nothing else, so the
two commands added since — update and publish — existed only for someone who
already knew to type them. The wizard is how a first-time user finds a
command; a command missing from it is a command they will not find.

It now asks what to do first. update and publish act on a project that already
exists, so outside one they are not offered at all — the same reason a web
project is never asked about a database. With one action to choose from the
screen is skipped: a menu with one answer asks nothing.

A test asserts every action the menu offers is one scaffold's own dispatch
accepts, so the menu and the case statement cannot drift.

is_scaffold_project comes out of `scaffold` while passing: the same two-line
check had been written out three times, and the wizard needed a fourth.
@ttncode
ttncode merged commit fe41871 into main Sep 11, 2026
18 checks passed
@ttncode
ttncode deleted the feat/wizard-offers-every-command branch September 11, 2026 15:35
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.

1 participant