-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Problem / Background
Issue #68 (Real-time streaming output with interactive multi-node UI) has been successfully implemented with a comprehensive TUI system. However, the documentation has not been updated to reflect these significant architectural additions. This makes it harder for new contributors to understand the TUI module structure and for users to discover the available keyboard shortcuts and features.
Related: #68
Proposed Solution
Update project documentation to cover the new TUI module architecture and user-facing features:
-
ARCHITECTURE.md Updates
- Add TUI module architecture section
- Document view system design (Summary, Detail, Split, Diff views)
- Explain event handling and state management patterns
- Document RollingBuffer and memory protection mechanisms
- Add TUI component interaction diagrams
-
README.md Updates
- Add TUI screenshot demonstrating multi-node monitoring
- Document
--streamand--output-diroutput modes - Add keyboard shortcuts reference table
- Include examples for different output modes
-
Help Output Enhancement
- Ensure
--helpincludes TUI-related options - Document keyboard shortcuts in
?help overlay
- Ensure
Acceptance Criteria
- ARCHITECTURE.md includes comprehensive TUI module documentation
- Module structure diagram for
src/ui/tui/ - ViewMode state machine documentation
- Event handling flow description
- RollingBuffer design explanation
- Module structure diagram for
- README.md updated with TUI features
- At least one screenshot of TUI in action
- Output mode comparison table (TUI vs Stream vs File)
- Keyboard shortcuts reference table
- Keyboard shortcuts documented in
?help overlay - All examples in README are tested and working
Technical Considerations
Files to Update
/Users/inureyes/Development/backend.ai/bssh/ARCHITECTURE.md/Users/inureyes/Development/backend.ai/bssh/README.md/Users/inureyes/Development/backend.ai/bssh/src/ui/tui/views/mod.rs(help overlay content)
Related Source Files for Reference
src/ui/tui/app.rs- TuiApp, ViewMode enumsrc/ui/tui/event.rs- Keyboard event handlingsrc/ui/tui/progress.rs- Progress bar parsingsrc/ui/tui/terminal_guard.rs- RAII terminal cleanupsrc/ui/tui/views/- View implementationssrc/executor/stream_manager.rs- NodeStream, MultiNodeStreamManager
Documentation Structure Suggestion
## TUI Architecture (for ARCHITECTURE.md)
### Module Structure
src/ui/tui/
├── mod.rs # Public API: run_tui(), TuiExitReason
├── app.rs # TuiApp state machine, ViewMode enum
├── event.rs # Keyboard input handling
├── progress.rs # Output parsing for progress indicators
├── terminal_guard.rs # RAII cleanup on exit/panic
└── views/
├── summary.rs # Multi-node overview
├── detail.rs # Single node full output
├── split.rs # Multi-pane view
└── diff.rs # Side-by-side comparison
### View State Machine
Summary ←→ Detail ←→ Split
↓ ↓
Diff DiffAdditional Context
The TUI implementation in #68 introduced approximately 2000 lines of new code in the src/ui/tui/ directory. Proper documentation will help maintain this code and enable future enhancements.