3162d1fec3dffece6f608f15eb6d46f6c46f7436
chmalee
  Fri Dec 5 16:13:05 2025 -0800
Working version of custom track group 'visible' that is at the top of the group list and has all the currently visible tracks, refs #36609

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index eba6546ffb9..078220f16cf 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -646,37 +646,41 @@
 
 extern boolean trackImgOnly;           /* caller wants just the track image and track table html */
 
 /* used in MAF display */
 #define UNALIGNED_SEQ 'o'
 #define MAF_DOUBLE_GAP '='
 
 void abbr(char *s, char *fluff);
 /* Cut out fluff from s. */
 
 struct track *getTrackList(struct group **pGroupList, int vis);
 /* Return list of all tracks, organizing by groups.
  * If vis is -1, restore default groups to tracks.
  * Shared by hgTracks and configure page. */
 
-void groupTrackListAddSuper(struct cart *cart, struct group *group, struct hash *superHash);
+void groupTrackListAddSuper(struct cart *cart, struct group *group, struct hash *superHash, struct hash *trackHashRef);
 /* Construct a new track list that includes supertracks, sort by priority,
  * and determine if supertracks have visible members.
  * Replace the group track list with this new list.
  * Shared by hgTracks and configure page to expand track list,
  * in contexts where no track display functions (which don't understand
- * supertracks) are invoked.  */
+ * supertracks) are invoked.
+ * In general, trackHashRef is just a pointer to the global trackHash,
+ * except in the case of building the Visible Tracks group, in which
+ * case it is a new hash, because we want super tracks duplicated into
+ * the visible tracks list and their normal group list */
 
 void removeTrackFromGroup(struct track *track);
 /* Remove track from group it is part of. */
 
 struct sqlConnection *remoteTrackConnection(struct track *tg);
 /* Get a connection to remote database as specified in remoteSql settings... */
 
 int orientFromChar(char c);
 /* Return 1 or -1 in place of + or - */
 
 enum trackVisibility limitVisibility(struct track *tg);
 /* Return default visibility limited by number of items. */
 
 char *hgcNameAndSettings();
 /* Return path to hgc with variables to store UI settings. */