Improve samples UI
Overview
This PR removes all references to SimpleConsoleUI from the Libp2p /Chat Application sample. The application now exclusively uses the modern Terminal UI (TerminalUI), streamlining the codebase and ensuring that we maintain a consistent and feature-rich user experience.
Changes Made
-
UI Initialization:
- Updated the initialization logic to exclusively use
TerminalUI.
- Updated the initialization logic to exclusively use
-
ChatProtocol Configuration:
- Modified the configuration method so that the
ChatProtocolis bound only to the TerminalUI adapter.
- Modified the configuration method so that the
Motivation & Benefits
- Modern User Experience:
The TerminalUI delivers a multi-panel interface with 3 tabs: chat, peers (connected peers) and logs
Testing & Verification
-
Listener and Dialer Modes:
Confirmed that both modes work seamlessly with TerminalUI. -
UI Functionality:
Verified that status updates, peer additions, and graceful shutdown via the TUI (using exit shortcuts like ESC and Ctrl+C) work as expected. -
Logging:
Ensured that all logging, especially error handling in case of initialization failures, is effective and informative.
Related Issues
- Closes #57
Thank you for reviewing this PR. I look forward to your feedback!