mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
fix(tui): keep the window following the client used last, forced resizes included
A browser that opens a session sends a forced resize at its current size. Its pty does not change, so tmux keeps the TUI's client as the latest one and `client-active` never fires again, while Codeman's `resize-window` still pins the window to `manual` at the browser's size. Typing in the terminal then did nothing, which is the bug this branch fixes. An `after-resize-window[91]` hook now puts `latest` back after Codeman's resize, so tmux keeps deciding by the client used last; `client-active[91]` stays for Codeman's own attach (`setManualWindowSize()`), which sets `manual` without a resize. The owner's tty moves into the session option `@codeman-tui-follow`, and both hook commands are constants that read it, so no tty is interpolated into a hook and hooks whose owner is gone do nothing. restore() and the startup sweep drop the owner first, then our hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d387cf8cdb
commit
dbf545ce8f
7 files changed
+344
-301
No files matched your search
@@ -2,4 +2,4 @@
|
||||
'aicodeman': patch
|
||||
---
|
||||
|
||||
`codeman tui`: a terminal attached to a session takes the window size back when you type, paste or resize it, after a browser tab (a phone, for example) opened or resized the same session and Codeman sized the window to that tab. Until now the terminal kept showing a small pane until a detach and a fresh attach. The attach sets a `client-active` hook on the sessions it dressed that acts only for its own tmux client, and removes it on detach. Needs tmux 3.3 or newer.
|
||||
`codeman tui`: while a terminal is attached, the window follows whichever client was used last, as plain tmux does. Before, a browser tab (a phone, for example) that opened or resized the same session pinned the window to the tab's size, and typing or pasting in the terminal did not take it back until a detach and a fresh attach. Now typing, pasting or resizing the terminal fills it again, and typing in the tab gives the tab the size. The attach sets two hooks and an owner option on the sessions it dressed and removes them on detach; a TUI killed mid-attach has its leftovers removed by the next `codeman tui`. Needs tmux 3.3 or newer.
|
||||
Reference in new issue
Block a user