diff --git a/templates/regression/index.html b/templates/regression/index.html
index 87281b81..3e98f1fb 100644
--- a/templates/regression/index.html
+++ b/templates/regression/index.html
@@ -216,8 +216,8 @@
Regression tests
$(document).ready(function(){
const urlParams = new URLSearchParams(window.location.search);
- const hash = urlParams.get("category");
- if(hash === "") hash = "1";
+ let hash = urlParams.get("category");
+ if(!hash || hash === "") hash = "1";
$("#category").find("option").each(function(idx, elm){
if($(elm).val() === hash){
$(elm).attr("selected",true);
diff --git a/tests/test_regression/test_controllers.py b/tests/test_regression/test_controllers.py
index 83eb4039..b7edab9f 100644
--- a/tests/test_regression/test_controllers.py
+++ b/tests/test_regression/test_controllers.py
@@ -566,3 +566,12 @@ def test_add_test_output_and_check_double_hashes(self):
).count(),
1
)
+
+ def test_category_description_shown_without_tags(self):
+ """Test that category description is shown when accessing /regression/ with category parameter but no tags."""
+ response = self.app.test_client().get('/regression/?category=1')
+ self.assertEqual(response.status_code, 200)
+ # Check that the category description span is present and not hidden
+ self.assertIn('data-category="1"', str(response.data))
+ # The JavaScript should ensure the description is visible, but we can't test JS execution in unit tests
+ # This test verifies the HTML structure is correct for the fix to work