Skip to content

fix(web/NetworkView): drag fly-away, fetch races, degree dead code#105

Merged
Xinze-Li-Moqian merged 1 commit into
mainfrom
fix/networkview-drag-races
Jun 28, 2026
Merged

fix(web/NetworkView): drag fly-away, fetch races, degree dead code#105
Xinze-Li-Moqian merged 1 commit into
mainfrom
fix/networkview-drag-races

Conversation

@Xinze-Li-Moqian

Copy link
Copy Markdown
Contributor

Bug fixes in the graph view (web-only, no project data).

Fixes

  • Drag fly-away: .subject() now returns screen-space coordinates so d3-drag's event.x stays in screen units. Previously it returned world coords while d3 adds the screen-pixel pointer delta — the mismatch sent a node flying off-screen the moment it was grabbed.
  • Fetch races: the load and style effects guard their async writes with an alive flag + cleanup, so a slow earlier request can no longer overwrite newer data on fast reload/mode-toggle.
  • Dead code / disabled feature: ForceNode gained a degree field, now propagated to force nodes — the dashed outline for non-atom (degree≥1) nodes finally renders (the field was never set, silently disabling it).
  • Stale closure: effects read network mode via usePluginStore.getState() instead of a closure variable that wasn't in the deps.

Typecheck clean; NetworkView tests pass (12/12).

- Drag: subject returns screen-space coords so d3-drag's event.x stays in
  screen units; previously world coords + screen delta were mixed, so a node
  flew off-screen the instant it was grabbed.
- Fetch races: load + style effects now guard their async writes with an
  'alive' flag and cleanup, so a slow earlier request can't overwrite newer data.
- Dead code: ForceNode gained a 'degree' field and it is now propagated to
  force nodes, so the dashed outline for non-atom (degree>=1) nodes actually
  renders (the field was never set before, silently disabling it).
- Read network mode via getState() inside effects instead of a stale closure var.
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-ga Ready Ready Preview, Comment Jun 28, 2026 6:58pm

Request Review

@Xinze-Li-Moqian Xinze-Li-Moqian merged commit 44776a6 into main Jun 28, 2026
3 of 5 checks passed
@Xinze-Li-Moqian Xinze-Li-Moqian deleted the fix/networkview-drag-races branch June 28, 2026 18:58
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