improvement(canonical): backfill for canonical modes on config changes#3447
improvement(canonical): backfill for canonical modes on config changes#3447icecrasher321 merged 2 commits intostagingfrom
Conversation
PR SummaryMedium Risk Overview Wires this migration into the workflow block migration pipeline and updates persistence so migrated blocks write both Written by Cursor Bugbot for commit c0d41c3. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds a Key changes:
Issue found:
Confidence Score: 3/5
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[loadWorkflowFromNormalizedTables] --> B[Build blocksMap from DB rows]
B --> C[applyBlockMigrations pipeline]
C --> C1[sanitizeAgentToolsInBlocks]
C1 --> C2[migrateAgentBlocksToMessagesFormat]
C2 --> C3[migrateCredentialIds]
C3 --> C4[migrateSubblockIds]
C4 --> C5[backfillCanonicalModes ✨ NEW]
C5 --> D{migrated?}
D -- yes --> E[Schedule fire-and-forget write-back\nclosure captures finalBlocks ref]
D -- no --> F[Continue]
E --> F
F --> G[Process subflows\nmutates finalBlocks for loop/parallel blocks]
G --> H[Return finalBlocks to caller]
E -.->|microtask runs after sync code| I[Iterate finalBlocks\nblock !== blocksMap check]
I --> J{block reference\nchanged?}
J -- yes --> K[UPDATE workflowBlocks\nsubBlocks + data ✨ NEW]
J -- no --> L[Skip]
G -.->|⚠️ loop/parallel blocks now have\nnew references in finalBlocks| I
|
|
bugbot run |
|
@greptile |
Summary
When config changes to mark existing fields as advanced need to backfill automatically to render toggle correctly.
Type of Change
Testing
Tested manually + added tests for this case
Checklist