Skip to content

Attribute empty expand results to active filters, not exhaustion - #2071

Open
mig-builds wants to merge 1 commit into
aws:mainfrom
mig-builds:contrib/issue-2060-misleading-no-more-neighbors-to-expand-mes
Open

Attribute empty expand results to active filters, not exhaustion#2071
mig-builds wants to merge 1 commit into
aws:mainfrom
mig-builds:contrib/issue-2060-misleading-no-more-neighbors-to-expand-mes

Conversation

@mig-builds

Copy link
Copy Markdown

Closes #2060

What changed

useExpandNode's toast message after an empty expansion result no longer always says "No more neighbors to expand." That message is only accurate when no filters were applied. When the request carried non-empty attributeFilters and the result came back empty, the toast now says "No neighbors matched your filters" instead, since the node may still have neighbors that the filter excluded.

Applied at both call sites (expandNode for a single node, expandNodes for multiple), since the fix path in the issue noted the multi-node path could gain filter support later.

Verification

  • Added tests covering both the generic exhausted case and the filtered-empty case, for both expandNode and expandNodes.
  • pnpm checks (lint, format, types) passes.
  • pnpm test passes except for one pre-existing, unrelated failure in safeSessionStorage.test.ts (confirmed it fails identically on main without this change).

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