From 775996b53d4bc44be5e233c08331e087a3eb432f Mon Sep 17 00:00:00 2001 From: Isaac Jandalala Date: Tue, 3 Feb 2026 16:07:51 +0000 Subject: [PATCH 1/5] Add pre-filled form support for DocBot. --- rnacentral/portal/templates/portal/base.html | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/rnacentral/portal/templates/portal/base.html b/rnacentral/portal/templates/portal/base.html index 1e0d19e4f..76796737c 100644 --- a/rnacentral/portal/templates/portal/base.html +++ b/rnacentral/portal/templates/portal/base.html @@ -284,6 +284,51 @@ (function(d, t) { var g = d.createElement(t);g.id = 'doorbellScript';g.type = 'text/javascript';g.async = true;g.src = 'https://embed.doorbell.io/button/2991?t='+(new Date().getTime());(d.getElementsByTagName('head')[0]||d.getElementsByTagName('body')[0]).appendChild(g); }(document, 'script')); + + // Wait for doorbell to load + (function() { + var ALLOWED_DOCBOT_ORIGINS = [ + 'https://wwwdev.ebi.ac.uk/docbot', + 'http://localhost:8000' + ]; + + var params = new URLSearchParams(window.location.search); + if (params.get('source') !== 'docbot') return; + + var conversation = params.get('conversation') || ''; + if (!conversation) return; + + // Referrer origin + var referrer = document.referrer; + if (referrer) { + try { + var referrerOrigin = new URL(referrer).origin; + if (ALLOWED_DOCBOT_ORIGINS.indexOf(referrerOrigin) === -1) return; + } catch (e) { + return; + } + } + + // Poll until doorbell is available (loaded async) + var attempts = 0; + var interval = setInterval(function() { + if (++attempts > 50) { clearInterval(interval); return; } + if (typeof doorbell === 'undefined') return; + clearInterval(interval); + + doorbell.setOption('onShow', function() { + var textarea = document.getElementById('doorbell-feedback'); + if (textarea) { + textarea.value = conversation; + textarea.dispatchEvent(new Event('input', { bubbles: true })); + textarea.setSelectionRange(0, 0); + textarea.focus(); + } + }); + + doorbell.show(); + }, 100); + })(); $(function(){ $('.doorbell-feedback').on('click', function(){ doorbell.show(); From cf229248dbbd19b4fcdc454922a0487fd4d01396 Mon Sep 17 00:00:00 2001 From: Isaac Jandalala Date: Tue, 3 Feb 2026 16:13:27 +0000 Subject: [PATCH 2/5] Refactor DocBot pre-fill. --- rnacentral/portal/templates/portal/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rnacentral/portal/templates/portal/base.html b/rnacentral/portal/templates/portal/base.html index 76796737c..4b464db8f 100644 --- a/rnacentral/portal/templates/portal/base.html +++ b/rnacentral/portal/templates/portal/base.html @@ -289,7 +289,7 @@ (function() { var ALLOWED_DOCBOT_ORIGINS = [ 'https://wwwdev.ebi.ac.uk/docbot', - 'http://localhost:8000' + 'http://localhost:8000' // dev ]; var params = new URLSearchParams(window.location.search); @@ -309,7 +309,7 @@ } } - // Poll until doorbell is available (loaded async) + // Poll until doorbell is available var attempts = 0; var interval = setInterval(function() { if (++attempts > 50) { clearInterval(interval); return; } From ac8ad4304468b069e6492b23585b7c3b11878c6e Mon Sep 17 00:00:00 2001 From: Isaac Jandalala Date: Thu, 5 Feb 2026 17:43:24 +0000 Subject: [PATCH 3/5] Annotate Litsumm summaries. --- rnacentral/apiv1/serializers.py | 6 +++++- rnacentral/portal/static/css/gene.css | 13 +++++++++++++ rnacentral/portal/views.py | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/rnacentral/apiv1/serializers.py b/rnacentral/apiv1/serializers.py index 78e25d662..20c556afc 100644 --- a/rnacentral/apiv1/serializers.py +++ b/rnacentral/apiv1/serializers.py @@ -930,9 +930,13 @@ class LitSummSerializer(serializers.Serializer): rna_id = serializers.CharField() display_id = serializers.CharField() - summary = serializers.CharField() + summary = serializers.SerializerMethodField() primary_id = serializers.CharField() + def get_summary(self, obj): + """Prefix the summary with a warning that it is AI-generated""" + return f"WARNING: This summary was generated by AI. {obj.summary}" + class RnaGenomeLocationsSerializer(serializers.Serializer): """Serializer class for Genome Locations""" diff --git a/rnacentral/portal/static/css/gene.css b/rnacentral/portal/static/css/gene.css index c4c9ebe43..df4175881 100644 --- a/rnacentral/portal/static/css/gene.css +++ b/rnacentral/portal/static/css/gene.css @@ -675,6 +675,19 @@ text-decoration: none; margin: 0; } +.gene__litsumm-warning { + display: inline-block; + background-color: #dc3545; + color: #fff; + font-weight: 600; + font-size: 12px; + padding: 4px 8px; + border-radius: 4px; + margin-right: 8px; + text-transform: uppercase; + letter-spacing: 0.5px; +} + .gene__litsumm-summary a { color: #3498db; text-decoration: none; diff --git a/rnacentral/portal/views.py b/rnacentral/portal/views.py index 7d4486e6e..28d41a977 100644 --- a/rnacentral/portal/views.py +++ b/rnacentral/portal/views.py @@ -623,7 +623,7 @@ def gene_detail(request, name): litsumm_summaries_data.append({ "id": display_id, "urs": primary_id, - "summary": summary_with_links, + "summary": f'WARNING: This summary was generated by AI. {summary_with_links}', "description": description or "", }) From 6b1266fe00c2caac17bd438922bba4cc26bc85be Mon Sep 17 00:00:00 2001 From: Isaac Jandalala Date: Wed, 11 Feb 2026 10:42:44 +0000 Subject: [PATCH 4/5] Remove debug warning. --- rnacentral/portal/static/css/gene.css | 13 ------------- rnacentral/portal/views.py | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/rnacentral/portal/static/css/gene.css b/rnacentral/portal/static/css/gene.css index df4175881..c4c9ebe43 100644 --- a/rnacentral/portal/static/css/gene.css +++ b/rnacentral/portal/static/css/gene.css @@ -675,19 +675,6 @@ text-decoration: none; margin: 0; } -.gene__litsumm-warning { - display: inline-block; - background-color: #dc3545; - color: #fff; - font-weight: 600; - font-size: 12px; - padding: 4px 8px; - border-radius: 4px; - margin-right: 8px; - text-transform: uppercase; - letter-spacing: 0.5px; -} - .gene__litsumm-summary a { color: #3498db; text-decoration: none; diff --git a/rnacentral/portal/views.py b/rnacentral/portal/views.py index 28d41a977..7d4486e6e 100644 --- a/rnacentral/portal/views.py +++ b/rnacentral/portal/views.py @@ -623,7 +623,7 @@ def gene_detail(request, name): litsumm_summaries_data.append({ "id": display_id, "urs": primary_id, - "summary": f'WARNING: This summary was generated by AI. {summary_with_links}', + "summary": summary_with_links, "description": description or "", }) From 2055bd96543ae9743ffdc342b1ef7bd0be6c1b71 Mon Sep 17 00:00:00 2001 From: Isaac Jandalala Date: Wed, 18 Feb 2026 15:10:47 +0000 Subject: [PATCH 5/5] Update training page. --- rnacentral/portal/templates/portal/docs/training.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rnacentral/portal/templates/portal/docs/training.md b/rnacentral/portal/templates/portal/docs/training.md index ed6357a2f..88186901d 100644 --- a/rnacentral/portal/templates/portal/docs/training.md +++ b/rnacentral/portal/templates/portal/docs/training.md @@ -82,6 +82,10 @@ RNAcentral has been described in several papers: Pubmed +### Other resources + +Explore community-contributed educational resources including tutorials, slides, and lecture materials: [Educational Resources Repository](https://github.com/RNAcentral/rna-educational-resources). + ### Feedback Let us know what you think by getting in touch on [Twitter](https://twitter.com/rnacentral),