on main help sign in
refactor: rename `uiConfigure` to `uiOnboarding`
commit5454a2ed119bd5baad60853665c7315aa97255b5 authorAndrey Nering <andreynering@users.noreply.github.com> dateTue 20 Jan 2026, 14:35 (9 months ago) parent88d10d1
1 file changed+9−12
internal/ui/model/ui.go+9−12
internal/ui/model/ui.go+9−12
@@ -77,7 +77,7 @@ type uiState uint8
7777
7878// Possible uiState values.
7979const (
80− uiConfigure uiState = iota
80+ uiOnboarding uiState = iota
8181 uiInitialize
8282 uiLanding
8383 uiChat
@@ -258,7 +258,7 @@ func New(com *common.Common) *UI {
258258 dialog: dialog.NewOverlay(),
259259 keyMap: keyMap,
260260 focus: uiFocusNone,
261− state: uiConfigure,
261+ state: uiOnboarding,
262262 textarea: ta,
263263 chat: ch,
264264 completions: comp,
@@ -273,13 +273,10 @@ func New(com *common.Common) *UI {
273273 // set onboarding state defaults
274274 ui.onboarding.yesInitializeSelected = true
275275
276− // If no provider is configured show the user the provider list
277276 if !com.Config().IsConfigured() {
278− ui.state = uiConfigure
279− // if the project needs initialization show the user the question
277+ ui.state = uiOnboarding
280278 } else if n, _ := config.ProjectNeedsInitialization(); n {
281279 ui.state = uiInitialize
282− // otherwise go to the landing UI
283280 } else {
284281 ui.state = uiLanding
285282 ui.focus = uiFocusEditor
@@ -1392,7 +1389,7 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
13921389 }
13931390
13941391 switch m.state {
1395− case uiConfigure:
1392+ case uiOnboarding:
13961393 return tea.Batch(cmds...)
13971394 case uiInitialize:
13981395 cmds = append(cmds, m.updateInitializeView(msg)...)
@@ -1647,14 +1644,14 @@ func (m *UI) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
16471644 screen.Clear(scr)
16481645
16491646 switch m.state {
1650− case uiConfigure:
1647+ case uiOnboarding:
16511648 header := uv.NewStyledString(m.header)
16521649 header.Draw(scr, layout.header)
16531650
16541651 mainView := lipgloss.NewStyle().Width(layout.main.Dx()).
16551652 Height(layout.main.Dy()).
16561653 Background(lipgloss.ANSIColor(rand.Intn(256))).
1657− Render(" Configure ")
1654+ Render(" Onboarding ")
16581655 main := uv.NewStyledString(mainView)
16591656 main.Draw(scr, layout.main)
16601657
@@ -2052,7 +2049,7 @@ func (m *UI) updateSize() {
20522049
20532050 // Handle different app states
20542051 switch m.state {
2055− case uiConfigure, uiInitialize, uiLanding:
2052+ case uiOnboarding, uiInitialize, uiLanding:
20562053 m.renderHeader(false, m.layout.header.Dx())
20572054
20582055 case uiChat:
@@ -2094,7 +2091,7 @@ func (m *UI) generateLayout(w, h int) layout {
20942091 appRect.Min.X += 1
20952092 appRect.Max.X -= 1
20962093
2097− if slices.Contains([]uiState{uiConfigure, uiInitialize, uiLanding}, m.state) {
2094+ if slices.Contains([]uiState{uiOnboarding, uiInitialize, uiLanding}, m.state) {
20982095 // extra padding on left and right for these states
20992096 appRect.Min.X += 1
21002097 appRect.Max.X -= 1
@@ -2107,7 +2104,7 @@ func (m *UI) generateLayout(w, h int) layout {
21072104
21082105 // Handle different app states
21092106 switch m.state {
2110− case uiConfigure, uiInitialize:
2107+ case uiOnboarding, uiInitialize:
21112108 // Layout
21122109 //
21132110 // header