Skip to content

Commit 9cc335f

Browse files
waleedlatif1claude
andcommitted
refactor(panel-store): derive ActiveSearchTargetKind from WorkflowSearchTarget
Replaces the hand-maintained literal union with a derived type so adding a new target kind in search-replace/types.ts automatically propagates here. Co-Authored-By: Claude Opus 4.7 <[email protected]>
1 parent 241ee2f commit 9cc335f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sim/stores/panel/editor/store.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
import { create } from 'zustand'
44
import { persist } from 'zustand/middleware'
5+
import type { WorkflowSearchTarget } from '@/lib/workflows/search-replace/types'
56
import { EDITOR_CONNECTIONS_HEIGHT } from '@/stores/constants'
67
import { usePanelStore } from '../store'
78

89
let renameCallback: (() => void) | null = null
910

10-
export type ActiveSearchTargetKind = 'subblock' | 'subflow' | 'block-name'
11+
export type ActiveSearchTargetKind = WorkflowSearchTarget['kind']
1112

1213
export interface ActiveSearchTarget {
1314
matchId: string

0 commit comments

Comments
 (0)