Summary
Some variant records do not have a valid ClinGen allele ID, but the UI can still render a "View variant details" link for them. When the underlying ID value is a placeholder such as NA, the generated link points to /variants/NA, which cannot load a meaningful variant detail page.
Problem
Score-set visualizations render variant detail links from clingen_allele_id values. The current checks only verify that the value is truthy before generating a link. Placeholder values such as NA are truthy, so they produce broken links like /variants/NA.
This is confusing because the UI presents the link as a valid path to variant details even though no valid ClinGen allele identifier exists.
Steps to reproduce
- Open a score set visualization containing variants whose
clingen_allele_id is missing or represented as NA.
- Hover or interact with the chart tooltip/details area that includes variant actions.
- Observe that a "View variant details" link may be rendered.
- Click the link.
Observed behavior
The link navigates to /variants/NA or another invalid variant detail route derived from a non-ID placeholder.
Expected behavior
The UI should not render a variant detail link unless the variant has a valid ClinGen allele identifier supported by the variant detail route.
Proposed behavior
Validate the identifier before rendering variant detail links. Placeholder or missing values such as NA, empty strings, null, or undefined should not produce links.
Acceptance criteria
- Score-set histogram tooltips do not render "View variant details" when
clingen_allele_id is missing or set to NA.
- Score-set heatmap tooltips do not render "View variant details" when
clingen_allele_id is missing or set to NA.
- Valid ClinGen allele identifiers still render working variant detail links.
- No
/variants/NA links are generated from score-set visualization UI.
- If related route redirects depend on a
clingenAlleleId, they only redirect when the resolved ID is valid.
Implementation notes
Consider adding a small shared helper near the existing MaveMD ClinGen allele ID regex so components can consistently check whether an identifier is valid before creating links. Use that helper in score-set histogram and heatmap tooltip generation, and consider using it in any route redirect or search result path that constructs a variant detail route from a potentially nullable or placeholder ID.
Keep the behavior change limited to suppressing invalid links; do not redesign the variant detail page or chart tooltips as part of this issue.
Summary
Some variant records do not have a valid ClinGen allele ID, but the UI can still render a "View variant details" link for them. When the underlying ID value is a placeholder such as
NA, the generated link points to/variants/NA, which cannot load a meaningful variant detail page.Problem
Score-set visualizations render variant detail links from
clingen_allele_idvalues. The current checks only verify that the value is truthy before generating a link. Placeholder values such asNAare truthy, so they produce broken links like/variants/NA.This is confusing because the UI presents the link as a valid path to variant details even though no valid ClinGen allele identifier exists.
Steps to reproduce
clingen_allele_idis missing or represented asNA.Observed behavior
The link navigates to
/variants/NAor another invalid variant detail route derived from a non-ID placeholder.Expected behavior
The UI should not render a variant detail link unless the variant has a valid ClinGen allele identifier supported by the variant detail route.
Proposed behavior
Validate the identifier before rendering variant detail links. Placeholder or missing values such as
NA, empty strings,null, orundefinedshould not produce links.Acceptance criteria
clingen_allele_idis missing or set toNA.clingen_allele_idis missing or set toNA./variants/NAlinks are generated from score-set visualization UI.clingenAlleleId, they only redirect when the resolved ID is valid.Implementation notes
Consider adding a small shared helper near the existing MaveMD ClinGen allele ID regex so components can consistently check whether an identifier is valid before creating links. Use that helper in score-set histogram and heatmap tooltip generation, and consider using it in any route redirect or search result path that constructs a variant detail route from a potentially nullable or placeholder ID.
Keep the behavior change limited to suppressing invalid links; do not redesign the variant detail page or chart tooltips as part of this issue.