improvement(workflow-search): include block names in in-workflow search#4668
Conversation
Adds block names to the workflow search index alongside subblock content. Selecting a block-name match navigates to the block and highlights its title in the editor header with the same orange treatment used for subblock labels. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The search UI and editor panel store now persist Adds/updates tests to cover block-name match indexing and to ensure these matches are excluded from resource-only searches. Reviewed by Cursor Bugbot for commit 9cc335f. Configure here. |
Greptile SummaryThis PR extends the in-workflow search index to include block names, so typing a search query now matches block names in addition to subblock field content. Block-name matches are navigation-only (
Confidence Score: 5/5Safe to merge — all changes are additive and isolated to the search index and editor header. The block-name match path is gated behind editable: false and the replace plan builder skips non-editable matches, so there is no way for block names to be mutated through the replace flow. The activeSearchTarget is not persisted, removing any hydration risk from the new targetKind field. The deduplication logic already returns null scope keys for non-subblock targets, so block-name matches cannot accidentally collide with subblock matches during dedup. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[indexWorkflowSearchMatches] --> B{mode !== 'resource'
AND query non-empty?}
B -->|Yes| C[findTextRanges on block.name]
C --> D[Push block-name match
editable:false, navigable:true]
B -->|No| E[Skip block-name indexing]
D --> F[Continue to subflow/subblock indexing]
E --> F
G[handleSelectMatch] --> H[setActiveSearchTarget
with targetKind]
H --> I{targetKind === 'block-name'?}
I -->|Yes| J[isBlockNameSearchHighlighted = true
Skip subblock scroll]
I -->|No| K[Normal subblock scroll/highlight]
J --> L[Wrap title in mark element]
M[Replace controls] --> N{activeMatch.editable?}
N -->|false — block-name match| O[canReplaceActive = false
Replace button disabled]
N -->|true| P[canReplaceActive evaluated normally]
Reviews (2): Last reviewed commit: "refactor(panel-store): derive ActiveSear..." | Re-trigger Greptile |
…rchTarget Replaces the hand-maintained literal union with a derived type so adding a new target kind in search-replace/types.ts automatically propagates here. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9cc335f. Configure here.
Summary
Test plan