fix: clear add repo focus frames from refs (#3502)

This commit is contained in:
Neil
2026-05-29 23:42:02 -07:00
committed by GitHub
parent 43a565b93e
commit 2982659d2c
3 changed files with 3 additions and 9 deletions
@@ -5,7 +5,7 @@
* oxlint limit, following the same pattern as useRemoteRepo.
*/
import React, { useCallback, useEffect, useRef, useState } from 'react'
import React, { useCallback, useRef, useState } from 'react'
import { toast } from 'sonner'
import { Folder, GitBranch, Home, Pencil } from 'lucide-react'
import { useAppStore } from '@/store'
@@ -301,8 +301,6 @@ export function CreateStep({
radioFocusFrameRef.current = null
}, [])
useEffect(() => cancelRadioFocusFrame, [cancelRadioFocusFrame])
const setRadioGroupNode = useCallback(
(node: HTMLDivElement | null): void => {
// Why: the queued arrow-key focus is only valid while this radiogroup is mounted.
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useRef, useState } from 'react'
import React, { useCallback, useRef, useState } from 'react'
import { GitBranch, GitBranchPlus, Settings } from 'lucide-react'
import { DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
@@ -158,8 +158,6 @@ export function ProjectAddedContent({
radioFocusFrameRef.current = null
}, [])
useEffect(() => cancelRadioFocusFrame, [cancelRadioFocusFrame])
const setRadioGroupNode = useCallback(
(node: HTMLDivElement | null): void => {
// Why: the queued arrow-key focus is only valid while this radiogroup is mounted.
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import React, { useCallback, useMemo, useRef, useState } from 'react'
import { Check, ChevronsUpDown, LoaderCircle, Pencil, Plus, RefreshCcw } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
@@ -84,8 +84,6 @@ export default function SparseCheckoutPresetSelect({
nameInputFocusFrameRef.current = null
}, [])
useEffect(() => cancelNameInputFocusFrame, [cancelNameInputFocusFrame])
const setNameInputNode = useCallback(
(node: HTMLInputElement | null): void => {
// Why: the queued draft focus is only valid while this input is mounted.