From a51ca4ee9e762788602a6e287773c792dbad5bb4 Mon Sep 17 00:00:00 2001 From: Sushant Gautam Date: Wed, 14 Oct 2026 00:06:03 +0200 Subject: [PATCH] fix(scenarios): hide agentic options when 'Agentic scenario' is unchecked On the scenario edit/add forms, wrap the agentic metadata JSON editor and the structured agentic controls in a section that starts hidden unless the scenario is agentic, and show/hide it live as the checkbox toggles. This matches the backend, which already strips agentic metadata on save when the box is off, so the UI no longer shows ~30 irrelevant fields for non-agentic scenarios. Fixes #45 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/scenarios.html | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/templates/scenarios.html b/templates/scenarios.html index fb62c96f..8c517d96 100644 --- a/templates/scenarios.html +++ b/templates/scenarios.html @@ -146,12 +146,14 @@

{{ selected.name }}

Agentic scenario -
- -

Advanced editor for trace, tool, retrieval, trajectory, budget, policy, and enforcement expectations. It is preserved on revisions and exports.

- +
+
+ +

Advanced editor for trace, tool, retrieval, trajectory, budget, policy, and enforcement expectations. It is preserved on revisions and exports.

+ +
+ {% include "partials/agentic_controls.html" with agentic=item.revision.metadata.agentic %}
- {% include "partials/agentic_controls.html" with agentic=item.revision.metadata.agentic %}
Advanced (severity ceiling, documents, file URI)
@@ -217,12 +219,14 @@

{{ selected.name }}

Agentic scenario -
- -

Use the advanced JSON editor for trace, tool, retrieval, trajectory, budget, policy, and enforcement expectations.

- +
+
+ +

Use the advanced JSON editor for trace, tool, retrieval, trajectory, budget, policy, and enforcement expectations.

+ +
+ {% include "partials/agentic_controls.html" with agentic=None %}
- {% include "partials/agentic_controls.html" with agentic=None %}
Advanced (severity ceiling, documents, file URI)
@@ -439,6 +443,15 @@

Import Scenarios