avoigt1121 Claude Opus 5 commited on
Commit
3ad3d85
·
1 Parent(s): 408908b

docs(memory): the stacked-chart split, the two axis distortions, and the render race caught before shipping

Browse files
Files changed (2) hide show
  1. TODO.md +11 -6
  2. memory.md +39 -0
TODO.md CHANGED
@@ -201,12 +201,17 @@ the reasoning → `memory.md` (2026-08-05).
201
  - [ ] **No curated cohort carries a subtype label** — all seven route to `orchestrator`, so the
202
  label-join half of this agent cannot be demonstrated in the Space at all. Either curate a cohort
203
  that has one, or say plainly on the tab that the join is orchestrator-only today.
204
- - [ ] **Legibility, for the non-coding OHSU audience.** Bars stack across modalities, so KRAS reaches
205
- ~120% on a "% altered (of profiled)" axis and the three modalities have *different*
206
- denominators (CCLE: 53 / 44 / 41), so the stack is not a quantity. The page header still says
207
- "Somatic **mutation** and **copy-number status**" with no mention of the third modality. Opening
208
- "Raw result (JSON)" on a full-panel query produces a ~300,000-pixel page, because
209
- `samples_profiled` prints all 2,336 ids three times.
 
 
 
 
 
210
 
211
  ## Open — payload contract
212
 
 
201
  - [ ] **No curated cohort carries a subtype label** — all seven route to `orchestrator`, so the
202
  label-join half of this agent cannot be demonstrated in the Space at all. Either curate a cohort
203
  that has one, or say plainly on the tab that the join is orchestrator-only today.
204
+ - [x] **DONE `408908b` (not deployed) header names SV, and the chart no longer stacks.** Header +
205
+ tab blurb now say "mutation, copy-number and structural-variant (fusion)". The stack was wrong
206
+ twice over (overlapping membership double-counting; different denominators not percentages
207
+ of the same thing), so it is now **one chart per modality**, each naming its own denominator.
208
+ Also fixed two distortions found only by looking at the render: the y-axis started at the data
209
+ minimum (SMAD4 ~21% looked like nothing beside KRAS 90%) — baseline now zero; and a fixed 0–100
210
+ ceiling made NRG1's real 0.26% a sub-pixel sliver — ceiling now fitted per chart.
211
+ **Do not reintroduce a shared 0–100 axis** — it only buys cross-modality comparison by eye,
212
+ which the differing denominators make invalid. Detail → `memory.md` 2026-08-06.
213
+ - [ ] **Legibility, still open:** the "Raw result (JSON)" accordion on a full-panel query produces a
214
+ ~300,000-pixel page, because `samples_profiled` prints all 2,336 sample ids three times.
215
 
216
  ## Open — payload contract
217
 
memory.md CHANGED
@@ -4,6 +4,45 @@ Current status + history. Architecture → `CLAUDE.md`. Backlog → `TODO.md`.
4
 
5
  ---
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ## 2026-08-05 (latest) — I shipped a regression to prod and caught it in the post-deploy click-through (`819da30`, NOT deployed)
8
 
9
  `23d37b6` went to prod and fixed the three real bugs. It also introduced a fourth, which the
 
4
 
5
  ---
6
 
7
+ ## 2026-08-06 — legibility: the header names SV, and the chart no longer stacks (`408908b`, NOT deployed)
8
+
9
+ **Header.** Title and the variant-status blurb both said "mutation and copy-number status". SV has
10
+ been shipping since `0f39c3b` and was named nowhere a reader looks first.
11
+
12
+ **The stacked chart was wrong twice over, not merely cramped.** A sample can be BOTH mutated and
13
+ copy-number altered, so the segments are not disjoint and stacking double-counts; and the modalities
14
+ have **different denominators** (`ccle_broad_2019`: 53 / 44 / 41 profiled; `paad_tcga`: 150 mutation
15
+ vs 184 cnv), so the segments are not percentages of the same thing. A stacked bar asserts "these
16
+ parts make up the whole". KRAS reached ~120% on an axis labelled "% altered".
17
+
18
+ Now **one chart per modality**, each naming its own denominator, each a single series. Gradio's
19
+ native BarPlot has no grouping control and the Space has no other plotting library, so splitting is
20
+ the only honest option inside the current dependency set — and it deletes the categorical colour
21
+ scale whose stale domain caused both wrong-answer bugs of 2026-08-05.
22
+
23
+ **Two further distortions surfaced only by looking at the rendered result:**
24
+ 1. Autoscale started the y-axis at the **data minimum** — a CCLE chart ran from 20%, so SMAD4 at
25
+ ~21% looked like nothing beside KRAS at 90%. Baseline now pinned to zero.
26
+ 2. Fixing the ceiling at 100 to match then made SV unreadable: NRG1 is 6/2336 = **0.26%**, a
27
+ sub-pixel sliver — the same "reported as nothing" failure in new clothes. Ceiling is fitted per
28
+ chart, floored so one tiny bar is not stretched to full height, capped at 100.
29
+
30
+ **A third bug caught BEFORE shipping, which is the point.** The clearing frame first hid all three
31
+ charts; the answer then re-showed them. That hide→show flip lost the race for the third chart about
32
+ half the time — it stayed unmounted (browser: "null does not exist"), so a cohort **with** structural
33
+ variants rendered as mutation+CNV only, reading as "no fusions here". The clearing frame now blanks
34
+ each chart's VALUE and leaves visibility alone.
35
+
36
+ **What caught it was re-running the same query from a fresh load instead of accepting one good
37
+ render.** The first render looked right; the failure only appeared on a first query after load, so a
38
+ single happy screenshot would have shipped it. That is the third time in two days this exact class —
39
+ a chart silently not showing — has appeared, and the first time it was caught before deploy.
40
+ Verified across 4 fresh-load trials (including a click during hydration and the double-click that
41
+ first exposed it), plus `paad_tcga` showing exactly 2 charts, plus both narrow→wide and wide→narrow
42
+ on single clicks. **237 tests** (was 235).
43
+
44
+ ---
45
+
46
  ## 2026-08-05 (latest) — I shipped a regression to prod and caught it in the post-deploy click-through (`819da30`, NOT deployed)
47
 
48
  `23d37b6` went to prod and fixed the three real bugs. It also introduced a fourth, which the