c1ac48b0feb9a8ff0f0bb16d7aff15d417d6772b
lrnassar
  Tue Sep 8 12:38:42 2026 -0700
Share dialog: scope the snapshot-lifetime wording to the BLAT alignment share only. Feedback from CR. refs #37996

The softer durability text (link valid for years, save into a Session for permanence) keyed
on the generic url mode, so hgTrackUi's page-share link and the hgc item-popup share, both
plain non-expiring URLs, showed misleading copy. The wording is now behind an explicit
snapshot flag that only the BLAT alignment page's share passes; every other caller keeps
"Links never time out". Also removes a stray blank line in hgc.c from the same review.

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 99bb876867d..03d3741d2ab 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -9790,31 +9790,31 @@
     "  if (btn.dataset.busy) return;\n"
     "  btn.dataset.busy = '1';\n"
     "  var label = btn.textContent;\n"
     "  btn.textContent = 'Creating link\\u2026';\n"
     "  fetch('../cgi-bin/hgSession', {method:'POST', credentials:'same-origin',"
     " headers:{'Content-Type':'application/x-www-form-urlencoded'},"
     // hgS_snapshotType=blat -> a lightweight snapshot storing only blatLastBigBed (+db), not the
     // whole cart, under a server-generated unique "__" name (see lib/snapshotSession.c).
     " body:'hgsid=%s&hgS_doSaveSessionJson=1&hgS_shareAnon=1&hgS_snapshotType=blat'})\n"
     "  .then(function(r){ return r.json(); }).then(function(data){\n"
     "    btn.textContent = label; btn.dataset.busy = '';\n"
     "    if (!data || !data.name) return;\n"
     "    var link = window.location.origin + window.location.pathname +\n"
     "      '?g=htcBlatAlign&c=%s&o=%d&i=' + encodeURIComponent('%s') +\n"  // db comes from the session
     "      '&u=l&s=' + encodeURIComponent(data.name);\n"
-    "    if (window.topLinks && topLinks.shareUrl) topLinks.shareUrl(link);\n"
+    "    if (window.topLinks && topLinks.shareUrl) topLinks.shareUrl(link, {snapshot: true});\n"
     "  }).catch(function(){ btn.textContent = label; btn.dataset.busy = ''; });\n"
     "});\n"
     "})();\n",
     cartSessionId(cart), tNameJs, psl->tStart, qNameJs);
 freeMem(qNameHtml);
 freeMem(chromHtml);
 freeMem(qNameJs);
 freeMem(chromJs);
 freeMem(tNameJs);
 }
 
 void alnModernStart(char *classicTitle)
 /* Begin an alignment page.  With the modernAlignPage hg.conf flag set, start the modern single-page
  * chrome (webStartGbNoBanner) and arm gAlnModern so showSomeAlignment() renders the modern body;
  * otherwise start the classic <frameset>.  This is the plain track-click entry point (mRNA/EST/PSL
@@ -28019,31 +28019,30 @@
 // group=blat (gated by hg.conf blatResultsGroup) puts BLAT results in their own "BLAT Results" track
 // group instead of Custom Tracks, so they are easy to find and clear as a set (see the group's
 // "Delete all" button in hgTracks).
 char *groupTag = cfgOptionBooleanDefault("blatResultsGroup", FALSE) ? "group=blat " : "";
 char *customTextTemplate = "track type=bigPsl blatResult=on %sindelDoubleInsert=on indelQueryInsert=on pslFile=%s visibility=pack showAll=on htmlUrl=http://%s/goldenPath/help/hgUserPsl.html %s bigDataUrl=%s name=\"%s\" description=\"%s\" colorByStrand=\"0,0,0 0,0,150\" mouseOver=\"${oChromStart}-${oChromEnd} of ${oChromSize} bp, strand ${oStrand}\"\n";
 char *extraForMismatch = "indelPolyA=on showDiffBasesAllScales=. baseColorUseSequence=lfExtra baseColorDefault=diffBases";
 
 if (isProt)
     extraForMismatch = "";
 char buffer[4096];
 safef(buffer, sizeof buffer, customTextTemplate, groupTag, bigBedTn.forCgi, host, extraForMismatch, bigBedTn.forCgi, trackName, trackDescription);
 
 struct customTrack *ctList = getCtList();
 struct customTrack *newCts = customFactoryParse(database, buffer, FALSE, NULL, NULL);
 
-
 /* Optionally clear PREVIOUS BLAT result tracks (those tagged blatResult=on) so the user is not
  * confused about which results are current.  hg.conf "blatOldTracks":
  *   keep   (default) - do nothing, every search's track stays as-is
  *   hide             - leave earlier BLAT tracks in the session but set them to hide
  *   delete           - remove earlier BLAT tracks from the session (their trash files age out)
  * Only BLAT-tagged tracks are touched; the track just made is left alone. */
 char *oldTracks = cfgOptionDefault("blatOldTracks", "keep");
 /* Fail safe on an unrecognized value (e.g. a typo in hg.conf): fall back to "keep" rather than to
  * the destructive "delete" branch below, so a misconfiguration never silently discards a user's
  * previous BLAT tracks. */
 if (differentString(oldTracks, "keep") && differentString(oldTracks, "hide")
     && differentString(oldTracks, "delete"))
     {
     warn("hg.conf blatOldTracks has unrecognized value '%s'; expected keep|hide|delete. "
          "Treating as 'keep'.", oldTracks);