{# T36.1 — sandbox editor under the T28 admin layout. #} {# Was a standalone cream-themed page with the old green admin banner; #} {# now extends ``admin_layout.html`` so the sidebar nav, header brand, #} {# role chip, and Tailwind CDN come from the layout — and "Experiments" #} {# lights up while you're on any ``/admin/sandbox/*`` path. #} {% extends "admin_layout.html" %} {% block page_title %}Sandbox · {{ prompt_name }}{% endblock %} {% block breadcrumb %} Admin / Experiments / {{ prompt_name }} {% endblock %} {% block content %}
{# ===================== Header card ===================== #}

Prompt sandbox

Source call: {{ source_call_id }} {% if scan_id %} · scan {{ scan_id }} {% endif %} · prompt {{ prompt_name }}

Edit either prompt, pick a model, then click Run experiment. This NEVER overwrites the original LLM call — a new llm_experiments row is created instead. Cost is billed to your admin account (cap: see /admin/sandbox/list).

{# T36.4 — empty-state notice when the source dump is missing/malformed. #} {# The textareas stay editable; the admin can type fresh prompts. #} {% if not source_dump_available %}
⚠ Source dump unavailable for this call.
This usually means the dump format predates the current schema, or the S3 object has been deleted. You can still type fresh prompts manually below.
{% endif %} {# ===================== Form card ===================== #}
{# T36.3 — original response as a chat bubble (was a raw
 dump).    #}
  {# We feed the FULL source dump dict into the partial via inline_dump    #}
  {# so the system + user + response render together. The partial gates   #}
  {# on each field being present, so the missing-dump case (where         #}
  {# ``original_dump_json`` is ``{}``) collapses to the partial's empty    #}
  {# "No content." state.                                                  #}
  

Original response

{% with chat_view_id='original-response-' ~ source_call_id, inline_dump=original_dump_json %} {% include 'partials/llm_chat_view.html' %} {% endwith %}
{# ===================== Footer links ===================== #}
All experiments · Admin dashboard {% if scan_id %} · Source debug page {% endif %}
{% endblock %} {% block scripts %} {% endblock %}