Skip to content

TUI update #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

TUI update #1

wants to merge 3 commits into from

Conversation

yashksaini-coder
Copy link
Owner

This pull request introduces significant enhancements to the TUI-based Python virtual environment manager, including new features for virtual environment deletion, improved UI, command-line argument support, and comprehensive test coverage. The most important changes are grouped below:

Feature Enhancements:

  • Added functionality to delete virtual environments with confirmation dialogs, including methods start_deletion, confirm_deletion, and cancel_deletion in the App struct. These methods ensure safe deletion with proper index validation and UI updates. (src/app.rs, src/app.rsR2-R63)

User Interface Improvements:

  • Updated the TUI to display a list of virtual environments, their sizes, and last modified timestamps, with navigation and deletion options. Added a confirmation dialog overlay for deletion actions. (src/ui.rs, src/ui.rsR2-R104)
  • Introduced helper functions like centered_rect to manage UI layout for dialogs. (src/ui.rs, src/ui.rsR2-R104)

Command-Line Argument Support:

  • Integrated clap for parsing command-line arguments, enabling users to specify a scan path and choose a non-TUI mode to list virtual environments. (src/main.rs, src/main.rsL6-R110)
  • Added a --no-tui flag to print found virtual environments directly to the console. (src/main.rs, src/main.rsL6-R110)

Dependency Updates:

  • Added clap (with derive feature), crossterm, and ratatui for command-line parsing and TUI rendering. (Cargo.toml, Cargo.tomlR12)

Test Coverage:

  • Added extensive unit tests for the App struct, including navigation, deletion workflows, and edge cases. (src/app.rs, src/app.rsR80-R292)
  • Introduced tests for directory size calculation and virtual environment scanning in the scanner module. (src/scanner.rs, src/scanner.rsR64-R182)
    This pull request introduces significant enhancements to the TUI-based Python virtual environment manager, including new features for virtual environment deletion, improved UI, command-line argument support, and comprehensive test coverage. The most important changes are grouped below:

Feature Enhancements:

  • Added functionality to delete virtual environments with confirmation dialogs, including methods start_deletion, confirm_deletion, and cancel_deletion in the App struct. These methods ensure safe deletion with proper index validation and UI updates. (src/app.rs, src/app.rsR2-R63)

User Interface Improvements:

  • Updated the TUI to display a list of virtual environments, their sizes, and last modified timestamps, with navigation and deletion options. Added a confirmation dialog overlay for deletion actions. (src/ui.rs, src/ui.rsR2-R104)
  • Introduced helper functions like centered_rect to manage UI layout for dialogs. (src/ui.rs, src/ui.rsR2-R104)

Command-Line Argument Support:

  • Integrated clap for parsing command-line arguments, enabling users to specify a scan path and choose a non-TUI mode to list virtual environments. (src/main.rs, src/main.rsL6-R110)
  • Added a --no-tui flag to print found virtual environments directly to the console. (src/main.rs, src/main.rsL6-R110)

Dependency Updates:

  • Added clap (with derive feature), crossterm, and ratatui for command-line parsing and TUI rendering. (Cargo.toml, Cargo.tomlR12)

Test Coverage:

  • Added extensive unit tests for the App struct, including navigation, deletion workflows, and edge cases. (src/app.rs, src/app.rsR80-R292)
  • Introduced tests for directory size calculation and virtual environment scanning in the scanner module. (src/scanner.rs, src/scanner.rsR64-R182)

…, including methods for starting, confirming, and canceling deletion. Add unit tests to validate deletion logic and navigation behavior.
…paths and toggling TUI mode. Implement a detailed output for found virtual environments, including size and last modified date. Add unit tests for directory size calculation and virtual environment detection.
…ay of virtual environments. Implement a confirmation dialog for deletion with improved layout and styling, including help text for user navigation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant