-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(copilot): workflow pan #3057
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 workflow viewport panning when copilot makes changes. The key improvements:
The implementation correctly handles:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Copilot
participant UseEffect1 as Queue Effect
participant SeenRef as seenDiffBlocksRef
participant PendingRef as pendingZoomBlockIdsRef
participant UseEffect2 as Pan Effect
participant Utils as getNodeAbsolutePosition
participant Viewport as fitViewToBounds
Copilot->>UseEffect1: diffAnalysis updates (new_blocks: [block1])
UseEffect1->>SeenRef: Check if block1 seen
SeenRef-->>UseEffect1: Not seen
UseEffect1->>SeenRef: Add block1
UseEffect1->>PendingRef: Set {block1}
UseEffect2->>PendingRef: Check pending blocks
PendingRef-->>UseEffect2: {block1}
UseEffect2->>UseEffect2: Verify block1 has dimensions
UseEffect2->>Utils: getNodeAbsolutePosition(block1)
Utils-->>UseEffect2: Absolute position
UseEffect2->>Viewport: Pan to block1 (absolute coords)
UseEffect2->>PendingRef: Clear pending
Note over Copilot: User accepts, copilot makes more changes
Copilot->>UseEffect1: diffAnalysis updates (new_blocks: [block2])
UseEffect1->>SeenRef: Check if block2 seen
SeenRef-->>UseEffect1: Not seen
UseEffect1->>SeenRef: Add block2
UseEffect1->>PendingRef: Set {block2}
UseEffect2->>PendingRef: Check pending blocks
PendingRef-->>UseEffect2: {block2}
UseEffect2->>UseEffect2: Verify block2 has dimensions
UseEffect2->>Utils: getNodeAbsolutePosition(block2)
Utils-->>UseEffect2: Absolute position
UseEffect2->>Viewport: Pan to block2 (absolute coords)
UseEffect2->>PendingRef: Clear pending
|
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.
1 file reviewed, no comments
|
@greptile |
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.
1 file reviewed, no comments
Summary
Type of Change
Testing
Solo.
Checklist