Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several state-reset, label-generation, compatibility, and legacy-migration defects can produce incorrect filtering or failing tests.
Review effort: Balanced
Findings: 2
Open (6)
Clear stale origin state when no origin selector exists · New Migrate legacy origins in custom groupsets · New Fall back to sample type name when plural name is absent · New Put sample type before origin in combined labels · New Include selector labels in custom groupset titles · New Preserve generic sample labels for legacy matrix requests · New
What changed in this PR
Adds multi-origin selection and labeling for geneVariant terms across client and server processing.
Changes:
- Makes mutation data-type terms origin-agnostic.
- Adds reusable origin/sample-type selectors and labels.
- Filters and aggregates variants across selected origins.
| File | Description |
|---|---|
| shared/utils/src/test/terms.unit.spec.ts | Tests origin-agnostic data-type terms. |
| shared/utils/src/common.ts | Simplifies shared data-type terms. |
| shared/types/src/terms/geneVariant.ts | Updates current and legacy origin types. |
| server/src/test/mds3.init.unit.spec.js | Tests server-side origin filtering. |
| server/src/termdb.matrix.ts | Adjusts sample-type labels. |
| server/src/termdb.barchart.js | Attaches origins to chart terms. |
| server/src/routes/termdb.categories.ts | Supports dynamic origin categories. |
| server/src/mds3.init.js | Filters variants and availability by origins. |
| client/tw/test/geneVariant.integration.spec.ts | Tests term-wrapper migration. |
| client/tw/geneVariant.ts | Migrates legacy terms and updates groupsets. |
| client/termsetting/handlers/geneVariant.ts | Displays combined labels. |
| client/termdb/handlers/test/rememberedGvQ.unit.spec.ts | Updates remembered-setting expectations. |
| client/termdb/handlers/test/geneVariant.integration.spec.ts | Tests origin and label selection. |
| client/termdb/handlers/test/geneExpression.unit.spec.ts | Tests sample-type labels. |
| client/termdb/handlers/rememberedGvQ.ts | Matches settings by data type. |
| client/termdb/handlers/geneVariant.ts | Implements origin selection and submission. |
| client/termdb/handlers/geneExpression.ts | Reuses sample-type labeling. |
| client/filter/tvs.dt.js | Merges selected-origin values. |
| client/filter/test/tvs.dt.unit.spec.ts | Tests origin value merging. |
| client/dom/test/checkboxSelect.unit.spec.ts | Tests the checkbox selector. |
| client/dom/sampleTypeSelect.ts | Generalizes sample-type selection and labels. |
| client/dom/index.ts | Exports checkbox utilities. |
| client/dom/checkboxSelect.ts | Adds reusable checkbox selection UI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Legacy saved sessions can be misinterpreted, and current label, matrix, and type-definition issues cause incorrect behavior or test/type-check failures.
Review effort: Balanced
Findings: 3
Open (5)
gavrielm
force-pushed
the
genev_origin_sampletype
branch
2 times, most recently
from
October 2, 2026 21:18
9199647 to
bddf844
Compare
gavrielm
marked this pull request as ready for review
October 2, 2026 21:49
xzhou82
force-pushed
the
genev_origin_sampletype
branch
from
October 3, 2026 15:37
72f6d5f to
0294117
Compare
xzhou82
force-pushed
the
genev_origin_sampletype
branch
from
October 4, 2026 14:36
0294117 to
92e075f
Compare
This branch has not been deployed
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.


Description
This PR supports selection of one or more mutation origins for geneVariant term. In the geneVariant search handler,
if a mutation type (e.g. SNV/indel) has multiple origins (e.g. somatic and germline), then checkboxes are rendered to select one or more of these origins. The selected origins are stored on
tw.term.origins[].Since now origin is a dynamic property, dtTerms and predefined groupsets that were defined by origin have been removed. Legacy geneVariant termwrapper structure is still supported.
Labels for selected origins and sample types are stored on
term.originLabelandterm.sampleTypeLabel, respectively, and then concatenated intoterm.label. Theterm.labelis displayed along withterm.namein the plot title and in the term pill.Please test using DISCOVER portal.
Checklist
Check each task that has been performed or verified to be not applicable.