From bc1a0dd6db0aadd7ebcf9e80b21f682f5869067b Mon Sep 17 00:00:00 2001 From: Theodore Li Date: Thu, 4 Jun 2026 14:57:48 -0700 Subject: [PATCH 1/5] feat(tables): workflow version selection (live/deployed) and not-found/no-output badges --- .../app/api/table/[tableId]/groups/route.ts | 3 ++ .../table-grid/cells/cell-render.tsx | 13 ++++++ .../table-grid/headers/column-header-menu.tsx | 18 ++++++++ .../[tableId]/components/table-grid/types.ts | 3 ++ .../workflow-sidebar/workflow-sidebar.tsx | 41 +++++++++++++++--- .../tables/[tableId]/hooks/use-table.ts | 5 ++- .../background/workflow-column-execution.ts | 43 ++++++++++++++++--- apps/sim/hooks/queries/tables.ts | 1 + apps/sim/lib/api/contracts/tables.ts | 11 +++++ apps/sim/lib/table/service.ts | 1 + apps/sim/lib/table/types.ts | 15 +++++++ apps/sim/lib/table/workflow-columns.ts | 6 +++ 12 files changed, 148 insertions(+), 12 deletions(-) diff --git a/apps/sim/app/api/table/[tableId]/groups/route.ts b/apps/sim/app/api/table/[tableId]/groups/route.ts index 197a1722b1b..5b9f960896a 100644 --- a/apps/sim/app/api/table/[tableId]/groups/route.ts +++ b/apps/sim/app/api/table/[tableId]/groups/route.ts @@ -116,6 +116,9 @@ export const PATCH = withRouteHandler(async (request: NextRequest, { params }: R ...(validated.inputMappings !== undefined ? { inputMappings: validated.inputMappings } : {}), + ...(validated.deploymentMode !== undefined + ? { deploymentMode: validated.deploymentMode } + : {}), ...(validated.type !== undefined ? { type: validated.type } : {}), ...(validated.autoRun !== undefined ? { autoRun: validated.autoRun } : {}), }, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx index 065385a9f05..c4c7904a711 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx @@ -22,6 +22,7 @@ export type CellRenderKind = | { kind: 'error' } | { kind: 'waiting'; labels: string[] } | { kind: 'not-found' } + | { kind: 'no-output' } // Plain typed cells | { kind: 'boolean'; checked: boolean } | { kind: 'json'; text: string } @@ -106,6 +107,9 @@ export function resolveCellRender({ if (exec?.status === 'error') return { kind: 'error' } // Enrichment ran to completion but matched nothing → "Not found". if (isEnrichmentOutput && exec?.status === 'completed') return { kind: 'not-found' } + // Workflow output: the group's run completed but this block produced no + // value for the cell → grey "No output" (distinct from a never-run blank). + if (exec?.status === 'completed') return { kind: 'no-output' } return { kind: 'empty' } } @@ -394,6 +398,15 @@ export function CellRender({ kind, isEditing }: CellRenderProps): React.ReactEle ) + case 'no-output': + return ( + + + No output + + + ) + case 'empty': return null diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx index 463927819f7..3d54e08d02b 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx @@ -1,6 +1,7 @@ 'use client' import React, { useCallback, useEffect, useRef, useState } from 'react' +import { Badge, Tooltip } from '@/components/emcn' import { ChevronDown } from '@/components/emcn/icons' import { cn } from '@/lib/core/utils/cn' import type { WorkflowGroup } from '@/lib/table' @@ -237,6 +238,21 @@ export const ColumnHeaderMenu = React.memo(function ColumnHeaderMenu({ setMenuOpen(true) } + const notFoundBadge = sourceInfo?.blockMissing ? ( + + + + + Not found + + + + + This column's source block no longer exists in the workflow. + + + ) : null + return ( {column.workflowGroupId ? column.headerLabel : column.name} + {notFoundBadge} ) : (
@@ -309,6 +326,7 @@ export const ColumnHeaderMenu = React.memo(function ColumnHeaderMenu({ {column.workflowGroupId ? column.headerLabel : column.name} + {notFoundBadge}