on main help sign in
fix(ui): only auto-expand pills once per session lifecycle
db9d939Andrey Nering
internal/ui/model/pills.go+4
@@ -154,7 +154,11 @@ func (m *UI) autoExpandPillsIfReasonable() tea.Cmd {
154 if m.pillsExpanded {
154 if m.pillsExpanded {
155 return nil
155 return nil
156 }
156 }
157+ if m.pillsAutoExpanded {
158+ return nil
159+ }
157 m.pillsExpanded = true
160 m.pillsExpanded = true
161+ m.pillsAutoExpanded = true
158 if hasIncompleteTodos(m.session.Todos) {
162 if hasIncompleteTodos(m.session.Todos) {
159 m.focusedPillSection = pillSectionTodos
163 m.focusedPillSection = pillSectionTodos
160 } else {
164 } else {
internal/ui/model/ui.go+2
@@ -259,6 +259,7 @@ type UI struct {
259
259
260 // pills state
260 // pills state
261 pillsExpanded bool
261 pillsExpanded bool
262+ pillsAutoExpanded bool
262 focusedPillSection pillSection
263 focusedPillSection pillSection
263 promptQueue int
264 promptQueue int
264 pillsView string
265 pillsView string
@@ -3500,6 +3501,7 @@ func (m *UI) newSession() tea.Cmd {
3500 m.chat.Blur()
3501 m.chat.Blur()
3501 m.chat.ClearMessages()
3502 m.chat.ClearMessages()
3502 m.pillsExpanded = false
3503 m.pillsExpanded = false
3504+ m.pillsAutoExpanded = false
3503 m.promptQueue = 0
3505 m.promptQueue = 0
3504 m.pillsView = ""
3506 m.pillsView = ""
3505 m.historyReset()
3507 m.historyReset()