-
Notifications
You must be signed in to change notification settings - Fork 236
Comparing changes
Open a pull request
base repository: tmux-python/tmuxp
base: v1.65.0
head repository: tmux-python/tmuxp
compare: v1.66.0
- 17 commits
- 53 files changed
- 1 contributor
Commits on Mar 8, 2026
-
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
Configuration menu - View commit details
-
Copy full SHA for 69a886c - Browse repository at this point
Copy the full SHA 69a886cView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 1c828c4 - Browse repository at this point
Copy the full SHA 1c828c4View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for aaaffe5 - Browse repository at this point
Copy the full SHA aaaffe5View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 3d7b951 - Browse repository at this point
Copy the full SHA 3d7b951View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for ad99470 - Browse repository at this point
Copy the full SHA ad99470View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for fd390b6 - Browse repository at this point
Copy the full SHA fd390b6View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 1826606 - Browse repository at this point
Copy the full SHA 1826606View commit details -
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
Configuration menu 8000- View commit details
-
Copy full SHA for 50d87de - Browse repository at this point
Copy the full SHA 50d87deView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for ed00d63 - Browse repository at this point
Copy the full SHA ed00d63View commit details -
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)
Configuration menu - View commit details
-
Copy full SHA for 476a550 - Browse repository at this point
Copy the full SHA 476a550View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 9ee0acc - Browse repository at this point
Copy the full SHA 9ee0accView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 16fb89a - Browse repository at this point
Copy the full SHA 16fb89aView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 689b5bc - Browse repository at this point
Copy the full SHA 689b5bcView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for df72c84 - Browse repository at this point
Copy the full SHA df72c84View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 1f38d39 - Browse repository at this point
Copy the full SHA 1f38d39View commit details -
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`).
Configuration menu - View commit details
-
Copy full SHA for 13906cc - Browse repository at this point
Copy the full SHA 13906ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for e23569d - Browse repository at this point
Copy the full SHA e23569dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.65.0...v1.66.0