Skip to content

Commit d7388c6

Browse files
committed
fix(files): import the folder picker from the components barrel
CI's Lint and Test failed on sub-block-password.test.tsx, a test this branch does not touch, with a missing icon export from a partial mock. The cause was a deep import. sub-block.tsx takes every other subblock component from the components barrel, and that test mocks the barrel wholesale — which is what keeps the editor's module graph out of its way. My folder picker was imported directly from its file instead, bypassing the mock and pulling the real chain in behind it: use-resource-folders, the realtime invalidation room, the socket provider, the workflow stores, and through them the block and trigger registries. Every trigger's icon then had to appear in that test's icon mock. Exporting the picker from the barrel and importing it from there fixes it with no change to the test, which is the sign it was the right fix — I had first patched the mock, then stubbed the socket provider, and both were treating a symptom. The repo's import rules already say to use the barrel; I had not.
1 parent 0878ae6 commit d7388c6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export { ResponseFormat } from './response'
2323
export { ScheduleInfo } from './schedule-info'
2424
export { SelectorInput, type SelectorOverrides } from './selector-input'
2525
export { ShortInput } from './short-input'
26+
export { SimFolderTreeSelector } from './sim-folder-tree-selector/sim-folder-tree-selector'
2627
export { SkillInput } from './skill-input'
2728
export { SliderInput } from './slider-input'
2829
export { SortBuilder } from './sort-builder'

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
SelectorInput,
3838
type SelectorOverrides,
3939
ShortInput,
40+
SimFolderTreeSelector,
4041
SkillInput,
4142
SliderInput,
4243
SortBuilder,
@@ -52,7 +53,6 @@ import {
5253
WorkflowSelectorInput,
5354
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components'
5455
import { MODAL_REGISTRY } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/modal-registry'
55-
import { SimFolderTreeSelector } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sim-folder-tree-selector/sim-folder-tree-selector'
5656
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
5757
import type { SubBlockConfig } from '@/blocks/types'
5858
import { useWebhookManagement } from '@/hooks/use-webhook-management'

0 commit comments

Comments
 (0)