Skip to content

Fix Expert panel output clamped to 80 columns#66

Merged
Cassin01 merged 2 commits into
mainfrom
auto_resize_pane
Apr 18, 2026
Merged

Fix Expert panel output clamped to 80 columns#66
Cassin01 merged 2 commits into
mainfrom
auto_resize_pane

Conversation

@Cassin01
Copy link
Copy Markdown
Owner

Summary

  • TmuxManager::create_session now sets window-size manual on the session so detached windows no longer get auto-clamped to default-size (80x24).
  • TmuxManager::resize_pane now shells out to tmux resize-window instead of tmux resize-pane; the latter cannot grow a single-pane detached window, so the previous implementation was a silent no-op.
  • Added a #[ignore]-gated integration test that spawns real tmux, calls resize_pane(0, 160, 40), and asserts the window actually reports 160x40. A SessionGuard ensures the test session is always killed even if an assertion panics.

Why

The Expert panel displayed Claude output at a fixed ~80 columns regardless of the TUI panel's width. Root cause: tmux's default window-size latest plus the resize-pane subcommand both silently reject resize requests under macot's detached-single-pane setup. Verified with live tmux reproduction.

Test plan

  • make ci (813 passed, 1 ignored)
  • cargo test --lib resize_pane_actually_grows_window_with_real_tmux -- --ignored --nocapture (1 passed)
  • Manual: launch the TUI, resize the terminal, confirm tmux list-panes -t <macot>:0 -F '#{window_width}x#{window_height}' tracks the panel width within ~250 ms

Compatibility

Requires tmux >= 2.9 (resize-window subcommand). Documented in CHANGELOG.

tmux sessions were created without `window-size manual`, so detached
windows stayed at `default-size` (80x24). `resize_pane` also issued
`tmux resize-pane`, which cannot grow a single-pane detached window.

Set `window-size manual` in `create_session` and switch the resize
implementation to `tmux resize-window` (requires tmux >= 2.9). Add a
gated integration test that spawns real tmux and asserts the window
actually resizes.
Satisfies clippy 1.95's unnecessary_sort_by check; DateTime<Utc> is
Copy, so sort_by_key avoids the unneeded closure.
@Cassin01 Cassin01 merged commit 38c91da into main Apr 18, 2026
1 check passed
@Cassin01 Cassin01 deleted the auto_resize_pane branch April 19, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant