mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 16:02:35 +00:00
perf: reset automation branch picker by repo key (#4073)
This commit is contained in:
@@ -318,6 +318,9 @@ export function AutomationEditorDialog({
|
||||
/>
|
||||
) : (
|
||||
<CreateFromPicker
|
||||
// Why: branch search state belongs to the selected project,
|
||||
// so repo switches should reset it before the next paint.
|
||||
key={draft.projectId}
|
||||
repoId={draft.projectId}
|
||||
repoMap={repoMap}
|
||||
worktrees={worktrees}
|
||||
|
||||
@@ -127,12 +127,6 @@ export function CreateFromPicker({
|
||||
}
|
||||
}, [activeRuntimeEnvironmentId, repoId])
|
||||
|
||||
React.useEffect(() => {
|
||||
setQuery('')
|
||||
setSearchResults([])
|
||||
setIsSearching(false)
|
||||
}, [repoId])
|
||||
|
||||
React.useEffect(() => {
|
||||
const trimmedQuery = query.trim()
|
||||
if (!open || !repoId || trimmedQuery.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user