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.

贡献者指南