feat(search-replace): search & replace, cut, deploy modal ui flicker#4507
feat(search-replace): search & replace, cut, deploy modal ui flicker#4507icecrasher321 merged 12 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces a new realtime Adds Cut support for blocks ( Reviewed by Cursor Bugbot for commit 304c50c. Configure here. |
Greptile SummaryThis PR adds a floating Search & Replace panel (Cmd/Ctrl+F), a Cut operation (Cmd/Ctrl+X) with protected-block awareness, and fixes UI flicker in the deploy modal by removing the intermediate "Syncing" state. It is a large feature addition (~4500 lines) backed by a new
Confidence Score: 5/5The change is safe to merge; all three features are well-isolated and the collaborative plumbing follows established patterns throughout the codebase. The core replacement pipeline builds a conflict-checked plan before touching any state, undo/redo inverse operations are correctly mirrored, and the server-side handler gates on the full ancestry lock chain via the shared isWorkflowBlockProtected. The only findings are a performance note and two minor style concerns; none affect correctness or data integrity. apps/realtime/src/database/operations.ts — the new handleSubblockOperationTx is worth a second look for query batching on large replace-all operations. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User (Cmd+F)
participant Panel as WorkflowSearchReplace
participant Indexer as indexWorkflowSearchMatches
participant Planner as buildWorkflowSearchReplacePlan
participant Collab as collaborativeBatchSetSubblockValues
participant UndoRedo as recordBatchUpdateSubblocks
participant Queue as OperationQueue
participant Server as handleSubblockOperationTx (DB)
participant Other as Other Clients
U->>Panel: open panel / type query
Panel->>Indexer: index matches (text + resources)
Indexer-->>Panel: WorkflowSearchMatch[]
Panel->>Panel: hydrate resource labels (react-query)
U->>Panel: click Replace / Replace All
Panel->>Planner: buildWorkflowSearchReplacePlan(blocks, matches, ids)
Planner-->>Panel: "{updates, subflowUpdates, conflicts}"
alt conflicts present
Panel-->>U: error notification
else no conflicts
Panel->>Collab: "collaborativeBatchSetSubblockValues(updates, {subflowUpdates})"
Collab->>Collab: apply to SubBlockStore + WorkflowStore (local)
Collab->>Queue: enqueue SUBBLOCK.BATCH_UPDATE
Collab->>UndoRedo: recordBatchUpdateSubblocks(updates, subflowUpdates)
Panel->>Panel: applySubflowUpdate per subflowUpdate
Queue->>Server: persist BATCH_UPDATE in DB transaction
Server-->>Queue: ack / error (rolls back on lock/mismatch)
Queue->>Other: broadcast SUBBLOCK.BATCH_UPDATE
Other->>Other: apply updates locally
end
Reviews (4): Last reviewed commit: "fix padding" | Re-trigger Greptile |
|
@greptile |
|
@greptile |
|
@greptile |
Summary
Type of Change
Testing
Tested manually
Checklist