Skip to content

Commit 293863c

Browse files
committed
fix(tables): keep the select colours off the @/lib/table barrel
CI's tool-registry boundary check caught this. Importing SELECT_OPTION_COLORS as a VALUE from the `@/lib/table` barrel turned what had been a type-only import in a client component into a real runtime edge, and that barrel reaches the executor — pulling the executable tool registry (~4,700 modules) into the chat, home and tables route graphs. Deep-imported from `@/lib/table/types`, which is a leaf: its only other imports are type-only. The barrel stays fine for `import type`.
1 parent b3a60de commit 293863c

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/select-field/select-color-picker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
DropdownMenuRadioItem,
99
DropdownMenuTrigger,
1010
} from '@sim/emcn'
11-
import { SELECT_OPTION_COLORS, type SelectOptionColor } from '@/lib/table'
11+
// Deep import, not the `@/lib/table` barrel — see select-options-editor.tsx.
12+
import { SELECT_OPTION_COLORS, type SelectOptionColor } from '@/lib/table/types'
1213

1314
interface SelectColorPickerProps {
1415
color: SelectOptionColor | undefined

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/select-field/select-options-editor.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { useEffect, useRef, useState } from 'react'
44
import { Button, ChipInput } from '@sim/emcn'
55
import { X } from '@sim/emcn/icons'
66
import { generateShortId } from '@sim/utils/id'
7-
import { SELECT_OPTION_COLORS, type SelectOption } from '@/lib/table'
7+
// Deep import, not the `@/lib/table` barrel: this is a VALUE, and a runtime
8+
// edge from a client component into that barrel reaches the executor and drags
9+
// the executable tool registry (~4,700 modules) into three route bundles. The
10+
// barrel is safe for `import type` only.
11+
import type { SelectOption } from '@/lib/table'
12+
import { SELECT_OPTION_COLORS } from '@/lib/table/types'
813
import { SelectColorPicker } from './select-color-picker'
914

1015
interface SelectOptionsEditorProps {

0 commit comments

Comments
 (0)