Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(_progress[spinner]): add Spinner, BuildTree, templates, and presets
why: The CLI needs an animated progress display during workspace builds.
A dedicated module keeps display logic decoupled from builder and load.
what:
- Add Spinner context manager with atexit cursor restore and non-TTY fallback
- Add BuildTree for tracking build state (session, windows, panes)
- Add scrolling output panel for before_script output lines
- Add PROGRESS_PRESETS (default, minimal, window, pane, verbose) with
  format_template using {session}, {window}, {bar}, {progress}, etc.
- Add render_bar() with marching indicator during before_script
- Add SUCCESS_TEMPLATE and format_success() for persistent completion line
- Add _SafeFormatMap, ANSI-aware truncation, dynamic terminal width refresh
  • Loading branch information
tony committed Mar 9, 2026
commit ac1f73b73b9bf06532e61de8f48cfa124b829366
1 change: 1 addition & 0 deletions src/tmuxp/_internal/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ def get_color_mode(color_arg: str | None = None) -> ColorMode:
# ANSI styling utilities (originally from click, via utils.py)

_ansi_re = re.compile(r"\033\[[;?0-9]*[a-zA-Z]")
ANSI_SEQ_RE = _ansi_re


def strip_ansi(value: str) -> str:
Expand Down
2 changes: 2 additions & 0 deletions src/tmuxp/cli/_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import logging

from tmuxp._internal.colors import (
ANSI_SEQ_RE,
ColorMode,
Colors,
UnknownStyleColor,
Expand All @@ -25,6 +26,7 @@
logger = logging.getLogger(__name__)

__all__ = [
"ANSI_SEQ_RE",
"ColorMode",
"Colors",
"UnknownStyleColor",
Expand Down
Loading