Skip to content

feat(website): rename AA mutations to AA substitutions on details page#6150

Merged
anna-parker merged 5 commits intomainfrom
rename_header
Mar 20, 2026
Merged

feat(website): rename AA mutations to AA substitutions on details page#6150
anna-parker merged 5 commits intomainfrom
rename_header

Conversation

@anna-parker
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker commented Mar 18, 2026

Alternative to #6135 - as discussed on slack https://loculus.slack.com/archives/C061ZQQM3N1/p1773419507020499 for consistency across organisms we will change the details page header amino acid mutations to amino acid substitutions

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://rename-header.loculus.org

@claude claude bot added the website Tasks related to the web application label Mar 18, 2026
@anna-parker anna-parker added the preview Triggers a deployment to argocd label Mar 18, 2026
@anna-parker anna-parker marked this pull request as ready for review March 18, 2026 12:16
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 18, 2026

Claude finished @anna-parker's task in 1m 2s —— View job


Code Review

  • Read changed files
  • Review code quality, testing, and correctness
  • Post final review

The rename from "amino acid mutations" → "amino acid substitutions" is straightforward and the changes are generally clean. However, there is one significant bug introduced by this PR.

Bug: AA substitutions section will not render

DataTable.tsx, line 58:

const mutationSections = dataTableData.table.filter(({ header }) => header.toLowerCase().includes('mutation'));

DEFAULT_AA_MUTATION_DETAILS_HEADER is now 'Amino acid substitutions', which does not contain the word 'mutation'. At the same time, the generalSections filter correctly excludes it via explicit constant comparison (line 54–55). The net result is that rows with the AA substitutions header are excluded from both generalSections and mutationSections, so the entire amino acid substitutions panel will silently disappear from the details page.

The fix is to use the constants directly instead of a string match:

const mutationSections = dataTableData.table.filter(
    ({ header }) =>
        header === DEFAULT_NUC_MUTATION_DETAILS_HEADER || header === DEFAULT_AA_MUTATION_DETAILS_HEADER,
);

Fix this →

Minor: inconsistent terminology in search docs

DisplaySearchDocs.tsx, line 76 — the section heading was updated but the body text still reads:

"An amino acid mutation has the format…"

Since the heading now says "Amino acid substitutions and insertions", this paragraph body should say "substitution" too for consistency.

Copy link
Copy Markdown
Collaborator

@tombch tombch left a comment

Choose a reason for hiding this comment

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

Looks good! Although one issue I've spotted is under the 'Amino acid substitutions' it says 'mutations called relative to the...':

Image

@anna-parker anna-parker requested a review from tombch March 19, 2026 10:23
Copy link
Copy Markdown
Collaborator

@tombch tombch left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@anna-parker anna-parker merged commit 95efaf5 into main Mar 20, 2026
49 of 51 checks passed
@anna-parker anna-parker deleted the rename_header branch March 20, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants