8000 Comparing e23569d...d08589a · tmux-python/tmuxp · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tmux-python/tmuxp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e23569d
Choose a base ref
...
head repository: tmux-python/tmuxp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d08589a
Choose a head ref
  • 8 commits
  • 17 files changed
  • 1 contributor

Commits on Mar 8, 2026

  1. feat(builder[callbacks]): add progress, before_script, script_output,…

    … and build_event callbacks
    
    why: The builder needs to emit lifecycle events so a UI layer can render
    real-time progress without coupling builder logic to display code.
    what:
    - Add on_progress, on_before_script, on_script_output, on_build_event
      callback parameters to WorkspaceBuilder
    - Emit structured build events: session_created (with window_total,
      session_pane_total), window_started, pane_creating, window_done,
      workspace_built, before_script_started, before_script_done
    - Add on_line callback to run_before_script() for capturing script output
    - Add doctests for all callback types
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    46cf411 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2026

  1. 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
    tony committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    ac1f73b View commit details
    Browse the repository at this point in the history
  2. feat(load[spinner]): wire progress spinner into tmuxp load command

    why: Users need visual feedback during workspace builds, especially for
    sessions with many windows or long before_script executions.
    what:
    - Add _silence_stream_handlers() to suppress StreamHandler during spinner
    - Add _dispatch_build() extracting shared build/attach/error logic
    - Wire Spinner.on_build_event and add_output_line to builder callbacks
    - Add --progress-format / TMUXP_PROGRESS_FORMAT for preset or custom format
    - Add --progress-lines / TMUXP_PROGRESS_LINES for panel height control
    - Add --no-progress / TMUXP_PROGRESS=0 to disable spinner entirely
    - Emit persistent success line with checkmark after successful build
    - Stop spinner before interactive prompts (TMUX switch, error recovery)
    tony committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    12e5f12 View commit details
    Browse the repository at this point in the history
  3. test(progress[coverage]): add comprehensive tests for spinner and bui…

    …ld progress
    
    why: The progress spinner and its CLI wiring need thorough test coverage
    for BuildTree state, template rendering, bar generation, panel behavior,
    and CLI flag handling.
    what:
    - Add tests/cli/test_progress.py covering Spinner lifecycle, BuildTree
      state transitions, template presets, bar rendering, panel lines,
      ANSI truncation, non-TTY fallback, and success output
    - Add tests/workspace/test_progress.py for builder callback integration
    - Update tests/cli/test_load.py for progress output assertions
    tony committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    2528c59 View commit details
    Browse the repository at this point in the history
  4. docs(progress): document progress display, env vars, and API reference

    why: Users need documentation for the progress spinner feature.
    what:
    - Add "Progress display" section to docs/cli/load.md with presets, tokens,
      panel lines, disabling, and before-script behavior
    - Add TMUXP_PROGRESS, TMUXP_PROGRESS_FORMAT, TMUXP_PROGRESS_LINES to
      environmental-variables.md
    - Add docs/api/cli/progress.md API reference page
    tony committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    2e9f8cd View commit details
    Browse the repository at this point in the history
  5. docs(CHANGES): add animated progress spinner entry

    why: PR 2 needs changelog entry for the progress spinner feature.
    what:
    - Add "Animated progress spinner" section under What's new
    tony committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    96ede9b View commit details
    Browse the repository at this point in the history
  6. feat(load[progress]): animated progress spinner for tmuxp load (#1020)

    Adds real-time build feedback to `tmuxp load` via an animated
    terminal spinner that shows window/pane creation progress. The
    spinner runs in a background thread during the build phase only,
    stopping cleanly before interactive prompts or tmux attach.
    
    **Builder callbacks**: Four optional callbacks on `WorkspaceBuilder`
    (`on_progress`, `on_before_script`, `on_script_output`,
    `on_build_event`) decouple progress reporting from build logic,
    emitting structured lifecycle events at each build milestone.
    
    **Spinner and BuildTree** (`cli/_progress.py`): `Spinner` handles
    ANSI-aware terminal output with atexit cursor restoration and a
    scrolling panel for `before_script` output. `BuildTree` tracks
    build state and provides template context for format tokens
    (`{bar}`, `{progress}`, `{window}`, `{pane_index}`, etc.).
    
    **Five built-in presets**: `default`, `minimal`, `window`, `pane`,
    `verbose` — selectable via `--progress-format` or
    `TMUXP_PROGRESS_FORMAT`.
    
    **CLI flags**: `--progress-format`, `--progress-lines`,
    `--no-progress` with corresponding `TMUXP_PROGRESS*` env vars.
    Non-TTY environments automatically disable the spinner.
    
    **Graceful degradation**: `--no-progress` path wraps session
    summary access in try/except so killing the session after attach
    does not crash.
    tony authored Mar 9, 2026
    Configuration menu
    Copy the full SHA
    975a3da View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d08589a View commit details
    Browse the repository at this point in the history
Loading
0