From 3c51e0e4b480951eb054ae61394acd014efe6f34 Mon Sep 17 00:00:00 2001 From: Jorge Rivera Date: Sun, 25 Oct 2026 13:40:28 +0100 Subject: [PATCH] fix(search): group entity-choice menus by entity_choice An option or slot token carrying entity_choice joins the no_data.ambiguous_entities group of that index, so two groups written alike ("aid from Congo to Congo") open two menus, each from its own slot. Without the field, menus group by mention text as before. Co-authored-by: Claude --- .../organisms/DataSearch/SearchCards.tsx | 2 +- .../organisms/DataSearch/SearchSentence.tsx | 2 +- src/lib/search/parsedEdit.ts | 39 ++++++++--- .../search/test/fixtures/ambiguous-congo.ts | 67 ++++++++++++++++++- src/lib/search/test/parsedEdit.test.ts | 15 +++++ src/lib/search/test/view.test.ts | 30 +++++++++ src/lib/search/types.ts | 17 ++++- src/lib/search/view.ts | 51 ++++++++------ 8 files changed, 187 insertions(+), 36 deletions(-) diff --git a/src/components/organisms/DataSearch/SearchCards.tsx b/src/components/organisms/DataSearch/SearchCards.tsx index 24ead24..e288319 100644 --- a/src/components/organisms/DataSearch/SearchCards.tsx +++ b/src/components/organisms/DataSearch/SearchCards.tsx @@ -129,7 +129,7 @@ const SearchCards = ({ {groups.flatMap((group) => group.options.map((option, index) => (