From ffd268598cdedb9aa2aaa27a55c5fa80e44743ab Mon Sep 17 00:00:00 2001 From: Steven Roberts Date: Thu, 15 Oct 2026 21:00:02 -0700 Subject: [PATCH] Dashboard: don't repeat the overall top list as a pool table When the overall top candidates all come from one pool, that pool's top 5 are the overall table's first five rows. Show a one-line pointer instead of the duplicate table; other pools keep their tables. Co-Authored-By: Claude Opus 5.5 --- docs/index.qmd | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/index.qmd b/docs/index.qmd index df4f92c..814a2c7 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -202,11 +202,17 @@ candidateTable(data.candidates.top_real, {showPhenotype: !topPhen}) .filter(p => !p.simulated && p.feature_type === "gene" && p.max_k >= 2 && byPhen[p.phenotype]?.length) .sort((a, b) => b.studies.length - a.studies.length || a.phenotype.localeCompare(b.phenotype)); if (!pools.length) return html`

No cross-study pool has ranked candidates yet.

`; - return html`${pools.map(p => html` + // A pool whose list is exactly the head of the overall table gets a pointer, not a repeat. + const key = (r) => `${r.phenotype}|${r.feature_id_standardized}`; + const overallHead = (rows) => rows.every((r, i) => key(r) === key(data.candidates.top_real[i] ?? {})); + return html`${pools.map(p => { + const rows = byPhen[p.phenotype]; + return html`

${phen(p.phenotype)}

-

${p.studies.length} studies (${p.studies.join(", ")}); top ${byPhen[p.phenotype].length} - by tier, then score.

- ${candidateTable(byPhen[p.phenotype], {maxRows: byPhen[p.phenotype].length})}`)}`; +

${p.studies.length} studies (${p.studies.join(", ")}); top ${rows.length} + by tier, then score${overallHead(rows) ? `: the same as the first ${rows.length} rows of the overall table above.` : "."}

+ ${overallHead(rows) ? "" : candidateTable(rows, {maxRows: rows.length})}`; + })}`; } ```