on main help sign in
fix(ui): only auto-expand pills once per session lifecycle

The auto-expand logic now fires only when the todo/queue panel is first created, not on subsequent session updates. A `pillsAutoExpanded` guard flag prevents re-triggering until the next session. 💘 Generated with Crush Assisted-by: Crush:kimi-k2.6

commitdb9d9399d31aa883cb74f688d8dafc2f067188ce authorAndrey Nering <andreynering@users.noreply.github.com> dateFri 22 May 2026, 15:45 (5 months ago) parentba692cc
2 files changed+6
internal/ui/model/pills.go+4 internal/ui/model/ui.go+2
internal/ui/model/pills.go+4
@@ -154,7 +154,11 @@ func (m *UI) autoExpandPillsIfReasonable() tea.Cmd {
154154 if m.pillsExpanded {
155155 return nil
156156 }
157+ if m.pillsAutoExpanded {
158+ return nil
159+ }
157160 m.pillsExpanded = true
161+ m.pillsAutoExpanded = true
158162 if hasIncompleteTodos(m.session.Todos) {
159163 m.focusedPillSection = pillSectionTodos
160164 } else {
internal/ui/model/ui.go+2
@@ -259,6 +259,7 @@ type UI struct {
259259
260260 // pills state
261261 pillsExpanded bool
262+ pillsAutoExpanded bool
262263 focusedPillSection pillSection
263264 promptQueue int
264265 pillsView string
@@ -3500,6 +3501,7 @@ func (m *UI) newSession() tea.Cmd {
35003501 m.chat.Blur()
35013502 m.chat.ClearMessages()
35023503 m.pillsExpanded = false
3504+ m.pillsAutoExpanded = false
35033505 m.promptQueue = 0
35043506 m.pillsView = ""
35053507 m.historyReset()