Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,9 @@ export function SecretsManager() {
}
}

const validVariables = envVars
.filter((v) => v.key && v.value)
.reduce<Record<string, string>>((acc, { key, value }) => ({ ...acc, [key]: value }), {})
const validVariables = Object.fromEntries(
envVars.filter((v) => v.key && v.value).map(({ key, value }) => [key, value])
)

const before = initialWorkspaceVarsRef.current
const after = mergedWorkspaceVars
Expand Down
14 changes: 5 additions & 9 deletions apps/sim/stores/workflows/workflow/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,11 @@ export const useWorkflowStore = create<WorkflowStore>()(
const activeWorkflowId = get().currentWorkflowId
const mergedBlock = mergeSubblockState(get().blocks, activeWorkflowId || undefined, id)[id]

const newSubBlocks = Object.entries(mergedBlock.subBlocks).reduce(
(acc, [subId, subBlock]) => ({
...acc,
[subId]: {
...subBlock,
value: structuredClone(subBlock.value),
},
}),
{}
const newSubBlocks = Object.fromEntries(
Object.entries(mergedBlock.subBlocks).map(([subId, subBlock]) => [
subId,
{ ...subBlock, value: structuredClone(subBlock.value) },
])
)

// Remap condition/router IDs in the duplicated subBlocks
Expand Down
15 changes: 14 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,25 @@
"noStaticOnlyClass": "off"
},
"performance": {
"noAccumulatingSpread": "off",
"noAccumulatingSpread": "error",
"noDelete": "error",
"noImgElement": "off"
}
}
},
"overrides": [
{
"includes": ["packages/**"],
"linter": {
"rules": {
"correctness": {
"noUnusedFunctionParameters": "error",
"noUnusedVariables": "error"
}
}
}
}
],
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/src/mocks/socket.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function createMockSocket(): IMockSocket {
disconnected: false,

// Core methods
emit: vi.fn((event: string, ..._args: any[]) => {
emit: vi.fn((_event: string, ..._args: any[]) => {
return socket
}),

Expand Down
2 changes: 1 addition & 1 deletion packages/ts-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class SimStudioClient {
try {
const status = await this.getWorkflowStatus(workflowId)
return status.isDeployed
} catch (error) {
} catch {
return false
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/workflow-persistence/src/subflow-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function generateLoopBlocks(blocks: Record<string, BlockState>): Record<s

Object.entries(blocks)
.filter(([_, block]) => block.type === 'loop')
.forEach(([id, block]) => {
.forEach(([id]) => {
const loop = convertLoopBlockToLoop(id, blocks)
if (loop) {
loops[id] = loop
Expand All @@ -95,7 +95,7 @@ export function generateParallelBlocks(

Object.entries(blocks)
.filter(([_, block]) => block.type === 'parallel')
.forEach(([id, block]) => {
.forEach(([id]) => {
const parallel = convertParallelBlockToParallel(id, blocks)
if (parallel) {
parallels[id] = parallel
Expand Down
10 changes: 8 additions & 2 deletions packages/workflow-renderer/src/subflow/subflow-node-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ export interface SubflowNodeViewProps {
isFocused: boolean
/** Whether execution controls are active for this subflow. */
isRunning?: boolean
/** Whether the parent workflow is executing. Holds every subflow action swell open. */
/**
* Whether the parent workflow is executing.
*
* Accepted and currently unread: `subflow-node.tsx` supplies it and nothing
* below consults it, so the hold-open behavior this once claimed is not
* implemented. Kept in the interface because the caller passes it — wire it up
* or stop passing it, but do not read this as working today.
*/
isWorkflowRunning?: boolean
/** Whether this subflow participates in the current execution handoff. */
isExecutionHighlighted?: boolean
Expand Down Expand Up @@ -326,7 +333,6 @@ export function SubflowNodeView({
isLocked,
isFocused,
isRunning = false,
isWorkflowRunning = false,
isExecutionHighlighted = false,
diffStatus,
nestingLevel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,14 @@ export interface WorkflowBlockViewProps {
runPathStatus?: BlockRunStatus
/** Whether execution controls are active for this block. */
isRunning?: boolean
/** Whether the parent workflow is executing. Holds every block's action swell open. */
/**
* Whether the parent workflow is executing.
*
* Accepted and currently unread: `workflow-block.tsx` supplies it and nothing
* below consults it, so the hold-open behavior this once claimed is not
* implemented. Kept in the interface because the caller passes it — wire it up
* or stop passing it, but do not read this as working today.
*/
isWorkflowRunning?: boolean
/** Whether this block participates in the current execution handoff. */
isExecutionHighlighted?: boolean
Expand Down Expand Up @@ -521,7 +528,6 @@ export function WorkflowBlockView({
ringStyles,
runPathStatus,
isRunning = false,
isWorkflowRunning = false,
isExecutionHighlighted = false,
Icon,
iconBgColor,
Expand Down
Loading