Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 1, 2025

Fix viewport persistence and minimap syncing:

  • Don't use singular 'root' key when persisting viewport, as each workflow tab has its own 'root' so there will be collisions
  • The minimap viewport indicator was not updating when graph bounds changed after the canvas was fully loaded. This happened because calculateGraphBounds() would run with new bounds but the viewport position wouldn't recalculate with those new bounds, causing the white viewport box to remain at its initial position until user interaction triggered an update. The fix ensures that when bounds change in updateMinimap(), it also sets the viewport update flag to trigger updateViewport(), keeping the viewport indicator synchronized with the actual graph bounds. This also removes the workaround watchers added in [fix] Make minimap reactive to subgraph context changes #4597 which were patching the symptom but are now unnecessary since the core issue is resolved.

Fixes #4605.

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner August 1, 2025 18:28
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

⚠️ Warnings

⚠️ Warning: E2E Test Coverage Missing

If this PR modifies behavior that can be covered by browser-based E2E tests, those tests are required. PRs lacking applicable test coverage may not be reviewed until added. Please add or update browser tests to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.
You can add it by:

  • GitHub: Drag & drop media directly into the PR description

  • YouTube: Include a link to a short demo

@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch area:subgraph labels Aug 1, 2025
@christian-byrne christian-byrne changed the title [fix] Update minimap viewport when graph bounds change [fix] Fix viewport sync in minimap and subgraphs navigation Aug 1, 2025
@christian-byrne christian-byrne merged commit dc395f5 into main Aug 2, 2025
17 checks passed
@christian-byrne christian-byrne deleted the fix/viewport-restore-subgraph branch August 2, 2025 01:12
Myestery pushed a commit to Myestery/ComfyUI_frontend that referenced this pull request Aug 2, 2025
@christian-byrne christian-byrne mentioned this pull request Aug 3, 2025
christian-byrne added a commit that referenced this pull request Aug 4, 2025
Author: Christian Byrne <[email protected]>
Date: Fri Aug 1 20:30:28 2025 -0700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:minimap area:subgraph needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch

Projects

None yet

2 participants