You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttachFocus: focus reporting (CSI I/O) for direct-terminal attach clients
#6178
Follow-up to #6177 (closed toward Ideas). Mouse mode state turned out to already exist for TerminalAttach clients via ServerMessage::MouseCapture — a GUI client (herdr-t3) now consumes it for selection-vs-report and delivers reports through AttachMouse/AttachScroll.
One gap remains: focus reporting. A pane that enables DECSET 1004 (\e[?1004h) expects CSI I/CSI O when the outer terminal gains/loses focus. Server-side support exists (send_pane_focus_event→try_send_focus_event, gated by focus_reporting_enabled()), but ClientShellFocusis gated tois_active_shell_client(), so TerminalAttach/ObserveTerminal` clients cannot report their outer focus at all — attach clients never emit CSI I/O.
Proposal
ClientMessage::AttachFocus { focused: bool }, handled for ClientConnectionMode::TerminalAttach (and TerminalObserve if useful), routing to try_send_focus_event(Gained/Lost) on the attached runtime. The pane's own ?1004 gate already decides whether bytes are written, so the message can be sent unconditionally on outer focus transitions — same shape as AttachMouse/AttachScroll.
Consumer: herdr-t3 (T3-Code-style GUI client). Verified end-to-end on macOS + herdr 0.9.5 that focus transitions currently produce zero bytes at the pane.
Happy to send a PR against a maintainer-preferred shape.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to #6177 (closed toward Ideas). Mouse mode state turned out to already exist for
TerminalAttachclients viaServerMessage::MouseCapture— a GUI client (herdr-t3) now consumes it for selection-vs-report and delivers reports throughAttachMouse/AttachScroll.One gap remains: focus reporting. A pane that enables DECSET 1004 (
\e[?1004h) expects CSII/CSIOwhen the outer terminal gains/loses focus. Server-side support exists (send_pane_focus_event→try_send_focus_event, gated byfocus_reporting_enabled()), butClientShellFocusis gated tois_active_shell_client(), soTerminalAttach/ObserveTerminal` clients cannot report their outer focus at all — attach clients never emit CSI I/O.Proposal
ClientMessage::AttachFocus { focused: bool }, handled forClientConnectionMode::TerminalAttach(andTerminalObserveif useful), routing totry_send_focus_event(Gained/Lost)on the attached runtime. The pane's own?1004gate already decides whether bytes are written, so the message can be sent unconditionally on outer focus transitions — same shape asAttachMouse/AttachScroll.Consumer: herdr-t3 (T3-Code-style GUI client). Verified end-to-end on macOS + herdr 0.9.5 that focus transitions currently produce zero bytes at the pane.
Happy to send a PR against a maintainer-preferred shape.
All reactions