{% if std %}
{#- The standard's proofs of it, per dataset (standard/proofs/prove.py): its controls as chips, their source in the title, then its units and leak checks; and Prove it, cli prove as a run. -#}
{% macro proof(rec, failed, expect, short='') -%}
- {%- if rec %}{% set notes = [short, ('over the first ' ~ rec.limit) if rec.limit, ('shard ' ~ rec.shard) if rec.shard]|select|list %}✓ {{ rec.passed }}{% if rec.limit %} · first {{ rec.limit }}{% endif %}
+ {%- if rec %}{% set notes = [short, ('over the first ' ~ rec.limit) if rec.limit, ('shard ' ~ rec.shard) if rec.shard]|select|list %}✓ {{ rec.passed }}{% if rec.limit %} · first {{ rec.limit }}{% endif %}
{%- elif failed and failed.value is defined %}{% set e = (failed.expect or expect or {'at_least': 1}) %}{% set k = e|list|first %}✕ {{ failed.value }} {{ '>' if k == 'at_most' else '<' }} {{ e[k] }}
- {%- elif failed %}✕ not proven
- {%- else %}not run{% endif -%}
+ {%- elif failed %}✕ not proven
+ {%- else %}not run{% endif -%}
{%- endmacro %}
{% macro chip(c) -%}
{{ c.key }}{{ proof(c.proven, c.failed, c.expect, c.short) }}
diff --git a/app/templates/runs/job.html b/app/templates/runs/job.html
index 7db61cf51..2ae2b893f 100644
--- a/app/templates/runs/job.html
+++ b/app/templates/runs/job.html
@@ -288,7 +288,7 @@
{% for cat, n in traj.category_freq.most_common() %}
{{ cat }} {{ n }}
+ title="{{ cat }}: {% for name, k in traj.names_of(cat) %}{{ name }} ×{{ k }}{{ ', ' if not loop.last }}{% endfor %}">{{ cat }} {{ n }}
{% endfor %}
{% if traj.n_failed_calls %}failed {{ traj.n_failed_calls }}{% endif %}
@@ -138,7 +138,7 @@
Tool calls
{% for t in traj.tools %}
{% if t.server and (loop.first or traj.tools[loop.index0 - 1].server != t.server) %}
{{ t.server }}
{% endif %}
-
{{ t.name[:80] }}{% if t.name|length > 80 %}…{% endif %}
+
{{ t.name }}
{{ t.category }}
{{ t.calls }}
{{ t.failed or '—' }}
diff --git a/app/ui_tests/browser/outcome_wrapping.py b/app/ui_tests/browser/outcome_wrapping.py
new file mode 100644
index 000000000..eb73f805b
--- /dev/null
+++ b/app/ui_tests/browser/outcome_wrapping.py
@@ -0,0 +1,90 @@
+"""Wrapped outcome labels keep their judge lanes aligned as the board resizes.
+
+Run with app/ui_tests/browser/requirements.txt and app/requirements.txt.
+"""
+import os
+from pathlib import Path
+import sys
+import tempfile
+import unittest
+from unittest.mock import patch
+from urllib.parse import urlsplit
+
+sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
+from playwright.sync_api import sync_playwright
+from ui_tests import test_reconcile_routes
+
+
+class OutcomeWrapping(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ cls.playwright = sync_playwright().start()
+ options = {"executable_path": os.environ["NULLIUS_TEST_CHROMIUM"]} if os.environ.get("NULLIUS_TEST_CHROMIUM") else {}
+ cls.browser = cls.playwright.chromium.launch(**options)
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.browser.close()
+ cls.playwright.stop()
+
+ def setUp(self):
+ home = tempfile.TemporaryDirectory()
+ self.addCleanup(home.cleanup)
+ env = patch.dict(os.environ, NULLIUS_HOME=home.name)
+ env.start()
+ self.addCleanup(env.stop)
+ self.fixture = test_reconcile_routes.ReconcilePage()
+ self.fixture.setUp()
+ self.fixture.seed()
+ self.addCleanup(self.fixture.doCleanups)
+ context = self.browser.new_context(viewport={"width": 1280, "height": 900})
+ self.addCleanup(context.close)
+ self.page = context.new_page()
+ self.errors = []
+ self.page.on("pageerror", lambda e: self.errors.append(str(e)))
+
+ def route(r):
+ u = urlsplit(r.request.url)
+ if u.hostname != "localhost":
+ r.abort()
+ return
+ response = self.fixture.client.get(u.path + ("?" + u.query if u.query else ""))
+ try:
+ headers = dict(response.headers)
+ headers.pop("Content-Length", None)
+ r.fulfill(status=response.status_code, headers=headers, body=response.get_data())
+ finally:
+ response.close()
+ self.page.route("**/*", route)
+ self.page.add_init_script("localStorage.setItem('nullius-onboarding', JSON.stringify({asked:true,dismissed:true}))")
+ self.page.set_default_timeout(5000)
+
+ def test_long_outcome_keeps_each_lane_aligned_after_resizing(self):
+ page = self.page
+ page.goto("http://localhost/job/r-agent")
+ page.evaluate("document.fonts.ready")
+ self.assertGreater(page.locator(".lanes > .lr").count(), 1)
+ page.locator(".run-outcome-filters .lg > span").first.evaluate(
+ "e => e.textContent = 'AnUnbrokenOutcomeName'.repeat(8)")
+ for width in (1280, 900, 390, 1280):
+ with self.subTest(width=width):
+ page.set_viewport_size({"width": width, "height": 900})
+ page.wait_for_function("""() => [...document.querySelectorAll('.run-outcome-filters .lg')].every(row => {
+ const lane = document.querySelector('.lanes > .lr[data-o="' + row.dataset.o + '"]');
+ return lane && Math.abs(row.getBoundingClientRect().height - lane.getBoundingClientRect().height) < 1;
+ })""")
+ rows = page.locator(".run-outcome-filters .lg").evaluate_all("""es => es.map(row => {
+ const text = row.querySelector('span'), rect = row.getBoundingClientRect();
+ const lane = document.querySelector('.lanes > .lr[data-o="' + row.dataset.o + '"]').getBoundingClientRect();
+ return {top: rect.top, bottom: rect.bottom, laneTop: lane.top,
+ clipped: text.scrollWidth > text.clientWidth + 1 || text.scrollHeight > text.clientHeight + 1};
+ })""")
+ self.assertFalse(any(row["clipped"] for row in rows), rows)
+ for prior, row in zip(rows, rows[1:]):
+ self.assertGreaterEqual(row["top"], prior["bottom"] - 1)
+ self.assertAlmostEqual(row["top"] - rows[0]["top"], row["laneTop"] - rows[0]["laneTop"], delta=1)
+ self.assertFalse(self.errors, self.errors)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/app/ui_tests/evidence/issue-406/compare-panes-after-1280-light.png b/app/ui_tests/evidence/issue-406/compare-panes-after-1280-light.png
new file mode 100644
index 000000000..9a671c9d3
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/compare-panes-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/compare-panes-before-1280-light.png b/app/ui_tests/evidence/issue-406/compare-panes-before-1280-light.png
new file mode 100644
index 000000000..ff3645407
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/compare-panes-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/compare-tasks-after-1280-light.png b/app/ui_tests/evidence/issue-406/compare-tasks-after-1280-light.png
new file mode 100644
index 000000000..6728b6e0a
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/compare-tasks-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/compare-tasks-before-1280-light.png b/app/ui_tests/evidence/issue-406/compare-tasks-before-1280-light.png
new file mode 100644
index 000000000..3c9aa823e
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/compare-tasks-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/live-events-after-1280-light.png b/app/ui_tests/evidence/issue-406/live-events-after-1280-light.png
new file mode 100644
index 000000000..259b56778
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/live-events-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/live-events-before-1280-light.png b/app/ui_tests/evidence/issue-406/live-events-before-1280-light.png
new file mode 100644
index 000000000..b8f7212c1
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/live-events-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/live-winners-after-1280-light.png b/app/ui_tests/evidence/issue-406/live-winners-after-1280-light.png
new file mode 100644
index 000000000..16be0f52b
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/live-winners-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/live-winners-before-1280-light.png b/app/ui_tests/evidence/issue-406/live-winners-before-1280-light.png
new file mode 100644
index 000000000..d04cabbf0
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/live-winners-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/outcomes-after-1280-light.png b/app/ui_tests/evidence/issue-406/outcomes-after-1280-light.png
new file mode 100644
index 000000000..0156419b3
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/outcomes-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/outcomes-before-1280-light.png b/app/ui_tests/evidence/issue-406/outcomes-before-1280-light.png
new file mode 100644
index 000000000..c9a23444f
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/outcomes-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/recipes-after-1280-light.png b/app/ui_tests/evidence/issue-406/recipes-after-1280-light.png
new file mode 100644
index 000000000..be7b5c38e
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/recipes-after-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/recipes-before-1280-light.png b/app/ui_tests/evidence/issue-406/recipes-before-1280-light.png
new file mode 100644
index 000000000..1d67b103c
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/recipes-before-1280-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/staged-folder-after-390-light.png b/app/ui_tests/evidence/issue-406/staged-folder-after-390-light.png
new file mode 100644
index 000000000..38763b0ac
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/staged-folder-after-390-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/staged-folder-before-390-light.png b/app/ui_tests/evidence/issue-406/staged-folder-before-390-light.png
new file mode 100644
index 000000000..f594a1b5c
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/staged-folder-before-390-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/trace-after-390-light.png b/app/ui_tests/evidence/issue-406/trace-after-390-light.png
new file mode 100644
index 000000000..d57b99477
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/trace-after-390-light.png differ
diff --git a/app/ui_tests/evidence/issue-406/trace-before-390-light.png b/app/ui_tests/evidence/issue-406/trace-before-390-light.png
new file mode 100644
index 000000000..425ed18a2
Binary files /dev/null and b/app/ui_tests/evidence/issue-406/trace-before-390-light.png differ
diff --git a/app/ui_tests/test_catalogue_routes.py b/app/ui_tests/test_catalogue_routes.py
index 71c548b74..643305100 100644
--- a/app/ui_tests/test_catalogue_routes.py
+++ b/app/ui_tests/test_catalogue_routes.py
@@ -224,7 +224,7 @@ def test_a_proof_short_of_the_full_mark_has_no_green_tick_and_says_its_bound(sel
self.assertIn("✓ 1871/2000", row("3GPP TSG · Full"))
self.assertIn('', row("3GPP TSG · Lite"))
self.assertIn("the reference answers: must score at least 93% - made by Nullius", row("3GPP TSG · Lite"))
- self.assertIn('✓', row("TeleQnA · Lite")) # every unit: green
+ self.assertIn('✓ 1000/1000', row("TeleQnA · Lite")) # every unit: green
self.assertNotIn("std-proof-part", row("TeleQnA · Lite"))
self.assertIn("no answer at all: must score nothing", row("TeleQnA · Lite"))
diff --git a/app/ui_tests/test_tool_categories.py b/app/ui_tests/test_tool_categories.py
index 7e254157f..6e2487739 100644
--- a/app/ui_tests/test_tool_categories.py
+++ b/app/ui_tests/test_tool_categories.py
@@ -116,6 +116,20 @@ def test_names_are_evidence_behind_the_chips_never_a_chip(self):
for _, _, sentence, _ in SAME_WORK:
self.assertNotIn(f'data-category="{sentence}"', verbose)
+ def test_long_tool_names_are_complete_in_the_table_and_category_help(self):
+ name = 'Read_' + 'conversation_history_' * 6 + ''
+ steps = two_agent_steps()['short'][:1]
+ steps[0]['tool_calls'][0]['function_name'] = name
+ with tempfile.TemporaryDirectory(prefix="nullius-long-tool-") as tmp:
+ record = _job(Path(tmp), "long-tool", "fixture", steps)
+ with patch.object(workspace, "load_jobs", return_value=[record]):
+ html = self.trial_page(record)
+ from html import escape, unescape
+ table = re.search(r'
', html, re.S).group(0)
+ cells = re.findall(r'
]*>(.*?)
', table, re.S)
+ self.assertIn(name, [unescape(re.sub(r'<[^>]+>', '', cell)) for cell in cells])
+ self.assertIn(escape(name) + ' ×1', html)
+
def test_a_trial_without_a_trajectory_shows_no_summary(self):
with tempfile.TemporaryDirectory(prefix="nullius-no-traj-") as tmp:
bare = _job(Path(tmp), "bare", "none", [])