feat(website): improve UX for W-ASAP collection analysis mode#1055
feat(website): improve UX for W-ASAP collection analysis mode#1055
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR implements variant query validation and coverage query generation for the W-ASAP wastewater dashboard collection mode, resolving issue #1026. It introduces LAPIS-based parsing and validation of variant queries, generates coverage queries using the formula (query) or (not maybe(query)), and improves the UI by extracting inline components into dedicated files and adding a new CollectionInfo component to display collection metadata and invalid variant warnings.
Changes:
- Added LAPIS query parsing and validation to ensure collection variants contain only genome-level filters (mutations/insertions)
- Implemented coverage query generation using the LAPIS formula from PR #1558
- Refactored W-ASAP page by extracting inline components (WasapStats, VariantFetchInfo, NoDataHelperText) and adding CollectionInfo component
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/util/siloExpressionUtils.ts | New utility to validate SILO filter expressions contain only genome checks |
| website/src/util/siloExpressionUtils.spec.ts | Tests for SILO expression validation logic |
| website/src/covspectrum/variantConversionUtil.ts | Converts detailedMutations queries to LAPIS query strings |
| website/src/covspectrum/variantConversionUtil.spec.ts | Tests for variant conversion utility |
| website/src/covspectrum/types.ts | Exports DetailedMutationsQuery type |
| website/src/components/views/wasap/useWasapPageData.ts | Core implementation of variant validation and coverage query generation |
| website/src/components/views/wasap/components/WasapStats.tsx | Extracted component showing amplicon sequences and sampling dates statistics |
| website/src/components/views/wasap/components/VariantFetchInfo.tsx | Extracted component displaying clinical sequence counts with warnings |
| website/src/components/views/wasap/components/NoDataHelperText.tsx | Extracted component for no data helper messages |
| website/src/components/views/wasap/components/CollectionInfo.tsx | New component displaying collection metadata and invalid variants |
| website/src/components/views/wasap/WasapPage.tsx | Refactored to use extracted components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
website/src/components/views/wasap/components/VariantFetchInfo.tsx
Outdated
Show resolved
Hide resolved
fengelniederhammer
left a comment
There was a problem hiding this comment.
and what Copilot says about the missing tests for the invalid cases ;)
|
I realised that the Example data:
The count will return just a single row However, the coverage query will return 105 instead of the expected 5: |
Refactored WasapPage.tsx by extracting all inline components into separate files in a new components subdirectory. This improves code organization and maintainability. Components extracted: - CollectionInfo: displays collection link and invalid variants - NoDataHelperText: shows helpful messages when no data is available - VariantFetchInfo: displays clinical sequence count with warnings - WasapStats: shows amplicon sequences and sampling date stats Additional changes: - Moved WasapStats to bottom of page for both mutation and collection modes - Removed completed TODO about collection link (now implemented in CollectionInfo) - Cleaned up imports in WasapPage.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Simplified the collection link display to be more concise: - Title: "CoV-Spectrum collection" (instead of "Collection") - Main text: Collection title as clickable link (reduced from 3 lines to 2) - Description: Shows collection ID 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
fcaca24 to
aaecc7b
Compare
|
Regarding Alex' comment, we're probably actually going to make some changes regarding this in SILO. Plan is now to disregard this issue with gaps for now - i'll make an issue for it though. Edit: Issue link: #1067 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
website/src/components/views/wasap/components/CollectionInfo.tsx
Outdated
Show resolved
Hide resolved
fengelniederhammer
left a comment
There was a problem hiding this comment.
The code looks good, but I can't test it because the WISE LAPIS doesn't have the query parse endpoint yet.
fengelniederhammer
left a comment
There was a problem hiding this comment.
Tested, works 👍
resolves #1026
Summary
Changes
Validation & Error Handling
UI Improvements
Code Organization
Screenshot
Screen.Recording.2026-02-24.at.19.08.15.mov
PR Checklist
🤖 Generated with https://claude.com/claude-code (and refined by Felix hehe)