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/js/model/lib/CladeOrgDbMixin.js src/hg/js/model/lib/CladeOrgDbMixin.js
index 8b5500cc7ab..179b7294099 100644
--- src/hg/js/model/lib/CladeOrgDbMixin.js
+++ src/hg/js/model/lib/CladeOrgDbMixin.js
@@ -89,58 +89,36 @@
             _.forEach(newValue, function(value, key) {
                 mySetIn(mutState, key, Immutable.fromJS(value));
             });
             generateMenuOptions(mutState);
         } else {
             this.error('CladeOrgDbMixin: expected cart var "' + myCartVar + '" but got "' +
                        cartVar + '"');
         }
     }
 
     // UI event handler
     function changeCladeOrgDb(mutState, uiPath, newValue) {
         // uiPath is myPath + either 'clade', 'org' or 'db'.
         // User changed clade, org or db; if clade or org, figure out the new lower-level
         // selections.  Update state, tell the server, and call this.onChangeDb if present.
-        var cladeOrgDb = myGetIn(mutState, 'cladeOrgDb');
-        var which = _.last(uiPath);
         var oldDb = myGetIn(mutState, 'db');
-        var clade, org, db;
-        var cladeNode, orgNode, dbNode;
         // Update the changed item in mutState, then handle possible side-effects on lower levels:
         mutState.setIn(uiPath, newValue);
-        clade = myGetIn(mutState, 'clade');
-        org = myGetIn(mutState, 'org');
-        db = myGetIn(mutState, 'db');
-        if (which === 'clade') {
-            cladeNode = findNodeByPath(cladeOrgDb, [clade]);
-            org = cladeNode.get('default');
-            mySetIn(mutState, 'org', org);
-        }
-        if (which === 'clade' || which === 'org') {
-            orgNode = findNodeByPath(cladeOrgDb, [clade, org]);
-            db = orgNode.get('default');
-            mySetIn(mutState, 'db', db);
-        }
-        generateMenuOptions(mutState);
+        var db = myGetIn(mutState, 'db');
         if (db !== oldDb) {
-            dbNode = findNodeByPath(cladeOrgDb, [clade, org, db]);
-            this.cartSend({ cgiVar: { clade: clade,
-                                      org: org,
-                                      db: db,
-                                      position: dbNode.get('defaultPos')
-                                    } });
+            this.cartSend({cgiVar: {db: db}});
             if (this.onChangeDb) {
                 this.onChangeDb(mutState);
             }
         }
     }
 
     function getDbNode(mutState) {
         // Return the currently selected db's node.
         var cladeOrgDb = myGetIn(mutState, 'cladeOrgDb');
         var clade = myGetIn(mutState, 'clade');
         var org = myGetIn(mutState, 'org');
         var db = myGetIn(mutState, 'db');
         return findNodeByPath(cladeOrgDb, [clade, org, db]);
     }