fix(sidebar): satisfy extracted hook quality gates (#14467)

This commit is contained in:
Neil
2026-08-13 23:40:04 -07:00
committed by GitHub
parent 08027d0d23
commit fcd99fc032
2 changed files with 2 additions and 6 deletions
@@ -136,8 +136,6 @@ export function usePendingSidebarReveal(args: PendingSidebarRevealArgs): void {
cancelled = true
cancelPendingRevealFrames()
}
// Why: the effect re-reads live inputs through argsRef; only reveal-relevant identities should retrigger it.
// oxlint-disable-next-line react-hooks/exhaustive-deps
}, [
pendingRevealWorktree,
args.agentSendTargetWorktreeId,
@@ -265,8 +263,6 @@ export function usePendingSidebarReveal(args: PendingSidebarRevealArgs): void {
cancelled = true
cancelPendingRevealFrames()
}
// Why: the effect re-reads live inputs through argsRef; only reveal-relevant identities should retrigger it.
// oxlint-disable-next-line react-hooks/exhaustive-deps
}, [
pendingRevealSidebarRow,
args.repoMap,
@@ -1,4 +1,4 @@
import { useCallback, useEffect, useState } from 'react'
import { useCallback, useLayoutEffect, useState } from 'react'
import type { ActiveSurfaceVariant } from '../WorktreeCard'
import type { HostSectionRow } from '../host-section-rows'
import type { PinnedWorktreeDisplayPolicy } from '../worktree-list-groups'
@@ -18,7 +18,7 @@ export function usePrimaryActiveWorktreeRow(args: {
rowKey: string
} | null>(null)
useEffect(() => {
useLayoutEffect(() => {
if (activeWorktreeId === null) {
setPrimaryActiveWorktreeRow(null)
return