dba11b63364870388011d5f04c6563ed440eb2a1
braney
  Thu Sep 24 13:49:56 2026 -0700
quickLift: a container set back to show no longer stays hidden on the target, refs #38198

When hgTracks arrives from a lift (hideTracks), it read a quickLifted
superTrack's state from the cart. It copied the source's bare cart value, such
as wgEncodeReg4, to hub_NNN_wgEncodeReg4 and then removed the bare one. That
had two effects. A container hidden before one lift kept the stored hide after
every later lift. This happened because hgTracks prunes a container value that
equals its default, so a container set back to show left nothing to carry
over. Visiting the target also deleted the source's own setting.

The cart read was added for #37535, when the lifted stanza still ended with
the source's "superTrack on hide". #37969 removed that line, so the stanza is
now correct. On a lift the stanza decides again: any hub_ value for the
container is dropped, and the source's value is left alone.

Also write "visibility show" for the container rather than "visibility hide".
walkTree passed "tvShow" to hTvFromString, which does not know that string and
returns hide.

With this change, a container hidden on the source keeps its earlier stanza on
the target, the same as a hidden track.

diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index 7ba1eba952f..b33d3cdc549 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -2154,31 +2154,31 @@
     rank += 1;
 
     if (isFromQuickLiftHub(tdb))
         continue;
 
     boolean isVisible =  FALSE;
 
     if (tdb->parent == NULL)
         isVisible = checkCartVisibility(cart, tdb);
     else if (isParentVisible(cart, tdb) &&  isSubtrackVisible(cart, tdb)) // child of supertrack
         {
         if (hashLookup(haveSuper, tdb->parent->track) == NULL)  // output yet?
             {
             //if (checkCartVisibility(cart, tdb->parent))
                 {
-                tdb->parent->visibility = hTvFromString("tvShow");
+                tdb->parent->visibility = tvShow;
                 // a superTrack is not in the list we are walking, so it has no rank
                 // of its own.  Slot it just above the first child that brought it in.
                 outTrack(out, cart, tdb->parent, rank - 0.5);
                 hashStore(haveSuper, tdb->parent->track);
                 }
             }
         isVisible = checkCartVisibility(cart, tdb);
         }
 
     if (isVisible && validateTdb(cart, db, tdb, badList))
         {
         hashRemove(tdb->settingsHash, "superTrack");   // this gets inherited by subTracks(?)
 
         // is this a custom track?
         char *tdbType = trackDbSetting(tdb, "tdbType");