Add a Dataset filter (PanTS / CancerVerse) to advanced search#80
Merged
Conversation
CancerVerse cases were unreachable from the dashboard: search defaulted to the backend's PanTS-only mode, and their complete:false sorts them last under quality sort. Add a Dataset section to advanced filters (multi-select, same pattern as Sex/Age) mapped to the backend ?dataset= param: - none / both selected -> dataset=all (show everything; default) - PanTS only -> dataset=pants - CancerVerse only -> dataset=cancerverse Backward-compatible: the backend serves PanTS-only for ?dataset=all when CancerVerse isn't configured, so this is a no-op until the CV env vars are set.
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.
Why
After the CancerVerse backend merged (#78), CV cases were still unreachable from the dashboard:
/api/searchdefaults to the backend's PanTS-only mode, and CV'scomplete:falsesorts them last under quality sort. This adds a Dataset section to advanced filters so users can actually see/filter CancerVerse.What
A new Dataset filter (multi-select, same UI pattern as Sex/Age — an Any pill +
PanTS+CancerVerse), placed first in the advanced-filters panel. Wired through the existingbuildSearchParamsto the backend's?dataset=param:?dataset=all(show everything — default)pantscancerversehelpers/search.ts—datasetadded toSearchFilters/EMPTY_FILTERS/MultiFilterKey; mapping inbuildSearchParams, round-trip inparseFiltersFromParams, andcountActiveFilterscounts it only when it restricts to one dataset.routes/Homepage.tsx—DATASET_OPTIONS+ the Dataset section.helpers/search.test.ts— dataset round-trip + mapping coverage.Backward-compatible
select_dataset_dfon the backend returns PanTS-only for?dataset=allwhen CancerVerse isn't loaded, so defaulting toallis a no-op until the CV env vars are set on the server — then both datasets appear (PanTS first by quality sort, CV after).Testing
tsc -bclean