fbfdc0a36bb6d3b0eb57dd07262c059086c7054e
braney
  Fri Jul 31 14:55:15 2026 -0700
hgConvert: link to the alignment request page, behind showLiftRequest, refs #37973

The Convert page's assembly list only offers targets that already have a
chain from the source, so it is where a user finds out theirs is missing.
Nothing in the tree linked to liftRequest.html, the page that requests a
new alignment, so unless someone wrote to us and we sent the URL they were
unlikely to find it.

Adds "Target assembly not listed? Request an alignment" at the foot of the
Destination section, gated by the new hg.conf flag showLiftRequest, which
defaults FALSE.  Registered in the hg.conf catalog as a release gate.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git src/hg/hgConvert/hgConvert.c src/hg/hgConvert/hgConvert.c
index 55eacd11b4c..fc08a9198da 100644
--- src/hg/hgConvert/hgConvert.c
+++ src/hg/hgConvert/hgConvert.c
@@ -16,30 +16,31 @@
 #include "hui.h"
 #include "cart.h"
 #include "web.h"
 #include "chain.h"
 #include "liftOver.h"
 #include "liftOverChain.h"
 #include "chromInfo.h"
 #include "net.h"
 #include "genark.h"
 #include "trackHub.h"
 #include "hubConnect.h"
 #include "quickLift.h"
 #include "chromAlias.h"
 #include "jsHelper.h"
 #include "hPrint.h"
+#include "hgConfig.h"
 #ifdef NOTNOW
 #include "bigChain.h"
 #include "bigLink.h"
 #endif
 
 
 /* CGI Variables */
 #define HGLFT_TOORG_VAR   "hglft_toOrg"           /* TO organism */
 #define HGLFT_TODB_VAR   "hglft_toDb"           /* TO assembly */
 #define HGLFT_DO_CONVERT "hglft_doConvert"	/* Do the actual conversion */
 
 /* Global Variables */
 static struct cart *cart;	        /* CGI and other variables */
 static struct hash *oldVars = NULL;
 static char *organism = NULL;
@@ -160,30 +161,40 @@
         "function hgcUpdateHideTracks() {\n"
         "    let ql = document.getElementById('doQuickLift');\n"
         "    let hideBox = document.getElementById('hideTracksOnConvert');\n"
         "    let hideRow = document.getElementById('hideTracksOnConvertRow');\n"
         "    if (!ql || !hideBox || !hideRow) return;\n"
         "    hideBox.disabled = !ql.checked;\n"
         "    hideRow.style.opacity = ql.checked ? '1' : '0.5';\n"
         "}\n"
         "document.addEventListener('DOMContentLoaded', function() {\n"
         "    let ql = document.getElementById('doQuickLift');\n"
         "    if (ql) ql.addEventListener('change', hgcUpdateHideTracks);\n"
         "    hgcUpdateHideTracks();\n"
         "});\n");
     }
 
+/* The assembly list only offers targets that already have a chain from this source, so
+ * this is where a user finds out theirs is missing.  Point them at the request page. */
+if (cfgOptionBooleanDefault("showLiftRequest", FALSE))
+    {
+    puts("<div class='fieldRow' style='margin-top: 15px;'>\n");
+    puts("Target assembly not listed? "
+         "<a href='../liftRequest.html' target='_blank'>Request an alignment</a>\n");
+    puts("</div>\n");
+    }
+
 puts("</div>\n");  /* end destination section */
 puts("</div>\n");  /* end grid */
 
 /* Submit button centered below */
 puts("<div style='text-align: center; margin-top: 20px;'>\n");
 cgiMakeButton(HGLFT_DO_CONVERT, "Submit");
 puts("</div>\n");
 
 /* JavaScript initialization for autocomplete with liftOver filtering */
 jsInlineF(
     "let validTargets = new Set();\n"
     "\n"
     "fetch('../cgi-bin/hubApi/liftOver/listExisting?fromGenome=%s')\n"
     "    .then(response => response.json())\n"
     "    .then(data => {\n"