Files
magpie/internal/tui
ggbdpq fed24aa1d6 tui: the agents page keeps the row picked in view, however many agents are installed
What changed
- viewList drew every agent and left the window to the terminal: on a
  machine with more agents than the terminal has rows the highlight
  scrolled off the top and the page froze — pressing j changed the row
  while the screen stood still, the same disease the library page had
  (#2220). The rows around the one picked are drawn now, as many as fit
  (the providers page's window).

Run
- TestAgentsViewKeepsTheRowPicked (new): 30 agents on a plain 80x24
  terminal, the row picked at 0, 4, 8, 15, 22 and 29 stays on screen,
  and a tall terminal still shows the list's top. Red at 422d057d
  ("row 0 (agent-00) picked, but the screen stops short of it",
  agents 06-29 with no highlight), green after; red again with only
  internal/tui/tui.go stashed. internal/tui and internal/library whole
  (ok, -tags nogui -p 2). gofmt clean; vet darwin, linux -tags nogui
  and windows = 0; build darwin, linux -tags nogui and windows = 0
  (trayimage_darwin.go's cgo -Wenum-conversion warning as ever).

Generated-by: GLM-5.3-Flash (ZCode)
2026-10-16 00:44:19 +08:00
..