Skip to content

Fix mesh nodes not centered on /mesh page#189

Merged
spe1020 merged 1 commit intomainfrom
feature/next
Feb 19, 2026
Merged

Fix mesh nodes not centered on /mesh page#189
spe1020 merged 1 commit intomainfrom
feature/next

Conversation

@spe1020
Copy link
Contributor

@spe1020 spe1020 commented Feb 19, 2026

Summary

  • Fix nodes rendering in the upper-left corner on /mesh instead of centered in the viewport
  • Add centerNodes() helper that shifts the node cluster to the container center via bounding-box midpoint calculation
  • Fix init race condition where simulation never started if container had no dimensions at mount time (retries via ResizeObserver)
  • Re-center cached layout positions to the current container size on restore

Test plan

  • Navigate to /mesh — nodes should appear centered in the viewport
  • Refresh /mesh (cached layout path) — nodes should still be centered
  • Resize the browser window — mesh should remain usable
  • Verify zoom/pan/drag still work correctly after centering

🤖 Generated with Claude Code

…ached layout restore

- Add centerNodes() that shifts node cluster to container center via bounding-box midpoint
- Call centerNodes() after simulation settling and after applying cached layout positions
- Fix init race condition: retry init from ResizeObserver when container gains dimensions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

Deploying frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: b75fc18
Status: ✅  Deploy successful!
Preview URL: https://4869670f.frontend-hvd.pages.dev
Branch Preview URL: https://feature-next.frontend-hvd.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 19, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
frontend b75fc18 Feb 19 2026, 03:01 AM

@spe1020 spe1020 merged commit 8baa1c3 into main Feb 19, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments