Skip to content

Commit 71ebe81

Browse files
feat(table): hide new workflow column feature (#4414)
* hide new workflow column feature * fix lint * fix unit test timout * fix lint
1 parent 23d74ac commit 71ebe81

4 files changed

Lines changed: 93 additions & 277 deletions

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-sidebar/column-sidebar.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,13 @@ export function ColumnSidebar({
765765
}
766766

767767
const typeOptions = useMemo(
768-
() => COLUMN_TYPE_OPTIONS.map((o) => ({ label: o.label, value: o.type, icon: o.icon })),
769-
[]
768+
() =>
769+
COLUMN_TYPE_OPTIONS.filter((o) => o.type !== 'workflow' || !!existingGroup).map((o) => ({
770+
label: o.label,
771+
value: o.type,
772+
icon: o.icon,
773+
})),
774+
[existingGroup]
770775
)
771776

772777
/**

apps/sim/lib/copilot/generated/tool-catalog-v1.ts

Lines changed: 6 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,23 +2792,14 @@ export const UserTable: ToolCatalogEntry = {
27922792
type: 'object',
27932793
description: 'Arguments for the operation',
27942794
properties: {
2795-
autoRun: {
2796-
type: 'boolean',
2797-
description:
2798-
'Optional flag for add_workflow_group. When true, existing rows whose dependencies are already filled run immediately. Default false: groups are staged silently — call run_workflow_group when ready to fire rows. Set true if the user explicitly asked you to start runs.',
2799-
},
2800-
blockId: {
2801-
type: 'string',
2802-
description: 'Source block ID inside the workflow. Used by add_workflow_group_output.',
2803-
},
28042795
column: {
28052796
type: 'object',
28062797
description: 'Column definition for add_column: { name, type, unique?, position? }',
28072798
},
28082799
columnName: {
28092800
type: 'string',
28102801
description:
2811-
'Column name. Required for rename_column, update_column, and delete_workflow_group_output (the bound column to drop). Optional for add_workflow_group_output (auto-derived from path when omitted). Use columnNames array for batch delete_column.',
2802+
'Column name (required for rename_column, update_column; use columnNames array for batch delete_column)',
28122803
},
28132804
columnNames: {
28142805
type: 'array',
@@ -2819,23 +2810,6 @@ export const UserTable: ToolCatalogEntry = {
28192810
type: 'object',
28202811
description: 'Row data as key-value pairs (required for insert_row, update_row)',
28212812
},
2822-
dependencies: {
2823-
type: 'object',
2824-
description:
2825-
'Dependencies the workflow group requires before running a row. { columns?: string[] } lists input column names that must be filled; { workflowGroups?: string[] } lists other workflow group IDs whose outputs must complete first. Used by add_workflow_group and update_workflow_group.',
2826-
properties: {
2827-
columns: {
2828-
type: 'array',
2829-
description: 'Input column names that must be filled before the group runs.',
2830-
items: { type: 'string' },
2831-
},
2832-
workflowGroups: {
2833-
type: 'array',
2834-
description: 'Other workflow group IDs whose outputs must complete first.',
2835-
items: { type: 'string' },
2836-
},
2837-
},
2838-
},
28392813
description: { type: 'string', description: "Table description (optional for 'create')" },
28402814
fileId: {
28412815
type: 'string',
@@ -2852,23 +2826,18 @@ export const UserTable: ToolCatalogEntry = {
28522826
description:
28532827
'MongoDB-style filter for query_rows, update_rows_by_filter, delete_rows_by_filter',
28542828
},
2855-
groupId: {
2856-
type: 'string',
2857-
description:
2858-
'Workflow group ID (required for update_workflow_group, delete_workflow_group, add_workflow_group_output, delete_workflow_group_output, run_workflow_group).',
2859-
},
28602829
limit: {
28612830
type: 'number',
28622831
description: 'Maximum rows to return or affect (optional, default 100)',
28632832
},
28642833
mapping: {
28652834
type: 'object',
28662835
description:
2867-
'Optional explicit CSV-header → table-column mapping for import_file, as { "csvHeader": "columnName" | null }. A string maps the CSV header to that table column; null skips that CSV header (it won\'t be imported); omit a header entirely to fall back to auto-mapping by sanitized name (case-insensitive).',
2836+
'Optional explicit CSV-header → table-column mapping for import_file, as { "csvHeader": "columnName" | null }. When omitted, headers are auto-matched by sanitized name (case-insensitive fallback). Use null to skip a CSV column.',
28682837
additionalProperties: {
2869-
type: ['string', 'null'],
2838+
type: 'string',
28702839
description:
2871-
"Target column name on the table. null skips that CSV header (it won't be imported); omit it entirely to fall back to auto-mapping.",
2840+
'Target column name on the table. Use null to skip this CSV header instead of a column name.',
28722841
},
28732842
},
28742843
mode: {
@@ -2899,33 +2868,6 @@ export const UserTable: ToolCatalogEntry = {
28992868
description:
29002869
'Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like "files/export.csv" — nested paths are not supported.',
29012870
},
2902-
outputs: {
2903-
type: 'array',
2904-
description:
2905-
"Outputs to surface as columns. Each entry maps a workflow block output to a table column: { blockId, path, columnName?, columnType? }. blockId is the source block; path is the dotted output path; columnName auto-derives from the path when omitted; columnType defaults from the leaf type when omitted. Used by add_workflow_group. (Also accepted by update_workflow_group for the UI's bulk replace, but the AI flow should use add_workflow_group_output / delete_workflow_group_output instead.) If unsure about valid (blockId, path) pairs, call list_workflow_outputs first — paths are validated against the live workflow and invalid picks return an error with the valid options. For Agent blocks with structured outputs, the structured fields appear as top-level paths (e.g. summary, industry); there is NO response.content path on a structured agent.",
2906-
items: {
2907-
type: 'object',
2908-
properties: {
2909-
blockId: { type: 'string', description: 'Source block ID inside the workflow.' },
2910-
columnName: {
2911-
type: 'string',
2912-
description:
2913-
'Optional target column name. Auto-derived from the path when omitted.',
2914-
},
2915-
columnType: {
2916-
type: 'string',
2917-
description: 'Optional column type. Defaults from the leaf type when omitted.',
2918-
enum: ['string', 'number', 'boolean', 'date', 'json'],
2919-
},
2920-
path: { type: 'string', description: 'Dotted output path on the block.' },
2921-
},
2922-
required: ['blockId', 'path'],
2923-
},
2924-
},
2925-
path: {
2926-
type: 'string',
2927-
description: 'Dotted output path on the block. Used by add_workflow_group_output.',
2928-
},
29292871
position: {
29302872
type: 'integer',
29312873
description:
@@ -2939,36 +2881,21 @@ export const UserTable: ToolCatalogEntry = {
29392881
},
29402882
rowId: {
29412883
type: 'string',
2942-
description:
2943-
"Row ID. Required for get_row, update_row, delete_row, and for cancel_table_runs when scope:'row'.",
2884+
description: 'Row ID (required for get_row, update_row, delete_row)',
29442885
},
29452886
rowIds: {
29462887
type: 'array',
2947-
description:
2948-
'Array of row IDs. Used by batch_delete_rows (rows to delete) and run_workflow_group (optional row scope: when omitted, runs across the whole table; when provided, only these rows are candidates and the eligibility predicate still applies — mid-run rows or rows with unmet deps are silently skipped).',
2949-
items: { type: 'string' },
2888+
description: 'Array of row IDs to delete (for batch_delete_rows)',
29502889
},
29512890
rows: {
29522891
type: 'array',
29532892
description: 'Array of row data objects (required for batch_insert_rows)',
29542893
},
2955-
runMode: {
2956-
type: 'string',
2957-
description:
2958-
"Run mode for run_workflow_group. 'incomplete' (default) re-runs only rows that never produced output or last failed; 'all' re-runs every dep-satisfied row.",
2959-
enum: ['incomplete', 'all'],
2960-
},
29612894
schema: {
29622895
type: 'object',
29632896
description:
29642897
"Table schema with columns array (required for 'create'). Each column: { name, type, unique? }",
29652898
},
2966-
scope: {
2967-
type: 'string',
2968-
description:
2969-
"Cancellation scope for cancel_table_runs. 'all' cancels in-flight runs across the whole table; 'row' cancels only the row identified by rowId.",
2970-
enum: ['all', 'row'],
2971-
},
29722899
sort: {
29732900
type: 'object',
29742901
description:
@@ -2998,11 +2925,6 @@ export const UserTable: ToolCatalogEntry = {
29982925
description:
29992926
'Map of rowId to value for single-column batch update: { "rowId1": val1, "rowId2": val2 } (for batch_update_rows with columnName)',
30002927
},
3001-
workflowId: {
3002-
type: 'string',
3003-
description:
3004-
'ID of the workflow (required for add_workflow_group and list_workflow_outputs).',
3005-
},
30062928
},
30072929
},
30082930
operation: {
@@ -3029,14 +2951,6 @@ export const UserTable: ToolCatalogEntry = {
30292951
'rename_column',
30302952
'delete_column',
30312953
'update_column',
3032-
'add_workflow_group',
3033-
'update_workflow_group',
3034-
'delete_workflow_group',
3035-
'add_workflow_group_output',
3036-
'delete_workflow_group_output',
3037-
'run_workflow_group',
3038-
'cancel_table_runs',
3039-
'list_workflow_outputs',
30402954
],
30412955
},
30422956
},
@@ -3375,14 +3289,6 @@ export const UserTableOperation = {
33753289
renameColumn: 'rename_column',
33763290
deleteColumn: 'delete_column',
33773291
updateColumn: 'update_column',
3378-
addWorkflowGroup: 'add_workflow_group',
3379-
updateWorkflowGroup: 'update_workflow_group',
3380-
deleteWorkflowGroup: 'delete_workflow_group',
3381-
addWorkflowGroupOutput: 'add_workflow_group_output',
3382-
deleteWorkflowGroupOutput: 'delete_workflow_group_output',
3383-
runWorkflowGroup: 'run_workflow_group',
3384-
cancelTableRuns: 'cancel_table_runs',
3385-
listWorkflowOutputs: 'list_workflow_outputs',
33863292
} as const
33873293

33883294
export type UserTableOperation = (typeof UserTableOperation)[keyof typeof UserTableOperation]
@@ -3408,14 +3314,6 @@ export const UserTableOperationValues = [
34083314
UserTableOperation.renameColumn,
34093315
UserTableOperation.deleteColumn,
34103316
UserTableOperation.updateColumn,
3411-
UserTableOperation.addWorkflowGroup,
3412-
UserTableOperation.updateWorkflowGroup,
3413-
UserTableOperation.deleteWorkflowGroup,
3414-
UserTableOperation.addWorkflowGroupOutput,
3415-
UserTableOperation.deleteWorkflowGroupOutput,
3416-
UserTableOperation.runWorkflowGroup,
3417-
UserTableOperation.cancelTableRuns,
3418-
UserTableOperation.listWorkflowOutputs,
34193317
] as const
34203318

34213319
export const WorkspaceFileOperation = {

0 commit comments

Comments
 (0)