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/libtmux
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3826ef9
Choose a base ref
...
head repository: tmux-python/libtmux
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 37812a7
Choose a head ref
  • 10 commits
  • 8 files changed
  • 1 contributor

Commits on Dec 7, 2025

  1. Configuration menu
    Copy the full SHA
    e907f81 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2025

  1. Configuration menu
    Copy the full SHA
    de74752 View commit details
    Browse the repository at this point in the history
  2. py(deps[dev]) Bump dev packages

    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    64276e4 View commit details
    Browse the repository at this point in the history
  3. test(Session.attach): Add xfail regression test for refresh after kill

    why: Reproduce tmuxp issue #1002 where attach() raises exception if
    session is killed while user is attached.
    what:
    - Add test that simulates session killed during attach-session
    - Mark as xfail since attach() currently calls refresh() which fails
    - Documents expected behavior: attach() should not raise if session gone
    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    70d1383 View commit details
    Browse the repository at this point in the history
  4. fix(Session.attach): Remove refresh() call that fails after session k…

    …illed
    
    why: attach-session is a blocking interactive command where session state
    can change arbitrarily during attachment, including being killed entirely.
    Calling refresh() after such a command is semantically incorrect.
    what:
    - Remove self.refresh() call from Session.attach()
    
    Fixes: tmux-python/tmuxp#1002
    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    d852aeb View commit details
    Browse the repository at this point in the history
  5. test(Session.attach): Remove xfail now that bug is fixed

    why: The fix in the previous commit resolves the issue, so the test
    should now pass and serve as a permanent regression guard.
    what:
    - Remove xfail marker from test_session_attach_does_not_fail_if_session_killed_during_attach
    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    a1ff647 View commit details
    Browse the repository at this point in the history
  6. docs(CHANGES): Add notes for Session.attach() fix

    why: Document the bug fix and behavioral change for the upcoming release.
    what:
    - Add breaking change note that attach() no longer calls refresh()
    - Add bug fix entry for session killed during attachment
    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    9826825 View commit details
    Browse the repository at this point in the history
  7. fix(Session.attach()): Remove refresh() call that fails after ses…

    …sion killed (#616)
    
    Fixes an issue where `Session.attach()` would raise `TmuxObjectDoesNotExist` when a user:
    
    1. Attaches to a tmux session via `tmuxp load`
    2. Works in the session
    3. Kills the session (e.g., closes all windows) before detaching
    4. Detaches from tmux
    
    ### User Experience
    
    After running `tmuxp load`, users would see this traceback printed to their terminal after detaching:
    
    ```
    Traceback (most recent call last):
      File "~/.local/bin/tmuxp", line 7, in <module>
        sys.exit(cli.cli())
      ...
      File ".../libtmux/session.py", line 332, in attach
        self.refresh()
      File ".../libtmux/neo.py", line 167, in _refresh
        obj = fetch_obj(...)
      File ".../libtmux/neo.py", line 242, in fetch_obj
        raise exc.TmuxObjectDoesNotExist(...)
    libtmux.exc.TmuxObjectDoesNotExist: Could not find object
    ```
    
    ### Root Cause
    
    `Session.attach()` called `self.refresh()` after the `attach-session` command returned. Since `attach-session` is a **blocking interactive command**, the session state can change arbitrarily during attachment - including being killed entirely.
    
    The `refresh()` call was semantically incorrect for interactive commands:
    - `attach-session` blocks until user detaches
    - Session state can change during attachment  
    - Refreshing after such a command makes no sense
    
    ### Timeline
    
    - **Feb 2024**: 9a5147a - `Session.attach()` was added with the `refresh()` call
    - **Nov 2025**: tmuxp tmux-python/tmuxp@fdafdd2b switched from `attach_session()` to `attach()`
    - Users started experiencing the bug
    
    ### Changes
    
    - Removes `self.refresh()` call from `Session.attach()`
    - Adds regression test using NamedTuple + parametrize + test_id pattern
    tony authored Dec 14, 2025
    Configuration menu
    Copy the full SHA
    0c644b8 View commit details
    Browse the repository at this point in the history
  8. Tag v0.53.0a0

    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    764ccf9 View commit details
    Browse the repository at this point in the history
  9. Tag v0.53.0

    tony committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    37812a7 View commit details
    Browse the repository at this point in the history
Loading