Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions templates/partials/result_rep_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,15 @@ <h3 class="text-sm font-semibold text-gray-300 mb-2">Judge rationale</h3>
</div>
{% endif %}

{% if rep.trace and rep.trace.spans %}
{% if rep.trace %}
<details class="bg-surface-raised rounded-xl border border-violet-900/40 p-4 group">
<summary class="flex cursor-pointer select-none flex-wrap items-center gap-3">
<h3 class="text-sm font-semibold text-violet-300">Target trace</h3>
<span class="text-xs text-gray-500">{{ rep.trace.spans|length }} span{{ rep.trace.spans|length|pluralize }} exported under {{ rep.trace.trace_ids|length }} trace{{ rep.trace.trace_ids|length|pluralize }}</span>
<span class="text-[10px] text-gray-600 group-open:hidden">click to expand</span>
</summary>
<div class="mt-3">
{% if rep.trace.spans %}
{% if rep.trace.trace_ids %}
<div class="flex flex-wrap gap-1.5 mb-3">
{% for tid in rep.trace.trace_ids %}
Expand Down Expand Up @@ -232,25 +233,9 @@ <h3 class="text-sm font-semibold text-violet-300">Target trace</h3>
<p class="mt-2 text-xs text-gray-500">+ {{ rep.trace.hidden_spans }} more span{{ rep.trace.hidden_spans|pluralize }} (shorter / beyond preview).</p>
{% endif %}
<p class="mt-2 text-[11px] text-gray-600">Click a span for its tool arguments / results and raw attributes. Evidence links from the checks above jump to their spans.</p>
<script>
// Evidence-link clicks expand the target span's detail (idempotent: the
// panel is included once per repetition on the same page).
(function() {
if (window.__traceSpanExpandBound) return;
window.__traceSpanExpandBound = true;
document.addEventListener('click', function(e) {
var a = e.target.closest ? e.target.closest('a[href^="#trace-span-"]') : null;
if (!a) return;
var el = document.getElementById(a.getAttribute('href').slice(1));
var d = el && el.closest ? el.closest('details') : null;
if (d) d.open = true;
});
})();
</script>
{% else %}
<p class="text-xs text-gray-500">The target exported no spans under this rep's trace{{ rep.trace.trace_ids|length|default:0|pluralize }} (tracing was on; the target's OTel may not be wired for this deployment).</p>
{% endif %}
</div>
</div>
</details>
{% endif %}
Expand Down
Loading