improvement(search-replace): pass down to subblocks#4712
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Highlighting logic is centralized and hardened. Reviewed by Cursor Bugbot for commit 68b6c03. Configure here. |
Greptile SummaryThis PR extends the workflow search-replace feature so that search highlights propagate from the top-level panel all the way into individual sub-block components (dropdowns, condition inputs, sort/filter builders, skill lists, etc.) instead of only highlighting the parent field label. It also enriches
Confidence Score: 4/5Safe to merge after addressing the Prism placeholder issue; all other changes are well-tested and follow established patterns. The placeholder string apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx — specifically the WORKFLOW_SEARCH_MATCH_PLACEHOLDER definition and its use in createHighlightFunction. Important Files Changed
Sequence DiagramsequenceDiagram
participant SR as WorkflowSearchReplace
participant Store as usePanelEditorSearchStore
participant Editor as Editor
participant SubBlock as SubBlock
participant Component as Sub-block Component
participant FT as formatDisplayText
SR->>Store: setActiveSearchTarget(match + range + query)
Store-->>Editor: activeSearchTarget (reactive)
Editor->>Editor: filter by currentBlockId
Editor->>SubBlock: activeSearchTarget (block-scoped)
SubBlock->>Component: activeSearchTarget
Component->>Component: getActiveWorkflowSearchHighlight(valuePath)
Component->>FT: "formatDisplayText(value, {workflowSearchHighlight})"
FT->>FT: slice before/match/after
FT-->>Component: ReactNode[] with mark around match
Reviews (2): Last reviewed commit: "fix local lowercasing bug" | Re-trigger Greptile |
|
@greptile |
Summary
Pass down search highlighting to the subblocks
Type of Change
Testing
Tested manually
Checklist