Context
Research into AIChat and Aider revealed both use an append-only output model with inline status indicators. No fixed panels, no scroll regions — just print to stdout and let the terminal scroll.
This issue tracks adopting those proven patterns after reverting the scroll region approach (#72).
Patterns to Adopt
From AIChat (Rust)
- Cursor position tracking: Use equivalent of
crossterm::cursor::position() to know terminal position
- Explicit scroll:
ScrollUp/ScrollDown commands when needed (not DECSTBM regions)
- Atomic abort signals: Coordinate Ctrl+C across async operations
- REPL loop: Simple
read → process → output → repeat cycle
From Aider (Python)
- Streaming markdown: Full re-render at 8fps (alternative to our incremental approach if edge cases pile up)
- Visual separators: Horizontal rules between messages for readability
- Inline status: Print "Thinking..." or spinner inline, no fixed status bar
- Alt+Enter for multi-line: Toggle between single-line submit and multi-line editing
From blessed (reference only)
- CSR reset recipe (for future use if we ever need fixed panels):
- Set CSR:
\x1b[{top};{bottom}r
- Position cursor inside bounds
- Insert/delete lines
- ALWAYS reset CSR:
\x1b[1;{height}r
- Reposition cursor
Implementation
Depends On
Acceptance Criteria
Context
Research into AIChat and Aider revealed both use an append-only output model with inline status indicators. No fixed panels, no scroll regions — just print to stdout and let the terminal scroll.
This issue tracks adopting those proven patterns after reverting the scroll region approach (#72).
Patterns to Adopt
From AIChat (Rust)
crossterm::cursor::position()to know terminal positionScrollUp/ScrollDowncommands when needed (not DECSTBM regions)read → process → output → repeatcycleFrom Aider (Python)
From blessed (reference only)
\x1b[{top};{bottom}r\x1b[1;{height}rImplementation
process.stdout.write()— no layout abstraction◇ bash git status→✓ bash)Depends On
Acceptance Criteria