6cbe668f98ab263238542b8fd6bbf860db113930
angie
  Wed Jan 28 09:55:13 2015 -0800
Several major changes in the way data sources are represented:
1. Instead of the CGI sending menus for group, track and table, make it send
the whole tree of groups, tracks, views, subtracks -- "groupedTrackDb".
Now the client-side model can make menus that reflect the tree structure.
This also gives us flexibility to tweak labels easily.
2. Instead of hardcoding group, track and table into elements of
hgai_querySpec.dataSources, make each data source a proper object with
a trackPath (path through groupedTrackDb), and for the UI, other attributes
like label and URL for hgTables schema page.  When the CGI unpacks
hgai_querySpec.dataSources, it now uses trackPath and gets table from the
leaf track or subtrack (the last item in trackPath).
Note: this doesn't work for old Conservation tracks that don't have
views/subtracks -- need to figure out how to fudge subtracks for those.
3. Limit the number of data sources to 5, don't let the user add the same
data source twice, and remember which track the user most recently selected
in the "Add Data Source" section.
Also, in hgAi.jsx, I separated out a bunch of things that were rendered in
the top-level AppComponent into subcomponents to add some granularity to
"Loading..." sections (instead of making the whole page saying "Loading..."
until everything is in place).

diff --git src/hg/inc/cartJson.h src/hg/inc/cartJson.h
index 80bcf57..6f7a356 100644
--- src/hg/inc/cartJson.h
+++ src/hg/inc/cartJson.h
@@ -40,19 +40,20 @@
 void cartJsonExecute(struct cartJson *cj);
 /* Get commands from cgi, print Content-type, execute commands, print results as JSON. */
 
 void cartJsonFree(struct cartJson **pCj);
 /* Close **pCj's contents and nullify *pCj. */
 
 void cartJsonChangeDb(struct cartJson *cj, struct hash *paramHash);
 /* Change db to new value, update cart and print JSON of new position & gene suggest track. */
 
 void cartJsonChangeOrg(struct cartJson *cj, struct hash *paramHash);
 /* Change org to new value, update cart and print JSON of new db menu, new position etc. */
 
 void cartJsonChangeClade(struct cartJson *cj, struct hash *paramHash);
 /* Change clade to new value, update cart, and print JSON of new org & db menus, new position etc */
 
-void cartJsonGetGroupsTracksTables(struct cartJson *cj, struct hash *paramHash);
-/* Print info necessary for group/track/table menus. */
+void cartJsonGetGroupedTrackDb(struct cartJson *cj, struct hash *paramHash);
+/* Translate trackDb list (only a subset of the fields) into JSON array of track group objects;
+ * each group contains an array of track objects that may have subtracks. */
 
 #endif /* CARTJSON_H */