Commit Graph

2 Commits

  • fix(tui): Container change detection for proper differential rendering
    Fixed rendering artifact where duplicate bottom borders appeared when components
    dynamically shifted positions (e.g., Ctrl+C in agent clearing status container).
    
    Root cause: Container wasn't reporting as "changed" when cleared (0 children),
    causing differential renderer to skip re-rendering that area.
    
    Solution: Container now tracks previousChildCount and reports changed when
    child count changes, ensuring proper re-rendering when containers are cleared.
    
    - Added comprehensive test reproducing the layout shift artifact
    - Fixed Container to track and report child count changes
    - All tests pass including new layout shift artifact test
  • refactor(tui): Move examples from README to test directory
    - Move chat application example to test/chat-app.ts
    - Move multi-component layout example to test/multi-layout.ts
    - Update README to reference example files instead of inline code
    - Add proper exit handlers (Ctrl+C) to all examples
    - Simplify README by reducing inline code examples