co-mono/packages
Mario Zechner 565488fde6 fix(tui): fix viewport tracking and cursor positioning for overlays and content shrink
- 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.
2026-01-20 23:30:53 +01:00
..
agent Add [Unreleased] section for next cycle 2026-01-19 16:14:47 +01:00
ai feat(ai): add originator option to loginOpenAICodex 2026-01-20 01:28:51 +01:00
coding-agent feat(coding-agent): show session name in terminal title and footer (#876) 2026-01-20 23:05:32 +01:00
mom Add [Unreleased] section for next cycle 2026-01-19 16:14:47 +01:00
pods Release v0.49.2 2026-01-19 16:14:07 +01:00
tui fix(tui): fix viewport tracking and cursor positioning for overlays and content shrink 2026-01-20 23:30:53 +01:00
web-ui Add [Unreleased] section for next cycle 2026-01-19 16:14:47 +01:00