pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/simstudioai/sim/commit/a3a99eda19223b4cbb035846ed92ed9de77d17d4

ink crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-95af332f763e4560.css" /> v0.5.82: slack trigger files, pagination for linear, executor fixes · simstudioai/sim@a3a99ed · GitHub
Skip to content

Commit a3a99ed

Browse files
authored
v0.5.82: slack trigger files, pagination for linear, executor fixes
2 parents 1a66d48 + ed5ed97 commit a3a99ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1069
-187
lines changed

apps/docs/content/docs/en/tools/linear.mdx

Lines changed: 198 additions & 21 deletions
Large diffs are not rendered by default.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,13 @@ export function useWorkflowExecution() {
491491
updateActiveBlocks(data.blockId, false)
492492
setBlockRunStatus(data.blockId, 'error')
493493

494+
executedBlockIds.add(data.blockId)
495+
accumulatedBlockStates.set(data.blockId, {
496+
output: { error: data.error },
497+
executed: true,
498+
executionTime: data.durationMs || 0,
499+
})
500+
494501
accumulatedBlockLogs.push(
495502
createBlockLogEntry(data, { success: false, output: {}, error: data.error })
496503
)

apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,15 @@ export function PreviewWorkflow({
349349
if (block.type === 'loop' || block.type === 'parallel') {
350350
const isSelected = selectedBlockId === blockId
351351
const dimensions = calculateContainerDimensions(blockId, workflowState.blocks)
352-
const subflowExecutionStatus = getSubflowExecutionStatus(blockId)
352+
353+
// Check for direct error on the subflow block itself (e.g., loop resolution errors)
354+
// before falling back to children-derived status
355+
const directExecution = blockExecutionMap.get(blockId)
356+
const subflowExecutionStatus: ExecutionStatus | undefined =
357+
directExecution?.status === 'error'
358+
? 'error'
359+
: (getSubflowExecutionStatus(blockId) ??
360+
(directExecution ? (directExecution.status as ExecutionStatus) : undefined))
353361

354362
nodeArray.push({
355363
id: blockId,

apps/sim/background/webhook-execution.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { executeWorkflowCore } from '@/lib/workflows/executor/execution-core'
2121
import { PauseResumeManager } from '@/lib/workflows/executor/human-in-the-loop-manager'
2222
import { loadDeployedWorkflowState } from '@/lib/workflows/persistence/utils'
2323
import { getWorkflowById } from '@/lib/workflows/utils'
24+
import { getBlock } from '@/blocks'
2425
import { ExecutionSnapshot } from '@/executor/execution/snapshot'
2526
import type { ExecutionMetadata } from '@/executor/execution/types'
2627
import { hasExecutionResult } from '@/executor/utils/errors'
@@ -74,8 +75,21 @@ async function processTriggerFileOutputs(
7475
logger.error(`[${context.requestId}] Error processing ${currentPath}:`, error)
7576
processed[key] = val
7677
}
78+
} else if (
79+
outputDef &&
80+
typeof outputDef === 'object' &&
81+
(outputDef.type === 'object' || outputDef.type === 'json') &&
82+
outputDef.properties
83+
) {
84+
// Explicit object schema with properties - recurse into properties
85+
processed[key] = await processTriggerFileOutputs(
86+
val,
87+
outputDef.properties,
88+
context,
89+
currentPath
90+
)
7791
} else if (outputDef && typeof outputDef === 'object' && !outputDef.type) {
78-
// Nested object in schema - recurse with the nested schema
92+
// Nested object in schema (flat pattern) - recurse with the nested schema
7993
processed[key] = await processTriggerFileOutputs(val, outputDef, context, currentPath)
8094
} else {
8195
// Not a file output - keep as is
@@ -405,11 +419,23 @@ async function executeWebhookJobInternal(
405419
const rawSelectedTriggerId = triggerBlock?.subBlocks?.selectedTriggerId?.value
406420
const rawTriggerId = triggerBlock?.subBlocks?.triggerId?.value
407421

408-
const resolvedTriggerId = [rawSelectedTriggerId, rawTriggerId].find(
422+
let resolvedTriggerId = [rawSelectedTriggerId, rawTriggerId].find(
409423
(candidate): candidate is string =>
410424
typeof candidate === 'string' && isTriggerValid(candidate)
411425
)
412426

427+
if (!resolvedTriggerId) {
428+
const blockConfig = getBlock(triggerBlock.type)
429+
if (blockConfig?.category === 'triggers' && isTriggerValid(triggerBlock.type)) {
430+
resolvedTriggerId = triggerBlock.type
431+
} else if (triggerBlock.triggerMode && blockConfig?.triggers?.enabled) {
432+
const available = blockConfig.triggers?.available?.[0]
433+
if (available && isTriggerValid(available)) {
434+
resolvedTriggerId = available
435+
}
436+
}
437+
}
438+
413439
if (resolvedTriggerId) {
414440
const triggerConfig = getTrigger(resolvedTriggerId)
415441

apps/sim/blocks/blocks/linear.ts

Lines changed: 99 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,29 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
810810
placeholder: 'Number of items to return (default: 50)',
811811
condition: {
812812
field: 'operation',
813-
value: ['linear_list_favorites'],
813+
value: [
814+
'linear_read_issues',
815+
'linear_search_issues',
816+
'linear_list_comments',
817+
'linear_list_projects',
818+
'linear_list_users',
819+
'linear_list_teams',
820+
'linear_list_labels',
821+
'linear_list_workflow_states',
822+
'linear_list_cycles',
823+
'linear_list_attachments',
824+
'linear_list_issue_relations',
825+
'linear_list_favorites',
826+
'linear_list_project_updates',
827+
'linear_list_notifications',
828+
'linear_list_customer_statuses',
829+
'linear_list_customer_tiers',
830+
'linear_list_customers',
831+
'linear_list_customer_requests',
832+
'linear_list_project_labels',
833+
'linear_list_project_milestones',
834+
'linear_list_project_statuses',
835+
],
814836
},
815837
},
816838
// Pagination - After (for list operations)
@@ -821,7 +843,29 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
821843
placeholder: 'Cursor for pagination',
822844
condition: {
823845
field: 'operation',
824-
value: ['linear_list_favorites'],
846+
value: [
847+
'linear_read_issues',
848+
'linear_search_issues',
849+
'linear_list_comments',
850+
'linear_list_projects',
851+
'linear_list_users',
852+
'linear_list_teams',
853+
'linear_list_labels',
854+
'linear_list_workflow_states',
855+
'linear_list_cycles',
856+
'linear_list_attachments',
857+
'linear_list_issue_relations',
858+
'linear_list_favorites',
859+
'linear_list_project_updates',
860+
'linear_list_notifications',
861+
'linear_list_customers',
862+
'linear_list_customer_requests',
863+
'linear_list_customer_statuses',
864+
'linear_list_customer_tiers',
865+
'linear_list_project_labels',
866+
'linear_list_project_milestones',
867+
'linear_list_project_statuses',
868+
],
825869
},
826870
},
827871
// Project health (for project updates)
@@ -1053,28 +1097,6 @@ Return ONLY the description text - no explanations.`,
10531097
value: ['linear_create_customer_request', 'linear_update_customer_request'],
10541098
},
10551099
},
1056-
// Pagination - first
1057-
{
1058-
id: 'first',
1059-
title: 'Limit',
1060-
type: 'short-input',
1061-
placeholder: 'Number of items (default: 50)',
1062-
condition: {
1063-
field: 'operation',
1064-
value: ['linear_list_customers', 'linear_list_customer_requests'],
1065-
},
1066-
},
1067-
// Pagination - after
1068-
{
1069-
id: 'after',
1070-
title: 'After Cursor',
1071-
type: 'short-input',
1072-
placeholder: 'Cursor for pagination',
1073-
condition: {
1074-
field: 'operation',
1075-
value: ['linear_list_customers', 'linear_list_customer_requests'],
1076-
},
1077-
},
10781100
// Customer ID for get/update/delete/merge operations
10791101
{
10801102
id: 'customerIdTarget',
@@ -1493,6 +1515,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
14931515
teamId: effectiveTeamId || undefined,
14941516
projectId: effectiveProjectId || undefined,
14951517
includeArchived: params.includeArchived,
1518+
first: params.first ? Number(params.first) : undefined,
1519+
after: params.after,
14961520
}
14971521

14981522
case 'linear_get_issue':
@@ -1558,6 +1582,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
15581582
query: params.query.trim(),
15591583
teamId: effectiveTeamId,
15601584
includeArchived: params.includeArchived,
1585+
first: params.first ? Number(params.first) : undefined,
1586+
after: params.after,
15611587
}
15621588

15631589
case 'linear_add_label_to_issue':
@@ -1607,13 +1633,17 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
16071633
return {
16081634
...baseParams,
16091635
issueId: params.issueId.trim(),
1636+
first: params.first ? Number(params.first) : undefined,
1637+
after: params.after,
16101638
}
16111639

16121640
case 'linear_list_projects':
16131641
return {
16141642
...baseParams,
16151643
teamId: effectiveTeamId,
16161644
includeArchived: params.includeArchived,
1645+
first: params.first ? Number(params.first) : undefined,
1646+
after: params.after,
16171647
}
16181648

16191649
case 'linear_get_project':
@@ -1665,13 +1695,21 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
16651695

16661696
case 'linear_list_users':
16671697
case 'linear_list_teams':
1698+
return {
1699+
...baseParams,
1700+
first: params.first ? Number(params.first) : undefined,
1701+
after: params.after,
1702+
}
1703+
16681704
case 'linear_get_viewer':
16691705
return baseParams
16701706

16711707
case 'linear_list_labels':
16721708
return {
16731709
...baseParams,
16741710
teamId: effectiveTeamId,
1711+
first: params.first ? Number(params.first) : undefined,
1712+
after: params.after,
16751713
}
16761714

16771715
case 'linear_create_label':
@@ -1709,6 +1747,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
17091747
return {
17101748
...baseParams,
17111749
teamId: effectiveTeamId,
1750+
first: params.first ? Number(params.first) : undefined,
1751+
after: params.after,
17121752
}
17131753

17141754
case 'linear_create_workflow_state':
@@ -1738,6 +1778,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
17381778
return {
17391779
...baseParams,
17401780
teamId: effectiveTeamId,
1781+
first: params.first ? Number(params.first) : undefined,
1782+
after: params.after,
17411783
}
17421784

17431785
case 'linear_get_cycle':
@@ -1801,6 +1843,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
18011843
return {
18021844
...baseParams,
18031845
issueId: params.issueId.trim(),
1846+
first: params.first ? Number(params.first) : undefined,
1847+
after: params.after,
18041848
}
18051849

18061850
case 'linear_update_attachment':
@@ -1840,6 +1884,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
18401884
return {
18411885
...baseParams,
18421886
issueId: params.issueId.trim(),
1887+
first: params.first ? Number(params.first) : undefined,
1888+
after: params.after,
18431889
}
18441890

18451891
case 'linear_delete_issue_relation':
@@ -1886,10 +1932,16 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
18861932
return {
18871933
...baseParams,
18881934
projectId: effectiveProjectId,
1935+
first: params.first ? Number(params.first) : undefined,
1936+
after: params.after,
18891937
}
18901938

18911939
case 'linear_list_notifications':
1892-
return baseParams
1940+
return {
1941+
...baseParams,
1942+
first: params.first ? Number(params.first) : undefined,
1943+
after: params.after,
1944+
}
18931945

18941946
case 'linear_update_notification':
18951947
if (!params.notificationId?.trim()) {
@@ -2018,9 +2070,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
20182070
return {
20192071
...baseParams,
20202072
name: params.statusName.trim(),
2021-
displayName: params.statusDisplayName?.trim() || params.statusName.trim(),
20222073
color: params.statusColor.trim(),
20232074
description: params.statusDescription?.trim() || undefined,
2075+
displayName: params.statusDisplayName?.trim() || undefined,
20242076
}
20252077

20262078
case 'linear_update_customer_status':
@@ -2031,9 +2083,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
20312083
...baseParams,
20322084
statusId: params.statusId.trim(),
20332085
name: params.statusName?.trim() || undefined,
2034-
displayName: params.statusDisplayName?.trim() || undefined,
20352086
color: params.statusColor?.trim() || undefined,
20362087
description: params.statusDescription?.trim() || undefined,
2088+
displayName: params.statusDisplayName?.trim() || undefined,
20372089
}
20382090

20392091
case 'linear_delete_customer_status':
@@ -2046,7 +2098,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
20462098
}
20472099

20482100
case 'linear_list_customer_statuses':
2049-
return baseParams
2101+
return {
2102+
...baseParams,
2103+
first: params.first ? Number(params.first) : undefined,
2104+
after: params.after,
2105+
}
20502106

20512107
// Customer Tier Operations
20522108
case 'linear_create_customer_tier':
@@ -2084,7 +2140,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
20842140
}
20852141

20862142
case 'linear_list_customer_tiers':
2087-
return baseParams
2143+
return {
2144+
...baseParams,
2145+
first: params.first ? Number(params.first) : undefined,
2146+
after: params.after,
2147+
}
20882148

20892149
// Project Management Operations
20902150
case 'linear_delete_project':
@@ -2135,6 +2195,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
21352195
return {
21362196
...baseParams,
21372197
projectId: effectiveProjectId || undefined,
2198+
first: params.first ? Number(params.first) : undefined,
2199+
after: params.after,
21382200
}
21392201

21402202
case 'linear_add_label_to_project':
@@ -2198,6 +2260,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
21982260
return {
21992261
...baseParams,
22002262
projectId: params.projectIdForMilestone.trim(),
2263+
first: params.first ? Number(params.first) : undefined,
2264+
after: params.after,
22012265
}
22022266

22032267
// Project Status Operations
@@ -2245,7 +2309,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
22452309
}
22462310

22472311
case 'linear_list_project_statuses':
2248-
return baseParams
2312+
return {
2313+
...baseParams,
2314+
first: params.first ? Number(params.first) : undefined,
2315+
after: params.after,
2316+
}
22492317

22502318
default:
22512319
return baseParams
@@ -2321,9 +2389,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
23212389
// Customer status and tier inputs
23222390
statusId: { type: 'string', description: 'Status identifier' },
23232391
statusName: { type: 'string', description: 'Status name' },
2324-
statusDisplayName: { type: 'string', description: 'Status display name' },
23252392
statusColor: { type: 'string', description: 'Status color in hex format' },
23262393
statusDescription: { type: 'string', description: 'Status description' },
2394+
statusDisplayName: { type: 'string', description: 'Status display name' },
23272395
tierId: { type: 'string', description: 'Tier identifier' },
23282396
tierName: { type: 'string', description: 'Tier name' },
23292397
tierDisplayName: { type: 'string', description: 'Tier display name' },

apps/sim/blocks/blocks/workflow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const WorkflowBlock: BlockConfig = {
4242
outputs: {
4343
success: { type: 'boolean', description: 'Execution success status' },
4444
childWorkflowName: { type: 'string', description: 'Child workflow name' },
45+
childWorkflowId: { type: 'string', description: 'Child workflow ID' },
4546
result: { type: 'json', description: 'Workflow execution result' },
4647
error: { type: 'string', description: 'Error message' },
4748
childTraceSpans: {

apps/sim/blocks/blocks/workflow_input.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const WorkflowInputBlock: BlockConfig = {
4141
outputs: {
4242
success: { type: 'boolean', description: 'Execution success status' },
4343
childWorkflowName: { type: 'string', description: 'Child workflow name' },
44+
childWorkflowId: { type: 'string', description: 'Child workflow ID' },
4445
result: { type: 'json', description: 'Workflow execution result' },
4546
error: { type: 'string', description: 'Error message' },
4647
childTraceSpans: {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy