Skip to content

Commit 925f06a

Browse files
improvement(preview): render nested values like input format correctly in workflow execution preview (#3154)
* improvement(preview): nested workflow snapshots/preview when not executed * improvements to resolve nested subblock values * few more things * add try catch * fix fallback case * deps
1 parent 193b95c commit 925f06a

File tree

17 files changed

+171
-43
lines changed

17 files changed

+171
-43
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ interface CredentialSelectorProps {
3535
disabled?: boolean
3636
isPreview?: boolean
3737
previewValue?: any | null
38+
previewContextValues?: Record<string, unknown>
3839
}
3940

4041
export function CredentialSelector({
@@ -43,6 +44,7 @@ export function CredentialSelector({
4344
disabled = false,
4445
isPreview = false,
4546
previewValue,
47+
previewContextValues,
4648
}: CredentialSelectorProps) {
4749
const [showOAuthModal, setShowOAuthModal] = useState(false)
4850
const [editingValue, setEditingValue] = useState('')
@@ -67,7 +69,11 @@ export function CredentialSelector({
6769
canUseCredentialSets
6870
)
6971

70-
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, { disabled, isPreview })
72+
const { depsSatisfied, dependsOn } = useDependsOnGate(blockId, subBlock, {
73+
disabled,
74+
isPreview,
75+
previewContextValues,
76+
})
7177
const hasDependencies = dependsOn.length > 0
7278

7379
const effectiveDisabled = disabled || (hasDependencies && !depsSatisfied)

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Tooltip } from '@/components/emcn'
55
import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox'
66
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
77
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
8+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
89
import type { SubBlockConfig } from '@/blocks/types'
910
import type { SelectorContext } from '@/hooks/selectors/types'
1011

@@ -33,7 +34,9 @@ export function DocumentSelector({
3334
previewContextValues,
3435
})
3536
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
36-
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
37+
const knowledgeBaseIdValue = previewContextValues
38+
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
39+
: knowledgeBaseIdFromStore
3740
const normalizedKnowledgeBaseId =
3841
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
3942
? knowledgeBaseIdValue

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/
1717
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
1818
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
1919
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
20+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
2021
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
2122
import type { SubBlockConfig } from '@/blocks/types'
2223
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
@@ -77,7 +78,9 @@ export function DocumentTagEntry({
7778
})
7879

7980
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
80-
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
81+
const knowledgeBaseIdValue = previewContextValues
82+
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
83+
: knowledgeBaseIdFromStore
8184
const knowledgeBaseId =
8285
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
8386
? knowledgeBaseIdValue

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

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
99
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
1010
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
1111
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
12+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
1213
import { getBlock } from '@/blocks/registry'
1314
import type { SubBlockConfig } from '@/blocks/types'
1415
import { isDependency } from '@/blocks/utils'
@@ -62,42 +63,56 @@ export function FileSelectorInput({
6263

6364
const [domainValueFromStore] = useSubBlockValue(blockId, 'domain')
6465

65-
const connectedCredential = previewContextValues?.credential ?? blockValues.credential
66-
const domainValue = previewContextValues?.domain ?? domainValueFromStore
66+
const connectedCredential = previewContextValues
67+
? resolvePreviewContextValue(previewContextValues.credential)
68+
: blockValues.credential
69+
const domainValue = previewContextValues
70+
? resolvePreviewContextValue(previewContextValues.domain)
71+
: domainValueFromStore
6772

6873
const teamIdValue = useMemo(
6974
() =>
70-
previewContextValues?.teamId ??
71-
resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
72-
[previewContextValues?.teamId, blockValues, canonicalIndex, canonicalModeOverrides]
75+
previewContextValues
76+
? resolvePreviewContextValue(previewContextValues.teamId)
77+
: resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
78+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
7379
)
7480

7581
const siteIdValue = useMemo(
7682
() =>
77-
previewContextValues?.siteId ??
78-
resolveDependencyValue('siteId', blockValues, canonicalIndex, canonicalModeOverrides),
79-
[previewContextValues?.siteId, blockValues, canonicalIndex, canonicalModeOverrides]
83+
previewContextValues
84+
? resolvePreviewContextValue(previewContextValues.siteId)
85+
: resolveDependencyValue('siteId', blockValues, canonicalIndex, canonicalModeOverrides),
86+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
8087
)
8188

8289
const collectionIdValue = useMemo(
8390
() =>
84-
previewContextValues?.collectionId ??
85-
resolveDependencyValue('collectionId', blockValues, canonicalIndex, canonicalModeOverrides),
86-
[previewContextValues?.collectionId, blockValues, canonicalIndex, canonicalModeOverrides]
91+
previewContextValues
92+
? resolvePreviewContextValue(previewContextValues.collectionId)
93+
: resolveDependencyValue(
94+
'collectionId',
95+
blockValues,
96+
canonicalIndex,
97+
canonicalModeOverrides
98+
),
99+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
87100
)
88101

89102
const projectIdValue = useMemo(
90103
() =>
91-
previewContextValues?.projectId ??
92-
resolveDependencyValue('projectId', blockValues, canonicalIndex, canonicalModeOverrides),
93-
[previewContextValues?.projectId, blockValues, canonicalIndex, canonicalModeOverrides]
104+
previewContextValues
105+
? resolvePreviewContextValue(previewContextValues.projectId)
106+
: resolveDependencyValue('projectId', blockValues, canonicalIndex, canonicalModeOverrides),
107+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
94108
)
95109

96110
const planIdValue = useMemo(
97111
() =>
98-
previewContextValues?.planId ??
99-
resolveDependencyValue('planId', blockValues, canonicalIndex, canonicalModeOverrides),
100-
[previewContextValues?.planId, blockValues, canonicalIndex, canonicalModeOverrides]
112+
previewContextValues
113+
? resolvePreviewContextValue(previewContextValues.planId)
114+
: resolveDependencyValue('planId', blockValues, canonicalIndex, canonicalModeOverrides),
115+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
101116
)
102117

103118
const normalizedCredentialId =

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
66
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
77
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
88
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
9+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
910
import type { SubBlockConfig } from '@/blocks/types'
1011
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
1112
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'
@@ -17,6 +18,7 @@ interface FolderSelectorInputProps {
1718
disabled?: boolean
1819
isPreview?: boolean
1920
previewValue?: any | null
21+
previewContextValues?: Record<string, unknown>
2022
}
2123

2224
export function FolderSelectorInput({
@@ -25,9 +27,13 @@ export function FolderSelectorInput({
2527
disabled = false,
2628
isPreview = false,
2729
previewValue,
30+
previewContextValues,
2831
}: FolderSelectorInputProps) {
2932
const [storeValue] = useSubBlockValue(blockId, subBlock.id)
30-
const [connectedCredential] = useSubBlockValue(blockId, 'credential')
33+
const [credentialFromStore] = useSubBlockValue(blockId, 'credential')
34+
const connectedCredential = previewContextValues
35+
? resolvePreviewContextValue(previewContextValues.credential)
36+
: credentialFromStore
3137
const { collaborativeSetSubblockValue } = useCollaborativeWorkflow()
3238
const { activeWorkflowId } = useWorkflowRegistry()
3339
const [selectedFolderId, setSelectedFolderId] = useState<string>('')
@@ -47,7 +53,11 @@ export function FolderSelectorInput({
4753
)
4854

4955
// Central dependsOn gating
50-
const { finalDisabled } = useDependsOnGate(blockId, subBlock, { disabled, isPreview })
56+
const { finalDisabled } = useDependsOnGate(blockId, subBlock, {
57+
disabled,
58+
isPreview,
59+
previewContextValues,
60+
})
5161

5262
// Get the current value from the store or prop value if in preview mode
5363
useEffect(() => {

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/
77
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
88
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
99
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
10+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
1011
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
1112
import { useWorkflowState } from '@/hooks/queries/workflows'
1213

@@ -37,6 +38,8 @@ interface InputMappingProps {
3738
isPreview?: boolean
3839
previewValue?: Record<string, unknown>
3940
disabled?: boolean
41+
/** Sub-block values from the preview context for resolving sibling sub-block values */
42+
previewContextValues?: Record<string, unknown>
4043
}
4144

4245
/**
@@ -50,9 +53,13 @@ export function InputMapping({
5053
isPreview = false,
5154
previewValue,
5255
disabled = false,
56+
previewContextValues,
5357
}: InputMappingProps) {
5458
const [mapping, setMapping] = useSubBlockValue(blockId, subBlockId)
55-
const [selectedWorkflowId] = useSubBlockValue(blockId, 'workflowId')
59+
const [storeWorkflowId] = useSubBlockValue(blockId, 'workflowId')
60+
const selectedWorkflowId = previewContextValues
61+
? resolvePreviewContextValue(previewContextValues.workflowId)
62+
: storeWorkflowId
5663

5764
const inputController = useSubBlockInput({
5865
blockId,

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { type FilterFieldType, getOperatorsForFieldType } from '@/lib/knowledge/
1717
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
1818
import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown'
1919
import { useSubBlockInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-input'
20+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
2021
import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
2122
import type { SubBlockConfig } from '@/blocks/types'
2223
import { useKnowledgeBaseTagDefinitions } from '@/hooks/kb/use-knowledge-base-tag-definitions'
@@ -69,7 +70,9 @@ export function KnowledgeTagFilters({
6970
const overlayRefs = useRef<Record<string, HTMLDivElement>>({})
7071

7172
const [knowledgeBaseIdFromStore] = useSubBlockValue(blockId, 'knowledgeBaseId')
72-
const knowledgeBaseIdValue = previewContextValues?.knowledgeBaseId ?? knowledgeBaseIdFromStore
73+
const knowledgeBaseIdValue = previewContextValues
74+
? resolvePreviewContextValue(previewContextValues.knowledgeBaseId)
75+
: knowledgeBaseIdFromStore
7376
const knowledgeBaseId =
7477
typeof knowledgeBaseIdValue === 'string' && knowledgeBaseIdValue.trim().length > 0
7578
? knowledgeBaseIdValue

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { cn } from '@/lib/core/utils/cn'
66
import { LongInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input'
77
import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input'
88
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
9+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
910
import type { SubBlockConfig } from '@/blocks/types'
1011
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
1112
import { formatParameterLabel } from '@/tools/params'
@@ -18,6 +19,7 @@ interface McpDynamicArgsProps {
1819
disabled?: boolean
1920
isPreview?: boolean
2021
previewValue?: any
22+
previewContextValues?: Record<string, unknown>
2123
}
2224

2325
/**
@@ -47,12 +49,19 @@ export function McpDynamicArgs({
4749
disabled = false,
4850
isPreview = false,
4951
previewValue,
52+
previewContextValues,
5053
}: McpDynamicArgsProps) {
5154
const params = useParams()
5255
const workspaceId = params.workspaceId as string
5356
const { mcpTools, isLoading } = useMcpTools(workspaceId)
54-
const [selectedTool] = useSubBlockValue(blockId, 'tool')
55-
const [cachedSchema] = useSubBlockValue(blockId, '_toolSchema')
57+
const [toolFromStore] = useSubBlockValue(blockId, 'tool')
58+
const selectedTool = previewContextValues
59+
? resolvePreviewContextValue(previewContextValues.tool)
60+
: toolFromStore
61+
const [schemaFromStore] = useSubBlockValue(blockId, '_toolSchema')
62+
const cachedSchema = previewContextValues
63+
? resolvePreviewContextValue(previewContextValues._toolSchema)
64+
: schemaFromStore
5665
const [toolArgs, setToolArgs] = useSubBlockValue(blockId, subBlockId)
5766

5867
const selectedToolConfig = mcpTools.find((tool) => tool.id === selectedTool)

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from 'react'
44
import { useParams } from 'next/navigation'
55
import { Combobox } from '@/components/emcn/components'
66
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
7+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
78
import type { SubBlockConfig } from '@/blocks/types'
89
import { useMcpTools } from '@/hooks/mcp/use-mcp-tools'
910

@@ -13,6 +14,7 @@ interface McpToolSelectorProps {
1314
disabled?: boolean
1415
isPreview?: boolean
1516
previewValue?: string | null
17+
previewContextValues?: Record<string, unknown>
1618
}
1719

1820
export function McpToolSelector({
@@ -21,6 +23,7 @@ export function McpToolSelector({
2123
disabled = false,
2224
isPreview = false,
2325
previewValue,
26+
previewContextValues,
2427
}: McpToolSelectorProps) {
2528
const params = useParams()
2629
const workspaceId = params.workspaceId as string
@@ -31,7 +34,10 @@ export function McpToolSelector({
3134
const [storeValue, setStoreValue] = useSubBlockValue(blockId, subBlock.id)
3235
const [, setSchemaCache] = useSubBlockValue(blockId, '_toolSchema')
3336

34-
const [serverValue] = useSubBlockValue(blockId, 'server')
37+
const [serverFromStore] = useSubBlockValue(blockId, 'server')
38+
const serverValue = previewContextValues
39+
? resolvePreviewContextValue(previewContextValues.server)
40+
: serverFromStore
3541

3642
const label = subBlock.placeholder || 'Select tool'
3743

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
99
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
1010
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
1111
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
12+
import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils'
1213
import { getBlock } from '@/blocks/registry'
1314
import type { SubBlockConfig } from '@/blocks/types'
1415
import { resolveSelectorForSubBlock } from '@/hooks/selectors/resolution'
@@ -55,14 +56,19 @@ export function ProjectSelectorInput({
5556
return (workflowValues as Record<string, Record<string, unknown>>)[blockId] || {}
5657
})
5758

58-
const connectedCredential = previewContextValues?.credential ?? blockValues.credential
59-
const jiraDomain = previewContextValues?.domain ?? jiraDomainFromStore
59+
const connectedCredential = previewContextValues
60+
? resolvePreviewContextValue(previewContextValues.credential)
61+
: blockValues.credential
62+
const jiraDomain = previewContextValues
63+
? resolvePreviewContextValue(previewContextValues.domain)
64+
: jiraDomainFromStore
6065

6166
const linearTeamId = useMemo(
6267
() =>
63-
previewContextValues?.teamId ??
64-
resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
65-
[previewContextValues?.teamId, blockValues, canonicalIndex, canonicalModeOverrides]
68+
previewContextValues
69+
? resolvePreviewContextValue(previewContextValues.teamId)
70+
: resolveDependencyValue('teamId', blockValues, canonicalIndex, canonicalModeOverrides),
71+
[previewContextValues, blockValues, canonicalIndex, canonicalModeOverrides]
6672
)
6773

6874
const serviceId = subBlock.serviceId || ''

0 commit comments

Comments
 (0)