fix(components): show aliases as autocomplete options in lineage filter#1113
fix(components): show aliases as autocomplete options in lineage filter#1113fhennig wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Previously, aliases were only used to generate prefix wildcard items (e.g. BA.3.2*) when the alias happened to be a prefix of another lineage name in the tree. This meant aliases that are not prefixes of anything (e.g. BA.3.2 when it has no children named BA.3.2.x) were silently omitted. The fix simplifies the logic: aliases are now always shown as direct autocomplete options (both exact and wildcard), deduplicated case-insensitively to avoid showing noise from lowercase variants. This also makes the previous findMissingPrefixMappings function redundant and removes it entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
491ced5 to
0696291
Compare
There was a problem hiding this comment.
Pull request overview
Updates the lineage filter autocomplete generation to surface lineage aliases (from the lineage definition) as selectable options, including wildcard variants, so users can search/select by both canonical lineage names and their aliases.
Changes:
- Add alias-derived autocomplete options (both exact and
*wildcard) with case-insensitive deduplication to reduce casing-noise duplicates. - Remove the previously introduced prefix-only alias handling (
findMissingPrefixMappings) in favor of the broader alias-option approach. - Extend/update unit tests to cover alias inclusion (including the “not a prefix of any other lineage” case).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| components/src/preact/lineageFilter/fetchLineageAutocompleteList.ts | Adds alias-based autocomplete items (exact + wildcard) with case-insensitive dedupe; removes prefix-mapping helper. |
| components/src/preact/lineageFilter/fetchLineageAutocompleteList.spec.ts | Updates expectations and adds coverage for direct alias inclusion and dedup behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fengelniederhammer
left a comment
There was a problem hiding this comment.
Are we sure about this change? As far as I understood it, it adds quite a number of new lineages to the options in the dropdown, doesn't it? In the preview, it also seems a bit laggy, when using all Covid lineages and filtering for B. or B.1.
|
Turns out we do not want this. |
resolves #926
Summary
BA.3.2) and wildcards (e.g.BA.3.2*)ba.3.2,bA.3.2) are not shown as separate optionsfindMissingPrefixMappingsfunction introduced in fix(components): add missing lineage prefixes to autocomplete list #1024, which handled a subset of this problem (aliases that happened to be prefixes of other lineage names). The new approach is simpler and covers all alias cases, making the prefix detection logic redundant.Background
PR #1024 (d1f34bb) added support for alias-based prefix wildcards (e.g.
BA.3.2*whenBA.3.2is an alias ofB.1.1.529.3.2andBA.3.2.1exists in the tree). However, if the alias was not a prefix of any other lineage name, it was silently omitted from the dropdown entirely — which is the case for leaf lineages likeB.1.1.529.3.2with aliasBA.3.2when no children useBA.3.2as their name prefix.