mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 00:02:41 +00:00
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:
@@ -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 */}
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user