-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(copilot): canonical modes should be constructed on edit #2989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR fixes a bug where canonical modes weren't being properly constructed when copilot edits workflows. The fix adds a new
The implementation correctly handles canonical pairs (basic/advanced mode swaps), prioritizes advanced mode when both modes are present, and properly initializes the Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Copilot
participant EditWorkflow
participant CreateBlock
participant UpdateCanonical
participant BlockRegistry
participant CanonicalUtils
Copilot->>EditWorkflow: Edit block with inputs
EditWorkflow->>EditWorkflow: validateInputsForBlock()
EditWorkflow->>BlockRegistry: getBlock(blockType)
BlockRegistry-->>EditWorkflow: blockConfig
alt Creating new block
EditWorkflow->>CreateBlock: createBlockFromParams()
CreateBlock->>CreateBlock: Setup subBlocks from config
CreateBlock->>UpdateCanonical: updateCanonicalModesForInputs()
else Editing existing block
EditWorkflow->>EditWorkflow: Apply input changes
EditWorkflow->>BlockRegistry: getBlock(blockType)
BlockRegistry-->>EditWorkflow: blockConfig
EditWorkflow->>UpdateCanonical: updateCanonicalModesForInputs()
end
UpdateCanonical->>CanonicalUtils: buildCanonicalIndex(subBlocks)
CanonicalUtils-->>UpdateCanonical: canonicalIndex
loop For each inputKey
UpdateCanonical->>UpdateCanonical: Get canonicalId from index
UpdateCanonical->>CanonicalUtils: isCanonicalPair(group)
CanonicalUtils-->>UpdateCanonical: boolean
UpdateCanonical->>UpdateCanonical: Determine mode (basic/advanced)
UpdateCanonical->>UpdateCanonical: Store in canonicalModeUpdates
end
UpdateCanonical->>UpdateCanonical: Assign to block.data.canonicalModes
UpdateCanonical-->>EditWorkflow: Block with canonical modes set
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Canonical Modes should be constructed based on copilot subblock choices.
Type of Change
Testing
Tested manually
Checklist