fix(website): fix sequence details page of multi-pathogen revocation entries#5626
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the sequence details page for multi-pathogen revocation entries by allowing the suborganism field to be null. Previously, revocation entries with null suborganism values would cause errors, but now the code properly handles this case throughout the application.
Key Changes:
- Modified type signatures to allow
suborganismto benull | Suborganisminstead of justSuborganism - Updated validation logic to accept null values for the suborganism field
- Added null checks before accessing suborganism-dependent data
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
website/src/types/detailsJson.ts |
Updated schema to allow nullable suborganism field |
website/src/utils/getSuborganismSegmentAndGeneInfo.tsx |
Removed function overload signatures (implementation already handled null) |
website/src/pages/seq/[accessionVersion]/getSequenceDetailsTableData.ts |
Updated TableData type to allow null suborganism |
website/src/components/SequenceDetailsPage/getTableData.ts |
Updated return types, validation logic, and error messages to handle null suborganism |
website/src/components/SequenceDetailsPage/getTableData.spec.ts |
Added test case and updated error message expectation for null suborganism handling |
website/src/components/SequenceDetailsPage/SequencesDisplay/SequencesContainer.tsx |
Added null check to return early when suborganism is null |
website/src/components/SequenceDetailsPage/SequenceDataUI.tsx |
Updated Props interface to allow null suborganism |
website/src/components/SequenceDetailsPage/RevocationEntryDataTable.astro |
Updated Props interface to allow null suborganism |
website/src/components/SequenceDetailsPage/DataTable.tsx |
Added null checks before accessing suborganism-dependent reference data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
website/src/components/SequenceDetailsPage/SequencesDisplay/SequencesContainer.tsx
Outdated
Show resolved
Hide resolved
website/src/components/SequenceDetailsPage/SequencesDisplay/SequencesContainer.tsx
Outdated
Show resolved
Hide resolved
bce2b8a to
2213cec
Compare
40fe433 to
dac97e2
Compare
|
I rebased to effectively cherry-pick the changes |
dac97e2 to
dbea671
Compare
3a58a50 to
4cc2c6d
Compare
anna-parker
left a comment
There was a problem hiding this comment.
lgtm - it might make sense to see if we can get rid of the empty nucleotide mutations list for revocation previews still (but we can make a follow up issue for this)
AFAICS this is also the case on main for other organisms, i.e. accepted existing behavior. Feel free to open an issue, I won't change it in this PR. |
resolves #5619
Screenshot
PR Checklist
- [ ] All necessary documentation has been adapted.Anya notes: revoked the sequence LOC_003MSV5.1 and confirmed page still works:
🚀 Preview: https://5619-missing-genotype-of.loculus.org