db7af49112d007eea8d9c0bccbac3f42ec7a8591 max Tue Aug 11 08:50:55 2026 -0700 hgBlat: results table follows the form the search came from, refs #37893 The results-page default now tracks which input form the search came from: a submission from the new form lands on the new sortable table, one from the classic form lands on the classic results table (which keeps its banner advertising the new one). Previously the new-form path set blatNewPage=TRUE but nothing set it back, so a user who switched to the classic form - or had opted into the new table earlier - still got the new table. Set blatNewPage to the form's own new/old choice in both directions. diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 31a0d6655ce..bbde8684329 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -3006,37 +3006,37 @@ cartSetString(cart, "seqFile", ""); } userSeq = cartUsualString(cart, "userSeq", ""); if (isEmpty(userSeq)) { userSeq = cartOptionalString(cart, "seqFile"); } if (isEmpty(userSeq) || orgChange) { /* The JS-built search form is an opt-in replacement for the classic one, controlled by the * blatNewForm cart variable, which defaults to the hg.conf setting of the same name. Making it * a cart variable (like blatNewPage for the results page) is what lets the new form's banner * offer a working "go back to the original page" link. */ boolean newForm = cartUsualBoolean(cart, "blatNewForm", cfgOptionBooleanDefault("blatNewForm", FALSE)); - /* The new search form and the new results table are one experience: opting into the new form - * also opts into the new results page, so a submission from here never lands back on the - * classic results. Setting it in the cart now (while the form is shown) carries the choice - * into the next request, the actual search. The results page still has its own toggle to - * switch back for a given session. */ - if (newForm) - cartSetBoolean(cart, "blatNewPage", TRUE); + /* The search form and the results table are one experience: the results page defaults to match + * the form the search came from. A submission from the new form lands on the new results + * table; one from the classic form lands on the classic results table (which still advertises + * the new one through its banner). Setting it in the cart now, while the form is shown, carries + * the choice into the next request - the actual search. The results page still has its own + * toggle to switch for a given session. */ + cartSetBoolean(cart, "blatNewPage", newForm); /* Title from the page design. The new form names the current assembly in its own genome * picker, so prefixing the title with it as well just repeats it - and for a hub assembly that * prefix is very long ("HG02257.alt.pat.f1_v2 May 2021 BLAT Search"). cartWebStart HTML-escapes * its title, so this has to be a literal em dash, not —; the page is served as UTF-8 (the * Content-Type header wins over the stale iso-8859-1 ), so the character survives. */ if (newForm) cartWebStart(theCart, db, "BLAT — Search the genome for DNA and protein sequence matches"); else cartWebStart(theCart, db, "%s BLAT Search", trackHubSkipHubName(organism)); if (differentString(oldDb, db)) printf("
Note: BLAT search is not available for %s %s; " "defaulting to %s %s