From de7d26f84f7a5b99e15852b0d31b9c79f233db6a Mon Sep 17 00:00:00 2001 From: Bill Leoutsakos Date: Tue, 22 Sep 2026 13:58:51 -0700 Subject: [PATCH 1/2] fix(emcn): preserve editable combobox overlay text visibility --- .../components/combobox/combobox.dom.test.tsx | 22 +++++++++++++++++++ .../emcn/src/components/combobox/combobox.tsx | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/emcn/src/components/combobox/combobox.dom.test.tsx b/packages/emcn/src/components/combobox/combobox.dom.test.tsx index a722d3229f5..9885c184baf 100644 --- a/packages/emcn/src/components/combobox/combobox.dom.test.tsx +++ b/packages/emcn/src/components/combobox/combobox.dom.test.tsx @@ -10,6 +10,7 @@ * that it does, in both directions. */ import { act, type ReactNode, useState } from 'react' +import { ChipCombobox } from '@sim/emcn' import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { InsideModalContext } from '../modal/modal' @@ -92,6 +93,27 @@ describe('Combobox onOpenChange', () => { expect(control.classList.contains('pr-10')).toBe(false) }) + it.each(['label', 'icon', 'none'] as const)( + 'preserves editable chip text visibility with %s overlay', + (overlay) => { + render( + }] : OPTIONS + } + editable + value='alpha' + overlayContent={overlay === 'label' ? Formatted Alpha : undefined} + inputProps={{ className: 'text-[var(--text-primary)]' }} + /> + ) + + const control = trigger() + expect(control.classList.contains('text-transparent')).toBe(overlay !== 'none') + expect(control.classList.contains('text-[var(--text-primary)]')).toBe(overlay === 'none') + } + ) + it.each([false, true])( 'puts the field name and validation ARIA on the interactive control (editable=%s)', (editable) => { diff --git a/packages/emcn/src/components/combobox/combobox.tsx b/packages/emcn/src/components/combobox/combobox.tsx index 00034f40b2e..d93c70ebc33 100644 --- a/packages/emcn/src/components/combobox/combobox.tsx +++ b/packages/emcn/src/components/combobox/combobox.tsx @@ -800,11 +800,11 @@ const Combobox = memo( {...inputProps} className={cn( 'w-full pr-10 transition-colors', - (overlayContent || SelectedIcon) && 'text-transparent caret-foreground', SelectedIcon && !overlayContent && 'pl-7', open && 'focus-visible:border-[var(--border-1)]', className, - inputProps?.className + inputProps?.className, + (overlayContent || SelectedIcon) && 'text-transparent caret-foreground' )} role='combobox' aria-expanded={open} From dc30a6e01b0b556bc82a6664c9f5b44fc41ca34f Mon Sep 17 00:00:00 2001 From: Bill Leoutsakos <157128530+BillLeoutsakosvl346@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:06:48 -0700 Subject: [PATCH 2/2] Share mirrored workflow field editing treatment (#8248) * refactor(workflow): share mirrored input and textarea editing * test(workflow): use absolute mirrored field import * refactor(workflow): declare mirrored props and class states * style(workflow): express mirrored overlay constants as classes --------- Co-authored-by: Bill Leoutsakos --- .../condition-input/condition-input.tsx | 39 +--- .../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 | 59 ++--- .../knowledge-tag-filters.tsx | 45 ++-- .../components/long-input/long-input.tsx | 58 ++--- .../mirrored-field/mirrored-field.test.tsx | 113 +++++++++ .../mirrored-field/mirrored-field.tsx | 218 ++++++++++++++++++ .../components/short-input/short-input.tsx | 26 +-- .../components/starter/input-format.tsx | 203 +++++----------- .../variables-input/variables-input.tsx | 116 ++++------ .../subflow-editor/subflow-editor.tsx | 32 +-- 13 files changed, 589 insertions(+), 500 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..7bca8ddcbf1 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)} > -