8000 Comparing v1.65.0...v1.66.0 · 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: v1.65.0
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: v1.66.0
Choose a head ref
  • 17 commits
  • 53 files changed
  • 1 contributor

Commits on Mar 8, 2026

  1. refactor(logging[infra]): add structured logging infrastructure to al…

    …l modules
    
    why: Enable structured logging with `extra` context for filtering, testing,
    and aggregation. Library modules need NullHandler per Python best practices.
    what:
    - Add `logging.getLogger(__name__)` to every module
    - Add NullHandler in library `__init__.py`
    - Add TmuxpLoggerAdapter with process() override for Python <3.13 compat
    - Simplify tmuxp_echo to pure print wrapper (decoupled from logging)
    - Add setup_log_file() for centralized --log-file handler setup
    - Fix setup_logger to target "tmuxp" logger, skip NullHandler check
    - Change default CLI log level from INFO to WARNING
    - Fix timestamp format bug: %H:%m:%S -> %H:%M:%S
    - Add future annotations and fix import ordering in _compat.py
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    69a886c View commit details
    Browse the repository at this point in the history
  2. feat(logging[extra]): add structured log calls with extra context acr…

    …oss all modules
    
    why: Structured `extra` keys (tmux_session, tmux_window, tmux_pane,
    tmux_config_path) enable filtering, aggregation, and test assertions
    on log records rather than string matching.
    what:
    - Add structured DEBUG/INFO/WARNING/ERROR log calls to workspace, CLI,
      and utility modules with appropriate extra keys
    - Route all raw print() calls through tmuxp_echo() in CLI commands
    - Fix get_pane() exception catch type to match sibling methods
    - Change before_script failure log from DEBUG to ERROR
    - Remove catch-log-reraise in plugin version check
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    1c828c4 View commit details
    Browse the repository at this point in the history
  3. test(logging[caplog]): add structured log assertions across all modules

    why: Verify structured extra keys on log records using caplog.records,
    per AGENTS.md guidelines — assert on attributes, not string matching.
    what:
    - Add caplog tests for builder, freezer, finders, loader, validation,
      importers, and plugin version_check
    - Add log-level filtering test for --log-file
    - Add ANSI-free assertions to JSON/NDJSON output tests (ls, search)
    - Add non-TTY stderr ANSI-free test for load command
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    aaaffe5 View commit details
    Browse the repository at this point in the history
  4. refactor(deps[colorama]): replace colorama with stdlib ANSI constants

    why: colorama wraps fixed ANSI escape string constants the stdlib can
    provide directly. Removing it shrinks the dependency tree.
    what:
    - Replace all colorama Fore/Style references in log.py with raw ANSI
      escapes via _ansi_colors from tmuxp._internal.colors
    - Remove colorama and types-colorama from pyproject.toml
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    3d7b951 View commit details
    Browse the repository at this point in the history
  5. feat(output[emit_object]): add OutputFormatter.emit_object and Colors…

    ….format_rule
    
    why: ls and debug-info bypassed OutputFormatter with raw sys.stdout.write,
    breaking the 2-channel output architecture for machine-readable output.
    what:
    - Add OutputFormatter.emit_object() for single top-level JSON objects
    - Route ls --json/--ndjson and debug-info --json through emit_object()
    - Add Colors.format_rule() for Unicode box-drawing horizontal rules
    - Add unit tests for emit_object in JSON, NDJSON, and HUMAN modes
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    ad99470 View commit details
    Browse the repository at this point in the history
  6. fix(logging[doctest]): add doctest to TmuxpLoggerAdapter

    why: CLAUDE.md requires all functions and methods to have working doctests.
    what:
    - Add Examples section to TmuxpLoggerAdapter demonstrating extra merging
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    fd390b6 View commit details
    Browse the repository at this point in the history
  7. docs(logging[AGENTS]): add output channels section to AGENTS.md

    why: Developers need guidance on the 2-channel output architecture
    (logger for diagnostics, tmuxp_echo/OutputFormatter for user output).
    what:
    - Add "Output channels" section with diagnostics vs user-facing rules
    - Document print() prohibition in command/business logic
    - Expand "Avoid" entry for print() with structured extra guidance
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    1826606 View commit details
    Browse the repository at this point in the history
  8. docs(CHANGES): add structured logging and colorama removal entries

    why: PR 1 needs changelog entries for the logging work.
    what:
    - Add bug fixes: CLI log level, get_pane() exception, OutputFormatter routing
    - Add development section: structured logging, colorama removal, print→tmuxp_echo
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    50d87de View commit details
    Browse the repository at this point in the history
  9. fix(logging[load]): downgrade logger.exception to debug with exc_info

    why: logger.exception() dumps tracebacks at ERROR level (visible at
    default WARNING) alongside tmuxp_echo() user-friendly messages, causing
    users to see double output.
    what:
    - Change plugin load failed from exception to debug with exc_info
    - Change plugin import failed from exception to debug with exc_info
    - Change workspace build failed from exception to debug with exc_info
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    ed00d63 View commit details
    Browse the repository at this point in the history
  10. fix(logging[load]): restore user-facing [Loading] message

    why: The structured logging migration removed the user-visible [Loading]
    message that shows which workspace file is being loaded.
    what:
    - Add tmuxp_echo with [Loading] and privacy-masked workspace path
    - Uses PrivatePath (already imported) and cli_colors (already available)
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    476a550 View commit details
    Browse the repository at this point in the history
  11. fix(logging[load]): move reattach output to structured extra

    why: Inlining tmux stdout in the log message string defeats structured
    log aggregation and filtering.
    what:
    - Move display-message output from format arg to extra tmux_stdout key
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    9ee0acc View commit details
    Browse the repository at this point in the history
  12. fix(logging[doctest]): add doctest to _identity

    why: All functions must have working doctests per project conventions.
    what:
    - Add Examples section with string and integer pass-through tests
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    16fb89a View commit details
    Browse the repository at this point in the history
  13. fix(logging[builder]): add script path to before_script error extra

    why: The bare error message loses the script path, making it harder to
    diagnose which before_script failed in structured log systems.
    what:
    - Add tmux_config_path extra with the before_script path to error log
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    689b5bc View commit details
    Browse the repository at this point in the history
  14. fix(logging[util]): remove redundant exc_info from pane lookup reraise

    why: The raise...from e chain on the next lines already preserves the
    exception traceback; logging it too is redundant per project standards.
    what:
    - Remove exc_info=True from pane lookup debug log before reraise
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    df72c84 View commit details
    Browse the repository at this point in the history
  15. fix(logging[test]): update stale assertion in skipped test

    why: The assertion checked for "Loading" or "Loaded" but the restored
    user-facing message now uses "[Loading]" format.
    what:
    - Update assertion to match the restored [Loading] message format
    tony committed Mar 8, 2026
    Configuration menu
    Copy the full SHA
    1f38d39 View commit details
    Browse the repository at this point in the history
  16. feat(logging) structured logging, colorama removal, OutputFormatter (#…

    …1017)
    
    Add structured logging with `extra` context across all modules and
    clean up output channels. Every module now declares
    `logging.getLogger(__name__)` with structured keys (`tmux_session`,
    `tmux_window`, `tmux_pane`, `tmux_config_path`) for filtering and
    aggregation. A new `TmuxpLoggerAdapter` provides persistent identity
    context for session/window/pane objects, portable across Python
    3.10–3.13+.
    
    - **Structured logging**: workspace builder emits INFO for session
      lifecycle and DEBUG for window/pane creation; finders, freezer,
      importers, loader, and validation modules emit DEBUG with config
      context; `NullHandler` added in library `__init__.py`
    - **Colorama removal**: replace `colorama` runtime and type-stub
      dependencies with stdlib ANSI escape constants
    - **Output channels**: route all raw `print()` calls through
      `tmuxp_echo()`; separate diagnostics (`logger.*()`) from
      user-facing output (`tmuxp_echo()`) per logging standards
    - **OutputFormatter.emit_object()**: single-object JSON output for
      `ls --json` and `debug-info --json`; `Colors.format_rule()` with
      Unicode box-drawing characters
    - **CLI log level**: default changed from INFO to WARNING so normal
      usage is not noisy
    - **Traceback suppression**: build-failure tracebacks moved from
      user-visible `tmuxp_echo(traceback.format_exc())` to
      `logger.debug(exc_info=True)`; users see `[Error] <message>`,
      full traceback available via `--log-level debug`
    - **`get_pane()` fix**: widen catch to `Exception` (matching
      `get_session`/`get_window`), preserve exception chain via
      `from e`, replace bare `print()` with structured debug log
    - **Log file handler**: `setup_log_file()` replaces inline handler
      setup in `command_load()`, respects `--log-level` flag
    
    Base PR for #1020 (animated progress spinner for `tmuxp load`).
    tony authored Mar 8, 2026
    Configuration menu
    Copy the full SHA
    13906cc View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    e23569d View commit details
    Browse the repository at this point in the history
Loading
0