994528edb7d89068f371fef6d8a5fc72566f7334
lrnassar
  Fri Sep 4 13:35:16 2026 -0700
Adding an opt-in "Keep only last search" checkbox to the new BLAT search form. refs #36292

Behind a new hg.conf setting, blatOnlyLatestCheckbox (default off, documented in ex.hg.conf).
When checked, each new BLAT search removes the user's earlier BLAT result tracks in hgc's
buildBigPsl (cart variable blatOnlyLatest, remembered per browser in localStorage); unchecked
keeps the current accumulate behavior, so site defaults are unchanged. Deletion requires both
the hg.conf setting and the cart variable, so a stale cart cannot delete tracks where the
feature is off. Independent of, and coexists with, the blatOldTracks hg.conf setting.

diff --git src/product/ex.hg.conf src/product/ex.hg.conf
index 6815f10bc78..039805e4bb1 100644
--- src/product/ex.hg.conf
+++ src/product/ex.hg.conf
@@ -678,30 +678,36 @@
 # default is 0
 # allowHgMirror=1
 
 # Turn off option to save blat results as a custom track. Default is on.
 # useBlatBigPsl=off
 
 # number of sequences allowed to submit to on-line blat, default is 25
 # hgBlat.maxSequenceCount=25
 
 # What to do with earlier BLAT result custom tracks when a new BLAT search adds one, so the
 # user is not confused about which results are current.  Values: keep (default, do nothing) |
 # hide (leave earlier BLAT tracks in the session but set them to hide) | delete (remove them
 # from the session).  Only affects tracks BLAT created (tagged blatResult=on).
 # blatOldTracks=keep
 
+# Offer a "Keep only last search" checkbox on the BLAT search form.  Off by default: results
+# accumulate as always.  When set to on, a user can check the box to have each new BLAT search
+# remove their earlier BLAT result tracks (tagged blatResult=on); the choice is stored in the
+# cart variable blatOnlyLatest and remembered per browser.
+# blatOnlyLatestCheckbox=on
+
 # Advertise the new BLAT results table page with a banner on the classic results page.
 # Default is off (the new page is still under test); set to on to show the invitation.
 # blatNewPageBanner=on
 
 # use a database other than hgFixed for the location of genbank table like gbCdnaInfo
 # genbankDb=hgFixed
 
 # use a table other than clade to hold the mappings from clades to their labels
 # cladeTableName=clade
 #
 # use a table other than genomeClade to hold the mappings from genome to clade
 # genomeCladeTableName=genomeClade
 #
 # use a table other than defaultDb to hold the default assembly for a genome
 # defaultDbTableName=defaultDb