Skip to content

Feat graph expand - #30

Open
Bud-Macaulay wants to merge 3 commits into
mainfrom
feat-graph-expand
Open

Bud-Macaulay wants to merge 3 commits into
mainfrom
feat-graph-expand

Conversation

@Bud-Macaulay

Copy link
Copy Markdown
Collaborator

Fixes #16

Largely a Proof of concept.

A fairly questionable overhaul of the graph renderer; - this still uses the old restapi.

Link counts are now ALWAYS calculated (which comes with some churn); nodes now render the edge tab (when they have 1 or more connections on that direction, with a [+/-] that indicates that one can expand the node;

This feature was kinda held because one, i didnt want to ddos our backend and two, it was unclear whether we could support this nicely in the new restapi - performance, concurrent fetching etc. It would be good to baseline this and then do benchmarks with respect to it.

This will be come along side a few other PRs that mostly address page layout and node hiding and automatic graph building

I think particularly, node hiding could be quite a wanted feature, if we allow this expansion (perhaps users dont want to be flooded by just Floats in their database). Page layout -> something closer to leetcodes design would be cool

Automatic graph building may be hard rootURl/?rootNode=xxxx,connectedNodes=[yyyy,yyyy] and run a query builder to build the graph? - could be interesting and a feature to add if this gets merged

As some notes; ---

I think this is a nice feature however, some interesting behaviour is observed;

1a . Firstly a node very far downstream can be used by a calculation very far upstream - the algo just connects these, which is potentially confusing.

1b. In the previous implementation if a node was both on the left hand side and the right hand side, it would simply be rendered twice, (on both sides) - this was somewhat confusing, but perhaps a little less confusing than drawing cyclical edges, i can probably restore this functionality, but its unclear whether we should

2 .Additionally, nodes can be expanded to both directions regardless if it was a the child or parent of a rootnode, when someone does this, it gets quite messy, i think its probably good though, perhaps someone would like to go to a calcfunction parent from a SD rootnode, knowing there is a Dict in the output aswell..., the visuals of this likely needs to be thought a lot, I could use a force algo to place nodes rather than the stack+level approach here, but this is probably going to be exceedingly expensive

  1. Added a collapse all button + increased the minZoom to allow further zooming out.

  2. Added a screenshot button, this only images the graph, but it could be a fun feature to allow users to take graph views and share them (i guess similar to verdi graph generate xxx)

  3. For some direction, should we still allow double click navigation, perhaps now its probably slightly cleaner to drop this altogether, having the history and URL sync'd directly to the selected node, and having navigation being +/- buttons only?

Would like some feedback.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://aiidateam.github.io/aiida-explorer/pr-preview/pr-30/

Built to branch gh-pages at 2026-10-07 09:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@Bud-Macaulay

Bud-Macaulay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

Also the blue path should probably get dropped, if we merge this - it doesnt makes sense to define 'where someone came from' anymore.

Perhaps we can color the selected nodes direct parents/children with blue to handle the crazy graph stuff a bit nicer.

@Bud-Macaulay

Bud-Macaulay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note to self, graph and history could be elevated to TanStack store (in browser, extensible to backend) for ergonomics (and potential AiiDAlab integration), should move to parsing as matsci (for potential integration with webapps, seekpath/qeinput etc) ...

The CI/CD pipeline worked - wow, i'm so talented
https://aiidateam.github.io/aiida-explorer/pr-preview/pr-30/ # check it out live here

Tagging some relevant people;
@mbercx (since you opened the issue, i guess you are probably busy)!
@Schastef (probably your data will churn quite a bit if you have many nodes, could be good to click around a bit)

@eimrek
@edan-bainglass
@giovannipizzi

Below is one such case where a DataNodes are being used for many different calculations leading to some ugly behaviour...
image

Attaching the figma sketch (from circa 2years ago) - where this was discussed (and shamelessly tagging a very busy @eimrek since his name is on the figma -- yikes)
image

This branch has not been deployed

No deployments
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.

❓ Can we expand the provenance beyond a single node?

1 participant