Skip to content

Commit 304cf71

Browse files
authored
improvement(cmdk): refactor search modal to use cmdk + fix icon SVG IDs (#3044)
* improvement(cmdk): refactor search modal to use cmdk + fix icon SVG IDs * chore: remove unrelated workflow.tsx changes * chore: remove comments * chore: add devtools middleware to search modal store * fix: allow search data re-initialization when permissions change * fix: include keywords in search filter + show service name in tool operations * fix: correct filterBlocks type signature * fix: move generic to function parameter position * fix(mcp): correct event handler type for onInput * perf: always render command palette for instant opening * fix: clear search input when modal reopens
1 parent 0d0209a commit 304cf71

File tree

8 files changed

+1042
-1205
lines changed

8 files changed

+1042
-1205
lines changed

apps/docs/components/icons.tsx

Lines changed: 220 additions & 165 deletions
Large diffs are not rendered by default.

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx

Lines changed: 378 additions & 616 deletions
Large diffs are not rendered by default.

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-utils.ts

Lines changed: 0 additions & 241 deletions
This file was deleted.

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/mcp/mcp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function FormattedInput({
176176
onChange,
177177
onScroll,
178178
}: FormattedInputProps) {
179-
const handleScroll = (e: React.UIEvent<HTMLInputElement>) => {
179+
const handleScroll = (e: { currentTarget: HTMLInputElement }) => {
180180
onScroll(e.currentTarget.scrollLeft)
181181
}
182182

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ export const Sidebar = memo(function Sidebar() {
7373

7474
const { data: sessionData, isPending: sessionLoading } = useSession()
7575
const { canEdit } = useUserPermissionsContext()
76-
const { config: permissionConfig } = usePermissionConfig()
76+
const { config: permissionConfig, filterBlocks } = usePermissionConfig()
77+
const initializeSearchData = useSearchModalStore((state) => state.initializeData)
78+
79+
useEffect(() => {
80+
initializeSearchData(filterBlocks)
81+
}, [initializeSearchData, filterBlocks])
7782

7883
/**
7984
* Sidebar state from store with hydration tracking to prevent SSR mismatch.

0 commit comments

Comments
 (0)