da33d70c10ddaae6c3290cb900d7d0cc2b6ee01b
hiram
  Tue Mar 17 13:57:24 2026 -0700
allow calculation of GC percent on the fly with code help from claude refs #35958

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 5e0dd02722b..c829663ae57 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -10615,15 +10615,27 @@
         if (!otherTdb)
             otherTdb = tdbForTrack(database, otherTrack, NULL);
         if (otherTdb)
             {
             puts("<li>");
             printf("<a href=\"%s?g=%s&%s\">%s</a>", hTrackUiForTrack(otherTdb->track), otherTdb->track, cartSidUrlString(cart), otherTdb->shortLabel);
             puts(": ");
             puts(why);
             }
         }
         puts("</ul>\n");
     }
 sqlFreeResult(&sr);
 hFreeConn(&conn);
 }
+
+char *gcOnFlyWinSize(struct cart *cart)
+/* Return window size for GC on the fly track calculation */
+{
+char *returnSize = NULL;
+char *s = cartOptionalString(cart, gcOnFlyWindowSize);
+if (s != NULL)
+    returnSize = cloneString(s);
+else
+    returnSize = cloneString(gcOnFlyDefaultSize);
+return returnSize;
+}