mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 10:05:14 +00:00
- Add maxLinesRendered to track terminal's working area (grows with content, only resets on full clear) - Fix viewport calculation: use maxLinesRendered instead of cursorRow for correct viewport bounds - Separate cursorRow (end of content for viewport calc) from hardwareCursorRow (actual cursor position) - Refactor full render into fullRender(clear) helper to reduce duplication - Fix shrink-clearing: properly clear extra lines when content shrinks - Add PI_TUI_DEBUG=1 env var for render debugging (writes to /tmp/tui/) The core issue was that after partial renders (e.g., overlay show/hide), the viewport calculation used cursorRow which reflected where rendering stopped, not where content ended. This caused incorrect viewport bounds, leading to cursor movement into scrollback (unreachable) or rendering at wrong positions. Additionally, when content shrank (e.g., selector dismissed), the terminal still had the old lines as blank space. maxLinesRendered tracks this so viewport calculations account for the terminal's actual working area. |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| coding-agent | ||
| mom | ||
| pods | ||
| tui | ||
| web-ui | ||