1a3400408892585e530f10d4b8c4b612f29e9473
jcasper
  Thu Mar 26 04:18:29 2026 -0700
Adding parent link to UI for faceted composites in supertracks, refs #36320

diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 3b0e375e388..52d240cdac1 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -3509,30 +3509,33 @@
 // A bit of context when we're in hierarchy: parent description and sibling track list
 
 if (!tdb->parent)
     return;
 
 // show super-track info
 struct trackDb *tdbParent = tdb->parent;
 
 printf("<b>Track collection: "
            "<img height=12 src='../images/ab_up.gif'>"
             "<a href='%s?%s=%s&c=%s&g=%s'>%s </a></b>",
             hgTrackUiName(), cartSessionVarName(), cartSessionId(cart),
             chromosome, cgiEncode(tdbParent->track), tdbParent->longLabel);
 printf("<p>");
 
+if (tdbIsComposite(tdb) && sameOk(trackDbLocalSetting(tdb, "compositeTrack"), "faceted"))
+    return;
+
 if (tdbParent->html)
     {
     // collapsed panel for Description
     printf("<p><table>");  // required by jsCollapsible
     jsBeginCollapsibleSectionFontSize(cart, tdb->track, "superDescription", "Description", FALSE,
                                             "medium");
     // TODO: better done with regex
     char *html = replaceChars(tdbParent->html, "<H", "<h");
     html = replaceChars(html, "</H", "</h");
 
     // remove Description header
     html = replaceChars(html, "<h2>Description</h2>", "");
     html = replaceChars(html, "<h3>Description</h3>", "");
     html = replaceChars(html, "<h1>Description</h1>", "");
 
@@ -3756,31 +3759,30 @@
         grpFreeList(&grps);
         }
 
     // incoming links from Google searches can go directly to a composite child trackUi page: tell users 
     // that they're inside a container now and can go back up the hierarchy
     if (tdbGetComposite(tdb)) {
         printf("<p>This track is a subtrack of the composite container track \"%s\".<br>", tdb->parent->shortLabel);
         printf("<a href='hgTrackUi?db=%s&c=%s&g=%s'>Click here</a> to display the \"%s\" container configuration page.", database, chromosome, tdb->parent->track, tdb->parent->shortLabel);
     }
 
     }
 
 puts("<BR><BR>");
 
 if (tdbIsSuperTrackChild(tdb))
-    if (! (tdbIsComposite(tdb) && sameOk(trackDbLocalSetting(tdb, "compositeTrack"), "faceted")) )
     showSupertrackInfo(tdb);
 
 if (ct && sameString(tdb->type, "maf"))
     tdb->canPack = TRUE;
 else if (sameString(tdb->track, WIKI_TRACK_TABLE))
     // special case wikiTrack (there's no trackDb entry); fixes redmine 2395
     tdb->canPack = TRUE;
 else if (sameString(tdb->type, "halSnake"))
     tdb->canPack = TRUE;
 else if (!startsWith("bigWig", tdb->type) && startsWith("big", tdb->type))
     tdb->canPack = TRUE;
 else if (sameString(tdb->type, "bigNarrowPeak"))
     tdb->canPack = TRUE;
 else if (sameString(tdb->type, "hic"))
     tdb->canPack = TRUE;