Repository navigation
Study View: a chart carries every value in practice (FACET_VALUE_LIMIT 20,000), so Summary Data is whole - #465
Conversation
…T 20,000), so Summary Data is whole The user's answer (2026-11-19): raise the bound on a chart's values from 200 to about 20,000, keeping a bound against something enormous. The warehouse's largest categorical list is 5,033 values (pancan_mimsi_msk_2024 SAMPLE_DISPLAY_NAME; 218 lists ran past 200), so every chart now lists every value and its Summary Data is offered whole. Its answer grows from 320KB to 450KB, about 0.2s. Generic-assay categorical charts keep the same bound (they kept 30). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3ezTaCo6wHFVsML6Qd4ht
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review: pass. This applies the user's answer of 2026-11-19 (Study View 200-value cap). nit: the test comment "the user's answer (2026-11-19)" records history; the comment should say what the test checks. |
Summary
A Study View chart now carries every value in practice, as the portal's does, so its Summary Data is whole (STS-STM-1, STS-DL-1). This follows the user's answer of 2026-11-19: raise the bound to about 20,000 and keep one against something enormous.
FACET_VALUE_LIMITgoes from 200 to 20,000 (lib/explore.ts).ASSAY_VALUE_LIMIT, was 30; SD16).ATTR_VALUE_CAP, as the user decided on 2026-11-17.Spec IDs
Verification
Dev server, pancan_mimsi_msk_2024:
Sample_Display_Name.summary.txthas 5,033 rows (5,032 values and NA), "Category · Number of samples · Percentage of samples" as the portal writes it.Answer size and time: 320,832 B / 1.4–2.2 s at 200; 450,298 B / 1.6–2.5 s at 20,000.
Unit tests (
test/explore-facets.test.ts):distinctat least the union's size, a study's own largerdistinctkept, a union within it not cut);npm test6,899 pass, 0 fail;tsc --noEmitand eslint clean.Coverage: passes.
Planted bug: 1 in
scripts/mutants/study-view.ts(facet-values-cut-at-200, guardunit).Tracker
Under "Study View → summary charts", these lines (docs/PORTAL-PARITY.md:432–433):
become:
This line (docs/PORTAL-PARITY.md:444):
becomes:
Scorecard
30-study-summary.md, row STS-STM-1 (was| STS-STM-1 | 🟡 | BC | Count by folded value at the attribute's level, NA row; all 40 categorical charts identical to the portal API on Q1, Q2, Q4; the kept spelling the greatest and values merged across studies by their fold, as the portal (keptSpelling). A chart lists at most 200 values (FACET_VALUE_LIMIT; OTHER_PATIENT_ID "showing 200 of 592 values") |):| STS-STM-1 | ✅ | BC | Count by folded value at the attribute's level, NA row; all 40 categorical charts identical to the portal API on Q1, Q2, Q4; the kept spelling the greatest and values merged across studies by their fold, as the portal (
keptSpelling). Every value listed (FACET_VALUE_LIMIT20,000, above the warehouse's largest list, 5,033) |download-cases.md, rows SD13, SD15, SD16:| SD13 | ⚠ Values cut | The page holds a categorical chart's values up to 20,000, more than any list in the warehouse (the largest is 5,033), so Summary Data is whole in practice. A chart past the bound offers Summary Data disabled, saying how many it holds of how many: a file that silently left values out would read as complete. The portal has no cap | cBioLab (
FACET_VALUE_LIMIT,lib/explore.ts) || SD15 | ⚠ Values cut across studies | Each study sends its values up to the bound. When their union holds more, the merged chart keeps the bound's worth of the most frequent, and its count of values (
distinct) is at least the union's size, so the cut shows, both in "showing N of M values" and in SD13 | cBioLab (mergeExplore,lib/explore.ts) || SD16 | ⚠ Generic-assay values cut | A categorical generic-assay chart keeps its values up to the same bound and reports how many it has, so SD13 applies to it too | cBioLab (
ASSAY_VALUE_LIMIT,lib/explore.ts) |Preview
/lab?tab=explore&study=pancan_mimsi_msk_2024: Add chart → Sample Display Name; ☰ › Download › Summary Data.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q3ezTaCo6wHFVsML6Qd4ht