From ae0eca2a2b72a68c5523956aff1f8c8fa46308a9 Mon Sep 17 00:00:00 2001 From: Bill Leoutsakos Date: Thu, 24 Sep 2026 11:25:08 -0700 Subject: [PATCH 1/4] refactor(workflow): share mirrored input and textarea editing --- .../condition-input/condition-input.tsx | 33 +-- .../document-tag-entry/document-tag-entry.tsx | 45 ++-- .../components/eval-input/eval-input.tsx | 90 ++++---- .../components/filter-rule-row.tsx | 45 ++-- .../input-mapping/input-mapping.tsx | 62 ++--- .../knowledge-tag-filters.tsx | 45 ++-- .../components/long-input/long-input.tsx | 43 ++-- .../mirrored-field/mirrored-field.test.tsx | 110 +++++++++ .../mirrored-field/mirrored-field.tsx | 211 ++++++++++++++++++ .../components/short-input/short-input.tsx | 26 +-- .../components/starter/input-format.tsx | 206 ++++++----------- .../variables-input/variables-input.tsx | 113 ++++------ .../subflow-editor/subflow-editor.tsx | 32 +-- 13 files changed, 589 insertions(+), 472 deletions(-) create mode 100644 apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mirrored-field/mirrored-field.test.tsx create mode 100644 apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mirrored-field/mirrored-field.tsx diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx index c9a550e6345..cb4121fbae1 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx @@ -8,7 +8,6 @@ import { getCodeEditorProps, highlight, languages, - Textarea, Tooltip, } from '@sim/emcn' import { ChevronDown, ChevronsUpDown, ChevronUp, Plus, Trash } from '@sim/emcn/icons' @@ -31,6 +30,7 @@ import { getValidWorkflowSearchRange, type WorkflowSearchTextHighlight, } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' +import { MirroredTextarea } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mirrored-field/mirrored-field' import { checkTagTrigger, TagDropdown, @@ -1044,7 +1044,7 @@ export function ConditionInput({ onDragOver={(e) => e.preventDefault()} onDrop={(e) => handleDrop(block.id, e)} > -