TestWidenResizeAlsoSuppresses: widening changes the splash layout (text→art at the wordmark threshold) and leaves narrow rows misplaced, so it takes the same suppress + settle-replay path as narrowing. The immediate cmd is the debounce tick; the clear lands on settle.
(t *testing.T)
| 180 | // so it takes the same suppress + settle-replay path as narrowing. The |
| 181 | // immediate cmd is the debounce tick; the clear lands on settle. |
| 182 | func TestWidenResizeAlsoSuppresses(t *testing.T) { |
| 183 | cfg, _, _ := config.Bootstrap(t.TempDir()) |
| 184 | m := New(cfg, llm.New("http://x", cfg.ActiveProfile().LLM, ""), t.TempDir(), "test") |
| 185 | var mm tea.Model = m |
| 186 | |
| 187 | mm, _ = mm.Update(tea.WindowSizeMsg{Width: 60, Height: 24}) |
| 188 | mm, cmd := mm.Update(tea.WindowSizeMsg{Width: 80, Height: 24}) |
| 189 | nm := mm.(Model) |
| 190 | |
| 191 | if !nm.suppressView { |
| 192 | t.Error("widening must enable suppressView so the eventual settle cleanly replays the new layout") |
| 193 | } |
| 194 | if cmd == nil { |
| 195 | t.Error("widening must schedule a settle tick") |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | // TestHeightOnlyResizeDoesNotClear: a height-only change can't induce the |
| 200 | // soft-wrap that breaks bubbletea's cursor math (no line widens), so the |