aws/graph-explorer

Misleading "No more neighbors to expand" message when filters exclude all neighbors

Aperta

#2060 aperta il 6 ago 2026

 (0 commenti) (0 reazioni) (0 assegnatari)TypeScript (88 fork)auto 404
help wantedneeds-triage

Metriche repository

Star
 (456 stelle)
Metriche merge PR
 (Merge medio 3g 9h) (41 PR mergiate in 30 g)

Descrizione

Description

When expanding a node's neighbors with attribute filters, if the filters match nothing, the app shows the toast "No more neighbors to expand" — which implies the node is fully expanded. The truth is the opposite: the node has neighbors, but the applied filters excluded all of them. A user would reasonably conclude there is nothing left and stop, when relaxing the filter would reveal neighbors.

This is connector-agnostic — the toast lives in the shared expand hook (useExpandNode), so it affects Gremlin, openCypher, and SPARQL alike.

Environment

  • OS: N/A
  • Browser: N/A
  • Graph Explorer Version: current main
  • Graph Database & Version: any (Gremlin / openCypher / SPARQL)

Steps to Reproduce

  1. Open the expand-neighbors sidebar for a node that has neighbors.
  2. Add an attribute filter whose value matches none of them (e.g. a value no neighbor's property contains).
  3. Expand.
  4. See the toast "No more neighbors to expand".

Expected Behavior

When the expansion request carried attribute filters and returned no results, the message should attribute the empty result to the filters — e.g. "No neighbors matched your filters" — rather than implying the node is exhausted. When no filters were applied, keep "No more neighbors to expand".

Fix Path

The toast fires from two shared sites in packages/graph-explorer/src/hooks/useExpandNode.tsx (line 97, single-node expandNode; line 169, multi-node expandNodes), based purely on an empty result set with no inspection of the request. At both sites, check whether the request carried non-empty attributeFilters; if so, show the filter-specific message. Today only the single-node sidebar path supplies filters, but writing it at both sites keeps them correct if the multi path ever gains filters.

[!IMPORTANT] If you are interested in working on this issue, please leave a comment.

[!TIP] Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.

Guida contributor