47ea57080b515e5dad5f658c58feb8944a7e7d61
chmalee
  Thu Jan 29 15:30:26 2026 -0800
Replace clade/assembly dropdowns with a search bar on most CGIs. Add a recents list to hgGateway and to the species bar and to the 'Genomes' dropdown menu. Track recently selected species in localStorage. Add toGenome and fromGenome arguemnts to hubApi/liftOver in order to find appropriate liftover assemblies, refs #36232

diff --git src/hg/hgSearch/hgSearch.c src/hg/hgSearch/hgSearch.c
index f78d366a1f8..506c570f864 100644
--- src/hg/hgSearch/hgSearch.c
+++ src/hg/hgSearch/hgSearch.c
@@ -320,39 +320,40 @@
 struct searchCategory *defaultCategories = getAllCategories(cart, database, hgFindGroupHash);
 struct jsonElement *categsJsonElement = jsonElementFromSearchCategory(defaultCategories, database);
 struct jsonElement *selectedCategsJsonList = jsonElementFromVisibleCategs(defaultCategories);
 jsonElementSaveCategoriesToCart(database,selectedCategsJsonList);
 dyStringPrintf(jw->dy, ", \"db\": \"%s\"", database);
 dyStringPrintf(jw->dy, ", \"categs\": ");
 jsonDyStringPrint(jw->dy, categsJsonElement, NULL, -1);
 dyStringPrintf(jw->dy, ", \"trackGroups\": ");
 jsonDyStringPrint(jw->dy, makeTrackGroupsJson(database), NULL, -1);
 }
 
 void printMainPageIncludes()
 {
 webIncludeResourceFile("gb.css");
 webIncludeResourceFile("gbStatic.css");
-puts("<link rel='stylesheet' href='https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css'>");
+webIncludeResourceFile("jquery-ui.css");
+jsIncludeFile("jquery.js", NULL);
+jsIncludeFile("jquery-ui.js", NULL);
 puts("<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css' />");
-puts("<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js'></script>");
-puts("<script src=\"//code.jquery.com/ui/1.10.3/jquery-ui.min.js\"></script>");
 puts("<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/jstree.min.js\"></script>\n");
 jsIncludeFile("utils.js", NULL);
 jsIncludeFile("ajax.js", NULL);
 jsIncludeFile("lodash.3.10.0.compat.min.js", NULL);
 jsIncludeFile("cart.js", NULL);
+jsIncludeFile("autocompleteCat.js", NULL);
 jsIncludeFile("hgSearch.js", NULL);
 
 // Write the skeleton HTML, which will get filled out by the javascript
 webIncludeFile("inc/hgSearch.html");
 webIncludeFile("inc/gbFooter.html");
 }
 
 /* End handler helper functions */
 
 /* Handlers for returning JSON to client */
 static void getSearchResults(struct cartJson *cj, struct hash *paramHash)
 /* User has entered a term to search, search this term against the selected categories */
 {
 char *db = cartJsonRequiredParam(paramHash, "db", cj->jw, "getSearchResults");
 cartSetString(cj->cart, "db", db);