Severity: HIGH
Status: Fixed
Following the introduction of second-granularity caching in Bug #425, the status line appeared noticeably delayed/laggy during interactive terminal sessions. Multiple state changes and lifecycle events updated underlying window/pane data without marking the status bar cache as dirty.
Auto-Rename Process Detection (renderToDisplayClient):
When getForegroundProcessName() detected a newly launched foreground process (e.g. vim, cat, cargo) or a return to shell (zsh), win.setName(proc_name_val) was called and self.dirty was set to true. However, self.status_dirty was never flagged. Within the active second, use_cache evaluated to true, and the status bar continued to display the previous process name until status-interval (default 15s) elapsed.
OSC Title Escape Sequences (windowTitleCallback):
When terminal programs emitted OSC 0 or OSC 2 window title sequences (\x1b]0;title\x07), windowTitleCallback updated window.name but did not notify the server of status dirtiness. The updated title was not rendered to the status line until the periodic interval timer fired.
Pane Selection and Layout Operations:
Switching active panes (select_pane_left/right/up/down, C-b o, mouse click via handleMouseFocus, select-pane), splitting panes, killing panes, and swapping panes did not set status_dirty = true. Formats relying on #{pane_title} or #{pane_index} lagged behind the actual active pane state.
Auto-Rename Inspection Rate-Limiting Lag:
getForegroundProcessName() was rate-limited to once every 1,000 ms. When the user pressed Enter to execute a command or when a child process exited (reapZombies), last_foreground_check_ms was not reset, adding up to 1,000 ms of latency before even polling the new process name.
Command Dispatch Status Invalidation:
dispatchCommand in src/server/dispatch.zig executed CLI / IPC commands but did not set server.status_dirty = true.
name_dirty: bool and active_pane_dirty: bool to Window, flagged in Window.setName and Window.setActivePane.active_window_dirty: bool to Session, flagged in Session.setActiveWindow, Session.newWindow, Session.killWindow, and Session.rename.renderToDisplayClient() to immediately set self.status_dirty = true.last_foreground_check_ms = 0 whenever Enter (\r or \n) is forwarded to a pane in processInput(), and whenever a child process terminates in reapZombies().self.status_dirty = true directly on win.setName(proc_name_val) inside renderToDisplayClient().self.status_dirty = true across executeAction() (splits, pane selections, copy mode, prompt, zoom, clock), handleMouseFocus(), and destroyPane().server.dirty = true; server.status_dirty = true; on successful command execution in dispatchCommand().