Skip to content

Commit fbef74b

Browse files
committed
refactor(editor): drop the dead isSearchHighlighted prop
No renderer consumed it. The editor computed it at two call sites and sub-block passed a hardcoded false into renderLabel's slot for it, so even the one function that declared a parameter never saw the real value. Its only live effect was in the memo comparator, where an unconsumed value changing forced a re-render for nothing. The name stays in the masking audit's forbidden-inputs list, which guards against a search signal being wired back into a masking decision.
1 parent 87025a4 commit fbef74b

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,6 @@ interface SubBlockProps {
106106
labelSuffix?: React.ReactNode
107107
/** Provides sibling values for dependency resolution in non-preview contexts (e.g. tool-input) */
108108
dependencyContext?: Record<string, unknown>
109-
/**
110-
* Whether workflow search currently targets this field. Supplied by the editor
111-
* and used only to keep the memo comparator honest — no renderer consumes it,
112-
* because a search hit deliberately does not reveal a masked secret. See
113-
* `shouldMaskSecretValue`.
114-
*/
115-
isSearchHighlighted?: boolean
116109
}
117110

118111
/**
@@ -239,7 +232,6 @@ const renderLabel = (
239232
onCopy: () => void
240233
},
241234
labelSuffix?: React.ReactNode,
242-
_isSearchHighlighted?: boolean,
243235
externalLink?: {
244236
show: boolean
245237
onClick: () => void
@@ -447,7 +439,6 @@ const arePropsEqual = (prevProps: SubBlockProps, nextProps: SubBlockProps): bool
447439
prevProps.allowExpandInPreview === nextProps.allowExpandInPreview &&
448440
canonicalToggleEqual &&
449441
prevProps.labelSuffix === nextProps.labelSuffix &&
450-
prevProps.isSearchHighlighted === nextProps.isSearchHighlighted &&
451442
prevProps.dependencyContext === nextProps.dependencyContext
452443
)
453444
}
@@ -1217,7 +1208,6 @@ function SubBlockComponent({
12171208
onCopy: handleCopy,
12181209
},
12191210
labelSuffix,
1220-
false,
12211211
externalLink
12221212
)}
12231213
{renderInput()}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -667,12 +667,6 @@ export function Editor() {
667667
subBlockValues={subBlockState}
668668
disabled={!canEditBlock}
669669
allowExpandInPreview={false}
670-
isSearchHighlighted={
671-
activeSearchTarget?.blockId === currentBlockId &&
672-
(activeSearchTarget.subBlockId === subBlock.id ||
673-
activeSearchTarget.canonicalSubBlockId ===
674-
(subBlock.canonicalParamId ?? subBlock.id))
675-
}
676670
canonicalToggle={
677671
isCanonicalSwap && canonicalMode && canonicalId
678672
? {
@@ -750,12 +744,6 @@ export function Editor() {
750744
subBlockValues={subBlockState}
751745
disabled={!canEditBlock}
752746
allowExpandInPreview={false}
753-
isSearchHighlighted={
754-
activeSearchTarget?.blockId === currentBlockId &&
755-
(activeSearchTarget.subBlockId === subBlock.id ||
756-
activeSearchTarget.canonicalSubBlockId ===
757-
(subBlock.canonicalParamId ?? subBlock.id))
758-
}
759747
/>
760748
{(index < advancedOnlySubBlocks.length - 1 || showRetrySettings) && (
761749
<FieldDivider

0 commit comments

Comments
 (0)