From e4d3bc242bd3d18aa83a76f25dcbe5cb7a2ced78 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Fri, 23 Oct 2026 19:11:23 +0300 Subject: raise the terminal window that holds the tmux client a jump (any click, a shortcut, search) activated the terminal app, which raised whichever window was used last. now: - the client: the named one (a status-line click), else one already on a session holding the agent's window (several terminal windows can show one session; it shows the agent without switching, and keeps its own session in a session group), else any; the focused one first, then the one used last (its last input or focus). - Ghostty (1.3+, scriptable by terminal id, not by tty): dingger learns which terminal holds each client when it gains focus. tmux's client-focus-in hook runs `dingger terminal focused`, which asks Ghostty for its focused terminal and records it in @dingger_terminal_, but only if the client is still focused once Ghostty answered (a fast switch must not pair the wrong terminal); a terminal holds one client, so an older pairing with it is dropped. `focus` raises the exact terminal (window, tab, split) through `tmux run-shell`: Apple Events from the tmux server count as Ghostty's own, so no permission prompt. a terminal that is gone is forgotten and the app activated, as without a pairing. - in a hook, #{client_name} can be another client (the previous event's); the snippet's hook uses #{hook_client}. e2e step 20: two nested clients on one session, focused by typing focus reports into their outer panes, a fake osascript as Ghostty, a fake open (tests never activate a real app); it loads the snippet's own hook line. each rule has a negative control that fails. --- ROADMAP.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ROADMAP.md') diff --git a/ROADMAP.md b/ROADMAP.md index 72efca8..52bc837 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -5,8 +5,7 @@ In priority order. 1. ~~**Restore after a crash or shutdown.**~~ Done for pi and Claude Code (see the README). Next, when used: other agents' session references (codex, ...). -2. **Raise the right window.** Jumping to an agent activates the terminal - app; with several windows (several Ghostty windows, say) it should raise - the exact window that holds the tmux client, not whichever was last used. +2. ~~**Raise the right window.**~~ Done for Ghostty (see the README). + Next, when used: Alacritty with several windows in one process. 3. **Preview in agent search.** Show the last lines of the selected agent's pane (`tmux capture-pane`) beside the results. -- cgit v1.2.3