From 120913307646e04d07efd57ea01adbe8d619e17a Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Fri, 29 May 2026 23:26:12 -0700 Subject: [PATCH] Clear checks title focus timer from ref (#3496) * fix: clear checks title focus timer from ref * fix: keep shell detection within lint budget --- .../components/right-sidebar/ChecksPanel.tsx | 11 ++++++++-- src/shared/agent-detection.ts | 22 +++++-------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx index 9b8f77a4a3b..fe8f42a8116 100644 --- a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx +++ b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx @@ -168,7 +168,14 @@ export default function ChecksPanel(): React.JSX.Element { } }, []) - useEffect(() => clearTitleInputFocusTimer, [clearTitleInputFocusTimer]) + const setChecksPanelContentRef = useCallback( + (node: HTMLDivElement | null) => { + if (node === null) { + clearTitleInputFocusTimer() + } + }, + [clearTitleInputFocusTimer] + ) // Why: the sidebar no longer uses key={activeWorktreeId} to force a full // remount on worktree switch (that caused an IPC storm on Windows). Reset @@ -1585,7 +1592,7 @@ export default function ChecksPanel(): React.JSX.Element { } return ( -
+
{/* PR Header */}
{/* PR number + state badge + refresh + open link */} diff --git a/src/shared/agent-detection.ts b/src/shared/agent-detection.ts index 2fef6182dc0..935e3a1af26 100644 --- a/src/shared/agent-detection.ts +++ b/src/shared/agent-detection.ts @@ -507,26 +507,16 @@ export function detectAgentStatusFromTitle(title: string): AgentStatus | null { // renderer (agent-ready-wait, new-workspace). A bare shell is the only process // type that garbles injected preambles, so this is the negative signal for // "is an agent running". -const SHELL_NAMES = new Set([ - '', - 'bash', - 'zsh', - 'sh', - 'fish', - 'cmd', - 'cmd.exe', - 'powershell', - 'powershell.exe', - 'pwsh', - 'pwsh.exe', - 'nu' -]) +const SHELL_NAMES = new Set( + '|bash|zsh|sh|fish|cmd|cmd.exe|powershell|powershell.exe|pwsh|pwsh.exe|nu'.split('|') +) export function isShellProcess(processName: string): boolean { const normalized = processName .trim() .replace(/^["']|["']$/g, '') .toLowerCase() - const basename = normalized.split(/[\\/]/).pop() ?? normalized - return SHELL_NAMES.has(normalized) || SHELL_NAMES.has(basename) + return ( + SHELL_NAMES.has(normalized) || SHELL_NAMES.has(normalized.split(/[\\/]/).pop() ?? normalized) + ) }