Skip to content

Enhance TUI console and tmux session management with error handling#5

Merged
anitoanto merged 13 commits intostagingfrom
dev
Apr 3, 2026
Merged

Enhance TUI console and tmux session management with error handling#5
anitoanto merged 13 commits intostagingfrom
dev

Conversation

@anitoanto
Copy link
Copy Markdown
Owner

This pull request introduces a major new release (v1.1.0) of gitdirector with significant enhancements to both the command-line interface and underlying functionality. The most notable changes are the addition of new commands (link, unlink, cd, autoclean), a more interactive and user-friendly CLI experience (with rich tables, live progress, and colorized output), and improved dependency management. The documentation (README.md) and configuration have also been updated to reflect these changes.

Major new features and commands:

  • Added new commands: link/unlink (replace add/remove), cd (open/switch to a tmux session for a repository), and autoclean (clean up broken links or stale tmux sessions). All commands now provide improved feedback and error handling. [1] [2] [3] [4]
  • Enhanced the list and pull commands with live updating, parallel execution, and rich table output, making it easier to track progress and view results. [1] [2] [3]

Documentation and configuration updates:

  • Updated the README.md to document the new commands, improved usage instructions, and added requirements for tmux for session management. [1] [2] [3]
  • Updated the version to 1.1.0 and added new dependencies (libtmux, textual, coolname) to support the new features. [1] [2]

Developer and testing improvements:

  • Added pytest-asyncio as a dev dependency and enabled asyncio_mode in pytest configuration for better test support. [1] [2]

Internal refactoring and UI improvements:

  • Introduced shared utility functions for colored status output, table formatting, and size/changes display to provide a consistent and visually appealing CLI experience.

These changes make gitdirector significantly more powerful and user-friendly, especially for users managing many repositories or working with tmux-based workflows.

anitoanto added 13 commits April 3, 2026 00:24
- Introduced `_alphanumeric_name` to sanitize repo names for tmux session names.
- Added `_make_session_name` to generate unique session names using a coolname slug.
- Implemented `list_repo_sessions` to retrieve existing tmux sessions for a repo.
- Created `create_tmux_session` to handle session creation with uniqueness checks.
- Added `kill_tmux_session` to facilitate session termination.
- Updated `open_in_tmux` to utilize the new session creation logic.

test(tui): add comprehensive tests for TUI components

- Created `test_tui.py` with tests for various TUI screens and components.
- Added tests for `GitDirectorConsole`, `ConfirmScreen`, `ActionMenuScreen`, and `RemoveSessionScreen`.
- Included tests for session management interactions and UI behavior.

chore(deps): update dependencies in lock file

- Added `coolname` package for generating unique session names.
- Updated `pytest-asyncio` to support both Python 3.9 and 3.10+.
- Included `backports-asyncio-runner` for compatibility with Python versions < 3.10.
…d update dependencies

- Updated test class names and methods in `test_cli.py` to reflect changes from add/remove commands to link/unlink commands.
- Adjusted mock manager patches and assertions accordingly.
- Modified `test_extras.py` to remove unnecessary imports and streamline code.
- Updated `uv.lock` to upgrade `click` to version 8.3.2, `gitdirector` to version 1.1.0, and `ruff` to version 0.15.9, along with other dependency updates.
@anitoanto anitoanto merged commit 3b8e43a into staging Apr 3, 2026
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