dotnet-libp2p icon indicating copy to clipboard operation
dotnet-libp2p copied to clipboard

Improve samples UI

Open leny62 opened this issue 9 months ago • 0 comments

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.
  • ChatProtocol Configuration:

    • Modified the configuration method so that the ChatProtocol is bound only to the TerminalUI adapter.

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!

leny62 avatar Apr 11 '25 12:04 leny62