4be6477ebcb6be9290d5d439cdb48cb714e744b5
braney
  Sat Sep 5 11:07:29 2026 -0700
hgc: let a quickLifted track fall back to the source hub's description again

getHtmlFromSelfOrParent() reaches for the source assembly's description page only
when the lifted track has none of its own, and it tested that with
tdb->html == NULL.  The lifted stanza in a quickLift hub carries the source hub's
own relative html path, which cannot resolve from the hub's home in trash, so that
fetch fails and the test used to hold.

1258d7f65e7 made trackHubAddOneDescription return early instead of assigning a
failed fetch, so tdb->html keeps whatever it held rather than becoming NULL.  The
test then never holds, getTrackHtml is never called, and a track lifted from a
GenArk assembly loses the description that #37389 added.  Ask isEmpty() instead,
which is the question this line meant: an empty description is the same as none
here, and 1258d7f65e7 keeps what it was for.

Bisected against genome-test: the description is drawn with trackHub.c at
v503_base, at f759bf663de and at f001e39d156, and gone at 1258d7f65e7.  Not
shipped - v502 and v503 both draw it - so this is a fix before v504 rather than a
patch.

refs #38275

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 2a67c2f4fd7..0cf8c8eda36 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3707,31 +3707,31 @@
 
 static void printOrigAssembly(struct trackDb *tdb)
 /* If this annotation has been lifted, print the original
  * freeze, as indicated by the "origAssembly" trackDb setting */
 {
 trackDbPrintOrigAssembly(tdb, database);
 }
 
 static char *getHtmlFromSelfOrParent(struct trackDb *tdb, char *liftDb)
 /* Get html from self or from parent if not in self. */
 {
 for (;tdb != NULL; tdb = tdb->parent)
     {
     if (sameString(trackHubSkipHubName(tdb->track), "quickLiftChain"))
         tdb->html = hFileContentsOrWarning(hHelpFile(trackHubSkipHubName(tdb->track)));
-    if (liftDb && (tdb->html == NULL))
+    if (liftDb && isEmpty(tdb->html))
         tdb->html = getTrackHtml(liftDb, tdb->table);
     if (tdb->html != NULL && tdb->html[0] != 0)
         return tdb->html;
     }
 return NULL;
 }
 
 void printTrackHtml(struct trackDb *tdb)
 /* If there's some html associated with track print it out. Also print
  * last update time for data table and make a link
  * to the TB table schema page for this table. */
 {
 if (!isCustomTrack(tdb->track) && !isMyVariantsType(tdb->type))
     {
     printRelatedTracks(database, trackHash, tdb, cart);