Files
codewhale/crates
Hunter Bown d9701c1dde perf(tui): lock composer height while slash/mention menu is open
User feedback (Windows 10 PowerShell + WSL, Telegram thread): typing
through `/skill` feels visibly laggy because every keystroke shrinks
the matched-entry list, which shrinks the composer panel, which
forces the chat area above to repaint cells. On Unix terminals the
work is invisible; on the Windows console backend the per-cell write
cost makes it noticeable.

Fix: when the slash- or mention-menu is open, `desired_height`
reserves the panel's worst-case envelope (`composer_max_height`) for
the whole menu session instead of tracking the matched-entry count.
The chat-area Rect stays stable, so ratatui's diff renderer skips
the cells above the composer entirely. The menu itself still renders
only the entries that actually match — extra rows are panel padding
inside the same Rect.

`render()` and `cursor_pos` route through the same locked-budget
calculation so the input stays at the top of the panel and the
cursor lands on the row the input is drawn on. New unit test pins
the invariant: 5-match and 1-match menus produce the same composer
height; closing the menu releases the reserved rows.
2026-05-03 08:02:23 -05:00
..