From db9d9399d31aa883cb74f688d8dafc2f067188ce Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Fri, 22 May 2026 15:45:13 -0300 Subject: [PATCH] fix(ui): only auto-expand pills once per session lifecycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/ui/model/pills.go | 4 ++++ internal/ui/model/ui.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/internal/ui/model/pills.go b/internal/ui/model/pills.go index 6bbfc34463a20658411fb74e847e87e4a7c2841b..ae3b09725884a3cb33c42bd363c8f7acceaaae62 100644 --- a/internal/ui/model/pills.go +++ b/internal/ui/model/pills.go @@ -154,7 +154,11 @@ func (m *UI) autoExpandPillsIfReasonable() tea.Cmd { if m.pillsExpanded { return nil } + if m.pillsAutoExpanded { + return nil + } m.pillsExpanded = true + m.pillsAutoExpanded = true if hasIncompleteTodos(m.session.Todos) { m.focusedPillSection = pillSectionTodos } else { diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index 078f051ce1c11adfbe76de103933a200078ee153..6ae48007848ea52f82eba8a0167f6ceb474ed92d 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -259,6 +259,7 @@ type UI struct { // pills state pillsExpanded bool + pillsAutoExpanded bool focusedPillSection pillSection promptQueue int pillsView string @@ -3500,6 +3501,7 @@ func (m *UI) newSession() tea.Cmd { m.chat.Blur() m.chat.ClearMessages() m.pillsExpanded = false + m.pillsAutoExpanded = false m.promptQueue = 0 m.pillsView = "" m.historyReset()