Skip to content

fix(components): show aliases as autocomplete options in lineage filter#1113

Closed
fhennig wants to merge 3 commits into
mainfrom
feat/lineage-filter-show-aliases
Closed

fix(components): show aliases as autocomplete options in lineage filter#1113
fhennig wants to merge 3 commits into
mainfrom
feat/lineage-filter-show-aliases

Conversation

@fhennig
Copy link
Copy Markdown
Contributor

@fhennig fhennig commented May 7, 2026

resolves #926

Summary

  • Aliases defined in the lineage definition file are now shown as direct autocomplete options in the lineage filter, both as exact matches (e.g. BA.3.2) and wildcards (e.g. BA.3.2*)
  • Aliases are deduplicated case-insensitively, so lowercase noise variants (e.g. ba.3.2, bA.3.2) are not shown as separate options
  • Removes the findMissingPrefixMappings function 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* when BA.3.2 is an alias of B.1.1.529.3.2 and BA.3.2.1 exists 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 like B.1.1.529.3.2 with alias BA.3.2 when no children use BA.3.2 as their name prefix.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard-components Ready Ready Preview, Comment May 14, 2026 10:27am

Request Review

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>
@fhennig fhennig force-pushed the feat/lineage-filter-show-aliases branch from 491ced5 to 0696291 Compare May 7, 2026 13:40
@fhennig fhennig self-assigned this May 7, 2026
@fhennig fhennig requested a review from fengelniederhammer May 7, 2026 13:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread components/src/preact/lineageFilter/fetchLineageAutocompleteList.ts
Comment thread components/src/preact/lineageFilter/fetchLineageAutocompleteList.spec.ts Outdated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fhennig
Copy link
Copy Markdown
Contributor Author

fhennig commented May 18, 2026

Turns out we do not want this.

@fhennig fhennig closed this May 18, 2026
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.

Support searching lineages using aliases

3 participants