Implements three UX improvements (TODO #1–#3): - Back navigation: Esc returns to the previous input step. The Model keeps a history stack of input steps (advance/goBack helpers); action/wait steps are excluded via isInputStep so back never re-enters a side-effecting step. Form values are preserved. - Review step (StepReview): shows all collected config for confirmation before any file is written; Enter installs, Esc edits. - Retry vs. fix: transient failures (image pull, container run) offer "r: tentar novamente" instead of quitting; validation failures route back to the relevant form to correct the value. Adds nav_test.go for the history/navigation logic and updates README/CLAUDE/docs (incl. docs/TODO.md tracking the remaining ideas). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.4 KiB
TODO — UX / UI improvements
Backlog of usability and interface improvements for the installer TUI. Ordered by value-to-effort. Status: ☐ pending · ☑ done.
High value
-
☑ 1. Back navigation between steps. Maintain a history stack of input steps (forms + IP question + review) and bind
Escto go back. Action steps (download, generate, run) are not part of the stack and are not re-enterable via back. Form values are preserved because theFormSteps live on theModel. -
☑ 2. Review/summary step before running containers. Show all collected config (
StepReview) for confirmation beforeStepGenerateFile/StepRunDocker. Natural anchor for "go back and edit a section" viaEsc. -
☑ 3. Retry instead of quit on transient errors. Image pull / container run failures offer
r: tentar novamente(re-runs just that command) instead of throwing away the whole session. Validation errors (generate file) route back to the relevant form to fix the value.
Medium value
-
☐ 4. Center the layout (vertically + horizontally). Use
lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, body)— the Model already trackswidth/height. Caveat: everyviewXxx/form.Viewcurrently hardcodes a manual left pad (strings.Repeat(" ", padding)); to center cleanly, strip that and wrap the body in one padded/bordered box, thenPlaceit. Consider pinning the help footer to the bottom rather than centering it with the body. -
☐ 5. Inline field validation. Numeric validation currently happens only at file write time (
WriteConfigFile), far from input. Wiretextinput.Validateper field and render a red hint under invalid fields inform.go. -
☐ 6. Step indicator. Show "Etapa N / Total" or a breadcrumb in the header. Total is dynamic because the vproxy branch adds steps.
Low value / cosmetic
-
☐ 7. Replace the fake progress bar.
viewCheckDockeranimates a random-increment bar for an instantLookPathcheck, then waits for a keypress. Use a spinner that resolves immediately (or auto-advance on success). -
☐ 8. Bordered card +
bubbles/helpfooter. Wrap the body in a roundedlipglossborder and render the footer viabubbles/helpwith a proper key map and a?toggle. Pairs with #4. -
☐ 9. Password reveal toggle (
ctrl+r) on the login password field.