From 1caaf2f45931f6494b998fe5ee5eee3cfe029e05 Mon Sep 17 00:00:00 2001 From: Aaron Lisman Date: Tue, 27 Oct 2026 00:18:34 +0000 Subject: [PATCH] Results page: a pencil by the genes edits them, and Modify query opens in a dialog without Explore The summary's gene chips end in a pencil (PortalSummary's onEditGenes) that opens the gene query dialog, titled "Edit genes", on the page's own query; Submit opens the Results page for the same studies and filters with the new genes. "Modify query" opens the study chooser in a dialog instead of under the summary, and there the flow offers only "Query by gene" (QueryFlow's explore={false}), whose gene dialog starts from the page's genes; the homepage keeps both. Verified on the dev server (coadread_tcga_pub, "KRAS: MUT / BRAF") and by the e2e lane of scripts/gate.sh (185 pass), whose homepage check now also asserts the dialog has no Explore button and the pencil opens "Edit genes" on the page's genes. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum --- app/_home/query-flow.tsx | 13 ++++++++----- app/portal/portal-chrome.tsx | 11 ++++++++--- app/portal/results/page.tsx | 19 +++++++++++++++---- e2e.cjs | 18 ++++++++++++++---- 4 files changed, 45 insertions(+), 16 deletions(-) diff --git a/app/_home/query-flow.tsx b/app/_home/query-flow.tsx index df0e925c..f04229c4 100644 --- a/app/_home/query-flow.tsx +++ b/app/_home/query-flow.tsx @@ -2,7 +2,8 @@ // cBioPortal's homepage flow: choose studies, then explore them (the lab's Explore, scoped to them) // or query them by gene (the gene query dialog, whose "Submit query" opens the Results page). The // homepage holds it full width and keeps the selection in its URL; the Results page's "Modify -// query" opens it with what the page queried, the dialog starting from the page's genes. +// query" opens it in a dialog with what the page queried, the gene dialog starting from the page's +// genes, and without the way into Explore. import { useState } from "react"; import { Dna, LayoutDashboard } from "lucide-react"; import { Button } from "../_ui/button"; @@ -25,8 +26,10 @@ const analyzeHref = (id: string): string => "/lab?" + new URLSearchParams({ tab: /** Explore on one study with Custom data → Add data open (the lab reads `custom=add`) */ const addDataHref = (id: string): string => "/lab?" + new URLSearchParams({ tab: "explore", study: id, custom: "add" }).toString(); -export function QueryFlow({ initial, onStudies, queryTitle, className }: { +export function QueryFlow({ initial, onStudies, queryTitle, explore = true, className }: { initial: ResultsTarget; + /** offer "Explore selected studies" beside "Query by gene" */ + explore?: boolean; /** the gene dialog's title when "Query by gene" opens it (the homepage's own wording) */ queryTitle?: string; /** the selection as it changes, for a page that keeps it in its URL */ @@ -47,7 +50,7 @@ export function QueryFlow({ initial, onStudies, queryTitle, className }: {
setAsking(null)} />
-

Select studies to explore or query

+

{explore ? "Select studies to explore or query" : "Select studies to query"}

choose([])} />
{filters.length > 0 && ( @@ -69,10 +72,10 @@ export function QueryFlow({ initial, onStudies, queryTitle, className }: {
- + }