From 793e4833108601082d16b35bcdddf803f455344c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 24 Aug 2026 11:10:52 -0700 Subject: [PATCH] refactor(renderer): drop the isWorkflowRunning prop the views never read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing only the unused binding and keeping the prop was half a fix. The views declared it, the app passed it, and nothing read it — so the prop was dead, and dead code does not become live by being documented. Its TSDoc claimed it "holds every block's action swell open". That behavior does not exist in either view. Keeping the prop on the chance someone wants it later is the speculative-generality smell: if the toolbar should pin open during a run, that gets implemented deliberately and the prop comes back with logic behind it. Removed from both view interfaces and from both call sites. The store subscription stays — `workflow-block.tsx` and `subflow-node.tsx` each passed the same value twice, once to the dead view prop and once to `ActionBar`, which has 28 real reads and is what the surrounding TSDoc is actually describing when it says the flag "only swaps Run for Stop and disables mutations". `workflow-edge-view` uses it too and is untouched. The renderer test that passed it loses the argument. Worth noting it set the flag to stage a workflow run, and since the view ignored it those two cases were never exercising the run state they name. --- .../w/[workflowId]/components/subflows/subflow-node.tsx | 1 - .../components/workflow-block/workflow-block.tsx | 1 - .../workflow-renderer/src/subflow/subflow-node-view.tsx | 9 --------- .../workflow-block-view-interaction.test.tsx | 8 +++----- .../src/workflow-block/workflow-block-view.tsx | 9 --------- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx index 78a4c02718d..602ddd8b715 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx @@ -75,7 +75,6 @@ export const SubflowNodeComponent = memo(({ data, id, selected }: NodeProps @@ -39,7 +38,6 @@ function createView( hasRing={false} ringStyles='' isRunning={isRunning} - isWorkflowRunning={isWorkflowRunning} isExecutionHighlighted={isExecutionHighlighted} Icon={TestIcon} iconBgColor='var(--surface-2)' @@ -130,7 +128,7 @@ describe('WorkflowBlockView action menu', () => { mountedRoots.add(root) mountedHosts.add(host) - act(() => root.render(createView(false, true, false, false, true))) + act(() => root.render(createView(false, true, false, false))) flushAnimationFrames() const actionMenuRoot = host.querySelector('.group.relative') @@ -149,7 +147,7 @@ describe('WorkflowBlockView action menu', () => { mountedRoots.add(root) mountedHosts.add(host) - act(() => root.render(createView(false, true, false, true, true))) + act(() => root.render(createView(false, true, false, true))) flushAnimationFrames() const actionMenuRoot = host.querySelector('.group.relative') diff --git a/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx b/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx index a7773745ff1..87e53e5964b 100644 --- a/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx +++ b/packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx @@ -393,15 +393,6 @@ export interface WorkflowBlockViewProps { runPathStatus?: BlockRunStatus /** Whether execution controls are active for this block. */ isRunning?: boolean - /** - * 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 /** Block icon component and its background color. */