docs/socket-focus-steal-audit.todo.md
Ensure commands run through the cmux Unix socket/CLI do not steal user focus from the current UI workflow.
Policy target:
TerminalController.AppDelegate (focusMainWindow, createMainWindow).rename-tab command with env-default targeting.rename-tab.These may mutate in-app focus/selection state:
v1:
focus_windowselect_workspacefocus_surfacefocus_panefocus_surface_by_panelfocus_webviewfocus_notification (debug)activate_app (debug)v2:
window.focusworkspace.selectworkspace.nextworkspace.previousworkspace.lastsurface.focuspane.focuspane.lastbrowser.focus_webviewbrowser.focusbrowser.tab.switchdebug.notification.focusdebug.app.activateAll other commands should preserve current user focus context.
v1 ping, help
v1 window commands (list_windows, current_window, focus_window, new_window, close_window)
v1 workspace commands (move_workspace_to_window, list_workspaces, new_workspace, close_workspace, select_workspace, current_workspace)
v1 surface/pane commands (new_split, list_surfaces, focus_surface, list_panes, list_pane_surfaces, focus_pane, focus_surface_by_panel, drag_surface_to_split, new_pane, new_surface, close_surface, refresh_surfaces, surface_health)
v1 input commands (send, send_key, send_surface, send_key_surface, read_screen)
v1 notification/status/log/report commands (notify*, list_notifications, clear_notifications, set_status, clear_status, list_status, log, clear_log, list_log, set_progress, clear_progress, report_*, ports_kick, sidebar_state, reset_sidebar)
v1 browser commands (open_browser, navigate, browser_back, browser_forward, browser_reload, get_url, focus_webview, is_webview_focused)
v1 debug/test commands (shortcut, type, drop/pasteboard, overlay probes, focus checks, screenshots, render/layout/flash/panel snapshot)
v2 system methods (system.*)
v2 window methods (window.*)
v2 workspace methods (workspace.*)
v2 surface methods (surface.*, tab.action)
v2 pane methods (pane.*)
v2 notification methods (notification.*)
v2 app methods (app.*)
v2 browser methods (full browser.* set including tab/network/trace/input)
v2 debug methods (debug.*)
rename-workspace + rename-window behavior remains intact.rename-tab command (defaults to CMUX_TAB_ID / CMUX_SURFACE_ID / CMUX_WORKSPACE_ID when flags omitted).