4fc775d4d4ce03a5e1236a5ce1e266b5a0a5e68e
chmalee
  Fri Mar 6 11:13:42 2026 -0800
database name in menubar links needs to include the hubUrl and hub_id when making a link to a non-genark assembly hub, refs #36535

diff --git src/hg/lib/web.c src/hg/lib/web.c
index 318bb03f31b..9fa4f687e3d 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -1793,47 +1793,52 @@
 // if the user has previously searched for assemblies, add them to the "Genomes" menu heading,
 // above the "other" assemblies link
 jsInline("addRecentGenomesToMenuBar();\n");
 
 // If the user explicitly navigated to this genome (db= in CGI params), add it to recent genomes
 if (db && cgiOptionalString("db"))
     {
     struct dbDb *dbInfo = hDbDb(db);
     if (dbInfo)
         {
         char *bareDb = jsonStringEscape(trackHubSkipHubName(db));
         char *safeOrganism = jsonStringEscape(trackHubSkipHubName(dbInfo->organism));
         char *safeDescription = jsonStringEscape(trackHubSkipHubName(dbInfo->description));
         struct dyString *jsCall = dyStringNew(512);
         dyStringPrintf(jsCall,
-            "addRecentGenome({db:'%s', genome:'%s', label:'%s - %s (%s)', commonName:'%s'",
+            "addRecentGenome({db:\"%s\", genome:\"%s\", label:\"%s - %s (%s)\", commonName:\"%s\"",
             bareDb, bareDb, safeOrganism, safeDescription, bareDb, safeOrganism);
         if (dbInfo->taxId > 0)
             dyStringPrintf(jsCall, ", taxId: %d", dbInfo->taxId);
         // For hub/GenArk assemblies, include hubUrl and category so hgGateway can route correctly
         struct trackHubGenome *hubGenome = trackHubDatabase(db) ? trackHubGetGenome(db) : NULL;
         if (hubGenome && hubGenome->trackHub)
             {
             char *safeHubUrl = jsonStringEscape(hubGenome->trackHub->url);
-            dyStringPrintf(jsCall, ", hubUrl:'%s'", safeHubUrl);
+            dyStringPrintf(jsCall, ", hubUrl:\"%s\"", safeHubUrl);
             if (startsWith("/gbdb", hubGenome->trackHub->url))
-                dyStringAppend(jsCall, ", category:'UCSC Curated'");
+                dyStringAppend(jsCall, ", category:\"UCSC Curated\"");
             else
-                dyStringAppend(jsCall, ", category:'Assembly Hub'");
+                {
+                dyStringAppend(jsCall, ", category:\"Assembly Hub\"");
+                char *hubName = trackHubGetHubName(db);
+                if (hubName)
+                    dyStringPrintf(jsCall, ", hubName: \"%s\"", jsonStringEscape(hubName));
+                }
             }
         else
-            dyStringAppend(jsCall, ", category:'UCSC Curated'");
+            dyStringAppend(jsCall, ", category:\"UCSC Curated\"");
         dyStringAppend(jsCall, "});\n");
         jsInline(dyStringContents(jsCall));
         dyStringFree(&jsCall);
         }
     }
 
 return menuStr;
 }
 
 void checkForGeoMirrorRedirect(struct cart *cart)
 // Implement Geo/IP based redirection.
 {
 char *thisNodeStr = geoMirrorNode();
 if (thisNodeStr)   // if geo-mirroring is enabled
     {