Fix choppy pan/zoom on large graphs - #107
Open
EBB2675 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Two moderate issues could cause excessive rerenders and crashes when graph node IDs change.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Optimizes graph overlay synchronization to reduce pan/zoom work on large schemas.
Changes:
- Separates viewport updates from geometry measurement.
- Re-measures geometry after layout or node dragging.
- Adds regression coverage and regenerates Light Mode assets.
Required changes:
- Moderate: Restore
requestAnimationFramecoalescing for viewport updates, including cleanup cancellation. - Moderate: Handle missing IDs in
sameCardBoxto prevent crashes when graph IDs change without changing node count.
File summaries
| File | Description |
|---|---|
web/tests/graph-view-overlay-sync.test.tsx |
Adds overlay measurement regression tests. |
web/src/GraphView.tsx |
Optimizes overlay geometry and viewport synchronization. |
api/light_mode/static/index.html |
References the regenerated bundle. |
api/light_mode/static/assets/purify.es-CovBOfck.js |
Adds the regenerated sanitizer asset. |
api/light_mode/static/assets/purify.es-Bzr520pe.js |
Removes the superseded sanitizer asset. |
api/light_mode/static/assets/index.es-CCxox2Or.js |
Updates the generated bundle import. |
Review details
Files not reviewed (1)
- api/light_mode/static/assets/purify.es-CovBOfck.js: Generated file
- Files reviewed: 5/7 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The static bundle references the deleted purify.es-Bzr520pe.js asset and must be regenerated atomically.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- api/light_mode/static/assets/purify.es-CovBOfck.js: Generated file
- Files reviewed: 5/7 changed files
- Comments generated: 1
- Review effort level: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The card overlay was calling
boundingBox()on every node on every render/pan/zoom event and rebuilding the cardBoxes map each frame. Node positions don't change on pan or zoom, so this was wasted work and pan/zoom stuttered on large schemas.Changes in
GraphView.tsx:No behaviour change. Card positioning, selection, editing, layout, diff and export all work as before. Only large graphs feel different.
also added a regression test and regenerated the Light Mode static bundle as usual