refactor(website): use per-mutation annotations for wastewater resistance mutations#1274
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the wastewater resistance mutation annotation pipeline to use a single unified annotation approach that leverages per-mutation naming support (dashboard-components ^1.18.0), removing the previous two-mode system (perVariant / perCollection).
Changes:
- Remove
annotationModefromResistanceMutationCollectionConfigand delete theannotationModeconstant. - Update resistance annotation generation to always emit one
MutationAnnotationper collection, with{ mutation, name }entries per mutation (variant name stored per mutation). - Simplify the
buildResistanceDatatest suite to match the unified behavior and updated annotation shape.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/views/pageStateHandlers/WasapPageStateHandler.spec.ts | Updates test config objects to remove the deleted annotationMode field. |
| website/src/types/wastewaterConfig.ts | Removes usage/import of annotationMode in wastewater organism configs. |
| website/src/components/views/wasap/wasapPageConfig.ts | Deletes annotationMode constant and removes annotationMode from resistance collection config type. |
| website/src/components/views/wasap/resistanceData.ts | Unifies annotation construction: one annotation per collection with per-mutation names derived from collection variants. |
| website/src/components/views/wasap/resistanceData.spec.ts | Updates expectations to the new unified annotation structure and reduces redundant mode-based tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+59
to
+60
| aminoAcidMutations: filterVariants.flatMap((variant) => | ||
| (variant.filterObject.aminoAcidMutations ?? []).map((mutation) => ({ |
Contributor
There was a problem hiding this comment.
Can't we also use allMutations here?
Suggested change
| aminoAcidMutations: filterVariants.flatMap((variant) => | |
| (variant.filterObject.aminoAcidMutations ?? []).map((mutation) => ({ | |
| aminoAcidMutations: | |
| allMutations.map((mutation) => ({ |
or something?
fengelniederhammer
approved these changes
Jun 23, 2026
…ance mutations Takes advantage of the new per-mutation name support in dashboard-components 1.18 to replace the two-mode annotation system (perVariant / perCollection) with a single unified approach: one MutationAnnotation per collection, with each mutation carrying its variant name via the new object form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…owser test flakiness Vite was re-optimizing react/jsx-dev-runtime mid browser test run, causing React to load as null and breaking tests that use hooks (e.g. useRef in LabeledField). Pinning it in optimizeDeps.include prevents the reload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2a02680 to
b198675
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

resolves #1223
Summary
perVariant/perCollection) with a single unified approach, taking advantage of per-mutation name support added in dashboard-components 1.18MutationAnnotationper collection, with each individual mutation carrying its variant name via the new{ mutation, name }object formannotationModefield fromResistanceMutationCollectionConfigand theannotationModeconstant entirelydescribeblocks down to two focused testsTest plan
npm run check-typespassesresistanceData.spec.tspasses (2 tests)WasapPageStateHandler.spec.tspasses (26 tests)🤖 Generated with Claude Code