Skip to content

fix(graph-explorer): show filter-specific toast when expand matches no neighbors - #2618

Open
DYNOSuprovo wants to merge 1 commit into
aws:mainfrom
DYNOSuprovo:fix/filter-expand-toast-message-2060
Open

DYNOSuprovo wants to merge 1 commit into
aws:mainfrom
DYNOSuprovo:fix/filter-expand-toast-message-2060

Conversation

@DYNOSuprovo

Copy link
Copy Markdown

Summary

Fixes #2060

When expanding a node's neighbors with attribute filters, an empty result set previously triggered the toast:

"No more neighbors to expand"

This implied the node's neighbors were exhausted, when in reality neighbors existed but were excluded by the active filters.

Changes

  • In packages/graph-explorer/src/hooks/useExpandNode.tsx:
    • In expandNode (single expand), check request.attributeFilters: if present and non-empty, show toast No neighbors matched your filters; otherwise display No more neighbors to expand.
    • In expandNodes (multi expand), check filters.attributeFilters: if present and non-empty, show toast No neighbors matched your filters; otherwise display No more neighbors to expand.
  • In packages/graph-explorer/src/hooks/useExpandNode.test.ts:
    • Added unit test verifying single-node expansion with attribute filters displays No neighbors matched your filters.
    • Added unit test verifying single-node expansion without attribute filters retains No more neighbors to expand.
    • Added unit test verifying multi-node expansion with attribute filters displays No neighbors matched your filters.

…o neighbors

When expanding a node's neighbors with attribute filters, an empty result set
previously triggered 'No more neighbors to expand', misleading users into believing
the node was exhausted rather than filtered.

Check attributeFilters on the expansion request: if filters were applied,
show 'No neighbors matched your filters'; otherwise keep 'No more neighbors to expand'.

Fixes aws#2060

Signed-off-by: Suprovo Mallick (DYNO) <143953131+DYNOSuprovo@users.noreply.github.com>

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.

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

1 participant