aws/graph-explorer

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

開放

#2,060 建立於 2026年8月6日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (88 個分叉)auto 404
help wantedneeds-triage

倉庫指標

星標
 (456 顆星)
PR 合併指標
 (平均合併 3天 9小時) (30 天內合併 41 個 PR)

描述

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.

貢獻者指南