Clear checks title focus timer from ref (#3496)

* fix: clear checks title focus timer from ref

* fix: keep shell detection within lint budget
This commit is contained in:
Neil
2026-05-29 23:26:12 -07:00
committed by GitHub
parent 270ccb2ef8
commit 1209133076
2 changed files with 15 additions and 18 deletions
@@ -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 (
<div className="flex-1 overflow-auto scrollbar-sleek">
<div ref={setChecksPanelContentRef} className="flex-1 overflow-auto scrollbar-sleek">
{/* PR Header */}
<div className="px-3 py-3 border-b border-border space-y-2.5">
{/* PR number + state badge + refresh + open link */}
+6 -16
View File
@@ -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)
)
}