@sanity/ailf-studio 1.7.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1696,11 +1696,6 @@ var reportSchema = defineType4({
1696
1696
  name: "graderPrompts",
1697
1697
  title: "Grader Prompts"
1698
1698
  }),
1699
- defineField4({
1700
- ...artifactRefSchema(),
1701
- name: "taskDefinitions",
1702
- title: "Task Definitions"
1703
- }),
1704
1699
  defineField4({
1705
1700
  ...artifactRefSchema(),
1706
1701
  name: "traces",
@@ -3270,17 +3265,17 @@ import { route } from "sanity/router";
3270
3265
  // src/components/Dashboard.tsx
3271
3266
  import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
3272
3267
  import {
3273
- Box as Box29,
3268
+ Box as Box31,
3274
3269
  Button as Button10,
3275
3270
  Container,
3276
- Flex as Flex34,
3277
- Stack as Stack36,
3271
+ Flex as Flex36,
3272
+ Stack as Stack38,
3278
3273
  Tab as Tab3,
3279
3274
  TabList as TabList3,
3280
3275
  TabPanel as TabPanel3,
3281
- Text as Text46
3276
+ Text as Text48
3282
3277
  } from "@sanity/ui";
3283
- import { useCallback as useCallback36, useEffect as useEffect15 } from "react";
3278
+ import { useCallback as useCallback36, useEffect as useEffect16 } from "react";
3284
3279
  import { useRouter as useRouter3 } from "sanity/router";
3285
3280
 
3286
3281
  // src/lib/help-context.ts
@@ -6050,22 +6045,22 @@ function LatestReports({
6050
6045
  // src/components/report-detail/ReportDetail.tsx
6051
6046
  import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
6052
6047
  import {
6053
- Badge as Badge7,
6054
- Box as Box23,
6055
- Button as Button7,
6056
- Flex as Flex27,
6057
- Stack as Stack28,
6048
+ Badge as Badge8,
6049
+ Box as Box26,
6050
+ Button as Button8,
6051
+ Flex as Flex29,
6052
+ Stack as Stack30,
6058
6053
  Tab,
6059
6054
  TabList,
6060
6055
  TabPanel,
6061
- Text as Text36,
6062
- Tooltip as Tooltip9
6056
+ Text as Text39,
6057
+ Tooltip as Tooltip10
6063
6058
  } from "@sanity/ui";
6064
6059
  import {
6065
- useCallback as useCallback32,
6066
- useEffect as useEffect10,
6067
- useMemo as useMemo13,
6068
- useState as useState22
6060
+ useCallback as useCallback33,
6061
+ useEffect as useEffect12,
6062
+ useMemo as useMemo15,
6063
+ useState as useState23
6069
6064
  } from "react";
6070
6065
  import { useClient as useClient10 } from "sanity";
6071
6066
 
@@ -6095,8 +6090,21 @@ function findManifestEntry(ref, key) {
6095
6090
  return ref.entries.find((e) => e.key === key);
6096
6091
  }
6097
6092
 
6093
+ // src/lib/use-test-outputs-artifact.ts
6094
+ import { useMemo as useMemo7 } from "react";
6095
+
6096
+ // src/lib/test-outputs-entry-key.ts
6097
+ var VARIANT_SUFFIX_PATTERN = /\s*\((gold|baseline)\)\s*$/i;
6098
+ function testOutputsEntryKey(taskId, modelId) {
6099
+ const match = VARIANT_SUFFIX_PATTERN.exec(taskId);
6100
+ if (!match) return null;
6101
+ const mode = match[1].toLowerCase();
6102
+ const task = taskId.slice(0, match.index).trim();
6103
+ return `${mode}--${task}--${modelId}`;
6104
+ }
6105
+
6098
6106
  // src/lib/useArtifactCache.ts
6099
- import { useCallback as useCallback15, useRef as useRef5, useState as useState11 } from "react";
6107
+ import { useCallback as useCallback15, useMemo as useMemo6, useRef as useRef5, useState as useState11 } from "react";
6100
6108
  function useArtifactCache(opts) {
6101
6109
  const { runId, artifactRef, type } = opts;
6102
6110
  const cacheRef = useRef5(/* @__PURE__ */ new Map());
@@ -6104,7 +6112,10 @@ function useArtifactCache(opts) {
6104
6112
  const [error, setError] = useState11(null);
6105
6113
  const inFlight2 = useRef5(/* @__PURE__ */ new Set());
6106
6114
  const BULK_KEY = "__bulk__";
6107
- const availableEntries = artifactRef?.entries?.map((e) => e.key) ?? [];
6115
+ const availableEntries = useMemo6(
6116
+ () => artifactRef?.entries?.map((e) => e.key) ?? [],
6117
+ [artifactRef]
6118
+ );
6108
6119
  const fetchEntry = useCallback15(
6109
6120
  async (key) => {
6110
6121
  if (!artifactRef || !runId) return;
@@ -6159,14 +6170,17 @@ function useArtifactCache(opts) {
6159
6170
  (key) => cacheRef.current.get(key) ?? null,
6160
6171
  []
6161
6172
  );
6162
- return {
6163
- status,
6164
- error,
6165
- availableEntries,
6166
- getEntry,
6167
- fetchEntry,
6168
- fetchAll
6169
- };
6173
+ return useMemo6(
6174
+ () => ({
6175
+ status,
6176
+ error,
6177
+ availableEntries,
6178
+ getEntry,
6179
+ fetchEntry,
6180
+ fetchAll
6181
+ }),
6182
+ [status, error, availableEntries, getEntry, fetchEntry, fetchAll]
6183
+ );
6170
6184
  }
6171
6185
  async function signAndFetch(signingUrl) {
6172
6186
  const signingRes = await fetch(signingUrl, {
@@ -6201,24 +6215,27 @@ function useTestOutputsArtifact(runId, artifactRef) {
6201
6215
  artifactRef,
6202
6216
  type: "testOutputs"
6203
6217
  });
6204
- return {
6205
- status: cache.status,
6206
- error: cache.error,
6207
- getOutput: (taskId, modelId) => cache.getEntry(`${taskId}::${modelId}`),
6208
- fetchOutput: async (taskId, modelId) => {
6209
- if (!artifactRef) return;
6210
- if (!artifactRef.layout || artifactRef.layout === "bulk") {
6211
- await cache.fetchAll();
6212
- return;
6218
+ return useMemo7(() => {
6219
+ const entryKey = (taskId, modelId) => testOutputsEntryKey(taskId, modelId) ?? `${taskId}::${modelId}`;
6220
+ return {
6221
+ status: cache.status,
6222
+ error: cache.error,
6223
+ getOutput: (taskId, modelId) => cache.getEntry(entryKey(taskId, modelId)),
6224
+ fetchOutput: async (taskId, modelId) => {
6225
+ if (!artifactRef) return;
6226
+ if (!artifactRef.layout || artifactRef.layout === "bulk") {
6227
+ await cache.fetchAll();
6228
+ return;
6229
+ }
6230
+ await cache.fetchEntry(entryKey(taskId, modelId));
6231
+ },
6232
+ hasOutput: (taskId, modelId) => {
6233
+ if (!artifactRef) return false;
6234
+ if (!artifactRef.layout || artifactRef.layout === "bulk") return true;
6235
+ return cache.availableEntries.includes(entryKey(taskId, modelId));
6213
6236
  }
6214
- await cache.fetchEntry(`${taskId}::${modelId}`);
6215
- },
6216
- hasOutput: (taskId, modelId) => {
6217
- if (!artifactRef) return false;
6218
- if (!artifactRef.layout || artifactRef.layout === "bulk") return true;
6219
- return cache.availableEntries.includes(`${taskId}::${modelId}`);
6220
- }
6221
- };
6237
+ };
6238
+ }, [cache, artifactRef]);
6222
6239
  }
6223
6240
 
6224
6241
  // src/lib/thresholds.ts
@@ -6262,7 +6279,7 @@ function negativeDocLiftSentiment(count) {
6262
6279
  }
6263
6280
 
6264
6281
  // src/components/report-detail/AgentBehaviorCard.tsx
6265
- import { useMemo as useMemo6, useState as useState12 } from "react";
6282
+ import { useMemo as useMemo8, useState as useState12 } from "react";
6266
6283
  import { HelpCircleIcon as HelpCircleIcon6, SearchIcon as SearchIcon4 } from "@sanity/icons";
6267
6284
  import {
6268
6285
  Badge as Badge5,
@@ -6473,7 +6490,7 @@ function SearchQueryList({
6473
6490
  truncated
6474
6491
  }) {
6475
6492
  const [filter, setFilter] = useState12("");
6476
- const filtered = useMemo6(() => {
6493
+ const filtered = useMemo8(() => {
6477
6494
  if (!filter) return queries;
6478
6495
  const lower = filter.toLowerCase();
6479
6496
  return queries.filter((q) => q.toLowerCase().includes(lower));
@@ -6582,14 +6599,7 @@ function GlossaryTip({ text }) {
6582
6599
  );
6583
6600
  }
6584
6601
 
6585
- // src/components/report-detail/DiagnosticsOverview.tsx
6586
- import {
6587
- ArrowDownIcon,
6588
- ArrowUpIcon,
6589
- CheckmarkCircleIcon,
6590
- ErrorOutlineIcon,
6591
- WarningOutlineIcon
6592
- } from "@sanity/icons";
6602
+ // src/components/report-detail/CostLatencyPanel.tsx
6593
6603
  import { Box as Box15, Flex as Flex14, Stack as Stack18, Text as Text23 } from "@sanity/ui";
6594
6604
 
6595
6605
  // src/components/report-detail/diagnostics-styles.ts
@@ -6698,8 +6708,271 @@ function sentimentTextColor(sentiment) {
6698
6708
  return COLORS[sentimentColorKey(sentiment)].text;
6699
6709
  }
6700
6710
 
6711
+ // src/components/report-detail/CostLatencyPanel.tsx
6712
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
6713
+ function median(values) {
6714
+ if (values.length === 0) return null;
6715
+ const sorted = values.slice().sort((a, b) => a - b);
6716
+ const mid = sorted.length >>> 1;
6717
+ return sorted.length % 2 === 0 ? Math.round((sorted[mid - 1] + sorted[mid]) / 2) : sorted[mid];
6718
+ }
6719
+ function rollup(testResults) {
6720
+ let totalCost = 0;
6721
+ let totalTokens = 0;
6722
+ let passed = 0;
6723
+ let failed = 0;
6724
+ const latencies = [];
6725
+ const byModel = /* @__PURE__ */ new Map();
6726
+ for (const t of testResults) {
6727
+ if (typeof t.cost === "number") totalCost += t.cost;
6728
+ if (typeof t.tokenUsage?.total === "number") {
6729
+ totalTokens += t.tokenUsage.total;
6730
+ }
6731
+ if (typeof t.latencyMs === "number") latencies.push(t.latencyMs);
6732
+ if (t.outputFailure) failed++;
6733
+ else passed++;
6734
+ const m = byModel.get(t.modelId) ?? {
6735
+ modelId: t.modelId,
6736
+ calls: 0,
6737
+ cost: 0,
6738
+ tokens: 0,
6739
+ passed: 0
6740
+ };
6741
+ m.calls++;
6742
+ if (typeof t.cost === "number") m.cost += t.cost;
6743
+ if (typeof t.tokenUsage?.total === "number") m.tokens += t.tokenUsage.total;
6744
+ if (!t.outputFailure) m.passed++;
6745
+ byModel.set(t.modelId, m);
6746
+ }
6747
+ return {
6748
+ totalCost,
6749
+ totalTokens,
6750
+ passed,
6751
+ failed,
6752
+ medianLatencyMs: median(latencies),
6753
+ perModel: [...byModel.values()].sort((a, b) => b.cost - a.cost)
6754
+ };
6755
+ }
6756
+ function aggregateRawResultsPreviews(entries) {
6757
+ let totalCost = 0;
6758
+ let totalTokens = 0;
6759
+ const totalLatencies = [];
6760
+ let hadCost = false;
6761
+ let hadTokens = false;
6762
+ let hadLatency = false;
6763
+ const perModelTokens = /* @__PURE__ */ new Map();
6764
+ for (const entry of entries) {
6765
+ const p = entry.preview;
6766
+ if (!p) continue;
6767
+ if (typeof p.cost === "number") {
6768
+ totalCost += p.cost;
6769
+ hadCost = true;
6770
+ }
6771
+ if (typeof p.totalTokens === "number") {
6772
+ totalTokens += p.totalTokens;
6773
+ hadTokens = true;
6774
+ const modelId = entry.association?.model;
6775
+ if (typeof modelId === "string") {
6776
+ perModelTokens.set(
6777
+ modelId,
6778
+ (perModelTokens.get(modelId) ?? 0) + p.totalTokens
6779
+ );
6780
+ }
6781
+ }
6782
+ if (typeof p.latencyMs === "number") {
6783
+ totalLatencies.push(p.latencyMs);
6784
+ hadLatency = true;
6785
+ }
6786
+ }
6787
+ return {
6788
+ totalCost,
6789
+ totalTokens,
6790
+ totalLatencies,
6791
+ hadCost,
6792
+ hadTokens,
6793
+ hadLatency,
6794
+ perModelTokens
6795
+ };
6796
+ }
6797
+ function formatUsd(n) {
6798
+ if (n === 0) return "$0.00";
6799
+ if (n < 0.01) return `$${n.toFixed(4)}`;
6800
+ return `$${n.toFixed(2)}`;
6801
+ }
6802
+ function formatTokens(n) {
6803
+ if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
6804
+ if (n >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
6805
+ return String(n);
6806
+ }
6807
+ function formatLatency(ms) {
6808
+ if (ms === null) return "\u2014";
6809
+ if (ms >= 1e4) return `${(ms / 1e3).toFixed(1)}s`;
6810
+ if (ms >= 1e3) return `${(ms / 1e3).toFixed(2)}s`;
6811
+ return `${ms} ms`;
6812
+ }
6813
+ function shortModelId(id) {
6814
+ const colon = id.lastIndexOf(":");
6815
+ return colon >= 0 ? id.slice(colon + 1) : id;
6816
+ }
6817
+ function CostLatencyPanel({ testResults }) {
6818
+ const rawResultsRef = useArtifactRef("rawResults");
6819
+ if (!testResults || testResults.length === 0) return null;
6820
+ const hasAnyCost = testResults.some((t) => typeof t.cost === "number");
6821
+ const hasAnyLatency = testResults.some((t) => typeof t.latencyMs === "number");
6822
+ if (!hasAnyCost && !hasAnyLatency) return null;
6823
+ const r = rollup(testResults);
6824
+ const totalCalls = r.passed + r.failed;
6825
+ const passRate = totalCalls > 0 ? Math.round(r.passed / totalCalls * 100) : 0;
6826
+ const manifestAgg = aggregateRawResultsPreviews(rawResultsRef?.entries ?? []);
6827
+ const totalTokens = r.totalTokens === 0 && manifestAgg.hadTokens ? manifestAgg.totalTokens : r.totalTokens;
6828
+ const totalCost = r.totalCost === 0 && manifestAgg.hadCost ? manifestAgg.totalCost : r.totalCost;
6829
+ const medianLatencyMs = r.medianLatencyMs === null && manifestAgg.hadLatency ? median(manifestAgg.totalLatencies) : r.medianLatencyMs;
6830
+ const perModel = r.perModel.map((m) => {
6831
+ if (m.tokens > 0) return m;
6832
+ const fallback = manifestAgg.perModelTokens.get(m.modelId);
6833
+ return fallback === void 0 ? m : { ...m, tokens: fallback };
6834
+ });
6835
+ return /* @__PURE__ */ jsx27(Box15, { style: { ...neutralCardStyle, padding: "16px 20px" }, children: /* @__PURE__ */ jsxs21(Stack18, { space: 4, children: [
6836
+ /* @__PURE__ */ jsxs21(Flex14, { align: "baseline", gap: 2, wrap: "wrap", children: [
6837
+ /* @__PURE__ */ jsx27(Text23, { size: 2, weight: "semibold", children: "Cost & Latency" }),
6838
+ /* @__PURE__ */ jsxs21(Text23, { muted: true, size: 1, children: [
6839
+ totalCalls,
6840
+ " call",
6841
+ totalCalls === 1 ? "" : "s"
6842
+ ] })
6843
+ ] }),
6844
+ /* @__PURE__ */ jsxs21(Flex14, { gap: 4, wrap: "wrap", children: [
6845
+ /* @__PURE__ */ jsx27(Stat, { label: "Total cost", value: formatUsd(totalCost) }),
6846
+ /* @__PURE__ */ jsx27(Stat, { label: "Total tokens", value: formatTokens(totalTokens) }),
6847
+ /* @__PURE__ */ jsx27(Stat, { label: "Pass rate", value: `${passRate}%` }),
6848
+ /* @__PURE__ */ jsx27(Stat, { label: "Median latency", value: formatLatency(medianLatencyMs) })
6849
+ ] }),
6850
+ perModel.length > 1 && /* @__PURE__ */ jsxs21(Fragment8, { children: [
6851
+ /* @__PURE__ */ jsx27(Box15, { style: dividerStyle }),
6852
+ /* @__PURE__ */ jsxs21(Stack18, { space: 2, children: [
6853
+ /* @__PURE__ */ jsx27(
6854
+ Text23,
6855
+ {
6856
+ muted: true,
6857
+ size: 1,
6858
+ style: {
6859
+ letterSpacing: "0.05em",
6860
+ textTransform: "uppercase"
6861
+ },
6862
+ weight: "semibold",
6863
+ children: "By model"
6864
+ }
6865
+ ),
6866
+ /* @__PURE__ */ jsx27(Stack18, { space: 1, children: perModel.map((m) => /* @__PURE__ */ jsx27(ModelRow, { row: m }, m.modelId)) })
6867
+ ] })
6868
+ ] })
6869
+ ] }) });
6870
+ }
6871
+ function Stat({ label, value }) {
6872
+ return /* @__PURE__ */ jsxs21(Stack18, { space: 1, children: [
6873
+ /* @__PURE__ */ jsx27(Text23, { muted: true, size: 1, children: label }),
6874
+ /* @__PURE__ */ jsx27(
6875
+ Text23,
6876
+ {
6877
+ size: 3,
6878
+ style: {
6879
+ fontFamily: FONT_STACK_MONO2,
6880
+ fontVariantNumeric: "tabular-nums"
6881
+ },
6882
+ weight: "semibold",
6883
+ children: value
6884
+ }
6885
+ )
6886
+ ] });
6887
+ }
6888
+ function ModelRow({ row }) {
6889
+ const pct = row.calls > 0 ? Math.round(row.passed / row.calls * 100) : 0;
6890
+ return /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 3, style: { padding: "2px 0" }, wrap: "wrap", children: [
6891
+ /* @__PURE__ */ jsx27(
6892
+ Text23,
6893
+ {
6894
+ size: 1,
6895
+ style: {
6896
+ fontFamily: FONT_STACK_MONO2,
6897
+ minWidth: 140
6898
+ },
6899
+ weight: "medium",
6900
+ children: shortModelId(row.modelId)
6901
+ }
6902
+ ),
6903
+ /* @__PURE__ */ jsxs21(
6904
+ Text23,
6905
+ {
6906
+ muted: true,
6907
+ size: 1,
6908
+ style: {
6909
+ fontFamily: FONT_STACK_MONO2,
6910
+ fontVariantNumeric: "tabular-nums",
6911
+ minWidth: 80
6912
+ },
6913
+ children: [
6914
+ row.calls,
6915
+ " call",
6916
+ row.calls === 1 ? "" : "s"
6917
+ ]
6918
+ }
6919
+ ),
6920
+ /* @__PURE__ */ jsx27(
6921
+ Text23,
6922
+ {
6923
+ size: 1,
6924
+ style: {
6925
+ fontFamily: FONT_STACK_MONO2,
6926
+ fontVariantNumeric: "tabular-nums",
6927
+ minWidth: 80
6928
+ },
6929
+ children: formatUsd(row.cost)
6930
+ }
6931
+ ),
6932
+ /* @__PURE__ */ jsxs21(
6933
+ Text23,
6934
+ {
6935
+ muted: true,
6936
+ size: 1,
6937
+ style: {
6938
+ fontFamily: FONT_STACK_MONO2,
6939
+ fontVariantNumeric: "tabular-nums",
6940
+ minWidth: 80
6941
+ },
6942
+ children: [
6943
+ formatTokens(row.tokens),
6944
+ " tok"
6945
+ ]
6946
+ }
6947
+ ),
6948
+ /* @__PURE__ */ jsxs21(
6949
+ Text23,
6950
+ {
6951
+ muted: true,
6952
+ size: 1,
6953
+ style: {
6954
+ fontFamily: FONT_STACK_MONO2,
6955
+ fontVariantNumeric: "tabular-nums"
6956
+ },
6957
+ children: [
6958
+ pct,
6959
+ "% pass"
6960
+ ]
6961
+ }
6962
+ )
6963
+ ] });
6964
+ }
6965
+
6701
6966
  // src/components/report-detail/DiagnosticsOverview.tsx
6702
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
6967
+ import {
6968
+ ArrowDownIcon,
6969
+ ArrowUpIcon,
6970
+ CheckmarkCircleIcon,
6971
+ ErrorOutlineIcon,
6972
+ WarningOutlineIcon
6973
+ } from "@sanity/icons";
6974
+ import { Box as Box16, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
6975
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
6703
6976
  function DiagnosticsOverview({
6704
6977
  scores,
6705
6978
  overall,
@@ -6721,11 +6994,11 @@ function DiagnosticsOverview({
6721
6994
  const regressed = comparison?.regressed ?? [];
6722
6995
  const unchanged = comparison?.unchanged ?? [];
6723
6996
  const hasComparison = improved.length > 0 || regressed.length > 0 || unchanged.length > 0;
6724
- return /* @__PURE__ */ jsxs21(Stack18, { space: 4, children: [
6725
- /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6726
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Baseline" }) }),
6727
- /* @__PURE__ */ jsxs21(Stack18, { space: 3, padding: 3, children: [
6728
- /* @__PURE__ */ jsxs21(
6997
+ return /* @__PURE__ */ jsxs22(Stack19, { space: 4, children: [
6998
+ /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
6999
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Baseline" }) }),
7000
+ /* @__PURE__ */ jsxs22(Stack19, { space: 3, padding: 3, children: [
7001
+ /* @__PURE__ */ jsxs22(
6729
7002
  "div",
6730
7003
  {
6731
7004
  style: {
@@ -6734,7 +7007,7 @@ function DiagnosticsOverview({
6734
7007
  gridTemplateColumns: showDocMetrics ? "repeat(3, 1fr)" : "repeat(2, 1fr)"
6735
7008
  },
6736
7009
  children: [
6737
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx27(
7010
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx28(
6738
7011
  ScoreCard,
6739
7012
  {
6740
7013
  delta: comparison?.deltas.overall,
@@ -6744,7 +7017,7 @@ function DiagnosticsOverview({
6744
7017
  value: Math.round(overall.avgScore)
6745
7018
  }
6746
7019
  ) }),
6747
- showDocMetrics && /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx27(
7020
+ showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx28(
6748
7021
  ScoreCard,
6749
7022
  {
6750
7023
  delta: comparison?.deltas.docLift,
@@ -6754,7 +7027,7 @@ function DiagnosticsOverview({
6754
7027
  value: Math.round(overall.avgDocLift)
6755
7028
  }
6756
7029
  ) }),
6757
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx27(
7030
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx28(
6758
7031
  ScoreCard,
6759
7032
  {
6760
7033
  label: "TESTS",
@@ -6765,7 +7038,7 @@ function DiagnosticsOverview({
6765
7038
  ]
6766
7039
  }
6767
7040
  ),
6768
- /* @__PURE__ */ jsxs21(
7041
+ /* @__PURE__ */ jsxs22(
6769
7042
  "div",
6770
7043
  {
6771
7044
  style: {
@@ -6774,7 +7047,7 @@ function DiagnosticsOverview({
6774
7047
  gridTemplateColumns: showDocMetrics ? "repeat(2, 1fr)" : "1fr"
6775
7048
  },
6776
7049
  children: [
6777
- showDocMetrics && /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx27(
7050
+ showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx28(
6778
7051
  MetricCard,
6779
7052
  {
6780
7053
  label: "Negative Doc Lift",
@@ -6782,12 +7055,12 @@ function DiagnosticsOverview({
6782
7055
  value: `${negativeDocLiftCount} area${negativeDocLiftCount === 1 ? "" : "s"}`
6783
7056
  }
6784
7057
  ) }),
6785
- durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx27(
7058
+ durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx28(
6786
7059
  HoverTip,
6787
7060
  {
6788
7061
  display: "block",
6789
7062
  text: "Total wall-clock time for the evaluation pipeline run.",
6790
- children: /* @__PURE__ */ jsx27(
7063
+ children: /* @__PURE__ */ jsx28(
6791
7064
  MetricCard,
6792
7065
  {
6793
7066
  label: "Duration",
@@ -6795,15 +7068,15 @@ function DiagnosticsOverview({
6795
7068
  }
6796
7069
  )
6797
7070
  }
6798
- ) : /* @__PURE__ */ jsx27("div", {})
7071
+ ) : /* @__PURE__ */ jsx28("div", {})
6799
7072
  ]
6800
7073
  }
6801
7074
  )
6802
7075
  ] })
6803
7076
  ] }),
6804
- hasAgenticData && /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6805
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Agent Performance" }) }),
6806
- /* @__PURE__ */ jsx27(Stack18, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs21(
7077
+ hasAgenticData && /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
7078
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Agent Performance" }) }),
7079
+ /* @__PURE__ */ jsx28(Stack19, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs22(
6807
7080
  "div",
6808
7081
  {
6809
7082
  style: {
@@ -6812,7 +7085,7 @@ function DiagnosticsOverview({
6812
7085
  gridTemplateColumns: "repeat(3, 1fr)"
6813
7086
  },
6814
7087
  children: [
6815
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx27(
7088
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx28(
6816
7089
  ScoreCard,
6817
7090
  {
6818
7091
  delta: comparison?.deltas.actualDelta,
@@ -6822,7 +7095,7 @@ function DiagnosticsOverview({
6822
7095
  value: Math.round(overall.avgActualScore)
6823
7096
  }
6824
7097
  ) }),
6825
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx27(
7098
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx28(
6826
7099
  ScoreCard,
6827
7100
  {
6828
7101
  label: "RETRIEVAL GAP",
@@ -6832,7 +7105,7 @@ function DiagnosticsOverview({
6832
7105
  value: overall.avgRetrievalGap != null ? Math.round(overall.avgRetrievalGap) : 0
6833
7106
  }
6834
7107
  ) }),
6835
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx27(
7108
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx28(
6836
7109
  ScoreCard,
6837
7110
  {
6838
7111
  label: "EFFICIENCY",
@@ -6846,9 +7119,9 @@ function DiagnosticsOverview({
6846
7119
  }
6847
7120
  ) })
6848
7121
  ] }),
6849
- /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6850
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Area Health" }) }),
6851
- /* @__PURE__ */ jsx27(Box15, { padding: 3, children: /* @__PURE__ */ jsxs21(
7122
+ /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
7123
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Area Health" }) }),
7124
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, children: /* @__PURE__ */ jsxs22(
6852
7125
  "div",
6853
7126
  {
6854
7127
  style: {
@@ -6857,30 +7130,30 @@ function DiagnosticsOverview({
6857
7130
  gridTemplateColumns: "1fr 1fr 1fr"
6858
7131
  },
6859
7132
  children: [
6860
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx27(
7133
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx28(
6861
7134
  HealthCard,
6862
7135
  {
6863
7136
  color: strong.length > 0 ? "emerald" : "muted",
6864
7137
  count: strong.length,
6865
- icon: /* @__PURE__ */ jsx27(CheckmarkCircleIcon, {}),
7138
+ icon: /* @__PURE__ */ jsx28(CheckmarkCircleIcon, {}),
6866
7139
  label: "Strong (80+)"
6867
7140
  }
6868
7141
  ) }),
6869
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx27(
7142
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx28(
6870
7143
  HealthCard,
6871
7144
  {
6872
7145
  color: attention.length === 0 ? "muted" : "amber",
6873
7146
  count: attention.length,
6874
- icon: /* @__PURE__ */ jsx27(WarningOutlineIcon, {}),
7147
+ icon: /* @__PURE__ */ jsx28(WarningOutlineIcon, {}),
6875
7148
  label: "Attention (70-79)"
6876
7149
  }
6877
7150
  ) }),
6878
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx27(
7151
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx28(
6879
7152
  HealthCard,
6880
7153
  {
6881
7154
  color: weak.length === 0 ? "muted" : "red",
6882
7155
  count: weak.length,
6883
- icon: /* @__PURE__ */ jsx27(ErrorOutlineIcon, {}),
7156
+ icon: /* @__PURE__ */ jsx28(ErrorOutlineIcon, {}),
6884
7157
  label: "Weak (<70)"
6885
7158
  }
6886
7159
  ) })
@@ -6888,16 +7161,16 @@ function DiagnosticsOverview({
6888
7161
  }
6889
7162
  ) })
6890
7163
  ] }),
6891
- hasComparison && /* @__PURE__ */ jsxs21(Box15, { style: neutralCardStyle, children: [
6892
- /* @__PURE__ */ jsx27(
6893
- Box15,
7164
+ hasComparison && /* @__PURE__ */ jsxs22(Box16, { style: neutralCardStyle, children: [
7165
+ /* @__PURE__ */ jsx28(
7166
+ Box16,
6894
7167
  {
6895
7168
  padding: 4,
6896
7169
  style: { borderBottom: "1px solid var(--card-border-color)" },
6897
- children: /* @__PURE__ */ jsx27(Text23, { size: 3, weight: "semibold", children: "Change from Previous Run" })
7170
+ children: /* @__PURE__ */ jsx28(Text24, { size: 3, weight: "semibold", children: "Change from Previous Run" })
6898
7171
  }
6899
7172
  ),
6900
- /* @__PURE__ */ jsxs21(
7173
+ /* @__PURE__ */ jsxs22(
6901
7174
  "div",
6902
7175
  {
6903
7176
  style: {
@@ -6905,43 +7178,43 @@ function DiagnosticsOverview({
6905
7178
  gridTemplateColumns: "1fr 1fr 1fr"
6906
7179
  },
6907
7180
  children: [
6908
- /* @__PURE__ */ jsx27(Box15, { padding: 4, children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6909
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6910
- /* @__PURE__ */ jsx27(ArrowUpIcon, { style: { color: "#34d399" } }),
6911
- /* @__PURE__ */ jsxs21(Text23, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
7181
+ /* @__PURE__ */ jsx28(Box16, { padding: 4, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7182
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7183
+ /* @__PURE__ */ jsx28(ArrowUpIcon, { style: { color: "#34d399" } }),
7184
+ /* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
6912
7185
  "Improved (",
6913
7186
  improved.length,
6914
7187
  ")"
6915
7188
  ] })
6916
7189
  ] }),
6917
- /* @__PURE__ */ jsx27(Flex14, { gap: 2, wrap: "wrap", children: improved.length > 0 ? improved.map((area) => /* @__PURE__ */ jsx27(Pill, { color: "emerald", label: area }, area)) : /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: "None" }) })
7190
+ /* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: improved.length > 0 ? improved.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "emerald", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
6918
7191
  ] }) }),
6919
- /* @__PURE__ */ jsx27(
6920
- Box15,
7192
+ /* @__PURE__ */ jsx28(
7193
+ Box16,
6921
7194
  {
6922
7195
  padding: 4,
6923
7196
  style: { borderLeft: "1px solid var(--card-border-color)" },
6924
- children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6925
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6926
- /* @__PURE__ */ jsx27(ArrowDownIcon, { style: { color: "#f87171" } }),
6927
- /* @__PURE__ */ jsxs21(Text23, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
7197
+ children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7198
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7199
+ /* @__PURE__ */ jsx28(ArrowDownIcon, { style: { color: "#f87171" } }),
7200
+ /* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
6928
7201
  "Regressed (",
6929
7202
  regressed.length,
6930
7203
  ")"
6931
7204
  ] })
6932
7205
  ] }),
6933
- /* @__PURE__ */ jsx27(Flex14, { gap: 2, wrap: "wrap", children: regressed.length > 0 ? regressed.map((area) => /* @__PURE__ */ jsx27(Pill, { color: "red", label: area }, area)) : /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: "None" }) })
7206
+ /* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: regressed.length > 0 ? regressed.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "red", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
6934
7207
  ] })
6935
7208
  }
6936
7209
  ),
6937
- /* @__PURE__ */ jsx27(
6938
- Box15,
7210
+ /* @__PURE__ */ jsx28(
7211
+ Box16,
6939
7212
  {
6940
7213
  padding: 4,
6941
7214
  style: { borderLeft: "1px solid var(--card-border-color)" },
6942
- children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6943
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6944
- /* @__PURE__ */ jsx27(
7215
+ children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7216
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7217
+ /* @__PURE__ */ jsx28(
6945
7218
  "span",
6946
7219
  {
6947
7220
  style: {
@@ -6952,13 +7225,13 @@ function DiagnosticsOverview({
6952
7225
  children: "\u2014"
6953
7226
  }
6954
7227
  ),
6955
- /* @__PURE__ */ jsxs21(Text23, { muted: true, size: 2, weight: "medium", children: [
7228
+ /* @__PURE__ */ jsxs22(Text24, { muted: true, size: 2, weight: "medium", children: [
6956
7229
  "Unchanged (",
6957
7230
  unchanged.length,
6958
7231
  ")"
6959
7232
  ] })
6960
7233
  ] }),
6961
- /* @__PURE__ */ jsx27(Flex14, { gap: 2, wrap: "wrap", children: unchanged.length > 0 ? unchanged.map((area) => /* @__PURE__ */ jsx27(Pill, { color: "muted", label: area }, area)) : /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: "None" }) })
7234
+ /* @__PURE__ */ jsx28(Flex15, { gap: 2, wrap: "wrap", children: unchanged.length > 0 ? unchanged.map((area) => /* @__PURE__ */ jsx28(Pill, { color: "muted", label: area }, area)) : /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: "None" }) })
6962
7235
  ] })
6963
7236
  }
6964
7237
  )
@@ -6977,8 +7250,8 @@ var sectionHeaderStyle = {
6977
7250
  borderBottom: "1px solid var(--card-border-color)"
6978
7251
  };
6979
7252
  function SectionLabel({ label }) {
6980
- return /* @__PURE__ */ jsx27(
6981
- Text23,
7253
+ return /* @__PURE__ */ jsx28(
7254
+ Text24,
6982
7255
  {
6983
7256
  muted: true,
6984
7257
  size: 1,
@@ -7002,9 +7275,9 @@ function ScoreCard({
7002
7275
  border: "1px solid var(--card-border-color)",
7003
7276
  borderRadius: 6
7004
7277
  };
7005
- return /* @__PURE__ */ jsx27(Box15, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
7006
- /* @__PURE__ */ jsx27(
7007
- Text23,
7278
+ return /* @__PURE__ */ jsx28(Box16, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7279
+ /* @__PURE__ */ jsx28(
7280
+ Text24,
7008
7281
  {
7009
7282
  muted: true,
7010
7283
  size: 1,
@@ -7015,8 +7288,8 @@ function ScoreCard({
7015
7288
  children: label
7016
7289
  }
7017
7290
  ),
7018
- /* @__PURE__ */ jsxs21(Flex14, { align: "baseline", gap: 2, children: [
7019
- /* @__PURE__ */ jsxs21(
7291
+ /* @__PURE__ */ jsxs22(Flex15, { align: "baseline", gap: 2, children: [
7292
+ /* @__PURE__ */ jsxs22(
7020
7293
  "span",
7021
7294
  {
7022
7295
  style: {
@@ -7028,13 +7301,13 @@ function ScoreCard({
7028
7301
  },
7029
7302
  children: [
7030
7303
  value,
7031
- suffix && /* @__PURE__ */ jsx27("span", { style: { fontSize: 24 }, children: suffix })
7304
+ suffix && /* @__PURE__ */ jsx28("span", { style: { fontSize: 24 }, children: suffix })
7032
7305
  ]
7033
7306
  }
7034
7307
  ),
7035
- delta != null && delta !== 0 && /* @__PURE__ */ jsx27(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
7308
+ delta != null && delta !== 0 && /* @__PURE__ */ jsx28(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
7036
7309
  ] }),
7037
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 1, children: subtitle })
7310
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 1, children: subtitle })
7038
7311
  ] }) });
7039
7312
  }
7040
7313
  function HealthCard({
@@ -7050,18 +7323,18 @@ function HealthCard({
7050
7323
  muted: "var(--card-muted-fg-color)"
7051
7324
  };
7052
7325
  const textColor = TEXT_COLORS[color];
7053
- return /* @__PURE__ */ jsx27(
7054
- Box15,
7326
+ return /* @__PURE__ */ jsx28(
7327
+ Box16,
7055
7328
  {
7056
7329
  padding: 4,
7057
7330
  style: {
7058
7331
  ...sectionStyle(color),
7059
7332
  minHeight: 80
7060
7333
  },
7061
- children: /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 3, children: [
7062
- /* @__PURE__ */ jsx27("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
7063
- /* @__PURE__ */ jsxs21(Stack18, { space: 1, children: [
7064
- /* @__PURE__ */ jsx27(
7334
+ children: /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 3, children: [
7335
+ /* @__PURE__ */ jsx28("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
7336
+ /* @__PURE__ */ jsxs22(Stack19, { space: 1, children: [
7337
+ /* @__PURE__ */ jsx28(
7065
7338
  "span",
7066
7339
  {
7067
7340
  style: {
@@ -7074,7 +7347,7 @@ function HealthCard({
7074
7347
  children: count
7075
7348
  }
7076
7349
  ),
7077
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: label })
7350
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label })
7078
7351
  ] })
7079
7352
  ] })
7080
7353
  }
@@ -7095,9 +7368,9 @@ function MetricCard({
7095
7368
  padding: 16
7096
7369
  };
7097
7370
  const valueColor = sentiment ? sentimentTextColor(sentiment) : "var(--card-fg-color)";
7098
- return /* @__PURE__ */ jsx27(Box15, { style, children: /* @__PURE__ */ jsxs21(Stack18, { space: 2, children: [
7099
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: label }),
7100
- /* @__PURE__ */ jsx27(
7371
+ return /* @__PURE__ */ jsx28(Box16, { style, children: /* @__PURE__ */ jsxs22(Stack19, { space: 2, children: [
7372
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label }),
7373
+ /* @__PURE__ */ jsx28(
7101
7374
  "span",
7102
7375
  {
7103
7376
  style: {
@@ -7125,7 +7398,7 @@ function Pill({
7125
7398
  }
7126
7399
  };
7127
7400
  const c = colors[color];
7128
- return /* @__PURE__ */ jsx27(
7401
+ return /* @__PURE__ */ jsx28(
7129
7402
  "span",
7130
7403
  {
7131
7404
  style: {
@@ -7143,10 +7416,10 @@ function Pill({
7143
7416
  }
7144
7417
 
7145
7418
  // src/components/report-detail/FailureModesPanel.tsx
7146
- import { Box as Box16, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
7419
+ import { Box as Box17, Flex as Flex16, Stack as Stack20, Text as Text25 } from "@sanity/ui";
7147
7420
 
7148
7421
  // src/lib/useArtifactListRow.ts
7149
- import { useCallback as useCallback18, useMemo as useMemo8 } from "react";
7422
+ import { useCallback as useCallback18, useMemo as useMemo10 } from "react";
7150
7423
 
7151
7424
  // src/lib/useArtifactDetail.ts
7152
7425
  import { useCallback as useCallback16, useEffect as useEffect7, useState as useState13 } from "react";
@@ -7375,7 +7648,7 @@ function useArtifactEntry(type, key) {
7375
7648
  }
7376
7649
 
7377
7650
  // src/lib/useArtifactPrefetch.ts
7378
- import { useCallback as useCallback17, useMemo as useMemo7 } from "react";
7651
+ import { useCallback as useCallback17, useMemo as useMemo9 } from "react";
7379
7652
  var NDJSON_TYPES2 = /* @__PURE__ */ new Set([
7380
7653
  "traces"
7381
7654
  ]);
@@ -7479,7 +7752,7 @@ function useArtifactPrefetch(type) {
7479
7752
  },
7480
7753
  [runId, ref, type]
7481
7754
  );
7482
- return useMemo7(
7755
+ return useMemo9(
7483
7756
  () => ({ prefetch, onHover, prefetchWindow, warmAll }),
7484
7757
  [prefetch, onHover, prefetchWindow, warmAll]
7485
7758
  );
@@ -7512,7 +7785,7 @@ function useArtifactListRow(type, key, listKeys) {
7512
7785
  const entry = useArtifactEntry(type, key);
7513
7786
  const [full, status, request] = useArtifactDetail(type, key);
7514
7787
  const { onHover, prefetchWindow } = useArtifactPrefetch(type);
7515
- const onMouseEnter = useMemo8(() => onHover(key), [onHover, key]);
7788
+ const onMouseEnter = useMemo10(() => onHover(key), [onHover, key]);
7516
7789
  const onFocus = useCallback18(() => {
7517
7790
  const idx = listKeys.indexOf(key);
7518
7791
  if (idx < 0) return;
@@ -7539,7 +7812,7 @@ function useGraderJudgmentArtifact(key, listKeys) {
7539
7812
  }
7540
7813
 
7541
7814
  // src/components/report-detail/FailureModesPanel.tsx
7542
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
7815
+ import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
7543
7816
  function severityColor(severity) {
7544
7817
  switch (severity) {
7545
7818
  case "critical":
@@ -7559,25 +7832,25 @@ function FailureModesPanel({ failureModes }) {
7559
7832
  if (!failureModes || failureModes.topTitles.length === 0) return null;
7560
7833
  const allKeys = failureModes.topTitles.map((t) => t.id);
7561
7834
  const classificationPct = Math.round(failureModes.classificationRate);
7562
- return /* @__PURE__ */ jsx28(
7563
- Box16,
7835
+ return /* @__PURE__ */ jsx29(
7836
+ Box17,
7564
7837
  {
7565
7838
  style: {
7566
7839
  ...neutralCardStyle,
7567
7840
  padding: "12px 16px"
7568
7841
  },
7569
- children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7570
- /* @__PURE__ */ jsxs22(Flex15, { align: "baseline", gap: 2, wrap: "wrap", children: [
7571
- /* @__PURE__ */ jsx28(Text24, { size: 2, weight: "semibold", children: "Failure Categories" }),
7572
- /* @__PURE__ */ jsxs22(Text24, { muted: true, size: 1, children: [
7842
+ children: /* @__PURE__ */ jsxs23(Stack20, { space: 3, children: [
7843
+ /* @__PURE__ */ jsxs23(Flex16, { align: "baseline", gap: 2, wrap: "wrap", children: [
7844
+ /* @__PURE__ */ jsx29(Text25, { size: 2, weight: "semibold", children: "Failure Categories" }),
7845
+ /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 1, children: [
7573
7846
  failureModes.totalJudgments,
7574
7847
  " judgments \xB7 ",
7575
7848
  classificationPct,
7576
7849
  "% classified"
7577
7850
  ] })
7578
7851
  ] }),
7579
- /* @__PURE__ */ jsx28(Box16, { style: dividerStyle }),
7580
- /* @__PURE__ */ jsx28(Stack19, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx28(
7852
+ /* @__PURE__ */ jsx29(Box17, { style: dividerStyle }),
7853
+ /* @__PURE__ */ jsx29(Stack20, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx29(
7581
7854
  FailureModeRow,
7582
7855
  {
7583
7856
  allKeys,
@@ -7601,8 +7874,8 @@ function FailureModeRow({
7601
7874
  const title = artifact.preview?.titlePreview ?? row.title ?? toTitleCase(category);
7602
7875
  const pct = total > 0 ? Math.round(row.count / total * 100) : 0;
7603
7876
  const sevColors = severityColor(severity);
7604
- return /* @__PURE__ */ jsxs22(
7605
- Flex15,
7877
+ return /* @__PURE__ */ jsxs23(
7878
+ Flex16,
7606
7879
  {
7607
7880
  align: "center",
7608
7881
  gap: 3,
@@ -7610,7 +7883,7 @@ function FailureModeRow({
7610
7883
  onMouseEnter: artifact.handlers.onMouseEnter,
7611
7884
  style: { padding: "4px 0" },
7612
7885
  children: [
7613
- /* @__PURE__ */ jsx28(
7886
+ /* @__PURE__ */ jsx29(
7614
7887
  "span",
7615
7888
  {
7616
7889
  style: {
@@ -7627,10 +7900,10 @@ function FailureModeRow({
7627
7900
  children: severity.toUpperCase()
7628
7901
  }
7629
7902
  ),
7630
- /* @__PURE__ */ jsx28(Text24, { size: 1, weight: "medium", children: title }),
7631
- /* @__PURE__ */ jsx28(Text24, { muted: true, size: 1, children: "\xB7" }),
7632
- /* @__PURE__ */ jsxs22(
7633
- Text24,
7903
+ /* @__PURE__ */ jsx29(Text25, { size: 1, weight: "medium", children: title }),
7904
+ /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, children: "\xB7" }),
7905
+ /* @__PURE__ */ jsxs23(
7906
+ Text25,
7634
7907
  {
7635
7908
  muted: true,
7636
7909
  size: 1,
@@ -7653,11 +7926,11 @@ function FailureModeRow({
7653
7926
 
7654
7927
  // src/components/report-detail/LineageCard.tsx
7655
7928
  import { LinkIcon as LinkIcon2 } from "@sanity/icons";
7656
- import { Badge as Badge6, Card as Card13, Flex as Flex16, Stack as Stack20, Text as Text25 } from "@sanity/ui";
7929
+ import { Badge as Badge6, Card as Card13, Flex as Flex17, Stack as Stack21, Text as Text26 } from "@sanity/ui";
7657
7930
  import { useCallback as useCallback19, useEffect as useEffect8, useState as useState14 } from "react";
7658
7931
  import { useClient as useClient5 } from "sanity";
7659
7932
  import { useRouter as useRouter2 } from "sanity/router";
7660
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
7933
+ import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
7661
7934
  var REPORT_TYPE2 = "ailf.report";
7662
7935
  var SPAWNED_REPORTS_QUERY = (
7663
7936
  /* groq */
@@ -7690,12 +7963,12 @@ function LineageCard({ provenance, reportId }) {
7690
7963
  }, [client, reportId]);
7691
7964
  const hasLineage = lineage?.rerunOf || lineage?.comparedAgainst;
7692
7965
  if (!hasLineage && spawned.length === 0) return null;
7693
- return /* @__PURE__ */ jsx29(Card13, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack20, { space: 4, children: [
7694
- /* @__PURE__ */ jsx29(Flex16, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs23(Text25, { size: 3, weight: "semibold", children: [
7695
- /* @__PURE__ */ jsx29(LinkIcon2, {}),
7966
+ return /* @__PURE__ */ jsx30(Card13, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack21, { space: 4, children: [
7967
+ /* @__PURE__ */ jsx30(Flex17, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs24(Text26, { size: 3, weight: "semibold", children: [
7968
+ /* @__PURE__ */ jsx30(LinkIcon2, {}),
7696
7969
  " Lineage"
7697
7970
  ] }) }),
7698
- lineage?.rerunOf && /* @__PURE__ */ jsx29(
7971
+ lineage?.rerunOf && /* @__PURE__ */ jsx30(
7699
7972
  LineageLink,
7700
7973
  {
7701
7974
  label: "Re-run of",
@@ -7703,7 +7976,7 @@ function LineageCard({ provenance, reportId }) {
7703
7976
  router
7704
7977
  }
7705
7978
  ),
7706
- lineage?.comparedAgainst && /* @__PURE__ */ jsx29(
7979
+ lineage?.comparedAgainst && /* @__PURE__ */ jsx30(
7707
7980
  LineageLink,
7708
7981
  {
7709
7982
  label: "Compared against",
@@ -7711,9 +7984,9 @@ function LineageCard({ provenance, reportId }) {
7711
7984
  router
7712
7985
  }
7713
7986
  ),
7714
- spawned.length > 0 && /* @__PURE__ */ jsxs23(Stack20, { space: 2, children: [
7715
- /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
7716
- spawned.map((s) => /* @__PURE__ */ jsx29(SpawnedReportRow, { report: s, router }, s.reportId))
7987
+ spawned.length > 0 && /* @__PURE__ */ jsxs24(Stack21, { space: 2, children: [
7988
+ /* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
7989
+ spawned.map((s) => /* @__PURE__ */ jsx30(SpawnedReportRow, { report: s, router }, s.reportId))
7717
7990
  ] })
7718
7991
  ] }) });
7719
7992
  }
@@ -7725,12 +7998,12 @@ function LineageLink({
7725
7998
  const handleClick = useCallback19(() => {
7726
7999
  router.navigate({ reportId });
7727
8000
  }, [reportId, router]);
7728
- return /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
7729
- /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 2, weight: "semibold", children: [
8001
+ return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8002
+ /* @__PURE__ */ jsxs24(Text26, { muted: true, size: 2, weight: "semibold", children: [
7730
8003
  label,
7731
8004
  ":"
7732
8005
  ] }),
7733
- /* @__PURE__ */ jsx29(Text25, { size: 2, children: /* @__PURE__ */ jsxs23(
8006
+ /* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsxs24(
7734
8007
  "a",
7735
8008
  {
7736
8009
  href: "#",
@@ -7756,8 +8029,8 @@ function SpawnedReportRow({
7756
8029
  }, [report.reportId, router]);
7757
8030
  const dateLabel = formatShortDate(report.completedAt);
7758
8031
  const label = report.title ?? report.tag ?? dateLabel;
7759
- return /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
7760
- /* @__PURE__ */ jsx29(Text25, { size: 2, children: /* @__PURE__ */ jsx29(
8032
+ return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8033
+ /* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsx30(
7761
8034
  "a",
7762
8035
  {
7763
8036
  href: "#",
@@ -7769,8 +8042,8 @@ function SpawnedReportRow({
7769
8042
  children: label
7770
8043
  }
7771
8044
  ) }),
7772
- (report.title ?? report.tag) && /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, children: dateLabel }),
7773
- /* @__PURE__ */ jsx29(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
8045
+ (report.title ?? report.tag) && /* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, children: dateLabel }),
8046
+ /* @__PURE__ */ jsx30(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
7774
8047
  ] });
7775
8048
  }
7776
8049
  function formatShortDate(iso) {
@@ -7786,18 +8059,294 @@ function formatShortDate(iso) {
7786
8059
  }
7787
8060
 
7788
8061
  // src/components/report-detail/JudgmentList.tsx
7789
- import React2, { useCallback as useCallback21, useEffect as useEffect9, useMemo as useMemo9, useRef as useRef6, useState as useState15 } from "react";
8062
+ import React2, { useCallback as useCallback22, useEffect as useEffect11, useMemo as useMemo11, useRef as useRef7, useState as useState16 } from "react";
7790
8063
  import {
7791
8064
  ChevronDownIcon,
7792
8065
  ChevronRightIcon,
7793
8066
  ErrorOutlineIcon as ErrorOutlineIcon2,
7794
8067
  HelpCircleIcon as HelpCircleIcon7
7795
8068
  } from "@sanity/icons";
7796
- import { Box as Box18, Flex as Flex18, Stack as Stack21, Text as Text28, Tooltip as Tooltip8 } from "@sanity/ui";
8069
+ import { Box as Box21, Flex as Flex20, Stack as Stack23, Text as Text31, Tooltip as Tooltip9 } from "@sanity/ui";
8070
+
8071
+ // src/components/report-detail/PromptReplayDrawer.tsx
8072
+ import { useEffect as useEffect10 } from "react";
8073
+ import { Badge as Badge7, Box as Box19, Card as Card14, Dialog, Flex as Flex18, Grid as Grid3, Stack as Stack22, Text as Text28 } from "@sanity/ui";
8074
+
8075
+ // src/components/CopyButton.tsx
8076
+ import {
8077
+ useCallback as useCallback20,
8078
+ useEffect as useEffect9,
8079
+ useRef as useRef6,
8080
+ useState as useState15
8081
+ } from "react";
8082
+ import { CheckmarkIcon, CopyIcon } from "@sanity/icons";
8083
+ import { Box as Box18, Button as Button3, Text as Text27, Tooltip as Tooltip7 } from "@sanity/ui";
8084
+ import { jsx as jsx31 } from "react/jsx-runtime";
8085
+ function CopyButton({
8086
+ copiedLabel = "Copied!",
8087
+ errorLabel = "Copy failed",
8088
+ label,
8089
+ revertAfterMs = 1500,
8090
+ style,
8091
+ text
8092
+ }) {
8093
+ const [status, setStatus] = useState15("idle");
8094
+ const timerRef = useRef6(null);
8095
+ const scheduleRevert = useCallback20(() => {
8096
+ if (timerRef.current !== null) window.clearTimeout(timerRef.current);
8097
+ timerRef.current = window.setTimeout(() => {
8098
+ setStatus("idle");
8099
+ timerRef.current = null;
8100
+ }, revertAfterMs);
8101
+ }, [revertAfterMs]);
8102
+ const handleCopy = useCallback20(() => {
8103
+ navigator.clipboard.writeText(text).then(
8104
+ () => {
8105
+ setStatus("copied");
8106
+ scheduleRevert();
8107
+ },
8108
+ () => {
8109
+ setStatus("error");
8110
+ scheduleRevert();
8111
+ }
8112
+ );
8113
+ }, [text, scheduleRevert]);
8114
+ useEffect9(() => {
8115
+ return () => {
8116
+ if (timerRef.current !== null) window.clearTimeout(timerRef.current);
8117
+ };
8118
+ }, []);
8119
+ const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
8120
+ const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
8121
+ const icon = status === "copied" ? CheckmarkIcon : CopyIcon;
8122
+ const idle = status === "idle";
8123
+ return /* @__PURE__ */ jsx31(
8124
+ Tooltip7,
8125
+ {
8126
+ content: /* @__PURE__ */ jsx31(Box18, { padding: 2, children: /* @__PURE__ */ jsx31(Text27, { size: 1, children: tooltipLabel }) }),
8127
+ placement: "left",
8128
+ portal: true,
8129
+ children: /* @__PURE__ */ jsx31(
8130
+ Button3,
8131
+ {
8132
+ "aria-label": label,
8133
+ fontSize: 1,
8134
+ icon,
8135
+ mode: "bleed",
8136
+ onBlur: (e) => {
8137
+ if (idle) e.currentTarget.style.opacity = "0.55";
8138
+ },
8139
+ onClick: handleCopy,
8140
+ onFocus: (e) => {
8141
+ if (idle) e.currentTarget.style.opacity = "1";
8142
+ },
8143
+ onMouseEnter: (e) => {
8144
+ if (idle) e.currentTarget.style.opacity = "1";
8145
+ },
8146
+ onMouseLeave: (e) => {
8147
+ if (idle) e.currentTarget.style.opacity = "0.55";
8148
+ },
8149
+ padding: 2,
8150
+ style: {
8151
+ opacity: idle ? 0.55 : 1,
8152
+ transition: "opacity 150ms ease",
8153
+ ...style
8154
+ },
8155
+ tone
8156
+ }
8157
+ )
8158
+ }
8159
+ );
8160
+ }
8161
+
8162
+ // src/components/report-detail/PromptReplayDrawer.tsx
8163
+ import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
8164
+ function useArtifactPane(type, entryKey, project) {
8165
+ const ref = useArtifactRef(type);
8166
+ const isLocalStore = ref?.store === "local";
8167
+ const entry = useArtifactEntry(type, entryKey ?? "");
8168
+ const [full, status, request] = useArtifactDetail(type, entryKey ?? "");
8169
+ useEffect10(() => {
8170
+ if (!entryKey) return;
8171
+ if (isLocalStore) return;
8172
+ if (status !== "idle") return;
8173
+ void request();
8174
+ }, [entryKey, status, request, isLocalStore]);
8175
+ const projected = project(entry.preview, full);
8176
+ return {
8177
+ charCount: projected.charCount,
8178
+ extra: projected.extra,
8179
+ fullText: projected.fullText,
8180
+ snippet: projected.snippet,
8181
+ status,
8182
+ isLocalStore,
8183
+ present: entry.present
8184
+ };
8185
+ }
8186
+ function useRenderedPrompt(entryKey) {
8187
+ return useArtifactPane(
8188
+ "renderedPrompts",
8189
+ entryKey,
8190
+ (preview, full) => {
8191
+ const fullText = typeof full?.prompt?.raw === "string" ? full.prompt.raw : null;
8192
+ return {
8193
+ charCount: fullText?.length ?? preview?.promptCharCount ?? 0,
8194
+ extra: preview?.label ?? null,
8195
+ fullText,
8196
+ snippet: preview?.snippet
8197
+ };
8198
+ }
8199
+ );
8200
+ }
8201
+ function useGraderRubric(entryKey) {
8202
+ return useArtifactPane(
8203
+ "graderPrompts",
8204
+ entryKey,
8205
+ (preview, full) => {
8206
+ const rubricText = typeof full?.assertion?.value === "string" ? full.assertion.value : null;
8207
+ return {
8208
+ charCount: rubricText?.length ?? preview?.rubricCharCount ?? 0,
8209
+ extra: preview?.rubricName ? `dim: ${preview.rubricName}` : null,
8210
+ fullText: rubricText,
8211
+ snippet: preview?.snippet
8212
+ };
8213
+ }
8214
+ );
8215
+ }
8216
+ function PromptReplayDrawer({
8217
+ open,
8218
+ renderedPromptKey,
8219
+ graderPromptKey,
8220
+ subtitle,
8221
+ onClose
8222
+ }) {
8223
+ if (!open) return null;
8224
+ return /* @__PURE__ */ jsx32(
8225
+ Dialog,
8226
+ {
8227
+ header: "Prompt replay",
8228
+ id: "prompt-replay-drawer",
8229
+ onClose,
8230
+ width: 4,
8231
+ children: /* @__PURE__ */ jsx32(Box19, { padding: 4, children: /* @__PURE__ */ jsxs25(Stack22, { space: 4, children: [
8232
+ /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: subtitle }),
8233
+ /* @__PURE__ */ jsxs25(Grid3, { columns: [1, 1, 2], gap: 4, children: [
8234
+ /* @__PURE__ */ jsx32(RenderedPromptPane, { entryKey: renderedPromptKey }),
8235
+ /* @__PURE__ */ jsx32(GraderRubricPane, { entryKey: graderPromptKey })
8236
+ ] })
8237
+ ] }) })
8238
+ }
8239
+ );
8240
+ }
8241
+ function RenderedPromptPane({ entryKey }) {
8242
+ const data = useRenderedPrompt(entryKey);
8243
+ return /* @__PURE__ */ jsx32(
8244
+ PromptPane,
8245
+ {
8246
+ copiedLabel: "Prompt copied",
8247
+ copyLabel: "Copy prompt",
8248
+ data,
8249
+ entryKey,
8250
+ paneLabel: "Rendered prompt"
8251
+ }
8252
+ );
8253
+ }
8254
+ function GraderRubricPane({ entryKey }) {
8255
+ const data = useGraderRubric(entryKey);
8256
+ return /* @__PURE__ */ jsx32(
8257
+ PromptPane,
8258
+ {
8259
+ copiedLabel: "Rubric copied",
8260
+ copyLabel: "Copy rubric",
8261
+ data,
8262
+ entryKey,
8263
+ paneLabel: "Grader rubric"
8264
+ }
8265
+ );
8266
+ }
8267
+ function PromptPane({
8268
+ copiedLabel,
8269
+ copyLabel,
8270
+ data,
8271
+ entryKey,
8272
+ paneLabel
8273
+ }) {
8274
+ if (!entryKey) {
8275
+ return /* @__PURE__ */ jsx32(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Not available for this report (no entry key could be derived from the task identity)." }) });
8276
+ }
8277
+ if (!data.present) {
8278
+ return /* @__PURE__ */ jsx32(PaneCard, { paneLabel, children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Not captured for this entry. (Older runs pre-dating the renderedPrompts/graderPrompts writers won't carry a manifest entry.)" }) });
8279
+ }
8280
+ const { fullText, snippet, charCount, extra, status, isLocalStore } = data;
8281
+ const displayText = fullText ?? snippet ?? "";
8282
+ const isPreviewOnly = fullText === null;
8283
+ const footer = isLocalStore ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Full text stored locally on the runner that produced this report \u2014 not reachable from Studio. Showing 120-char preview only." }) : status === "error" ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { color: "#f87171", marginTop: 8 }, children: "Failed to load full text \u2014 showing preview only." }) : status === "loading" && !fullText ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Loading full text from artifact store\u2026" }) : isPreviewOnly ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginTop: 8 }, children: "Showing 120-char preview. Full text not yet hydrated." }) : null;
8284
+ return /* @__PURE__ */ jsxs25(
8285
+ PaneCard,
8286
+ {
8287
+ badges: /* @__PURE__ */ jsxs25(Fragment9, { children: [
8288
+ /* @__PURE__ */ jsxs25(Badge7, { fontSize: 0, tone: "primary", children: [
8289
+ charCount.toLocaleString(),
8290
+ " char",
8291
+ charCount === 1 ? "" : "s"
8292
+ ] }),
8293
+ extra && /* @__PURE__ */ jsx32(Badge7, { fontSize: 0, tone: "default", children: extra })
8294
+ ] }),
8295
+ copyAction: displayText.length > 0 ? /* @__PURE__ */ jsx32(
8296
+ CopyButton,
8297
+ {
8298
+ copiedLabel,
8299
+ label: copyLabel,
8300
+ text: displayText
8301
+ }
8302
+ ) : null,
8303
+ paneLabel,
8304
+ children: [
8305
+ displayText.length === 0 ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "(empty)" }) : /* @__PURE__ */ jsx32(
8306
+ "pre",
8307
+ {
8308
+ style: {
8309
+ backgroundColor: "var(--card-muted-bg-color, rgba(0,0,0,0.2))",
8310
+ border: "1px solid var(--card-border-color)",
8311
+ borderRadius: 3,
8312
+ fontFamily: FONT_STACK_MONO2,
8313
+ fontSize: 12,
8314
+ lineHeight: 1.5,
8315
+ margin: 0,
8316
+ maxHeight: 480,
8317
+ overflow: "auto",
8318
+ padding: 12,
8319
+ whiteSpace: "pre-wrap",
8320
+ wordBreak: "break-word"
8321
+ },
8322
+ children: displayText
8323
+ }
8324
+ ),
8325
+ footer
8326
+ ]
8327
+ }
8328
+ );
8329
+ }
8330
+ function PaneCard({
8331
+ badges,
8332
+ children,
8333
+ copyAction,
8334
+ paneLabel
8335
+ }) {
8336
+ return /* @__PURE__ */ jsx32(Card14, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs25(Stack22, { space: 3, children: [
8337
+ /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
8338
+ /* @__PURE__ */ jsx32(Text28, { size: 1, weight: "semibold", children: paneLabel }),
8339
+ badges,
8340
+ /* @__PURE__ */ jsx32(Box19, { flex: 1 }),
8341
+ copyAction
8342
+ ] }),
8343
+ children
8344
+ ] }) });
8345
+ }
7797
8346
 
7798
8347
  // src/components/report-detail/judgment-formatting.tsx
7799
- import { Box as Box17, Text as Text26, Tooltip as Tooltip7 } from "@sanity/ui";
7800
- import { jsx as jsx30 } from "react/jsx-runtime";
8348
+ import { Box as Box20, Text as Text29, Tooltip as Tooltip8 } from "@sanity/ui";
8349
+ import { jsx as jsx33 } from "react/jsx-runtime";
7801
8350
  function judgmentSlug(j) {
7802
8351
  const sep = j.taskId.indexOf(" - ");
7803
8352
  const area = sep > 0 ? j.taskId.substring(0, sep) : j.taskId;
@@ -7814,7 +8363,7 @@ function dimensionLabel2(dim) {
7814
8363
  if (!dim) return "";
7815
8364
  return dim.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
7816
8365
  }
7817
- function shortModelId(id) {
8366
+ function shortModelId2(id) {
7818
8367
  const idx = id.lastIndexOf(":");
7819
8368
  if (idx < 0 || idx === id.length - 1) return id;
7820
8369
  return id.substring(idx + 1);
@@ -7832,13 +8381,13 @@ function splitVariant(taskName) {
7832
8381
  function VariantBadge({ variant }) {
7833
8382
  if (!variant) return null;
7834
8383
  const isGold = variant === "gold";
7835
- return /* @__PURE__ */ jsx30(
7836
- Tooltip7,
8384
+ return /* @__PURE__ */ jsx33(
8385
+ Tooltip8,
7837
8386
  {
7838
- content: /* @__PURE__ */ jsx30(Box17, { padding: 2, style: { maxWidth: 240 }, children: /* @__PURE__ */ jsx30(Text26, { size: 1, children: isGold ? "Gold: uses the documentation-authored reference prompt." : "Baseline: model implementation with no documentation guidance." }) }),
8387
+ content: /* @__PURE__ */ jsx33(Box20, { padding: 2, style: { maxWidth: 240 }, children: /* @__PURE__ */ jsx33(Text29, { size: 1, children: isGold ? "Gold: uses the documentation-authored reference prompt." : "Baseline: model implementation with no documentation guidance." }) }),
7839
8388
  placement: "bottom",
7840
8389
  portal: true,
7841
- children: /* @__PURE__ */ jsx30(
8390
+ children: /* @__PURE__ */ jsx33(
7842
8391
  "span",
7843
8392
  {
7844
8393
  style: {
@@ -7860,10 +8409,10 @@ function VariantBadge({ variant }) {
7860
8409
  }
7861
8410
 
7862
8411
  // src/components/report-detail/JudgmentListToolbar.tsx
7863
- import { Flex as Flex17, Text as Text27, TextInput as TextInput4 } from "@sanity/ui";
8412
+ import { Flex as Flex19, Text as Text30, TextInput as TextInput4 } from "@sanity/ui";
7864
8413
  import { ResetIcon as ResetIcon2, SearchIcon as SearchIcon5 } from "@sanity/icons";
7865
- import { useCallback as useCallback20 } from "react";
7866
- import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
8414
+ import { useCallback as useCallback21 } from "react";
8415
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
7867
8416
  var FILTERS_BOX_STYLE = {
7868
8417
  background: "var(--card-bg-color)",
7869
8418
  border: "1px solid var(--card-border-color)",
@@ -7956,17 +8505,17 @@ function JudgmentListToolbar({
7956
8505
  totalCount
7957
8506
  }) {
7958
8507
  const hasActiveFilters = query.trim() !== "" || scoreBand !== null || selectedDimensions.size > 0;
7959
- const handleQueryChange = useCallback20(
8508
+ const handleQueryChange = useCallback21(
7960
8509
  (e) => {
7961
8510
  onQueryChange(e.currentTarget.value);
7962
8511
  },
7963
8512
  [onQueryChange]
7964
8513
  );
7965
- return /* @__PURE__ */ jsx31("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs24(Flex17, { direction: "column", gap: 3, children: [
7966
- /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
7967
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
7968
- /* @__PURE__ */ jsx31("div", { style: { flex: "1 0 0px" } }),
7969
- hasActiveFilters && /* @__PURE__ */ jsxs24(
8514
+ return /* @__PURE__ */ jsx34("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs26(Flex19, { direction: "column", gap: 3, children: [
8515
+ /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8516
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
8517
+ /* @__PURE__ */ jsx34("div", { style: { flex: "1 0 0px" } }),
8518
+ hasActiveFilters && /* @__PURE__ */ jsxs26(
7970
8519
  "button",
7971
8520
  {
7972
8521
  onBlur: (e) => {
@@ -7993,15 +8542,15 @@ function JudgmentListToolbar({
7993
8542
  },
7994
8543
  type: "button",
7995
8544
  children: [
7996
- /* @__PURE__ */ jsx31(ResetIcon2, { style: { fontSize: 14 } }),
8545
+ /* @__PURE__ */ jsx34(ResetIcon2, { style: { fontSize: 14 } }),
7997
8546
  "Reset"
7998
8547
  ]
7999
8548
  }
8000
8549
  ),
8001
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
8550
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
8002
8551
  ] }),
8003
- /* @__PURE__ */ jsxs24("div", { style: CONTROLS_ROW_STYLE, children: [
8004
- /* @__PURE__ */ jsx31("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx31(
8552
+ /* @__PURE__ */ jsxs26("div", { style: CONTROLS_ROW_STYLE, children: [
8553
+ /* @__PURE__ */ jsx34("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx34(
8005
8554
  TextInput4,
8006
8555
  {
8007
8556
  fontSize: 1,
@@ -8011,7 +8560,7 @@ function JudgmentListToolbar({
8011
8560
  value: query
8012
8561
  }
8013
8562
  ) }),
8014
- /* @__PURE__ */ jsx31(PillGroup2, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx31(
8563
+ /* @__PURE__ */ jsx34(PillGroup2, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx34(
8015
8564
  "button",
8016
8565
  {
8017
8566
  onClick: () => onScoreBandChange(band),
@@ -8021,7 +8570,7 @@ function JudgmentListToolbar({
8021
8570
  },
8022
8571
  label
8023
8572
  )) }),
8024
- /* @__PURE__ */ jsx31(PillGroup2, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx31(
8573
+ /* @__PURE__ */ jsx34(PillGroup2, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx34(
8025
8574
  "button",
8026
8575
  {
8027
8576
  onClick: () => onSortOrderChange(order),
@@ -8032,11 +8581,11 @@ function JudgmentListToolbar({
8032
8581
  order
8033
8582
  )) })
8034
8583
  ] }),
8035
- dimensions.length > 0 && /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, wrap: "wrap", children: [
8036
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
8584
+ dimensions.length > 0 && /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
8585
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
8037
8586
  dimensions.map((d) => {
8038
8587
  const active = selectedDimensions.has(d.key);
8039
- return /* @__PURE__ */ jsxs24(
8588
+ return /* @__PURE__ */ jsxs26(
8040
8589
  "button",
8041
8590
  {
8042
8591
  "aria-pressed": active,
@@ -8046,7 +8595,7 @@ function JudgmentListToolbar({
8046
8595
  children: [
8047
8596
  d.label,
8048
8597
  " ",
8049
- /* @__PURE__ */ jsx31(
8598
+ /* @__PURE__ */ jsx34(
8050
8599
  "span",
8051
8600
  {
8052
8601
  style: {
@@ -8069,14 +8618,14 @@ function PillGroup2({
8069
8618
  label,
8070
8619
  children
8071
8620
  }) {
8072
- return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8073
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
8074
- /* @__PURE__ */ jsx31("div", { style: PILL_GROUP_STYLE2, children })
8621
+ return /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8622
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
8623
+ /* @__PURE__ */ jsx34("div", { style: PILL_GROUP_STYLE2, children })
8075
8624
  ] });
8076
8625
  }
8077
8626
 
8078
8627
  // src/components/report-detail/JudgmentList.tsx
8079
- import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
8628
+ import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
8080
8629
  function isOutputFailure(j) {
8081
8630
  if (j.outputFailure) return true;
8082
8631
  return j.score === 0 && j.taskId.includes("(baseline)");
@@ -8136,11 +8685,7 @@ function testResultKey(taskId, dimension, modelId) {
8136
8685
  return `${taskId}::${dimension}::${modelId}`;
8137
8686
  }
8138
8687
  function testOutputsKeyFor(j) {
8139
- const match = /\s*\((gold|baseline)\)\s*$/i.exec(j.taskId);
8140
- if (!match) return null;
8141
- const mode = match[1].toLowerCase();
8142
- const task = j.taskId.slice(0, match.index).trim();
8143
- return `${mode}--${task}--${j.modelId}`;
8688
+ return testOutputsEntryKey(j.taskId, j.modelId);
8144
8689
  }
8145
8690
  function JudgmentList({
8146
8691
  artifactCache,
@@ -8149,13 +8694,13 @@ function JudgmentList({
8149
8694
  onFocusChange,
8150
8695
  testResults
8151
8696
  }) {
8152
- const [query, setQuery] = useState15("");
8153
- const [selectedDimensions, setSelectedDimensions] = useState15(
8697
+ const [query, setQuery] = useState16("");
8698
+ const [selectedDimensions, setSelectedDimensions] = useState16(
8154
8699
  () => /* @__PURE__ */ new Set()
8155
8700
  );
8156
- const [scoreBand, setScoreBand] = useState15(null);
8157
- const [sortOrder, setSortOrder] = useState15("score-desc");
8158
- const testResultMap = useMemo9(() => {
8701
+ const [scoreBand, setScoreBand] = useState16(null);
8702
+ const [sortOrder, setSortOrder] = useState16("score-desc");
8703
+ const testResultMap = useMemo11(() => {
8159
8704
  const map = /* @__PURE__ */ new Map();
8160
8705
  if (!testResults) return map;
8161
8706
  for (const tr of testResults) {
@@ -8165,15 +8710,15 @@ function JudgmentList({
8165
8710
  }
8166
8711
  return map;
8167
8712
  }, [testResults]);
8168
- const pruned = useMemo9(() => pruneNoise(judgments), [judgments]);
8169
- const dimensionOptions = useMemo9(() => {
8713
+ const pruned = useMemo11(() => pruneNoise(judgments), [judgments]);
8714
+ const dimensionOptions = useMemo11(() => {
8170
8715
  const counts = /* @__PURE__ */ new Map();
8171
8716
  for (const j of pruned) {
8172
8717
  counts.set(j.dimension, (counts.get(j.dimension) ?? 0) + 1);
8173
8718
  }
8174
8719
  return [...counts.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, count]) => ({ key, label: dimensionLabel2(key), count }));
8175
8720
  }, [pruned]);
8176
- const filtered = useMemo9(() => {
8721
+ const filtered = useMemo11(() => {
8177
8722
  return pruned.filter((j) => {
8178
8723
  if (selectedDimensions.size > 0 && !selectedDimensions.has(j.dimension))
8179
8724
  return false;
@@ -8182,17 +8727,17 @@ function JudgmentList({
8182
8727
  return true;
8183
8728
  });
8184
8729
  }, [pruned, selectedDimensions, scoreBand, query]);
8185
- const grouped = useMemo9(
8730
+ const grouped = useMemo11(
8186
8731
  () => groupByArea(filtered, sortOrder),
8187
8732
  [filtered, sortOrder]
8188
8733
  );
8189
- const groupedWithStats = useMemo9(
8734
+ const groupedWithStats = useMemo11(
8190
8735
  () => grouped.map(
8191
8736
  ([area, list]) => [area, list, computeGroupStats(list)]
8192
8737
  ),
8193
8738
  [grouped]
8194
8739
  );
8195
- const focusedJudgment = useMemo9(() => {
8740
+ const focusedJudgment = useMemo11(() => {
8196
8741
  if (!focus) return null;
8197
8742
  return pruned.find((j) => judgmentSlug(j) === focus) ?? null;
8198
8743
  }, [pruned, focus]);
@@ -8203,7 +8748,7 @@ function JudgmentList({
8203
8748
  focusedJudgment.modelId
8204
8749
  )
8205
8750
  ) : void 0;
8206
- const handleDimensionToggle = useCallback21((key) => {
8751
+ const handleDimensionToggle = useCallback22((key) => {
8207
8752
  setSelectedDimensions((prev) => {
8208
8753
  const next = new Set(prev);
8209
8754
  if (next.has(key)) next.delete(key);
@@ -8211,15 +8756,26 @@ function JudgmentList({
8211
8756
  return next;
8212
8757
  });
8213
8758
  }, []);
8214
- const handleReset = useCallback21(() => {
8759
+ const handleReset = useCallback22(() => {
8215
8760
  setQuery("");
8216
8761
  setSelectedDimensions(/* @__PURE__ */ new Set());
8217
8762
  setScoreBand(null);
8218
8763
  }, []);
8219
- const [collapsedAreas, setCollapsedAreas] = useState15(
8764
+ const [promptReplay, setPromptReplay] = useState16(null);
8765
+ const openPromptReplay = useCallback22((j) => {
8766
+ const sep = j.taskId.indexOf(" - ");
8767
+ const rawTaskName = sep > 0 ? j.taskId.substring(sep + 3) : j.taskId;
8768
+ setPromptReplay({
8769
+ renderedPromptKey: testOutputsEntryKey(j.taskId, j.modelId),
8770
+ graderPromptKey: j.id ?? null,
8771
+ subtitle: `${rawTaskName} \xB7 ${j.modelId} \xB7 ${dimensionLabel2(j.dimension)}`
8772
+ });
8773
+ }, []);
8774
+ const closePromptReplay = useCallback22(() => setPromptReplay(null), []);
8775
+ const [collapsedAreas, setCollapsedAreas] = useState16(
8220
8776
  () => /* @__PURE__ */ new Set()
8221
8777
  );
8222
- const toggleArea = useCallback21((area) => {
8778
+ const toggleArea = useCallback22((area) => {
8223
8779
  setCollapsedAreas((prev) => {
8224
8780
  const next = new Set(prev);
8225
8781
  if (next.has(area)) next.delete(area);
@@ -8227,7 +8783,7 @@ function JudgmentList({
8227
8783
  return next;
8228
8784
  });
8229
8785
  }, []);
8230
- useEffect9(() => {
8786
+ useEffect11(() => {
8231
8787
  if (!focusedJudgment) return;
8232
8788
  const area = areaOf(focusedJudgment.taskId);
8233
8789
  setCollapsedAreas((prev) => {
@@ -8237,38 +8793,39 @@ function JudgmentList({
8237
8793
  return next;
8238
8794
  });
8239
8795
  }, [focusedJudgment]);
8240
- const [activeRowSlug, setActiveRowSlug] = useState15(null);
8241
- const flatSlugs = useMemo9(
8796
+ const [activeRowSlug, setActiveRowSlug] = useState16(null);
8797
+ const flatSlugs = useMemo11(
8242
8798
  () => grouped.flatMap(
8243
8799
  ([, areaJudgments]) => areaJudgments.map((j) => judgmentSlug(j))
8244
8800
  ),
8245
8801
  [grouped]
8246
8802
  );
8247
- const flatKeys = useMemo9(
8803
+ const flatKeys = useMemo11(
8248
8804
  () => grouped.flatMap(
8249
8805
  ([, areaJudgments]) => areaJudgments.map((j) => j.id ?? "")
8250
8806
  ),
8251
8807
  [grouped]
8252
8808
  );
8253
8809
  const effectiveActiveSlug = activeRowSlug && flatSlugs.includes(activeRowSlug) ? activeRowSlug : flatSlugs[0] ?? null;
8254
- useEffect9(() => {
8810
+ useEffect11(() => {
8255
8811
  if (focus) setActiveRowSlug(focus);
8256
8812
  }, [focus]);
8257
- useEffect9(() => {
8813
+ useEffect11(() => {
8258
8814
  if (activeRowSlug && !flatSlugs.includes(activeRowSlug)) {
8259
8815
  setActiveRowSlug(null);
8260
8816
  }
8261
8817
  }, [flatSlugs, activeRowSlug]);
8262
8818
  const { close: closeDrawer, open: openDrawer } = useJudgmentDrawer();
8263
8819
  const { runId: artifactRunId, manifest: artifactManifest } = useReportArtifactContext();
8264
- useEffect9(() => {
8820
+ useEffect11(() => {
8265
8821
  if (focus && focusedJudgment) {
8266
8822
  openDrawer({
8267
8823
  artifactCache,
8268
8824
  judgment: focusedJudgment,
8269
8825
  testResult: focusedTestResult,
8270
8826
  runId: artifactRunId,
8271
- manifest: artifactManifest
8827
+ manifest: artifactManifest,
8828
+ onShowPrompts: openPromptReplay
8272
8829
  });
8273
8830
  } else if (!focus) {
8274
8831
  closeDrawer();
@@ -8281,10 +8838,11 @@ function JudgmentList({
8281
8838
  openDrawer,
8282
8839
  closeDrawer,
8283
8840
  artifactRunId,
8284
- artifactManifest
8841
+ artifactManifest,
8842
+ openPromptReplay
8285
8843
  ]);
8286
- const prevFocusRef = useRef6(focus);
8287
- useEffect9(() => {
8844
+ const prevFocusRef = useRef7(focus);
8845
+ useEffect11(() => {
8288
8846
  const prev = prevFocusRef.current;
8289
8847
  prevFocusRef.current = focus;
8290
8848
  if (prev && !focus) {
@@ -8294,7 +8852,7 @@ function JudgmentList({
8294
8852
  });
8295
8853
  }
8296
8854
  }, [focus, activeRowSlug]);
8297
- const handleListKeyDown = useCallback21(
8855
+ const handleListKeyDown = useCallback22(
8298
8856
  (e) => {
8299
8857
  const key = e.key;
8300
8858
  const isNav = key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End" || key === "j" || key === "k";
@@ -8329,20 +8887,20 @@ function JudgmentList({
8329
8887
  if (judgments.length === 0) return null;
8330
8888
  if (pruned.length === 0) return null;
8331
8889
  const outputFailureCount = judgments.length - pruned.length;
8332
- return /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
8333
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, children: [
8334
- /* @__PURE__ */ jsx32(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
8335
- /* @__PURE__ */ jsx32(Text28, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
8336
- /* @__PURE__ */ jsx32(
8337
- Tooltip8,
8890
+ return /* @__PURE__ */ jsxs27(Stack23, { space: 3, children: [
8891
+ /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, children: [
8892
+ /* @__PURE__ */ jsx35(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
8893
+ /* @__PURE__ */ jsx35(Text31, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
8894
+ /* @__PURE__ */ jsx35(
8895
+ Tooltip9,
8338
8896
  {
8339
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx32(Text28, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
8897
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx35(Text31, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
8340
8898
  placement: "bottom",
8341
8899
  portal: true,
8342
- children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: /* @__PURE__ */ jsx32(HelpCircleIcon7, {}) })
8900
+ children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(HelpCircleIcon7, {}) })
8343
8901
  }
8344
8902
  ),
8345
- /* @__PURE__ */ jsxs25(
8903
+ /* @__PURE__ */ jsxs27(
8346
8904
  "span",
8347
8905
  {
8348
8906
  style: {
@@ -8361,10 +8919,10 @@ function JudgmentList({
8361
8919
  ]
8362
8920
  }
8363
8921
  ),
8364
- outputFailureCount > 0 && /* @__PURE__ */ jsx32(
8365
- Tooltip8,
8922
+ outputFailureCount > 0 && /* @__PURE__ */ jsx35(
8923
+ Tooltip9,
8366
8924
  {
8367
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs25(Text28, { size: 2, children: [
8925
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs27(Text31, { size: 2, children: [
8368
8926
  outputFailureCount,
8369
8927
  " judgment",
8370
8928
  outputFailureCount === 1 ? "" : "s",
@@ -8372,7 +8930,7 @@ function JudgmentList({
8372
8930
  ] }) }),
8373
8931
  placement: "bottom",
8374
8932
  portal: true,
8375
- children: /* @__PURE__ */ jsxs25(
8933
+ children: /* @__PURE__ */ jsxs27(
8376
8934
  "span",
8377
8935
  {
8378
8936
  style: {
@@ -8394,7 +8952,7 @@ function JudgmentList({
8394
8952
  }
8395
8953
  )
8396
8954
  ] }),
8397
- /* @__PURE__ */ jsx32(
8955
+ /* @__PURE__ */ jsx35(
8398
8956
  JudgmentListToolbar,
8399
8957
  {
8400
8958
  dimensions: dimensionOptions,
@@ -8411,11 +8969,21 @@ function JudgmentList({
8411
8969
  totalCount: pruned.length
8412
8970
  }
8413
8971
  ),
8414
- filtered.length === 0 ? /* @__PURE__ */ jsx32(Box18, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8415
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 2, children: "No judgments match these filters." }),
8416
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
8417
- ] }) }) : /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8418
- /* @__PURE__ */ jsx32(
8972
+ /* @__PURE__ */ jsx35(
8973
+ PromptReplayDrawer,
8974
+ {
8975
+ graderPromptKey: promptReplay?.graderPromptKey ?? null,
8976
+ onClose: closePromptReplay,
8977
+ open: promptReplay !== null,
8978
+ renderedPromptKey: promptReplay?.renderedPromptKey ?? null,
8979
+ subtitle: promptReplay?.subtitle ?? ""
8980
+ }
8981
+ ),
8982
+ filtered.length === 0 ? /* @__PURE__ */ jsx35(Box21, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
8983
+ /* @__PURE__ */ jsx35(Text31, { muted: true, size: 2, children: "No judgments match these filters." }),
8984
+ /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
8985
+ ] }) }) : /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
8986
+ /* @__PURE__ */ jsx35(
8419
8987
  AreaJumpRail,
8420
8988
  {
8421
8989
  areas: groupedWithStats.map(([area, list]) => ({
@@ -8424,20 +8992,20 @@ function JudgmentList({
8424
8992
  }))
8425
8993
  }
8426
8994
  ),
8427
- /* @__PURE__ */ jsx32(Box18, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
8995
+ /* @__PURE__ */ jsx35(Box21, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
8428
8996
  ([area, areaJudgments, stats], groupIndex) => {
8429
8997
  const anchorId = areaAnchorId(area);
8430
8998
  const collapsed = collapsedAreas.has(area);
8431
8999
  const groupBodyId = `${anchorId}-body`;
8432
- return /* @__PURE__ */ jsx32(
8433
- Box18,
9000
+ return /* @__PURE__ */ jsx35(
9001
+ Box21,
8434
9002
  {
8435
9003
  id: anchorId,
8436
9004
  padding: 3,
8437
9005
  style: groupIndex > 0 ? dividerStyle : void 0,
8438
- children: /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8439
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
8440
- /* @__PURE__ */ jsxs25(
9006
+ children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
9007
+ /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
9008
+ /* @__PURE__ */ jsxs27(
8441
9009
  "button",
8442
9010
  {
8443
9011
  "aria-controls": groupBodyId,
@@ -8451,7 +9019,7 @@ function JudgmentList({
8451
9019
  },
8452
9020
  type: "button",
8453
9021
  children: [
8454
- /* @__PURE__ */ jsx32(
9022
+ /* @__PURE__ */ jsx35(
8455
9023
  "span",
8456
9024
  {
8457
9025
  "aria-hidden": true,
@@ -8461,13 +9029,13 @@ function JudgmentList({
8461
9029
  display: "inline-flex",
8462
9030
  fontSize: 14
8463
9031
  },
8464
- children: collapsed ? /* @__PURE__ */ jsx32(ChevronRightIcon, {}) : /* @__PURE__ */ jsx32(ChevronDownIcon, {})
9032
+ children: collapsed ? /* @__PURE__ */ jsx35(ChevronRightIcon, {}) : /* @__PURE__ */ jsx35(ChevronDownIcon, {})
8465
9033
  }
8466
9034
  ),
8467
- /* @__PURE__ */ jsxs25(Text28, { size: 2, weight: "semibold", children: [
9035
+ /* @__PURE__ */ jsxs27(Text31, { size: 2, weight: "semibold", children: [
8468
9036
  area,
8469
9037
  " ",
8470
- /* @__PURE__ */ jsxs25(
9038
+ /* @__PURE__ */ jsxs27(
8471
9039
  "span",
8472
9040
  {
8473
9041
  style: {
@@ -8485,10 +9053,10 @@ function JudgmentList({
8485
9053
  ]
8486
9054
  }
8487
9055
  ),
8488
- /* @__PURE__ */ jsx32(
8489
- Tooltip8,
9056
+ /* @__PURE__ */ jsx35(
9057
+ Tooltip9,
8490
9058
  {
8491
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, children: /* @__PURE__ */ jsxs25(Text28, { size: 1, children: [
9059
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsxs27(Text31, { size: 1, children: [
8492
9060
  "Average score across the ",
8493
9061
  areaJudgments.length,
8494
9062
  " ",
@@ -8498,7 +9066,7 @@ function JudgmentList({
8498
9066
  ] }) }),
8499
9067
  placement: "bottom",
8500
9068
  portal: true,
8501
- children: /* @__PURE__ */ jsxs25(
9069
+ children: /* @__PURE__ */ jsxs27(
8502
9070
  "span",
8503
9071
  {
8504
9072
  style: {
@@ -8518,12 +9086,12 @@ function JudgmentList({
8518
9086
  )
8519
9087
  }
8520
9088
  ),
8521
- /* @__PURE__ */ jsx32(DistributionBar, { bands: stats.bands }),
8522
- stats.breakdown.length > 0 && /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
9089
+ /* @__PURE__ */ jsx35(DistributionBar, { bands: stats.bands }),
9090
+ stats.breakdown.length > 0 && /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
8523
9091
  ] }),
8524
- !collapsed && /* @__PURE__ */ jsx32(Stack21, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
9092
+ !collapsed && /* @__PURE__ */ jsx35(Stack23, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
8525
9093
  const slug = judgmentSlug(j);
8526
- return /* @__PURE__ */ jsx32(
9094
+ return /* @__PURE__ */ jsx35(
8527
9095
  JudgmentCard,
8528
9096
  {
8529
9097
  allKeys: flatKeys,
@@ -8553,7 +9121,7 @@ function JudgmentCard({
8553
9121
  slug,
8554
9122
  tabbable
8555
9123
  }) {
8556
- const cardRef = useRef6(null);
9124
+ const cardRef = useRef7(null);
8557
9125
  const judgmentId = judgment.id ?? "";
8558
9126
  const row = useGraderJudgmentArtifact(judgmentId, allKeys);
8559
9127
  const testOutputsPrefetch = useArtifactPrefetch("testOutputs");
@@ -8563,7 +9131,7 @@ function JudgmentCard({
8563
9131
  const sep = judgment.taskId.indexOf(" - ");
8564
9132
  const rawTaskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
8565
9133
  const { name: taskName, variant } = splitVariant(rawTaskName);
8566
- useEffect9(() => {
9134
+ useEffect11(() => {
8567
9135
  if (focused) {
8568
9136
  const timer = setTimeout(() => {
8569
9137
  cardRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
@@ -8571,10 +9139,10 @@ function JudgmentCard({
8571
9139
  return () => clearTimeout(timer);
8572
9140
  }
8573
9141
  }, []);
8574
- const handleClick = useCallback21(() => {
9142
+ const handleClick = useCallback22(() => {
8575
9143
  onFocusChange?.(focused ? null : slug);
8576
9144
  }, [focused, slug, onFocusChange]);
8577
- const handleKeyDown = useCallback21(
9145
+ const handleKeyDown = useCallback22(
8578
9146
  (e) => {
8579
9147
  if (e.key === "Enter" || e.key === " ") {
8580
9148
  e.preventDefault();
@@ -8583,20 +9151,20 @@ function JudgmentCard({
8583
9151
  },
8584
9152
  [handleClick]
8585
9153
  );
8586
- const onHoverTestOutputs = useMemo9(
9154
+ const onHoverTestOutputs = useMemo11(
8587
9155
  () => testOutputsKey ? testOutputsPrefetch.onHover(testOutputsKey) : null,
8588
9156
  [testOutputsPrefetch, testOutputsKey]
8589
9157
  );
8590
- const handleMouseEnter = useCallback21(() => {
9158
+ const handleMouseEnter = useCallback22(() => {
8591
9159
  row.handlers.onMouseEnter();
8592
9160
  onHoverTestOutputs?.();
8593
9161
  }, [row.handlers, onHoverTestOutputs]);
8594
- const handleFocusPrefetch = useCallback21(() => {
9162
+ const handleFocusPrefetch = useCallback22(() => {
8595
9163
  row.handlers.onFocus();
8596
9164
  onHoverTestOutputs?.();
8597
9165
  }, [row.handlers, onHoverTestOutputs]);
8598
- return /* @__PURE__ */ jsx32(
8599
- Box18,
9166
+ return /* @__PURE__ */ jsx35(
9167
+ Box21,
8600
9168
  {
8601
9169
  "aria-expanded": focused,
8602
9170
  "aria-label": `${score} ${dimLabel}: ${taskName}`,
@@ -8619,8 +9187,8 @@ function JudgmentCard({
8619
9187
  } : {}
8620
9188
  },
8621
9189
  tabIndex: tabbable ? 0 : -1,
8622
- children: /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
8623
- /* @__PURE__ */ jsx32(
9190
+ children: /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
9191
+ /* @__PURE__ */ jsx35(
8624
9192
  "span",
8625
9193
  {
8626
9194
  style: {
@@ -8635,7 +9203,7 @@ function JudgmentCard({
8635
9203
  children: score
8636
9204
  }
8637
9205
  ),
8638
- /* @__PURE__ */ jsx32(
9206
+ /* @__PURE__ */ jsx35(
8639
9207
  "span",
8640
9208
  {
8641
9209
  style: {
@@ -8648,15 +9216,15 @@ function JudgmentCard({
8648
9216
  children: dimLabel
8649
9217
  }
8650
9218
  ),
8651
- /* @__PURE__ */ jsx32(Text28, { size: 1, weight: "medium", children: taskName }),
8652
- /* @__PURE__ */ jsx32(VariantBadge, { variant }),
8653
- /* @__PURE__ */ jsx32(
8654
- Tooltip8,
9219
+ /* @__PURE__ */ jsx35(Text31, { size: 1, weight: "medium", children: taskName }),
9220
+ /* @__PURE__ */ jsx35(VariantBadge, { variant }),
9221
+ /* @__PURE__ */ jsx35(
9222
+ Tooltip9,
8655
9223
  {
8656
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, children: /* @__PURE__ */ jsx32(Text28, { size: 1, children: judgment.modelId }) }),
9224
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Text31, { size: 1, children: judgment.modelId }) }),
8657
9225
  placement: "bottom",
8658
9226
  portal: true,
8659
- children: /* @__PURE__ */ jsx32(
9227
+ children: /* @__PURE__ */ jsx35(
8660
9228
  "span",
8661
9229
  {
8662
9230
  style: {
@@ -8668,12 +9236,12 @@ function JudgmentCard({
8668
9236
  fontSize: 11,
8669
9237
  padding: "1px 6px"
8670
9238
  },
8671
- children: shortModelId(judgment.modelId)
9239
+ children: shortModelId2(judgment.modelId)
8672
9240
  }
8673
9241
  )
8674
9242
  }
8675
9243
  ),
8676
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx32(ChevronRightIcon, {}) })
9244
+ /* @__PURE__ */ jsx35(Flex20, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(ChevronRightIcon, {}) }) })
8677
9245
  ] })
8678
9246
  }
8679
9247
  );
@@ -8703,13 +9271,13 @@ function DistributionBar({ bands }) {
8703
9271
  label: `${bands.borderline} borderline (50\u201369)`
8704
9272
  });
8705
9273
  }
8706
- return /* @__PURE__ */ jsx32(
8707
- Tooltip8,
9274
+ return /* @__PURE__ */ jsx35(
9275
+ Tooltip9,
8708
9276
  {
8709
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, children: /* @__PURE__ */ jsx32(Stack21, { space: 1, children: parts.map((p) => /* @__PURE__ */ jsx32(Text28, { size: 1, children: p.label }, p.label)) }) }),
9277
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Stack23, { space: 1, children: parts.map((p) => /* @__PURE__ */ jsx35(Text31, { size: 1, children: p.label }, p.label)) }) }),
8710
9278
  placement: "bottom",
8711
9279
  portal: true,
8712
- children: /* @__PURE__ */ jsx32(
9280
+ children: /* @__PURE__ */ jsx35(
8713
9281
  "div",
8714
9282
  {
8715
9283
  "aria-label": parts.map((p) => p.label).join(", "),
@@ -8723,7 +9291,7 @@ function DistributionBar({ bands }) {
8723
9291
  overflow: "hidden",
8724
9292
  width: 72
8725
9293
  },
8726
- children: parts.map((p) => /* @__PURE__ */ jsx32(
9294
+ children: parts.map((p) => /* @__PURE__ */ jsx35(
8727
9295
  "div",
8728
9296
  {
8729
9297
  style: {
@@ -8739,14 +9307,14 @@ function DistributionBar({ bands }) {
8739
9307
  );
8740
9308
  }
8741
9309
  function AreaJumpRail({ areas }) {
8742
- const handleJump = useCallback21((area) => {
9310
+ const handleJump = useCallback22((area) => {
8743
9311
  const el = document.getElementById(areaAnchorId(area));
8744
9312
  el?.scrollIntoView({ behavior: "smooth", block: "start" });
8745
9313
  }, []);
8746
9314
  if (areas.length <= 1) return null;
8747
- return /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
8748
- /* @__PURE__ */ jsx32(
8749
- Text28,
9315
+ return /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
9316
+ /* @__PURE__ */ jsx35(
9317
+ Text31,
8750
9318
  {
8751
9319
  muted: true,
8752
9320
  size: 1,
@@ -8759,8 +9327,8 @@ function AreaJumpRail({ areas }) {
8759
9327
  children: "Jump to"
8760
9328
  }
8761
9329
  ),
8762
- areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs25(React2.Fragment, { children: [
8763
- i > 0 && /* @__PURE__ */ jsx32(
9330
+ areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs27(React2.Fragment, { children: [
9331
+ i > 0 && /* @__PURE__ */ jsx35(
8764
9332
  "span",
8765
9333
  {
8766
9334
  "aria-hidden": true,
@@ -8771,7 +9339,7 @@ function AreaJumpRail({ areas }) {
8771
9339
  children: "\xB7"
8772
9340
  }
8773
9341
  ),
8774
- /* @__PURE__ */ jsxs25(
9342
+ /* @__PURE__ */ jsxs27(
8775
9343
  "button",
8776
9344
  {
8777
9345
  "aria-label": `Jump to ${area}, ${count} judgment${count === 1 ? "" : "s"}`,
@@ -8799,8 +9367,8 @@ function AreaJumpRail({ areas }) {
8799
9367
  },
8800
9368
  type: "button",
8801
9369
  children: [
8802
- /* @__PURE__ */ jsx32("span", { "aria-hidden": true, children: area }),
8803
- /* @__PURE__ */ jsx32(
9370
+ /* @__PURE__ */ jsx35("span", { "aria-hidden": true, children: area }),
9371
+ /* @__PURE__ */ jsx35(
8804
9372
  "span",
8805
9373
  {
8806
9374
  "aria-hidden": true,
@@ -8820,30 +9388,30 @@ function AreaJumpRail({ areas }) {
8820
9388
  }
8821
9389
 
8822
9390
  // src/components/report-detail/ProvenanceCard.tsx
8823
- import { Card as Card14, Flex as Flex19, Grid as Grid3, Stack as Stack22, Text as Text29 } from "@sanity/ui";
8824
- import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
9391
+ import { Card as Card15, Flex as Flex21, Grid as Grid4, Stack as Stack24, Text as Text32 } from "@sanity/ui";
9392
+ import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
8825
9393
  function ProvenanceCard({ provenance }) {
8826
- return /* @__PURE__ */ jsx33(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs26(Stack22, { space: 4, children: [
8827
- /* @__PURE__ */ jsx33(Text29, { size: 3, weight: "semibold", children: "Provenance" }),
8828
- /* @__PURE__ */ jsxs26(Grid3, { columns: [1, 2, 3], gap: 4, children: [
8829
- /* @__PURE__ */ jsx33(Field, { label: "Mode", value: provenance.mode }),
8830
- /* @__PURE__ */ jsx33(Field, { label: "Source", value: provenance.source.name }),
8831
- /* @__PURE__ */ jsx33(
9394
+ return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
9395
+ /* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Provenance" }),
9396
+ /* @__PURE__ */ jsxs28(Grid4, { columns: [1, 2, 3], gap: 4, children: [
9397
+ /* @__PURE__ */ jsx36(Field, { label: "Mode", value: provenance.mode }),
9398
+ /* @__PURE__ */ jsx36(Field, { label: "Source", value: provenance.source.name }),
9399
+ /* @__PURE__ */ jsx36(
8832
9400
  Field,
8833
9401
  {
8834
9402
  label: "Trigger",
8835
9403
  value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
8836
9404
  }
8837
9405
  ),
8838
- /* @__PURE__ */ jsx33(
9406
+ /* @__PURE__ */ jsx36(
8839
9407
  Field,
8840
9408
  {
8841
9409
  label: "Models",
8842
9410
  value: provenance.models.map((m) => m.label).join(", ")
8843
9411
  }
8844
9412
  ),
8845
- /* @__PURE__ */ jsx33(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
8846
- provenance.contextHash && /* @__PURE__ */ jsx33(
9413
+ /* @__PURE__ */ jsx36(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
9414
+ provenance.contextHash && /* @__PURE__ */ jsx36(
8847
9415
  Field,
8848
9416
  {
8849
9417
  label: "Context Hash",
@@ -8852,8 +9420,8 @@ function ProvenanceCard({ provenance }) {
8852
9420
  }
8853
9421
  )
8854
9422
  ] }),
8855
- provenance.git && /* @__PURE__ */ jsx33(GitInfo, { git: provenance.git }),
8856
- /* @__PURE__ */ jsx33(PromptfooLinks, { provenance })
9423
+ provenance.git && /* @__PURE__ */ jsx36(GitInfo, { git: provenance.git }),
9424
+ /* @__PURE__ */ jsx36(PromptfooLinks, { provenance })
8857
9425
  ] }) });
8858
9426
  }
8859
9427
  function Field({
@@ -8861,9 +9429,9 @@ function Field({
8861
9429
  mono,
8862
9430
  value
8863
9431
  }) {
8864
- return /* @__PURE__ */ jsxs26(Stack22, { space: 1, children: [
8865
- /* @__PURE__ */ jsx33(
8866
- Text29,
9432
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 1, children: [
9433
+ /* @__PURE__ */ jsx36(
9434
+ Text32,
8867
9435
  {
8868
9436
  muted: true,
8869
9437
  size: 1,
@@ -8872,7 +9440,7 @@ function Field({
8872
9440
  children: label
8873
9441
  }
8874
9442
  ),
8875
- /* @__PURE__ */ jsx33(Text29, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
9443
+ /* @__PURE__ */ jsx36(Text32, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
8876
9444
  ] });
8877
9445
  }
8878
9446
  function GitInfo({ git }) {
@@ -8880,15 +9448,15 @@ function GitInfo({ git }) {
8880
9448
  const branchUrl = `${repoUrl}/tree/${git.branch}`;
8881
9449
  const commitUrl = `${repoUrl}/commit/${git.sha}`;
8882
9450
  const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
8883
- return /* @__PURE__ */ jsx33(Card14, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 3, wrap: "wrap", children: [
8884
- /* @__PURE__ */ jsx33(Text29, { muted: true, size: 2, weight: "semibold", children: "Git" }),
8885
- /* @__PURE__ */ jsxs26(Text29, { size: 2, children: [
8886
- /* @__PURE__ */ jsx33("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
9451
+ return /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
9452
+ /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, weight: "semibold", children: "Git" }),
9453
+ /* @__PURE__ */ jsxs28(Text32, { size: 2, children: [
9454
+ /* @__PURE__ */ jsx36("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
8887
9455
  " / ",
8888
- /* @__PURE__ */ jsx33("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
9456
+ /* @__PURE__ */ jsx36("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
8889
9457
  ] }),
8890
- /* @__PURE__ */ jsx33(Text29, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx33("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
8891
- prUrl && /* @__PURE__ */ jsx33(Text29, { size: 2, children: /* @__PURE__ */ jsxs26("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
9458
+ /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx36("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
9459
+ prUrl && /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
8892
9460
  "PR #",
8893
9461
  git.prNumber,
8894
9462
  " \u2192"
@@ -8899,14 +9467,14 @@ function PromptfooLinks({
8899
9467
  provenance
8900
9468
  }) {
8901
9469
  if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
8902
- return /* @__PURE__ */ jsx33(Flex19, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx33(Text29, { size: 2, children: /* @__PURE__ */ jsxs26("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
9470
+ return /* @__PURE__ */ jsx36(Flex21, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
8903
9471
  "View in Promptfoo (",
8904
9472
  entry.mode,
8905
9473
  ") \u2192"
8906
9474
  ] }) }, entry.mode)) });
8907
9475
  }
8908
9476
  if (provenance.promptfooUrl) {
8909
- return /* @__PURE__ */ jsx33(Text29, { size: 2, children: /* @__PURE__ */ jsx33(
9477
+ return /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsx36(
8910
9478
  "a",
8911
9479
  {
8912
9480
  href: provenance.promptfooUrl,
@@ -8916,40 +9484,40 @@ function PromptfooLinks({
8916
9484
  }
8917
9485
  ) });
8918
9486
  }
8919
- return /* @__PURE__ */ jsx33(PromptfooUnavailable, { reason: "not-shared" });
9487
+ return /* @__PURE__ */ jsx36(PromptfooUnavailable, { reason: "not-shared" });
8920
9488
  }
8921
9489
  var UNAVAILABLE_TOOLTIPS = {
8922
9490
  "not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
8923
9491
  };
8924
9492
  function PromptfooUnavailable({ reason }) {
8925
- return /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8926
- /* @__PURE__ */ jsx33(Text29, { muted: true, size: 2, children: "Promptfoo report not available" }),
8927
- /* @__PURE__ */ jsx33(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
9493
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
9494
+ /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Promptfoo report not available" }),
9495
+ /* @__PURE__ */ jsx36(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
8928
9496
  ] });
8929
9497
  }
8930
9498
 
8931
9499
  // src/components/report-detail/report-actions/ActionButton.tsx
8932
- import { Button as Button3, useToast as useToast2 } from "@sanity/ui";
8933
- import { jsx as jsx34 } from "react/jsx-runtime";
9500
+ import { Button as Button4, useToast as useToast2 } from "@sanity/ui";
9501
+ import { jsx as jsx37 } from "react/jsx-runtime";
8934
9502
 
8935
9503
  // src/components/report-detail/report-actions/JudgmentActions.tsx
8936
- import { LinkIcon as LinkIcon3 } from "@sanity/icons";
8937
- import { MenuItem, useToast as useToast3 } from "@sanity/ui";
8938
- import { useCallback as useCallback22 } from "react";
9504
+ import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
9505
+ import { MenuDivider, MenuItem, useToast as useToast3 } from "@sanity/ui";
9506
+ import { useCallback as useCallback23 } from "react";
8939
9507
 
8940
9508
  // src/components/report-detail/report-actions/SplitActionButton.tsx
8941
9509
  import { ChevronDownIcon as ChevronDownIcon2 } from "@sanity/icons";
8942
- import { Button as Button4, Flex as Flex20, Menu, MenuButton } from "@sanity/ui";
8943
- import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
9510
+ import { Button as Button5, Flex as Flex22, Menu, MenuButton } from "@sanity/ui";
9511
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
8944
9512
  function SplitActionButton({
8945
9513
  menu,
8946
9514
  menuId,
8947
9515
  placement = "bottom-end",
8948
9516
  primary
8949
9517
  }) {
8950
- return /* @__PURE__ */ jsxs27(Flex20, { children: [
8951
- /* @__PURE__ */ jsx35(
8952
- Button4,
9518
+ return /* @__PURE__ */ jsxs29(Flex22, { children: [
9519
+ /* @__PURE__ */ jsx38(
9520
+ Button5,
8953
9521
  {
8954
9522
  fontSize: primary.fontSize,
8955
9523
  icon: primary.icon,
@@ -8965,11 +9533,11 @@ function SplitActionButton({
8965
9533
  text: primary.text
8966
9534
  }
8967
9535
  ),
8968
- /* @__PURE__ */ jsx35(
9536
+ /* @__PURE__ */ jsx38(
8969
9537
  MenuButton,
8970
9538
  {
8971
- button: /* @__PURE__ */ jsx35(
8972
- Button4,
9539
+ button: /* @__PURE__ */ jsx38(
9540
+ Button5,
8973
9541
  {
8974
9542
  icon: ChevronDownIcon2,
8975
9543
  mode: "ghost",
@@ -8982,7 +9550,7 @@ function SplitActionButton({
8982
9550
  }
8983
9551
  ),
8984
9552
  id: menuId,
8985
- menu: /* @__PURE__ */ jsx35(Menu, { children: menu }),
9553
+ menu: /* @__PURE__ */ jsx38(Menu, { children: menu }),
8986
9554
  popover: { placement, portal: true }
8987
9555
  }
8988
9556
  )
@@ -8990,10 +9558,10 @@ function SplitActionButton({
8990
9558
  }
8991
9559
 
8992
9560
  // src/components/report-detail/report-actions/JudgmentActions.tsx
8993
- import { jsx as jsx36 } from "react/jsx-runtime";
8994
- function JudgmentActions() {
9561
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
9562
+ function JudgmentActions({ onShowPrompts } = {}) {
8995
9563
  const toast = useToast3();
8996
- const handleCopyLink = useCallback22(() => {
9564
+ const handleCopyLink = useCallback23(() => {
8997
9565
  navigator.clipboard.writeText(window.location.href).then(
8998
9566
  () => {
8999
9567
  toast.push({
@@ -9011,10 +9579,23 @@ function JudgmentActions() {
9011
9579
  }
9012
9580
  );
9013
9581
  }, [toast]);
9014
- return /* @__PURE__ */ jsx36(
9582
+ return /* @__PURE__ */ jsx39(
9015
9583
  SplitActionButton,
9016
9584
  {
9017
- menu: /* @__PURE__ */ jsx36(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" }),
9585
+ menu: /* @__PURE__ */ jsxs30(Fragment10, { children: [
9586
+ onShowPrompts && /* @__PURE__ */ jsxs30(Fragment10, { children: [
9587
+ /* @__PURE__ */ jsx39(
9588
+ MenuItem,
9589
+ {
9590
+ icon: DocumentTextIcon,
9591
+ onClick: onShowPrompts,
9592
+ text: "Show prompts"
9593
+ }
9594
+ ),
9595
+ /* @__PURE__ */ jsx39(MenuDivider, {})
9596
+ ] }),
9597
+ /* @__PURE__ */ jsx39(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
9598
+ ] }),
9018
9599
  menuId: "judgment-actions-menu",
9019
9600
  primary: {
9020
9601
  fontSize: 1,
@@ -9028,22 +9609,22 @@ function JudgmentActions() {
9028
9609
  }
9029
9610
 
9030
9611
  // src/components/report-detail/report-actions/ReportActions.tsx
9031
- import { CopyIcon as CopyIcon2 } from "@sanity/icons";
9032
- import { MenuDivider, useToast as useToast9 } from "@sanity/ui";
9033
- import { useCallback as useCallback28, useState as useState19 } from "react";
9612
+ import { CopyIcon as CopyIcon3 } from "@sanity/icons";
9613
+ import { MenuDivider as MenuDivider2, useToast as useToast9 } from "@sanity/ui";
9614
+ import { useCallback as useCallback29, useState as useState20 } from "react";
9034
9615
  import { useClient as useClient9 } from "sanity";
9035
9616
 
9036
9617
  // src/components/report-detail/report-actions/CopyReportAction.tsx
9037
9618
  import { ClipboardIcon } from "@sanity/icons";
9038
9619
  import { MenuItem as MenuItem2, useToast as useToast4 } from "@sanity/ui";
9039
- import { useCallback as useCallback23, useState as useState16 } from "react";
9620
+ import { useCallback as useCallback24, useState as useState17 } from "react";
9040
9621
  import { useClient as useClient6 } from "sanity";
9041
- import { jsx as jsx37 } from "react/jsx-runtime";
9622
+ import { jsx as jsx40 } from "react/jsx-runtime";
9042
9623
  function CopyReportAction({ documentId }) {
9043
9624
  const client = useClient6({ apiVersion: API_VERSION });
9044
9625
  const toast = useToast4();
9045
- const [copying, setCopying] = useState16(false);
9046
- const handleClick = useCallback23(async () => {
9626
+ const [copying, setCopying] = useState17(false);
9627
+ const handleClick = useCallback24(async () => {
9047
9628
  setCopying(true);
9048
9629
  try {
9049
9630
  const doc = await client.fetch(
@@ -9075,7 +9656,7 @@ function CopyReportAction({ documentId }) {
9075
9656
  setCopying(false);
9076
9657
  }
9077
9658
  }, [client, documentId, toast]);
9078
- return /* @__PURE__ */ jsx37(
9659
+ return /* @__PURE__ */ jsx40(
9079
9660
  MenuItem2,
9080
9661
  {
9081
9662
  disabled: copying,
@@ -9087,13 +9668,13 @@ function CopyReportAction({ documentId }) {
9087
9668
  }
9088
9669
 
9089
9670
  // src/components/report-detail/report-actions/CopyReportIdAction.tsx
9090
- import { CopyIcon } from "@sanity/icons";
9671
+ import { CopyIcon as CopyIcon2 } from "@sanity/icons";
9091
9672
  import { MenuItem as MenuItem3, useToast as useToast5 } from "@sanity/ui";
9092
- import { useCallback as useCallback24 } from "react";
9093
- import { jsx as jsx38 } from "react/jsx-runtime";
9673
+ import { useCallback as useCallback25 } from "react";
9674
+ import { jsx as jsx41 } from "react/jsx-runtime";
9094
9675
  function CopyReportIdAction({ reportId }) {
9095
9676
  const toast = useToast5();
9096
- const handleClick = useCallback24(() => {
9677
+ const handleClick = useCallback25(() => {
9097
9678
  navigator.clipboard.writeText(reportId).then(
9098
9679
  () => {
9099
9680
  toast.push({
@@ -9111,19 +9692,19 @@ function CopyReportIdAction({ reportId }) {
9111
9692
  }
9112
9693
  );
9113
9694
  }, [reportId, toast]);
9114
- return /* @__PURE__ */ jsx38(MenuItem3, { icon: CopyIcon, onClick: handleClick, text: "Copy report ID" });
9695
+ return /* @__PURE__ */ jsx41(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
9115
9696
  }
9116
9697
 
9117
9698
  // src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
9118
9699
  import { SearchIcon as SearchIcon6 } from "@sanity/icons";
9119
9700
  import { MenuItem as MenuItem4, useToast as useToast6 } from "@sanity/ui";
9120
- import { useCallback as useCallback25 } from "react";
9121
- import { jsx as jsx39 } from "react/jsx-runtime";
9701
+ import { useCallback as useCallback26 } from "react";
9702
+ import { jsx as jsx42 } from "react/jsx-runtime";
9122
9703
  function CopyVisionQueryAction({
9123
9704
  reportId
9124
9705
  }) {
9125
9706
  const toast = useToast6();
9126
- const handleClick = useCallback25(() => {
9707
+ const handleClick = useCallback26(() => {
9127
9708
  const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
9128
9709
  navigator.clipboard.writeText(query).then(
9129
9710
  () => {
@@ -9143,7 +9724,7 @@ function CopyVisionQueryAction({
9143
9724
  }
9144
9725
  );
9145
9726
  }, [reportId, toast]);
9146
- return /* @__PURE__ */ jsx39(
9727
+ return /* @__PURE__ */ jsx42(
9147
9728
  MenuItem4,
9148
9729
  {
9149
9730
  icon: SearchIcon6,
@@ -9154,25 +9735,25 @@ function CopyVisionQueryAction({
9154
9735
  }
9155
9736
 
9156
9737
  // src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
9157
- import { Box as Box19, Button as Button5, Card as Card15, Dialog, Flex as Flex21, Stack as Stack23, Text as Text30 } from "@sanity/ui";
9158
- import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
9738
+ import { Box as Box22, Button as Button6, Card as Card16, Dialog as Dialog2, Flex as Flex23, Stack as Stack25, Text as Text33 } from "@sanity/ui";
9739
+ import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
9159
9740
  function DeleteConfirmDialog({
9160
9741
  isDeleting,
9161
9742
  onClose,
9162
9743
  onConfirm,
9163
9744
  reportId
9164
9745
  }) {
9165
- return /* @__PURE__ */ jsx40(
9166
- Dialog,
9746
+ return /* @__PURE__ */ jsx43(
9747
+ Dialog2,
9167
9748
  {
9168
9749
  header: "Delete Report",
9169
9750
  id: "delete-report-dialog",
9170
9751
  onClose,
9171
9752
  width: 1,
9172
- children: /* @__PURE__ */ jsx40(Box19, { padding: 4, children: /* @__PURE__ */ jsxs28(Stack23, { space: 4, children: [
9173
- /* @__PURE__ */ jsx40(Text30, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
9174
- /* @__PURE__ */ jsx40(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx40(
9175
- Text30,
9753
+ children: /* @__PURE__ */ jsx43(Box22, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack25, { space: 4, children: [
9754
+ /* @__PURE__ */ jsx43(Text33, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
9755
+ /* @__PURE__ */ jsx43(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx43(
9756
+ Text33,
9176
9757
  {
9177
9758
  muted: true,
9178
9759
  size: 1,
@@ -9180,9 +9761,9 @@ function DeleteConfirmDialog({
9180
9761
  children: reportId
9181
9762
  }
9182
9763
  ) }),
9183
- /* @__PURE__ */ jsxs28(Flex21, { gap: 2, justify: "flex-end", children: [
9184
- /* @__PURE__ */ jsx40(
9185
- Button5,
9764
+ /* @__PURE__ */ jsxs31(Flex23, { gap: 2, justify: "flex-end", children: [
9765
+ /* @__PURE__ */ jsx43(
9766
+ Button6,
9186
9767
  {
9187
9768
  disabled: isDeleting,
9188
9769
  mode: "ghost",
@@ -9190,8 +9771,8 @@ function DeleteConfirmDialog({
9190
9771
  text: "Cancel"
9191
9772
  }
9192
9773
  ),
9193
- /* @__PURE__ */ jsx40(
9194
- Button5,
9774
+ /* @__PURE__ */ jsx43(
9775
+ Button6,
9195
9776
  {
9196
9777
  disabled: isDeleting,
9197
9778
  onClick: onConfirm,
@@ -9208,11 +9789,11 @@ function DeleteConfirmDialog({
9208
9789
  // src/components/report-detail/report-actions/DeleteReportAction.tsx
9209
9790
  import { TrashIcon } from "@sanity/icons";
9210
9791
  import { MenuItem as MenuItem5 } from "@sanity/ui";
9211
- import { jsx as jsx41 } from "react/jsx-runtime";
9792
+ import { jsx as jsx44 } from "react/jsx-runtime";
9212
9793
  function DeleteReportAction({
9213
9794
  onRequestDelete
9214
9795
  }) {
9215
- return /* @__PURE__ */ jsx41(
9796
+ return /* @__PURE__ */ jsx44(
9216
9797
  MenuItem5,
9217
9798
  {
9218
9799
  icon: TrashIcon,
@@ -9226,17 +9807,17 @@ function DeleteReportAction({
9226
9807
  // src/components/report-detail/report-actions/DownloadReportAction.tsx
9227
9808
  import { DownloadIcon } from "@sanity/icons";
9228
9809
  import { MenuItem as MenuItem6, useToast as useToast7 } from "@sanity/ui";
9229
- import { useCallback as useCallback26, useState as useState17 } from "react";
9810
+ import { useCallback as useCallback27, useState as useState18 } from "react";
9230
9811
  import { useClient as useClient7 } from "sanity";
9231
- import { jsx as jsx42 } from "react/jsx-runtime";
9812
+ import { jsx as jsx45 } from "react/jsx-runtime";
9232
9813
  function DownloadReportAction({
9233
9814
  documentId,
9234
9815
  reportId
9235
9816
  }) {
9236
9817
  const client = useClient7({ apiVersion: API_VERSION });
9237
9818
  const toast = useToast7();
9238
- const [downloading, setDownloading] = useState17(false);
9239
- const handleClick = useCallback26(async () => {
9819
+ const [downloading, setDownloading] = useState18(false);
9820
+ const handleClick = useCallback27(async () => {
9240
9821
  setDownloading(true);
9241
9822
  try {
9242
9823
  const doc = await client.fetch(
@@ -9276,7 +9857,7 @@ function DownloadReportAction({
9276
9857
  setDownloading(false);
9277
9858
  }
9278
9859
  }, [client, documentId, reportId, toast]);
9279
- return /* @__PURE__ */ jsx42(
9860
+ return /* @__PURE__ */ jsx45(
9280
9861
  MenuItem6,
9281
9862
  {
9282
9863
  disabled: downloading,
@@ -9290,7 +9871,7 @@ function DownloadReportAction({
9290
9871
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9291
9872
  import { PlayIcon as PlayIcon2 } from "@sanity/icons";
9292
9873
  import { MenuItem as MenuItem7, useToast as useToast8 } from "@sanity/ui";
9293
- import { useCallback as useCallback27, useState as useState18 } from "react";
9874
+ import { useCallback as useCallback28, useState as useState19 } from "react";
9294
9875
  import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
9295
9876
 
9296
9877
  // src/lib/eval-scope.ts
@@ -9306,7 +9887,7 @@ function extractEvalScope(provenance) {
9306
9887
  }
9307
9888
 
9308
9889
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9309
- import { jsx as jsx43 } from "react/jsx-runtime";
9890
+ import { jsx as jsx46 } from "react/jsx-runtime";
9310
9891
  var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
9311
9892
  function slugify2(s) {
9312
9893
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
@@ -9345,8 +9926,8 @@ function RerunEvaluationAction({
9345
9926
  const client = useClient8({ apiVersion: API_VERSION });
9346
9927
  const currentUser = useCurrentUser3();
9347
9928
  const toast = useToast8();
9348
- const [requesting, setRequesting] = useState18(false);
9349
- const handleClick = useCallback27(async () => {
9929
+ const [requesting, setRequesting] = useState19(false);
9930
+ const handleClick = useCallback28(async () => {
9350
9931
  setRequesting(true);
9351
9932
  try {
9352
9933
  const scope = extractEvalScope(provenance);
@@ -9373,7 +9954,7 @@ function RerunEvaluationAction({
9373
9954
  setRequesting(false);
9374
9955
  }
9375
9956
  }, [client, currentUser?.id, provenance, reportId, toast]);
9376
- return /* @__PURE__ */ jsx43(
9957
+ return /* @__PURE__ */ jsx46(
9377
9958
  MenuItem7,
9378
9959
  {
9379
9960
  disabled: requesting,
@@ -9385,7 +9966,7 @@ function RerunEvaluationAction({
9385
9966
  }
9386
9967
 
9387
9968
  // src/components/report-detail/report-actions/ReportActions.tsx
9388
- import { Fragment as Fragment8, jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
9969
+ import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
9389
9970
  function ReportActions({
9390
9971
  documentId,
9391
9972
  onDeleted,
@@ -9394,7 +9975,7 @@ function ReportActions({
9394
9975
  }) {
9395
9976
  const client = useClient9({ apiVersion: API_VERSION });
9396
9977
  const toast = useToast9();
9397
- const handleCopyId = useCallback28(() => {
9978
+ const handleCopyId = useCallback29(() => {
9398
9979
  navigator.clipboard.writeText(reportId).then(
9399
9980
  () => {
9400
9981
  toast.push({
@@ -9412,15 +9993,15 @@ function ReportActions({
9412
9993
  }
9413
9994
  );
9414
9995
  }, [reportId, toast]);
9415
- const [deleteDialogOpen, setDeleteDialogOpen] = useState19(false);
9416
- const [deleting, setDeleting] = useState19(false);
9417
- const handleRequestDelete = useCallback28(() => {
9996
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState20(false);
9997
+ const [deleting, setDeleting] = useState20(false);
9998
+ const handleRequestDelete = useCallback29(() => {
9418
9999
  setDeleteDialogOpen(true);
9419
10000
  }, []);
9420
- const handleDeleteClose = useCallback28(() => {
10001
+ const handleDeleteClose = useCallback29(() => {
9421
10002
  if (!deleting) setDeleteDialogOpen(false);
9422
10003
  }, [deleting]);
9423
- const handleDeleteConfirm = useCallback28(async () => {
10004
+ const handleDeleteConfirm = useCallback29(async () => {
9424
10005
  setDeleting(true);
9425
10006
  try {
9426
10007
  await client.delete(documentId);
@@ -9441,35 +10022,35 @@ function ReportActions({
9441
10022
  setDeleting(false);
9442
10023
  }
9443
10024
  }, [client, documentId, onDeleted, toast]);
9444
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
9445
- /* @__PURE__ */ jsx44(
10025
+ return /* @__PURE__ */ jsxs32(Fragment11, { children: [
10026
+ /* @__PURE__ */ jsx47(
9446
10027
  SplitActionButton,
9447
10028
  {
9448
- menu: /* @__PURE__ */ jsxs29(Fragment8, { children: [
9449
- /* @__PURE__ */ jsx44(CopyReportIdAction, { reportId }),
9450
- /* @__PURE__ */ jsx44(
10029
+ menu: /* @__PURE__ */ jsxs32(Fragment11, { children: [
10030
+ /* @__PURE__ */ jsx47(CopyReportIdAction, { reportId }),
10031
+ /* @__PURE__ */ jsx47(
9451
10032
  RerunEvaluationAction,
9452
10033
  {
9453
10034
  provenance,
9454
10035
  reportId
9455
10036
  }
9456
10037
  ),
9457
- /* @__PURE__ */ jsx44(MenuDivider, {}),
9458
- /* @__PURE__ */ jsx44(DownloadReportAction, { documentId, reportId }),
9459
- /* @__PURE__ */ jsx44(CopyReportAction, { documentId }),
9460
- /* @__PURE__ */ jsx44(CopyVisionQueryAction, { reportId }),
9461
- /* @__PURE__ */ jsx44(MenuDivider, {}),
9462
- /* @__PURE__ */ jsx44(DeleteReportAction, { onRequestDelete: handleRequestDelete })
10038
+ /* @__PURE__ */ jsx47(MenuDivider2, {}),
10039
+ /* @__PURE__ */ jsx47(DownloadReportAction, { documentId, reportId }),
10040
+ /* @__PURE__ */ jsx47(CopyReportAction, { documentId }),
10041
+ /* @__PURE__ */ jsx47(CopyVisionQueryAction, { reportId }),
10042
+ /* @__PURE__ */ jsx47(MenuDivider2, {}),
10043
+ /* @__PURE__ */ jsx47(DeleteReportAction, { onRequestDelete: handleRequestDelete })
9463
10044
  ] }),
9464
10045
  menuId: "report-actions-menu",
9465
10046
  primary: {
9466
- icon: CopyIcon2,
10047
+ icon: CopyIcon3,
9467
10048
  onClick: handleCopyId,
9468
10049
  text: "Copy Report ID"
9469
10050
  }
9470
10051
  }
9471
10052
  ),
9472
- deleteDialogOpen && /* @__PURE__ */ jsx44(
10053
+ deleteDialogOpen && /* @__PURE__ */ jsx47(
9473
10054
  DeleteConfirmDialog,
9474
10055
  {
9475
10056
  isDeleting: deleting,
@@ -9483,8 +10064,8 @@ function ReportActions({
9483
10064
 
9484
10065
  // src/components/report-detail/ReportHeader.tsx
9485
10066
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
9486
- import { Button as Button6, Flex as Flex22, Stack as Stack24, Text as Text31 } from "@sanity/ui";
9487
- import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
10067
+ import { Button as Button7, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10068
+ import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
9488
10069
  function ReportHeader({
9489
10070
  completedAt,
9490
10071
  onBack,
@@ -9494,29 +10075,29 @@ function ReportHeader({
9494
10075
  const dateLabel = formatCardDate(completedAt);
9495
10076
  const displayTitle = title ?? tag ?? dateLabel;
9496
10077
  const hasSubtitle = Boolean(title ?? tag);
9497
- return /* @__PURE__ */ jsxs30(Flex22, { align: "center", gap: 3, children: [
9498
- /* @__PURE__ */ jsx45(Button6, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
9499
- /* @__PURE__ */ jsxs30(Stack24, { flex: 1, space: 1, children: [
9500
- /* @__PURE__ */ jsx45(Text31, { size: 4, weight: "bold", children: displayTitle }),
9501
- hasSubtitle && /* @__PURE__ */ jsx45(Text31, { muted: true, size: 2, children: dateLabel })
10078
+ return /* @__PURE__ */ jsxs33(Flex24, { align: "center", gap: 3, children: [
10079
+ /* @__PURE__ */ jsx48(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
10080
+ /* @__PURE__ */ jsxs33(Stack26, { flex: 1, space: 1, children: [
10081
+ /* @__PURE__ */ jsx48(Text34, { size: 4, weight: "bold", children: displayTitle }),
10082
+ hasSubtitle && /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: dateLabel })
9502
10083
  ] })
9503
10084
  ] });
9504
10085
  }
9505
10086
 
9506
10087
  // src/components/report-detail/StrengthsList.tsx
9507
- import { useMemo as useMemo12 } from "react";
10088
+ import { useMemo as useMemo14 } from "react";
9508
10089
  import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon7 } from "@sanity/icons";
9509
- import { Box as Box21, Flex as Flex25, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10090
+ import { Box as Box24, Flex as Flex27, Stack as Stack28, Text as Text37 } from "@sanity/ui";
9510
10091
 
9511
10092
  // src/components/report-detail/AreaScoresGrid.tsx
9512
10093
  import React3, {
9513
- useCallback as useCallback29,
9514
- useMemo as useMemo10,
9515
- useState as useState20
10094
+ useCallback as useCallback30,
10095
+ useMemo as useMemo12,
10096
+ useState as useState21
9516
10097
  } from "react";
9517
10098
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
9518
- import { Box as Box20, Flex as Flex23, Stack as Stack25, Text as Text32 } from "@sanity/ui";
9519
- import { Fragment as Fragment9, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
10099
+ import { Box as Box23, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10100
+ import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
9520
10101
  var DIMENSION_TOOLTIPS2 = {
9521
10102
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
9522
10103
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -9556,15 +10137,15 @@ function AreaScoresGrid({
9556
10137
  }) {
9557
10138
  const { ref: containerRef, width } = useContainerWidth();
9558
10139
  const tier = tableTier(width);
9559
- const hasActual = useMemo10(
10140
+ const hasActual = useMemo12(
9560
10141
  () => scores.some((s) => s.actualScore != null),
9561
10142
  [scores]
9562
10143
  );
9563
10144
  const showLift = isLiteracyMode(mode);
9564
- const dimKeys = useMemo10(() => collectDimensionKeys(scores), [scores]);
9565
- const [sortField, setSortField] = useState20("score");
9566
- const [sortDir, setSortDir] = useState20("desc");
9567
- const handleSort = useCallback29(
10145
+ const dimKeys = useMemo12(() => collectDimensionKeys(scores), [scores]);
10146
+ const [sortField, setSortField] = useState21("score");
10147
+ const [sortDir, setSortDir] = useState21("desc");
10148
+ const handleSort = useCallback30(
9568
10149
  (field) => {
9569
10150
  if (field === sortField) {
9570
10151
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -9575,7 +10156,7 @@ function AreaScoresGrid({
9575
10156
  },
9576
10157
  [sortField]
9577
10158
  );
9578
- const sorted = useMemo10(() => {
10159
+ const sorted = useMemo12(() => {
9579
10160
  const dir = sortDir === "asc" ? 1 : -1;
9580
10161
  return [...scores].sort((a, b) => {
9581
10162
  switch (sortField) {
@@ -9590,7 +10171,7 @@ function AreaScoresGrid({
9590
10171
  }
9591
10172
  });
9592
10173
  }, [scores, sortField, sortDir]);
9593
- const modelScoresByFeature = useMemo10(() => {
10174
+ const modelScoresByFeature = useMemo12(() => {
9594
10175
  if (!perModel) return null;
9595
10176
  const map = /* @__PURE__ */ new Map();
9596
10177
  for (const model of perModel) {
@@ -9608,8 +10189,8 @@ function AreaScoresGrid({
9608
10189
  }
9609
10190
  return map;
9610
10191
  }, [perModel]);
9611
- return /* @__PURE__ */ jsxs31(Box20, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
9612
- /* @__PURE__ */ jsxs31(
10192
+ return /* @__PURE__ */ jsxs34(Box23, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
10193
+ /* @__PURE__ */ jsxs34(
9613
10194
  "div",
9614
10195
  {
9615
10196
  style: {
@@ -9625,7 +10206,7 @@ function AreaScoresGrid({
9625
10206
  padding: "12px 16px 8px"
9626
10207
  },
9627
10208
  children: [
9628
- /* @__PURE__ */ jsx46(
10209
+ /* @__PURE__ */ jsx49(
9629
10210
  ColHeader2,
9630
10211
  {
9631
10212
  active: sortField === "score",
@@ -9635,7 +10216,7 @@ function AreaScoresGrid({
9635
10216
  tooltip: GLOSSARY.score
9636
10217
  }
9637
10218
  ),
9638
- /* @__PURE__ */ jsx46(
10219
+ /* @__PURE__ */ jsx49(
9639
10220
  ColHeader2,
9640
10221
  {
9641
10222
  active: sortField === "area",
@@ -9644,7 +10225,7 @@ function AreaScoresGrid({
9644
10225
  onClick: () => handleSort("area")
9645
10226
  }
9646
10227
  ),
9647
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10228
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9648
10229
  ColHeader2,
9649
10230
  {
9650
10231
  active: sortField === key,
@@ -9655,7 +10236,7 @@ function AreaScoresGrid({
9655
10236
  },
9656
10237
  key
9657
10238
  )),
9658
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx46(
10239
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx49(
9659
10240
  ColHeader2,
9660
10241
  {
9661
10242
  active: sortField === "lift",
@@ -9665,12 +10246,12 @@ function AreaScoresGrid({
9665
10246
  tooltip: GLOSSARY.docLift
9666
10247
  }
9667
10248
  ),
9668
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
10249
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
9669
10250
  ]
9670
10251
  }
9671
10252
  ),
9672
- sorted.map((area) => /* @__PURE__ */ jsxs31(React3.Fragment, { children: [
9673
- /* @__PURE__ */ jsx46(
10253
+ sorted.map((area) => /* @__PURE__ */ jsxs34(React3.Fragment, { children: [
10254
+ /* @__PURE__ */ jsx49(
9674
10255
  AreaRow,
9675
10256
  {
9676
10257
  area,
@@ -9681,7 +10262,7 @@ function AreaScoresGrid({
9681
10262
  tier
9682
10263
  }
9683
10264
  ),
9684
- modelScoresByFeature && /* @__PURE__ */ jsx46(
10265
+ modelScoresByFeature && /* @__PURE__ */ jsx49(
9685
10266
  ModelSubRows,
9686
10267
  {
9687
10268
  dimKeys,
@@ -9702,8 +10283,8 @@ function ModelSubRows({
9702
10283
  tier
9703
10284
  }) {
9704
10285
  if (!models || models.length === 0) return null;
9705
- return /* @__PURE__ */ jsx46(Fragment9, { children: models.map((entry) => /* @__PURE__ */ jsx46(
9706
- ModelRow,
10286
+ return /* @__PURE__ */ jsx49(Fragment12, { children: models.map((entry) => /* @__PURE__ */ jsx49(
10287
+ ModelRow2,
9707
10288
  {
9708
10289
  dimKeys,
9709
10290
  hasActual,
@@ -9715,7 +10296,7 @@ function ModelSubRows({
9715
10296
  entry.label
9716
10297
  )) });
9717
10298
  }
9718
- function ModelRow({
10299
+ function ModelRow2({
9719
10300
  dimKeys,
9720
10301
  hasActual,
9721
10302
  label,
@@ -9724,7 +10305,7 @@ function ModelRow({
9724
10305
  tier
9725
10306
  }) {
9726
10307
  const isNarrow = tier === "narrow";
9727
- return /* @__PURE__ */ jsxs31(
10308
+ return /* @__PURE__ */ jsxs34(
9728
10309
  "div",
9729
10310
  {
9730
10311
  style: {
@@ -9742,8 +10323,8 @@ function ModelRow({
9742
10323
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
9743
10324
  },
9744
10325
  children: [
9745
- /* @__PURE__ */ jsx46(Flex23, { align: "center", children: /* @__PURE__ */ jsx46(
9746
- Text32,
10326
+ /* @__PURE__ */ jsx49(Flex25, { align: "center", children: /* @__PURE__ */ jsx49(
10327
+ Text35,
9747
10328
  {
9748
10329
  size: 1,
9749
10330
  style: {
@@ -9754,8 +10335,8 @@ function ModelRow({
9754
10335
  children: Math.round(scores.totalScore)
9755
10336
  }
9756
10337
  ) }),
9757
- /* @__PURE__ */ jsx46(Flex23, { align: "center", gap: 2, children: /* @__PURE__ */ jsx46(Text32, { muted: true, size: 1, children: label }) }),
9758
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10338
+ /* @__PURE__ */ jsx49(Flex25, { align: "center", gap: 2, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 1, children: label }) }),
10339
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9759
10340
  DimCell,
9760
10341
  {
9761
10342
  area: label,
@@ -9765,8 +10346,8 @@ function ModelRow({
9765
10346
  },
9766
10347
  key
9767
10348
  )),
9768
- !isNarrow && showLift && /* @__PURE__ */ jsxs31(
9769
- Text32,
10349
+ !isNarrow && showLift && /* @__PURE__ */ jsxs34(
10350
+ Text35,
9770
10351
  {
9771
10352
  size: 1,
9772
10353
  style: {
@@ -9780,8 +10361,8 @@ function ModelRow({
9780
10361
  ]
9781
10362
  }
9782
10363
  ),
9783
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(
9784
- Text32,
10364
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(
10365
+ Text35,
9785
10366
  {
9786
10367
  size: 1,
9787
10368
  style: {
@@ -9805,7 +10386,7 @@ function AreaRow({
9805
10386
  tier
9806
10387
  }) {
9807
10388
  const isNarrow = tier === "narrow";
9808
- return /* @__PURE__ */ jsxs31(
10389
+ return /* @__PURE__ */ jsxs34(
9809
10390
  "div",
9810
10391
  {
9811
10392
  style: {
@@ -9822,15 +10403,15 @@ function AreaRow({
9822
10403
  padding: isNarrow ? "8px 12px" : "10px 16px"
9823
10404
  },
9824
10405
  children: [
9825
- /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: isNarrow ? 0 : 2, children: [
9826
- /* @__PURE__ */ jsx46(
10406
+ /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: isNarrow ? 0 : 2, children: [
10407
+ /* @__PURE__ */ jsx49(
9827
10408
  HoverTip,
9828
10409
  {
9829
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9830
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area.feature }),
10410
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10411
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
9831
10412
  " score:",
9832
10413
  " ",
9833
- /* @__PURE__ */ jsx46(
10414
+ /* @__PURE__ */ jsx49(
9834
10415
  "span",
9835
10416
  {
9836
10417
  style: {
@@ -9841,12 +10422,12 @@ function AreaRow({
9841
10422
  children: Math.round(area.totalScore)
9842
10423
  }
9843
10424
  ),
9844
- /* @__PURE__ */ jsx46("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10425
+ /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
9845
10426
  ".",
9846
10427
  " ",
9847
10428
  GLOSSARY.score
9848
10429
  ] }),
9849
- children: /* @__PURE__ */ jsx46(
10430
+ children: /* @__PURE__ */ jsx49(
9850
10431
  "div",
9851
10432
  {
9852
10433
  style: {
@@ -9867,11 +10448,11 @@ function AreaRow({
9867
10448
  )
9868
10449
  }
9869
10450
  ),
9870
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx46(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx46(DeltaIndicator, { delta, icon: true, size: 1 }) })
10451
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx49(DeltaIndicator, { delta, icon: true, size: 1 }) })
9871
10452
  ] }),
9872
- /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: 2, wrap: "wrap", children: [
9873
- /* @__PURE__ */ jsx46(Text32, { size: 2, weight: "medium", children: area.feature }),
9874
- area.negativeDocLift && showLift && /* @__PURE__ */ jsx46(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx46(
10453
+ /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
10454
+ /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10455
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx49(
9875
10456
  "span",
9876
10457
  {
9877
10458
  style: {
@@ -9884,11 +10465,11 @@ function AreaRow({
9884
10465
  gap: 3,
9885
10466
  padding: "1px 5px"
9886
10467
  },
9887
- children: /* @__PURE__ */ jsx46(WarningOutlineIcon2, {})
10468
+ children: /* @__PURE__ */ jsx49(WarningOutlineIcon2, {})
9888
10469
  }
9889
10470
  ) })
9890
10471
  ] }),
9891
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10472
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9892
10473
  DimCell,
9893
10474
  {
9894
10475
  area: area.feature,
@@ -9897,14 +10478,14 @@ function AreaRow({
9897
10478
  },
9898
10479
  key
9899
10480
  )),
9900
- !isNarrow && showLift && /* @__PURE__ */ jsx46(
10481
+ !isNarrow && showLift && /* @__PURE__ */ jsx49(
9901
10482
  HoverTip,
9902
10483
  {
9903
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9904
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area.feature }),
10484
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10485
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
9905
10486
  " doc lift:",
9906
10487
  " ",
9907
- /* @__PURE__ */ jsxs31(
10488
+ /* @__PURE__ */ jsxs34(
9908
10489
  "span",
9909
10490
  {
9910
10491
  style: {
@@ -9922,8 +10503,8 @@ function AreaRow({
9922
10503
  "pts. ",
9923
10504
  GLOSSARY.docLift
9924
10505
  ] }),
9925
- children: /* @__PURE__ */ jsxs31(
9926
- Text32,
10506
+ children: /* @__PURE__ */ jsxs34(
10507
+ Text35,
9927
10508
  {
9928
10509
  size: 2,
9929
10510
  style: {
@@ -9939,12 +10520,12 @@ function AreaRow({
9939
10520
  )
9940
10521
  }
9941
10522
  ),
9942
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(
10523
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(
9943
10524
  HoverTip,
9944
10525
  {
9945
10526
  text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
9946
- children: /* @__PURE__ */ jsx46(
9947
- Text32,
10527
+ children: /* @__PURE__ */ jsx49(
10528
+ Text35,
9948
10529
  {
9949
10530
  size: 2,
9950
10531
  style: {
@@ -9973,17 +10554,17 @@ function DimCell({
9973
10554
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
9974
10555
  const textSize = size === "small" ? 0 : 1;
9975
10556
  const barHeight = size === "small" ? 3 : 4;
9976
- return /* @__PURE__ */ jsx46(
10557
+ return /* @__PURE__ */ jsx49(
9977
10558
  HoverTip,
9978
10559
  {
9979
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9980
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area }),
10560
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10561
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area }),
9981
10562
  " \u2192",
9982
10563
  " ",
9983
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: dim }),
10564
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: dim }),
9984
10565
  ":",
9985
10566
  " ",
9986
- /* @__PURE__ */ jsx46(
10567
+ /* @__PURE__ */ jsx49(
9987
10568
  "span",
9988
10569
  {
9989
10570
  style: {
@@ -9994,14 +10575,14 @@ function DimCell({
9994
10575
  children: Math.round(value)
9995
10576
  }
9996
10577
  ),
9997
- /* @__PURE__ */ jsx46("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10578
+ /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
9998
10579
  ".",
9999
10580
  " ",
10000
10581
  tooltip
10001
10582
  ] }),
10002
- children: /* @__PURE__ */ jsxs31(Stack25, { space: 1, style: { width: "100%" }, children: [
10003
- /* @__PURE__ */ jsx46(
10004
- Text32,
10583
+ children: /* @__PURE__ */ jsxs34(Stack27, { space: 1, style: { width: "100%" }, children: [
10584
+ /* @__PURE__ */ jsx49(
10585
+ Text35,
10005
10586
  {
10006
10587
  size: textSize,
10007
10588
  style: {
@@ -10012,7 +10593,7 @@ function DimCell({
10012
10593
  children: Math.round(value)
10013
10594
  }
10014
10595
  ),
10015
- /* @__PURE__ */ jsx46(
10596
+ /* @__PURE__ */ jsx49(
10016
10597
  "div",
10017
10598
  {
10018
10599
  style: {
@@ -10022,7 +10603,7 @@ function DimCell({
10022
10603
  overflow: "hidden",
10023
10604
  width: "100%"
10024
10605
  },
10025
- children: /* @__PURE__ */ jsx46(
10606
+ children: /* @__PURE__ */ jsx49(
10026
10607
  "div",
10027
10608
  {
10028
10609
  style: {
@@ -10047,7 +10628,7 @@ function ColHeader2({
10047
10628
  onClick,
10048
10629
  tooltip
10049
10630
  }) {
10050
- const handleKeyDown = useCallback29(
10631
+ const handleKeyDown = useCallback30(
10051
10632
  (e) => {
10052
10633
  if (onClick && (e.key === "Enter" || e.key === " ")) {
10053
10634
  e.preventDefault();
@@ -10057,8 +10638,8 @@ function ColHeader2({
10057
10638
  [onClick]
10058
10639
  );
10059
10640
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
10060
- return /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: 1, children: [
10061
- /* @__PURE__ */ jsx46(
10641
+ return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 1, children: [
10642
+ /* @__PURE__ */ jsx49(
10062
10643
  "div",
10063
10644
  {
10064
10645
  onClick,
@@ -10069,8 +10650,8 @@ function ColHeader2({
10069
10650
  userSelect: "none"
10070
10651
  },
10071
10652
  tabIndex: onClick ? 0 : void 0,
10072
- children: /* @__PURE__ */ jsxs31(
10073
- Text32,
10653
+ children: /* @__PURE__ */ jsxs34(
10654
+ Text35,
10074
10655
  {
10075
10656
  muted: true,
10076
10657
  size: 1,
@@ -10087,14 +10668,14 @@ function ColHeader2({
10087
10668
  )
10088
10669
  }
10089
10670
  ),
10090
- tooltip && /* @__PURE__ */ jsx46(InfoTip, { text: tooltip })
10671
+ tooltip && /* @__PURE__ */ jsx49(InfoTip, { text: tooltip })
10091
10672
  ] });
10092
10673
  }
10093
10674
 
10094
10675
  // src/components/report-detail/ModelSelector.tsx
10095
- import { useCallback as useCallback30 } from "react";
10096
- import { Flex as Flex24, Text as Text33 } from "@sanity/ui";
10097
- import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
10676
+ import { useCallback as useCallback31 } from "react";
10677
+ import { Flex as Flex26, Text as Text36 } from "@sanity/ui";
10678
+ import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
10098
10679
  var pillBase = {
10099
10680
  borderColor: "var(--card-border-color)",
10100
10681
  borderRadius: 999,
@@ -10125,8 +10706,8 @@ function ModelSelector({
10125
10706
  selection,
10126
10707
  onChange
10127
10708
  }) {
10128
- return /* @__PURE__ */ jsxs32(Flex24, { align: "center", gap: 1, wrap: "wrap", children: [
10129
- /* @__PURE__ */ jsx47(
10709
+ return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, wrap: "wrap", children: [
10710
+ /* @__PURE__ */ jsx50(
10130
10711
  Pill2,
10131
10712
  {
10132
10713
  isSelected: selection === null,
@@ -10134,7 +10715,7 @@ function ModelSelector({
10134
10715
  onClick: () => onChange(null)
10135
10716
  }
10136
10717
  ),
10137
- models.map((model) => /* @__PURE__ */ jsx47(
10718
+ models.map((model) => /* @__PURE__ */ jsx50(
10138
10719
  Pill2,
10139
10720
  {
10140
10721
  isSelected: selection === model.modelId,
@@ -10143,7 +10724,7 @@ function ModelSelector({
10143
10724
  },
10144
10725
  model.modelId
10145
10726
  )),
10146
- /* @__PURE__ */ jsx47(
10727
+ /* @__PURE__ */ jsx50(
10147
10728
  "div",
10148
10729
  {
10149
10730
  style: {
@@ -10154,7 +10735,7 @@ function ModelSelector({
10154
10735
  }
10155
10736
  }
10156
10737
  ),
10157
- /* @__PURE__ */ jsx47(
10738
+ /* @__PURE__ */ jsx50(
10158
10739
  Pill2,
10159
10740
  {
10160
10741
  isSelected: selection === "expanded",
@@ -10169,7 +10750,7 @@ function Pill2({
10169
10750
  label,
10170
10751
  onClick
10171
10752
  }) {
10172
- const handleKeyDown = useCallback30(
10753
+ const handleKeyDown = useCallback31(
10173
10754
  (e) => {
10174
10755
  if (e.key === "Enter" || e.key === " ") {
10175
10756
  e.preventDefault();
@@ -10178,7 +10759,7 @@ function Pill2({
10178
10759
  },
10179
10760
  [onClick]
10180
10761
  );
10181
- return /* @__PURE__ */ jsx47(
10762
+ return /* @__PURE__ */ jsx50(
10182
10763
  "span",
10183
10764
  {
10184
10765
  onClick,
@@ -10186,8 +10767,8 @@ function Pill2({
10186
10767
  role: "button",
10187
10768
  style: isSelected ? pillSelected : pillDefault,
10188
10769
  tabIndex: 0,
10189
- children: /* @__PURE__ */ jsx47(
10190
- Text33,
10770
+ children: /* @__PURE__ */ jsx50(
10771
+ Text36,
10191
10772
  {
10192
10773
  size: 1,
10193
10774
  style: {
@@ -10202,18 +10783,18 @@ function Pill2({
10202
10783
  }
10203
10784
 
10204
10785
  // src/components/report-detail/useModelSelection.ts
10205
- import { useCallback as useCallback31, useMemo as useMemo11, useState as useState21 } from "react";
10786
+ import { useCallback as useCallback32, useMemo as useMemo13, useState as useState22 } from "react";
10206
10787
  function useModelSelection({
10207
10788
  scores,
10208
10789
  perModel
10209
10790
  }) {
10210
- const [selection, setSelection] = useState21(null);
10211
- const onSelectionChange = useCallback31((next) => {
10791
+ const [selection, setSelection] = useState22(null);
10792
+ const onSelectionChange = useCallback32((next) => {
10212
10793
  setSelection(next);
10213
10794
  }, []);
10214
10795
  const isExpanded = selection === "expanded";
10215
10796
  const hasModels = perModel != null && perModel.length > 1;
10216
- const resolvedScores = useMemo11(() => {
10797
+ const resolvedScores = useMemo13(() => {
10217
10798
  if (isExpanded || selection === null || !perModel) return scores;
10218
10799
  const model = perModel.find((m) => m.modelId === selection);
10219
10800
  return model?.scores ?? scores;
@@ -10230,7 +10811,7 @@ function useModelSelection({
10230
10811
  }
10231
10812
 
10232
10813
  // src/components/report-detail/StrengthsList.tsx
10233
- import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
10814
+ import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
10234
10815
  function StrengthsList({
10235
10816
  mode,
10236
10817
  scores,
@@ -10244,7 +10825,7 @@ function StrengthsList({
10244
10825
  hasModels,
10245
10826
  expandedPerModel
10246
10827
  } = useModelSelection({ scores, perModel });
10247
- const displayedScores = useMemo12(
10828
+ const displayedScores = useMemo14(
10248
10829
  () => resolvedScores.filter((s) => s.totalScore >= SCORE_CAUTION),
10249
10830
  [resolvedScores]
10250
10831
  );
@@ -10254,13 +10835,13 @@ function StrengthsList({
10254
10835
  (a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
10255
10836
  );
10256
10837
  if (displayedScores.length === 0) return null;
10257
- return /* @__PURE__ */ jsxs33(Stack26, { space: 5, children: [
10258
- /* @__PURE__ */ jsxs33(Stack26, { space: 3, children: [
10259
- /* @__PURE__ */ jsxs33(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
10260
- /* @__PURE__ */ jsx48(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
10261
- /* @__PURE__ */ jsx48(Text34, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
10262
- /* @__PURE__ */ jsx48(InfoTip, { text: GLOSSARY.strengths }),
10263
- hasModels && /* @__PURE__ */ jsx48(Box21, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx48(
10838
+ return /* @__PURE__ */ jsxs36(Stack28, { space: 5, children: [
10839
+ /* @__PURE__ */ jsxs36(Stack28, { space: 3, children: [
10840
+ /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
10841
+ /* @__PURE__ */ jsx51(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
10842
+ /* @__PURE__ */ jsx51(Text37, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
10843
+ /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.strengths }),
10844
+ hasModels && /* @__PURE__ */ jsx51(Box24, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx51(
10264
10845
  ModelSelector,
10265
10846
  {
10266
10847
  models: perModel,
@@ -10269,7 +10850,7 @@ function StrengthsList({
10269
10850
  }
10270
10851
  ) })
10271
10852
  ] }),
10272
- /* @__PURE__ */ jsx48(
10853
+ /* @__PURE__ */ jsx51(
10273
10854
  AreaScoresGrid,
10274
10855
  {
10275
10856
  mode,
@@ -10279,33 +10860,33 @@ function StrengthsList({
10279
10860
  }
10280
10861
  )
10281
10862
  ] }),
10282
- retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs33(Box21, { style: neutralCardStyle, children: [
10283
- /* @__PURE__ */ jsx48(
10284
- Box21,
10863
+ retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs36(Box24, { style: neutralCardStyle, children: [
10864
+ /* @__PURE__ */ jsx51(
10865
+ Box24,
10285
10866
  {
10286
10867
  padding: 4,
10287
10868
  style: { borderBottom: "1px solid var(--card-border-color)" },
10288
- children: /* @__PURE__ */ jsxs33(Flex25, { align: "center", gap: 2, children: [
10289
- /* @__PURE__ */ jsx48(SearchIcon7, { style: { color: "#34d399" } }),
10290
- /* @__PURE__ */ jsxs33(Text34, { size: 2, weight: "medium", children: [
10869
+ children: /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, children: [
10870
+ /* @__PURE__ */ jsx51(SearchIcon7, { style: { color: "#34d399" } }),
10871
+ /* @__PURE__ */ jsxs36(Text37, { size: 2, weight: "medium", children: [
10291
10872
  "Retrieval Successes (",
10292
10873
  Math.round(EFFICIENCY_POSITIVE * 100),
10293
10874
  "%+ efficiency)"
10294
10875
  ] }),
10295
- /* @__PURE__ */ jsx48(InfoTip, { text: GLOSSARY.retrievalExcellence })
10876
+ /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.retrievalExcellence })
10296
10877
  ] })
10297
10878
  }
10298
10879
  ),
10299
- /* @__PURE__ */ jsx48(Stack26, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs33(
10300
- Flex25,
10880
+ /* @__PURE__ */ jsx51(Stack28, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs36(
10881
+ Flex27,
10301
10882
  {
10302
10883
  align: "center",
10303
10884
  justify: "space-between",
10304
10885
  padding: 4,
10305
10886
  style: i > 0 ? dividerStyle : void 0,
10306
10887
  children: [
10307
- /* @__PURE__ */ jsx48(Text34, { size: 2, children: area.feature }),
10308
- /* @__PURE__ */ jsx48(
10888
+ /* @__PURE__ */ jsx51(Text37, { size: 2, children: area.feature }),
10889
+ /* @__PURE__ */ jsx51(
10309
10890
  "span",
10310
10891
  {
10311
10892
  style: {
@@ -10335,8 +10916,9 @@ import {
10335
10916
  BoltIcon,
10336
10917
  ArrowDownIcon as ArrowDownIcon2
10337
10918
  } from "@sanity/icons";
10338
- import { Box as Box22, Flex as Flex26, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10339
- import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
10919
+ import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
10920
+ import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
10921
+ var SHOW_REGRESSED = false;
10340
10922
  function WeaknessesList({
10341
10923
  mode,
10342
10924
  scores,
@@ -10364,15 +10946,15 @@ function WeaknessesList({
10364
10946
  const efficiencyAnomalies = scores.filter(
10365
10947
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency > EFFICIENCY_ANOMALY
10366
10948
  );
10367
- const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || regressed.length > 0 || efficiencyAnomalies.length > 0;
10949
+ const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || SHOW_REGRESSED && regressed.length > 0 || efficiencyAnomalies.length > 0;
10368
10950
  if (!hasContent) return null;
10369
- return /* @__PURE__ */ jsxs34(Stack27, { space: 5, children: [
10370
- weakAreas.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10371
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
10372
- /* @__PURE__ */ jsx49(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10373
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
10374
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.weakAreas }),
10375
- hasModels && /* @__PURE__ */ jsx49(Box22, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx49(
10951
+ return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
10952
+ weakAreas.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10953
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
10954
+ /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10955
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
10956
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.weakAreas }),
10957
+ hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
10376
10958
  ModelSelector,
10377
10959
  {
10378
10960
  models: perModel,
@@ -10381,7 +10963,7 @@ function WeaknessesList({
10381
10963
  }
10382
10964
  ) })
10383
10965
  ] }),
10384
- /* @__PURE__ */ jsx49(
10966
+ /* @__PURE__ */ jsx52(
10385
10967
  AreaScoresGrid,
10386
10968
  {
10387
10969
  mode,
@@ -10391,22 +10973,22 @@ function WeaknessesList({
10391
10973
  }
10392
10974
  )
10393
10975
  ] }),
10394
- docsHurt.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10395
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10396
- /* @__PURE__ */ jsx49(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10397
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
10398
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.docsHurt })
10976
+ docsHurt.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10977
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
10978
+ /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10979
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
10980
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.docsHurt })
10399
10981
  ] }),
10400
- /* @__PURE__ */ jsx49(Box22, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs34(
10401
- Box22,
10982
+ /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs37(
10983
+ Box25,
10402
10984
  {
10403
10985
  padding: 4,
10404
10986
  style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
10405
10987
  children: [
10406
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", justify: "space-between", wrap: "wrap", children: [
10407
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10408
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10409
- /* @__PURE__ */ jsx49(
10988
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
10989
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
10990
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
10991
+ /* @__PURE__ */ jsx52(
10410
10992
  "span",
10411
10993
  {
10412
10994
  style: {
@@ -10421,7 +11003,7 @@ function WeaknessesList({
10421
11003
  }
10422
11004
  )
10423
11005
  ] }),
10424
- /* @__PURE__ */ jsx49(
11006
+ /* @__PURE__ */ jsx52(
10425
11007
  "span",
10426
11008
  {
10427
11009
  style: {
@@ -10434,8 +11016,8 @@ function WeaknessesList({
10434
11016
  }
10435
11017
  )
10436
11018
  ] }),
10437
- /* @__PURE__ */ jsx49(Box22, { paddingTop: 2, children: /* @__PURE__ */ jsxs34(Text35, { muted: true, size: 2, children: [
10438
- area.invertedRetrievalGap && /* @__PURE__ */ jsxs34("span", { style: { color: "#fbbf24" }, children: [
11019
+ /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
11020
+ area.invertedRetrievalGap && /* @__PURE__ */ jsxs37("span", { style: { color: "#fbbf24" }, children: [
10439
11021
  "Agent does better by NOT finding these docs.",
10440
11022
  " "
10441
11023
  ] }),
@@ -10450,22 +11032,22 @@ function WeaknessesList({
10450
11032
  area.feature
10451
11033
  )) })
10452
11034
  ] }),
10453
- retrievalIssues.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10454
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10455
- /* @__PURE__ */ jsx49(SearchIcon8, { style: { color: "#fbbf24" } }),
10456
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
10457
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.retrievalIssues })
11035
+ retrievalIssues.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11036
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11037
+ /* @__PURE__ */ jsx52(SearchIcon8, { style: { color: "#fbbf24" } }),
11038
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
11039
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalIssues })
10458
11040
  ] }),
10459
- /* @__PURE__ */ jsx49(Box22, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs34(
10460
- Box22,
11041
+ /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs37(
11042
+ Box25,
10461
11043
  {
10462
11044
  padding: 4,
10463
11045
  style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
10464
11046
  children: [
10465
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", justify: "space-between", wrap: "wrap", children: [
10466
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10467
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10468
- /* @__PURE__ */ jsx49(
11047
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
11048
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11049
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11050
+ /* @__PURE__ */ jsx52(
10469
11051
  "span",
10470
11052
  {
10471
11053
  style: {
@@ -10480,7 +11062,7 @@ function WeaknessesList({
10480
11062
  }
10481
11063
  )
10482
11064
  ] }),
10483
- /* @__PURE__ */ jsx49(
11065
+ /* @__PURE__ */ jsx52(
10484
11066
  "span",
10485
11067
  {
10486
11068
  style: {
@@ -10493,7 +11075,7 @@ function WeaknessesList({
10493
11075
  }
10494
11076
  )
10495
11077
  ] }),
10496
- /* @__PURE__ */ jsx49(Box22, { paddingTop: 2, children: /* @__PURE__ */ jsxs34(Text35, { muted: true, size: 2, children: [
11078
+ /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
10497
11079
  "Actual score (",
10498
11080
  Math.round(area.actualScore ?? 0),
10499
11081
  ") is much lower than ceiling (",
@@ -10508,21 +11090,21 @@ function WeaknessesList({
10508
11090
  area.feature
10509
11091
  )) })
10510
11092
  ] }),
10511
- dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10512
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10513
- /* @__PURE__ */ jsx49(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
10514
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
10515
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.dimWeaknesses })
11093
+ dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11094
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11095
+ /* @__PURE__ */ jsx52(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
11096
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
11097
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.dimWeaknesses })
10516
11098
  ] }),
10517
- /* @__PURE__ */ jsx49(Box22, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs34(
10518
- Box22,
11099
+ /* @__PURE__ */ jsx52(Box25, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs37(
11100
+ Box25,
10519
11101
  {
10520
11102
  padding: 4,
10521
11103
  style: i > 0 ? dividerStyle : void 0,
10522
11104
  children: [
10523
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, paddingBottom: 2, children: [
10524
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10525
- /* @__PURE__ */ jsx49(
11105
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, paddingBottom: 2, children: [
11106
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11107
+ /* @__PURE__ */ jsx52(
10526
11108
  "span",
10527
11109
  {
10528
11110
  style: {
@@ -10537,7 +11119,7 @@ function WeaknessesList({
10537
11119
  }
10538
11120
  )
10539
11121
  ] }),
10540
- /* @__PURE__ */ jsx49(Flex26, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx49(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs34(
11122
+ /* @__PURE__ */ jsx52(Flex28, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx52(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs37(
10541
11123
  "span",
10542
11124
  {
10543
11125
  style: {
@@ -10559,33 +11141,33 @@ function WeaknessesList({
10559
11141
  area.feature
10560
11142
  )) })
10561
11143
  ] }),
10562
- regressed.length > 0 && /* @__PURE__ */ jsxs34(Box22, { style: neutralCardStyle, children: [
10563
- /* @__PURE__ */ jsx49(
10564
- Box22,
11144
+ SHOW_REGRESSED && regressed.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11145
+ /* @__PURE__ */ jsx52(
11146
+ Box25,
10565
11147
  {
10566
11148
  padding: 4,
10567
11149
  style: { borderBottom: "1px solid var(--card-border-color)" },
10568
- children: /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10569
- /* @__PURE__ */ jsx49(ArrowDownIcon2, { style: { color: "#f87171" } }),
10570
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
11150
+ children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11151
+ /* @__PURE__ */ jsx52(ArrowDownIcon2, { style: { color: "#f87171" } }),
11152
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
10571
11153
  ] })
10572
11154
  }
10573
11155
  ),
10574
- /* @__PURE__ */ jsx49(Stack27, { children: regressed.map((featureName, i) => {
11156
+ /* @__PURE__ */ jsx52(Stack29, { children: regressed.map((featureName, i) => {
10575
11157
  const area = scores.find((s) => s.feature === featureName);
10576
11158
  const areaDelta = perArea?.[featureName];
10577
- return /* @__PURE__ */ jsxs34(
10578
- Flex26,
11159
+ return /* @__PURE__ */ jsxs37(
11160
+ Flex28,
10579
11161
  {
10580
11162
  align: "center",
10581
11163
  justify: "space-between",
10582
11164
  padding: 4,
10583
11165
  style: i > 0 ? dividerStyle : void 0,
10584
11166
  children: [
10585
- /* @__PURE__ */ jsx49(Text35, { size: 2, children: featureName }),
10586
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 3, children: [
10587
- areaDelta != null && /* @__PURE__ */ jsx49(DeltaIndicator, { delta: areaDelta, icon: true }),
10588
- area && /* @__PURE__ */ jsx49(
11167
+ /* @__PURE__ */ jsx52(Text38, { size: 2, children: featureName }),
11168
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 3, children: [
11169
+ areaDelta != null && /* @__PURE__ */ jsx52(DeltaIndicator, { delta: areaDelta, icon: true }),
11170
+ area && /* @__PURE__ */ jsx52(
10589
11171
  "span",
10590
11172
  {
10591
11173
  style: {
@@ -10607,32 +11189,32 @@ function WeaknessesList({
10607
11189
  );
10608
11190
  }) })
10609
11191
  ] }),
10610
- efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs34(Box22, { style: neutralCardStyle, children: [
10611
- /* @__PURE__ */ jsx49(
10612
- Box22,
11192
+ efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11193
+ /* @__PURE__ */ jsx52(
11194
+ Box25,
10613
11195
  {
10614
11196
  padding: 4,
10615
11197
  style: { borderBottom: "1px solid var(--card-border-color)" },
10616
- children: /* @__PURE__ */ jsxs34(Stack27, { space: 2, children: [
10617
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10618
- /* @__PURE__ */ jsx49(BoltIcon, { style: { color: "#fbbf24" } }),
10619
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
10620
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
11198
+ children: /* @__PURE__ */ jsxs37(Stack29, { space: 2, children: [
11199
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11200
+ /* @__PURE__ */ jsx52(BoltIcon, { style: { color: "#fbbf24" } }),
11201
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
11202
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
10621
11203
  ] }),
10622
- /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
11204
+ /* @__PURE__ */ jsx52(Text38, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
10623
11205
  ] })
10624
11206
  }
10625
11207
  ),
10626
- /* @__PURE__ */ jsx49(Stack27, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs34(
10627
- Flex26,
11208
+ /* @__PURE__ */ jsx52(Stack29, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs37(
11209
+ Flex28,
10628
11210
  {
10629
11211
  align: "center",
10630
11212
  justify: "space-between",
10631
11213
  padding: 4,
10632
11214
  style: i > 0 ? dividerStyle : void 0,
10633
11215
  children: [
10634
- /* @__PURE__ */ jsx49(Text35, { size: 2, children: area.feature }),
10635
- /* @__PURE__ */ jsx49(
11216
+ /* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
11217
+ /* @__PURE__ */ jsx52(
10636
11218
  "span",
10637
11219
  {
10638
11220
  style: {
@@ -10660,12 +11242,12 @@ var tipArea = {
10660
11242
  fontWeight: 600
10661
11243
  };
10662
11244
  function dimTip(area, dim, score, description) {
10663
- return /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10664
- /* @__PURE__ */ jsx49("span", { style: tipArea, children: area }),
11245
+ return /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11246
+ /* @__PURE__ */ jsx52("span", { style: tipArea, children: area }),
10665
11247
  " scores",
10666
11248
  " ",
10667
- /* @__PURE__ */ jsx49("span", { style: tipValue, children: score }),
10668
- /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11249
+ /* @__PURE__ */ jsx52("span", { style: tipValue, children: score }),
11250
+ /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10669
11251
  " on",
10670
11252
  " ",
10671
11253
  dim.toLowerCase(),
@@ -10694,7 +11276,7 @@ function getDimensionWeaknesses(area) {
10694
11276
  }
10695
11277
 
10696
11278
  // src/components/report-detail/ReportDetail.tsx
10697
- import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
11279
+ import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
10698
11280
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
10699
11281
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
10700
11282
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -10711,9 +11293,9 @@ function ReportDetail({
10711
11293
  subTab
10712
11294
  }) {
10713
11295
  const client = useClient10({ apiVersion: API_VERSION });
10714
- const [loading, setLoading] = useState22(true);
10715
- const [report, setReport] = useState22(null);
10716
- useEffect10(() => {
11296
+ const [loading, setLoading] = useState23(true);
11297
+ const [report, setReport] = useState23(null);
11298
+ useEffect12(() => {
10717
11299
  let cancelled = false;
10718
11300
  setLoading(true);
10719
11301
  client.fetch(reportDetailQuery, { reportId }).then((data) => {
@@ -10742,34 +11324,34 @@ function ReportDetail({
10742
11324
  const hasAgentActivity = Boolean(
10743
11325
  summary?.agentBehavior && summary.agentBehavior.length > 0
10744
11326
  );
10745
- const tabs = useMemo13(
11327
+ const tabs = useMemo15(
10746
11328
  () => [OVERVIEW_TAB, DIAGNOSTICS_TAB, ACTIVITY_TAB],
10747
11329
  []
10748
11330
  );
10749
- const disabledTabs = useMemo13(() => {
11331
+ const disabledTabs = useMemo15(() => {
10750
11332
  const set2 = /* @__PURE__ */ new Set();
10751
11333
  if (!hasDiagnostics) set2.add("diagnostics");
10752
11334
  if (!hasAgentActivity) set2.add("activity");
10753
11335
  return set2;
10754
11336
  }, [hasDiagnostics, hasAgentActivity]);
10755
- const currentTab = useMemo13(() => {
11337
+ const currentTab = useMemo15(() => {
10756
11338
  const parsed = parseTab(activeTab);
10757
11339
  if (disabledTabs.has(parsed)) return "overview";
10758
11340
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
10759
11341
  }, [activeTab, disabledTabs, tabs]);
10760
- const handleTabClick = useCallback32(
11342
+ const handleTabClick = useCallback33(
10761
11343
  (tabId) => {
10762
11344
  onTabChange(tabId === "overview" ? null : tabId, null, null);
10763
11345
  },
10764
11346
  [onTabChange]
10765
11347
  );
10766
11348
  if (loading) {
10767
- return /* @__PURE__ */ jsx50(LoadingState, { message: "Loading report\u2026" });
11349
+ return /* @__PURE__ */ jsx53(LoadingState, { message: "Loading report\u2026" });
10768
11350
  }
10769
11351
  if (!report || !summary) {
10770
- return /* @__PURE__ */ jsx50(Box23, { padding: 5, children: /* @__PURE__ */ jsxs35(Stack28, { space: 4, children: [
10771
- /* @__PURE__ */ jsx50(
10772
- Button7,
11352
+ return /* @__PURE__ */ jsx53(Box26, { padding: 5, children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11353
+ /* @__PURE__ */ jsx53(
11354
+ Button8,
10773
11355
  {
10774
11356
  icon: ArrowLeftIcon3,
10775
11357
  mode: "bleed",
@@ -10777,18 +11359,18 @@ function ReportDetail({
10777
11359
  text: "Back"
10778
11360
  }
10779
11361
  ),
10780
- /* @__PURE__ */ jsx50(Text36, { align: "center", muted: true, size: 3, children: "Report not found" })
11362
+ /* @__PURE__ */ jsx53(Text39, { align: "center", muted: true, size: 3, children: "Report not found" })
10781
11363
  ] }) });
10782
11364
  }
10783
11365
  const { comparison, provenance } = report;
10784
11366
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
10785
- return /* @__PURE__ */ jsx50(
11367
+ return /* @__PURE__ */ jsx53(
10786
11368
  ReportArtifactProvider,
10787
11369
  {
10788
11370
  runId: report.provenance?.runId,
10789
11371
  manifest: summary?.artifactManifest,
10790
- children: /* @__PURE__ */ jsx50(Box23, { padding: 4, children: /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
10791
- /* @__PURE__ */ jsx50(
11372
+ children: /* @__PURE__ */ jsx53(Box26, { padding: 4, children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11373
+ /* @__PURE__ */ jsx53(
10792
11374
  ReportHeader,
10793
11375
  {
10794
11376
  completedAt: report.completedAt,
@@ -10797,11 +11379,11 @@ function ReportDetail({
10797
11379
  title: report.title
10798
11380
  }
10799
11381
  ),
10800
- /* @__PURE__ */ jsxs35(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
10801
- /* @__PURE__ */ jsx50(TabList, { space: 1, children: tabs.map((tab) => {
11382
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
11383
+ /* @__PURE__ */ jsx53(TabList, { space: 1, children: tabs.map((tab) => {
10802
11384
  const isDisabled = disabledTabs.has(tab.id);
10803
11385
  const tooltip = getDisabledTabTooltip(tab.id, summary);
10804
- const tabElement = /* @__PURE__ */ jsx50(
11386
+ const tabElement = /* @__PURE__ */ jsx53(
10805
11387
  Tab,
10806
11388
  {
10807
11389
  "aria-controls": `panel-${tab.id}`,
@@ -10812,27 +11394,27 @@ function ReportDetail({
10812
11394
  selected: currentTab === tab.id
10813
11395
  }
10814
11396
  );
10815
- return isDisabled && tooltip ? /* @__PURE__ */ jsx50(
10816
- Tooltip9,
11397
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx53(
11398
+ Tooltip10,
10817
11399
  {
10818
- content: /* @__PURE__ */ jsx50(Box23, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
11400
+ content: /* @__PURE__ */ jsx53(Box26, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
10819
11401
  placement: "bottom",
10820
11402
  portal: true,
10821
- children: /* @__PURE__ */ jsx50("span", { style: { display: "inline-block" }, children: tabElement })
11403
+ children: /* @__PURE__ */ jsx53("span", { style: { display: "inline-block" }, children: tabElement })
10822
11404
  },
10823
11405
  tab.id
10824
- ) : /* @__PURE__ */ jsx50("span", { children: tabElement }, tab.id);
11406
+ ) : /* @__PURE__ */ jsx53("span", { children: tabElement }, tab.id);
10825
11407
  }) }),
10826
- /* @__PURE__ */ jsxs35(Flex27, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
10827
- /* @__PURE__ */ jsx50(
11408
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
11409
+ /* @__PURE__ */ jsx53(
10828
11410
  HoverTip,
10829
11411
  {
10830
11412
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
10831
- children: /* @__PURE__ */ jsx50(Badge7, { mode: "outline", tone: "default", children: provenance.source.name })
11413
+ children: /* @__PURE__ */ jsx53(Badge8, { mode: "outline", tone: "default", children: provenance.source.name })
10832
11414
  }
10833
11415
  ),
10834
- /* @__PURE__ */ jsx50(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx50(Badge7, { tone: "primary", children: provenance.mode }) }),
10835
- /* @__PURE__ */ jsx50(
11416
+ /* @__PURE__ */ jsx53(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx53(Badge8, { tone: "primary", children: provenance.mode }) }),
11417
+ /* @__PURE__ */ jsx53(
10836
11418
  ReportActions,
10837
11419
  {
10838
11420
  documentId: report._id,
@@ -10843,14 +11425,14 @@ function ReportDetail({
10843
11425
  )
10844
11426
  ] })
10845
11427
  ] }),
10846
- currentTab === "overview" && /* @__PURE__ */ jsx50(
11428
+ currentTab === "overview" && /* @__PURE__ */ jsx53(
10847
11429
  TabPanel,
10848
11430
  {
10849
11431
  "aria-labelledby": "tab-overview",
10850
11432
  hidden: currentTab !== "overview",
10851
11433
  id: "panel-overview",
10852
- children: /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
10853
- /* @__PURE__ */ jsx50(
11434
+ children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11435
+ /* @__PURE__ */ jsx53(
10854
11436
  DiagnosticsOverview,
10855
11437
  {
10856
11438
  comparison,
@@ -10861,18 +11443,19 @@ function ReportDetail({
10861
11443
  totalTests
10862
11444
  }
10863
11445
  ),
10864
- /* @__PURE__ */ jsx50(
11446
+ /* @__PURE__ */ jsx53(CostLatencyPanel, { testResults: summary.testResults }),
11447
+ /* @__PURE__ */ jsx53(
10865
11448
  LineageCard,
10866
11449
  {
10867
11450
  provenance,
10868
11451
  reportId: report.reportId
10869
11452
  }
10870
11453
  ),
10871
- /* @__PURE__ */ jsx50(ProvenanceCard, { provenance })
11454
+ /* @__PURE__ */ jsx53(ProvenanceCard, { provenance })
10872
11455
  ] })
10873
11456
  }
10874
11457
  ),
10875
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx50(
11458
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx53(
10876
11459
  DiagnosticsPanel,
10877
11460
  {
10878
11461
  artifactCache,
@@ -10888,13 +11471,13 @@ function ReportDetail({
10888
11471
  testResults: summary.testResults
10889
11472
  }
10890
11473
  ),
10891
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx50(
11474
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx53(
10892
11475
  TabPanel,
10893
11476
  {
10894
11477
  "aria-labelledby": "tab-activity",
10895
11478
  hidden: currentTab !== "activity",
10896
11479
  id: "panel-activity",
10897
- children: /* @__PURE__ */ jsx50(
11480
+ children: /* @__PURE__ */ jsx53(
10898
11481
  AgentBehaviorCard,
10899
11482
  {
10900
11483
  agentBehavior: summary.agentBehavior,
@@ -10915,6 +11498,7 @@ var DIAG_TABS = [
10915
11498
  { id: "strengths", label: "Strengths" },
10916
11499
  { id: "issues", label: "Issues" }
10917
11500
  ];
11501
+ var SHOW_FAILURE_MODES = false;
10918
11502
  function DiagnosticsPanel({
10919
11503
  artifactCache,
10920
11504
  comparison,
@@ -10932,9 +11516,9 @@ function DiagnosticsPanel({
10932
11516
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
10933
11517
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
10934
11518
  ).length;
10935
- return /* @__PURE__ */ jsx50(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs35(Stack28, { space: 4, children: [
10936
- /* @__PURE__ */ jsx50(
10937
- Flex27,
11519
+ return /* @__PURE__ */ jsx53(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11520
+ /* @__PURE__ */ jsx53(
11521
+ Flex29,
10938
11522
  {
10939
11523
  align: "center",
10940
11524
  gap: 1,
@@ -10943,7 +11527,7 @@ function DiagnosticsPanel({
10943
11527
  paddingBottom: 8
10944
11528
  },
10945
11529
  wrap: "wrap",
10946
- children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs35(
11530
+ children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs38(
10947
11531
  "button",
10948
11532
  {
10949
11533
  onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
@@ -10963,7 +11547,7 @@ function DiagnosticsPanel({
10963
11547
  type: "button",
10964
11548
  children: [
10965
11549
  tab.label,
10966
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx50(
11550
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx53(
10967
11551
  "span",
10968
11552
  {
10969
11553
  style: {
@@ -10983,7 +11567,7 @@ function DiagnosticsPanel({
10983
11567
  ))
10984
11568
  }
10985
11569
  ),
10986
- subTab === "strengths" && /* @__PURE__ */ jsx50(
11570
+ subTab === "strengths" && /* @__PURE__ */ jsx53(
10987
11571
  StrengthsList,
10988
11572
  {
10989
11573
  comparison,
@@ -10992,8 +11576,8 @@ function DiagnosticsPanel({
10992
11576
  scores
10993
11577
  }
10994
11578
  ),
10995
- subTab === "issues" && /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
10996
- /* @__PURE__ */ jsx50(
11579
+ subTab === "issues" && /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11580
+ /* @__PURE__ */ jsx53(
10997
11581
  WeaknessesList,
10998
11582
  {
10999
11583
  comparison,
@@ -11002,8 +11586,8 @@ function DiagnosticsPanel({
11002
11586
  scores
11003
11587
  }
11004
11588
  ),
11005
- /* @__PURE__ */ jsx50(FailureModesPanel, { failureModes }),
11006
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx50(
11589
+ SHOW_FAILURE_MODES && /* @__PURE__ */ jsx53(FailureModesPanel, { failureModes }),
11590
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx53(
11007
11591
  JudgmentList,
11008
11592
  {
11009
11593
  artifactCache,
@@ -11039,17 +11623,17 @@ function getDisabledTabTooltip(tabId, summary) {
11039
11623
  if (!summary) return null;
11040
11624
  switch (tabId) {
11041
11625
  case "diagnostics":
11042
- return /* @__PURE__ */ jsx50(Text36, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
11626
+ return /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
11043
11627
  case "activity":
11044
- return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs35(Text36, { muted: true, size: 2, children: [
11628
+ return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
11045
11629
  "Not available for baseline-only evaluations. Run with",
11046
11630
  " ",
11047
- /* @__PURE__ */ jsx50("code", { style: inlineCodeStyle, children: "--mode full" }),
11631
+ /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode full" }),
11048
11632
  " or",
11049
11633
  " ",
11050
- /* @__PURE__ */ jsx50("code", { style: inlineCodeStyle, children: "--mode agentic" }),
11634
+ /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode agentic" }),
11051
11635
  " to capture agent browsing behavior."
11052
- ] }) : /* @__PURE__ */ jsx50(Text36, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
11636
+ ] }) : /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
11053
11637
  default:
11054
11638
  return null;
11055
11639
  }
@@ -11057,12 +11641,12 @@ function getDisabledTabTooltip(tabId, summary) {
11057
11641
 
11058
11642
  // src/components/report-detail/AreaScoreRow.tsx
11059
11643
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
11060
- import { Box as Box24, Flex as Flex28, Stack as Stack29, Text as Text37 } from "@sanity/ui";
11061
- import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
11644
+ import { Box as Box27, Flex as Flex30, Stack as Stack31, Text as Text40 } from "@sanity/ui";
11645
+ import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
11062
11646
 
11063
11647
  // src/components/report-detail/AreaScoreTable.tsx
11064
11648
  import React4 from "react";
11065
- import { Card as Card17, Stack as Stack30, Text as Text39 } from "@sanity/ui";
11649
+ import { Card as Card18, Stack as Stack32, Text as Text42 } from "@sanity/ui";
11066
11650
 
11067
11651
  // src/lib/scoring.ts
11068
11652
  var HEX_MAP = {
@@ -11079,138 +11663,49 @@ function scoreHex(score) {
11079
11663
  }
11080
11664
 
11081
11665
  // src/components/primitives/ScoreCell.tsx
11082
- import { Card as Card16, Text as Text38 } from "@sanity/ui";
11083
- import { jsx as jsx52 } from "react/jsx-runtime";
11666
+ import { Card as Card17, Text as Text41 } from "@sanity/ui";
11667
+ import { jsx as jsx55 } from "react/jsx-runtime";
11084
11668
 
11085
11669
  // src/components/report-detail/AreaScoreTable.tsx
11086
- import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
11670
+ import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
11087
11671
 
11088
11672
  // src/components/report-detail/AutoComparisonCard.tsx
11089
- import { Badge as Badge8, Box as Box25, Card as Card18, Flex as Flex29, Grid as Grid4, Stack as Stack31, Text as Text40, Tooltip as Tooltip10 } from "@sanity/ui";
11090
- import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
11673
+ import { Badge as Badge9, Box as Box28, Card as Card19, Flex as Flex31, Grid as Grid5, Stack as Stack33, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
11674
+ import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
11091
11675
 
11092
11676
  // src/components/report-detail/OverviewStats.tsx
11093
- import { Grid as Grid5 } from "@sanity/ui";
11094
- import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
11677
+ import { Grid as Grid6 } from "@sanity/ui";
11678
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
11095
11679
 
11096
11680
  // src/components/report-detail/RecommendationsSection.tsx
11097
11681
  import { BoltIcon as BoltIcon2 } from "@sanity/icons";
11098
- import { Box as Box26, Flex as Flex30, Stack as Stack32, Text as Text41 } from "@sanity/ui";
11099
- import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
11682
+ import { Box as Box29, Flex as Flex32, Stack as Stack34, Text as Text44 } from "@sanity/ui";
11683
+ import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
11100
11684
 
11101
11685
  // src/components/report-detail/ThreeLayerTable.tsx
11102
11686
  import React5 from "react";
11103
- import { Badge as Badge9, Card as Card19, Flex as Flex31, Stack as Stack33, Text as Text42 } from "@sanity/ui";
11104
- import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
11687
+ import { Badge as Badge10, Card as Card20, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
11688
+ import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
11105
11689
 
11106
11690
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
11107
- import { Card as Card20 } from "@sanity/ui";
11108
- import { useCallback as useCallback34, useEffect as useEffect13, useRef as useRef8, useState as useState25 } from "react";
11691
+ import { Card as Card21 } from "@sanity/ui";
11692
+ import { useCallback as useCallback34, useEffect as useEffect14, useRef as useRef8, useState as useState25 } from "react";
11109
11693
 
11110
11694
  // src/components/report-detail/JudgmentDetailDrawer.tsx
11111
- import { useEffect as useEffect12, useState as useState24 } from "react";
11695
+ import { useEffect as useEffect13, useState as useState24 } from "react";
11112
11696
  import { CloseIcon as CloseIcon2 } from "@sanity/icons";
11113
11697
  import {
11114
- Box as Box28,
11698
+ Box as Box30,
11115
11699
  Button as Button9,
11116
- Flex as Flex32,
11117
- Stack as Stack34,
11700
+ Flex as Flex34,
11701
+ Stack as Stack36,
11118
11702
  Tab as Tab2,
11119
11703
  TabList as TabList2,
11120
11704
  TabPanel as TabPanel2,
11121
- Text as Text44,
11705
+ Text as Text46,
11122
11706
  Tooltip as Tooltip12
11123
11707
  } from "@sanity/ui";
11124
-
11125
- // src/components/CopyButton.tsx
11126
- import {
11127
- useCallback as useCallback33,
11128
- useEffect as useEffect11,
11129
- useRef as useRef7,
11130
- useState as useState23
11131
- } from "react";
11132
- import { CheckmarkIcon, CopyIcon as CopyIcon3 } from "@sanity/icons";
11133
- import { Box as Box27, Button as Button8, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
11134
- import { jsx as jsx58 } from "react/jsx-runtime";
11135
- function CopyButton({
11136
- copiedLabel = "Copied!",
11137
- errorLabel = "Copy failed",
11138
- label,
11139
- revertAfterMs = 1500,
11140
- style,
11141
- text
11142
- }) {
11143
- const [status, setStatus] = useState23("idle");
11144
- const timerRef = useRef7(null);
11145
- const scheduleRevert = useCallback33(() => {
11146
- if (timerRef.current !== null) window.clearTimeout(timerRef.current);
11147
- timerRef.current = window.setTimeout(() => {
11148
- setStatus("idle");
11149
- timerRef.current = null;
11150
- }, revertAfterMs);
11151
- }, [revertAfterMs]);
11152
- const handleCopy = useCallback33(() => {
11153
- navigator.clipboard.writeText(text).then(
11154
- () => {
11155
- setStatus("copied");
11156
- scheduleRevert();
11157
- },
11158
- () => {
11159
- setStatus("error");
11160
- scheduleRevert();
11161
- }
11162
- );
11163
- }, [text, scheduleRevert]);
11164
- useEffect11(() => {
11165
- return () => {
11166
- if (timerRef.current !== null) window.clearTimeout(timerRef.current);
11167
- };
11168
- }, []);
11169
- const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
11170
- const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
11171
- const icon = status === "copied" ? CheckmarkIcon : CopyIcon3;
11172
- const idle = status === "idle";
11173
- return /* @__PURE__ */ jsx58(
11174
- Tooltip11,
11175
- {
11176
- content: /* @__PURE__ */ jsx58(Box27, { padding: 2, children: /* @__PURE__ */ jsx58(Text43, { size: 1, children: tooltipLabel }) }),
11177
- placement: "left",
11178
- portal: true,
11179
- children: /* @__PURE__ */ jsx58(
11180
- Button8,
11181
- {
11182
- "aria-label": label,
11183
- fontSize: 1,
11184
- icon,
11185
- mode: "bleed",
11186
- onBlur: (e) => {
11187
- if (idle) e.currentTarget.style.opacity = "0.55";
11188
- },
11189
- onClick: handleCopy,
11190
- onFocus: (e) => {
11191
- if (idle) e.currentTarget.style.opacity = "1";
11192
- },
11193
- onMouseEnter: (e) => {
11194
- if (idle) e.currentTarget.style.opacity = "1";
11195
- },
11196
- onMouseLeave: (e) => {
11197
- if (idle) e.currentTarget.style.opacity = "0.55";
11198
- },
11199
- padding: 2,
11200
- style: {
11201
- opacity: idle ? 0.55 : 1,
11202
- transition: "opacity 150ms ease",
11203
- ...style
11204
- },
11205
- tone
11206
- }
11207
- )
11208
- }
11209
- );
11210
- }
11211
-
11212
- // src/components/report-detail/JudgmentDetailDrawer.tsx
11213
- import { jsx as jsx59, jsxs as jsxs42 } from "react/jsx-runtime";
11708
+ import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
11214
11709
  var HEADER_STYLE = {
11215
11710
  borderBottom: "1px solid var(--card-border-color)"
11216
11711
  };
@@ -11233,11 +11728,12 @@ var SECTION_LABEL_STYLE = {
11233
11728
  textTransform: "uppercase"
11234
11729
  };
11235
11730
  var COPYABLE_BLOCK_STYLE = {
11236
- paddingRight: 40
11731
+ position: "relative"
11237
11732
  };
11238
11733
  var COPY_BUTTON_SLOT_STYLE = {
11239
11734
  float: "right",
11240
11735
  marginLeft: 8,
11736
+ marginBottom: 4,
11241
11737
  position: "sticky",
11242
11738
  top: 0,
11243
11739
  zIndex: 1
@@ -11248,7 +11744,7 @@ function DocBadge({
11248
11744
  const [hovered, setHovered] = useState24(false);
11249
11745
  const isLinked = Boolean(doc.documentId);
11250
11746
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
11251
- const badge = /* @__PURE__ */ jsx59(
11747
+ const badge = /* @__PURE__ */ jsx61(
11252
11748
  "span",
11253
11749
  {
11254
11750
  style: {
@@ -11261,13 +11757,13 @@ function DocBadge({
11261
11757
  children: doc.slug
11262
11758
  }
11263
11759
  );
11264
- return /* @__PURE__ */ jsx59(
11760
+ return /* @__PURE__ */ jsx61(
11265
11761
  Tooltip12,
11266
11762
  {
11267
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 2, children: tooltipLabel }) }),
11763
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 2, children: tooltipLabel }) }),
11268
11764
  placement: "bottom",
11269
11765
  portal: true,
11270
- children: isLinked ? /* @__PURE__ */ jsx59(
11766
+ children: isLinked ? /* @__PURE__ */ jsx61(
11271
11767
  "a",
11272
11768
  {
11273
11769
  href: `/intent/edit/id=${doc.documentId}`,
@@ -11282,7 +11778,7 @@ function DocBadge({
11282
11778
  },
11283
11779
  children: badge
11284
11780
  }
11285
- ) : /* @__PURE__ */ jsx59("span", { children: badge })
11781
+ ) : /* @__PURE__ */ jsx61("span", { children: badge })
11286
11782
  }
11287
11783
  );
11288
11784
  }
@@ -11290,6 +11786,7 @@ function JudgmentDetailDrawer({
11290
11786
  artifactCache,
11291
11787
  judgment,
11292
11788
  onClose,
11789
+ onShowPrompts,
11293
11790
  testResult
11294
11791
  }) {
11295
11792
  const [tab, setTab] = useState24("reasoning");
@@ -11299,7 +11796,7 @@ function JudgmentDetailDrawer({
11299
11796
  const dimLabel = dimensionLabel2(judgment.dimension);
11300
11797
  const judgmentId = judgment.id ?? "";
11301
11798
  const [fullJudgment, fullStatus, requestFullJudgment] = useArtifactDetail("graderJudgments", judgmentId);
11302
- useEffect12(() => {
11799
+ useEffect13(() => {
11303
11800
  if (!judgmentId) return;
11304
11801
  if (fullStatus !== "idle") return;
11305
11802
  void requestFullJudgment();
@@ -11307,9 +11804,13 @@ function JudgmentDetailDrawer({
11307
11804
  const fullReason = typeof fullJudgment?.reason === "string" && fullJudgment.reason.length > 0 ? fullJudgment.reason : null;
11308
11805
  const reasoningText = fullReason ?? judgment.reason;
11309
11806
  const reasoningIsPreview = fullReason === null && judgmentId.length > 0 && fullStatus !== "error";
11310
- useEffect12(() => {
11807
+ useEffect13(() => {
11311
11808
  setTab("reasoning");
11312
11809
  }, [judgment.taskId, judgment.dimension, judgment.modelId]);
11810
+ const [fetchDispatched, setFetchDispatched] = useState24(false);
11811
+ useEffect13(() => {
11812
+ setFetchDispatched(false);
11813
+ }, [judgment.taskId, judgment.dimension, judgment.modelId]);
11313
11814
  const inlineOutput = testResult?.responseOutput;
11314
11815
  const artifactEntry = artifactCache?.getOutput(
11315
11816
  judgment.taskId,
@@ -11317,38 +11818,40 @@ function JudgmentDetailDrawer({
11317
11818
  );
11318
11819
  const resolvedOutput = inlineOutput ?? artifactEntry?.responseOutput ?? null;
11319
11820
  const resolvedTruncated = testResult?.responseOutputTruncated ?? artifactEntry?.responseOutputTruncated ?? false;
11320
- const entryKnownToManifest = artifactCache?.hasOutput(judgment.taskId, judgment.modelId) ?? false;
11321
- const canFetchArtifact = !inlineOutput && !artifactEntry && artifactCache != null && entryKnownToManifest;
11322
- const entryUnavailable = !inlineOutput && !artifactEntry && artifactCache != null && !entryKnownToManifest;
11323
- const hasOutputTab = resolvedOutput != null || canFetchArtifact || entryUnavailable;
11324
- useEffect12(() => {
11325
- if (tab === "output" && !resolvedOutput && artifactCache && entryKnownToManifest) {
11326
- artifactCache.fetchOutput(judgment.taskId, judgment.modelId);
11821
+ const canAttemptFetch = !inlineOutput && !artifactEntry && artifactCache != null;
11822
+ const fetchInFlight = canAttemptFetch && artifactCache?.status === "loading";
11823
+ const fetchFailed = canAttemptFetch && artifactCache?.status === "error";
11824
+ const entryUnavailable = canAttemptFetch && fetchDispatched && !fetchInFlight && !fetchFailed;
11825
+ const hasOutputTab = resolvedOutput != null || canAttemptFetch;
11826
+ useEffect13(() => {
11827
+ if (tab === "output" && canAttemptFetch && !fetchDispatched) {
11828
+ setFetchDispatched(true);
11829
+ void artifactCache.fetchOutput(judgment.taskId, judgment.modelId);
11327
11830
  }
11328
11831
  }, [
11329
11832
  tab,
11330
- resolvedOutput,
11833
+ canAttemptFetch,
11834
+ fetchDispatched,
11331
11835
  artifactCache,
11332
- entryKnownToManifest,
11333
11836
  judgment.taskId,
11334
11837
  judgment.modelId
11335
11838
  ]);
11336
- useEffect12(() => {
11839
+ useEffect13(() => {
11337
11840
  const onKeyDown = (e) => {
11338
11841
  if (e.key === "Escape") onClose();
11339
11842
  };
11340
11843
  window.addEventListener("keydown", onKeyDown);
11341
11844
  return () => window.removeEventListener("keydown", onKeyDown);
11342
11845
  }, [onClose]);
11343
- return /* @__PURE__ */ jsxs42(
11344
- Flex32,
11846
+ return /* @__PURE__ */ jsxs45(
11847
+ Flex34,
11345
11848
  {
11346
11849
  "aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
11347
11850
  direction: "column",
11348
11851
  role: "dialog",
11349
11852
  style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
11350
11853
  children: [
11351
- /* @__PURE__ */ jsx59(
11854
+ /* @__PURE__ */ jsx61(
11352
11855
  "div",
11353
11856
  {
11354
11857
  "aria-hidden": true,
@@ -11361,10 +11864,10 @@ function JudgmentDetailDrawer({
11361
11864
  }
11362
11865
  }
11363
11866
  ),
11364
- /* @__PURE__ */ jsxs42(Flex32, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
11365
- /* @__PURE__ */ jsxs42(Stack34, { flex: 1, space: 2, children: [
11366
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 2, wrap: "wrap", children: [
11367
- /* @__PURE__ */ jsx59(
11867
+ /* @__PURE__ */ jsxs45(Flex34, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
11868
+ /* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 2, children: [
11869
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11870
+ /* @__PURE__ */ jsx61(
11368
11871
  "span",
11369
11872
  {
11370
11873
  style: {
@@ -11379,7 +11882,7 @@ function JudgmentDetailDrawer({
11379
11882
  children: judgment.score
11380
11883
  }
11381
11884
  ),
11382
- /* @__PURE__ */ jsx59(
11885
+ /* @__PURE__ */ jsx61(
11383
11886
  "span",
11384
11887
  {
11385
11888
  style: {
@@ -11392,13 +11895,13 @@ function JudgmentDetailDrawer({
11392
11895
  children: dimLabel
11393
11896
  }
11394
11897
  ),
11395
- /* @__PURE__ */ jsx59(
11898
+ /* @__PURE__ */ jsx61(
11396
11899
  Tooltip12,
11397
11900
  {
11398
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: judgment.modelId }) }),
11901
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: judgment.modelId }) }),
11399
11902
  placement: "bottom",
11400
11903
  portal: true,
11401
- children: /* @__PURE__ */ jsx59(
11904
+ children: /* @__PURE__ */ jsx61(
11402
11905
  "span",
11403
11906
  {
11404
11907
  style: {
@@ -11410,12 +11913,12 @@ function JudgmentDetailDrawer({
11410
11913
  fontSize: 12,
11411
11914
  padding: "2px 6px"
11412
11915
  },
11413
- children: shortModelId(judgment.modelId)
11916
+ children: shortModelId2(judgment.modelId)
11414
11917
  }
11415
11918
  )
11416
11919
  }
11417
11920
  ),
11418
- (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx59(
11921
+ (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx61(
11419
11922
  "span",
11420
11923
  {
11421
11924
  "aria-hidden": true,
@@ -11427,38 +11930,38 @@ function JudgmentDetailDrawer({
11427
11930
  }
11428
11931
  }
11429
11932
  ),
11430
- testResult?.latencyMs != null && /* @__PURE__ */ jsx59(
11933
+ testResult?.latencyMs != null && /* @__PURE__ */ jsx61(
11431
11934
  Tooltip12,
11432
11935
  {
11433
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: "End-to-end generation latency for this model call." }) }),
11936
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "End-to-end generation latency for this model call." }) }),
11434
11937
  placement: "bottom",
11435
11938
  portal: true,
11436
- children: /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, children: [
11939
+ children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
11437
11940
  (testResult.latencyMs / 1e3).toFixed(1),
11438
11941
  "s"
11439
11942
  ] })
11440
11943
  }
11441
11944
  ),
11442
- testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx59(
11945
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx61(
11443
11946
  Tooltip12,
11444
11947
  {
11445
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: "Provider-reported cost for this model call." }) }),
11948
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "Provider-reported cost for this model call." }) }),
11446
11949
  placement: "bottom",
11447
11950
  portal: true,
11448
- children: /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, children: [
11951
+ children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
11449
11952
  "$",
11450
11953
  testResult.cost.toFixed(4)
11451
11954
  ] })
11452
11955
  }
11453
11956
  )
11454
11957
  ] }),
11455
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 2, wrap: "wrap", children: [
11456
- /* @__PURE__ */ jsx59(Text44, { size: 2, weight: "medium", children: taskName }),
11457
- /* @__PURE__ */ jsx59(VariantBadge, { variant })
11958
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11959
+ /* @__PURE__ */ jsx61(Text46, { size: 2, weight: "medium", children: taskName }),
11960
+ /* @__PURE__ */ jsx61(VariantBadge, { variant })
11458
11961
  ] })
11459
11962
  ] }),
11460
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 1, children: [
11461
- /* @__PURE__ */ jsx59(
11963
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 1, children: [
11964
+ /* @__PURE__ */ jsx61(
11462
11965
  "span",
11463
11966
  {
11464
11967
  style: {
@@ -11476,7 +11979,7 @@ function JudgmentDetailDrawer({
11476
11979
  children: "Esc"
11477
11980
  }
11478
11981
  ),
11479
- /* @__PURE__ */ jsx59(
11982
+ /* @__PURE__ */ jsx61(
11480
11983
  Button9,
11481
11984
  {
11482
11985
  "aria-label": "Close (Esc)",
@@ -11489,8 +11992,8 @@ function JudgmentDetailDrawer({
11489
11992
  )
11490
11993
  ] })
11491
11994
  ] }),
11492
- /* @__PURE__ */ jsxs42(
11493
- Flex32,
11995
+ /* @__PURE__ */ jsxs45(
11996
+ Flex34,
11494
11997
  {
11495
11998
  align: "center",
11496
11999
  gap: 2,
@@ -11499,8 +12002,8 @@ function JudgmentDetailDrawer({
11499
12002
  paddingY: 2,
11500
12003
  style: TAB_BAR_STYLE,
11501
12004
  children: [
11502
- /* @__PURE__ */ jsx59(Box28, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs42(TabList2, { space: 2, children: [
11503
- /* @__PURE__ */ jsx59(
12005
+ /* @__PURE__ */ jsx61(Box30, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs45(TabList2, { space: 2, children: [
12006
+ /* @__PURE__ */ jsx61(
11504
12007
  Tab2,
11505
12008
  {
11506
12009
  "aria-controls": "judgment-panel-reasoning",
@@ -11510,7 +12013,7 @@ function JudgmentDetailDrawer({
11510
12013
  selected: tab === "reasoning"
11511
12014
  }
11512
12015
  ),
11513
- hasOutputTab && /* @__PURE__ */ jsx59(
12016
+ hasOutputTab && /* @__PURE__ */ jsx61(
11514
12017
  Tab2,
11515
12018
  {
11516
12019
  "aria-controls": "judgment-panel-output",
@@ -11521,19 +12024,24 @@ function JudgmentDetailDrawer({
11521
12024
  }
11522
12025
  )
11523
12026
  ] }) }),
11524
- /* @__PURE__ */ jsx59(JudgmentActions, {})
12027
+ /* @__PURE__ */ jsx61(
12028
+ JudgmentActions,
12029
+ {
12030
+ onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
12031
+ }
12032
+ )
11525
12033
  ]
11526
12034
  }
11527
12035
  ),
11528
- /* @__PURE__ */ jsxs42(Box28, { padding: 4, style: CONTENT_STYLE, children: [
11529
- /* @__PURE__ */ jsx59(
12036
+ /* @__PURE__ */ jsxs45(Box30, { padding: 4, style: CONTENT_STYLE, children: [
12037
+ /* @__PURE__ */ jsx61(
11530
12038
  TabPanel2,
11531
12039
  {
11532
12040
  "aria-labelledby": "judgment-tab-reasoning",
11533
12041
  hidden: tab !== "reasoning",
11534
12042
  id: "judgment-panel-reasoning",
11535
- children: /* @__PURE__ */ jsxs42(Box28, { style: COPYABLE_BLOCK_STYLE, children: [
11536
- /* @__PURE__ */ jsx59(Box28, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx59(
12043
+ children: /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12044
+ /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
11537
12045
  CopyButton,
11538
12046
  {
11539
12047
  copiedLabel: "Reasoning copied",
@@ -11541,26 +12049,26 @@ function JudgmentDetailDrawer({
11541
12049
  text: reasoningText
11542
12050
  }
11543
12051
  ) }),
11544
- /* @__PURE__ */ jsx59(Markdown, { content: reasoningText }),
11545
- reasoningIsPreview && /* @__PURE__ */ jsx59(Text44, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
12052
+ /* @__PURE__ */ jsx61(Markdown, { content: reasoningText }),
12053
+ reasoningIsPreview && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
11546
12054
  ] })
11547
12055
  }
11548
12056
  ),
11549
- hasOutputTab && /* @__PURE__ */ jsxs42(
12057
+ hasOutputTab && /* @__PURE__ */ jsxs45(
11550
12058
  TabPanel2,
11551
12059
  {
11552
12060
  "aria-labelledby": "judgment-tab-output",
11553
12061
  hidden: tab !== "output",
11554
12062
  id: "judgment-panel-output",
11555
12063
  children: [
11556
- !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx59(Text44, { muted: true, size: 1, children: "Model output not available for this entry." }),
11557
- !resolvedOutput && !entryUnavailable && artifactCache?.status === "loading" && /* @__PURE__ */ jsx59(Text44, { muted: true, size: 1, children: "Fetching model output\u2026" }),
11558
- !resolvedOutput && !entryUnavailable && artifactCache?.status === "error" && /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, style: { color: "#f87171" }, children: [
12064
+ !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Fetching model output\u2026" }),
12065
+ !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, style: { color: "#f87171" }, children: [
11559
12066
  "Failed to load model output",
11560
- artifactCache.error ? `: ${artifactCache.error}` : ""
12067
+ artifactCache?.error ? `: ${artifactCache.error}` : ""
11561
12068
  ] }),
11562
- resolvedOutput && /* @__PURE__ */ jsxs42(Box28, { style: COPYABLE_BLOCK_STYLE, children: [
11563
- /* @__PURE__ */ jsx59(Box28, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx59(
12069
+ !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Model output not available for this entry." }),
12070
+ resolvedOutput && /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12071
+ /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
11564
12072
  CopyButton,
11565
12073
  {
11566
12074
  copiedLabel: "Output copied",
@@ -11568,15 +12076,15 @@ function JudgmentDetailDrawer({
11568
12076
  text: resolvedOutput
11569
12077
  }
11570
12078
  ) }),
11571
- /* @__PURE__ */ jsx59(Markdown, { content: resolvedOutput })
12079
+ /* @__PURE__ */ jsx61(Markdown, { content: resolvedOutput })
11572
12080
  ] })
11573
12081
  ]
11574
12082
  }
11575
12083
  )
11576
12084
  ] }),
11577
- judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx59(Box28, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 2, wrap: "wrap", children: [
11578
- /* @__PURE__ */ jsx59("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
11579
- judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx59(DocBadge, { doc }, doc.slug))
12085
+ judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx61(Box30, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
12086
+ /* @__PURE__ */ jsx61("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
12087
+ judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx61(DocBadge, { doc }, doc.slug))
11580
12088
  ] }) })
11581
12089
  ]
11582
12090
  }
@@ -11584,7 +12092,7 @@ function JudgmentDetailDrawer({
11584
12092
  }
11585
12093
 
11586
12094
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
11587
- import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
12095
+ import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
11588
12096
  var MIN_WIDTH2 = 480;
11589
12097
  var MAX_WIDTH2 = 900;
11590
12098
  var OVERLAY_BREAKPOINT2 = 1024;
@@ -11597,7 +12105,7 @@ function useIsNarrow2() {
11597
12105
  const [narrow, setNarrow] = useState25(
11598
12106
  () => typeof window !== "undefined" && window.innerWidth < OVERLAY_BREAKPOINT2
11599
12107
  );
11600
- useEffect13(() => {
12108
+ useEffect14(() => {
11601
12109
  function handleResize() {
11602
12110
  setNarrow(window.innerWidth < OVERLAY_BREAKPOINT2);
11603
12111
  }
@@ -11622,7 +12130,7 @@ function useResizable2(defaultWidth) {
11622
12130
  },
11623
12131
  [width]
11624
12132
  );
11625
- useEffect13(() => {
12133
+ useEffect14(() => {
11626
12134
  function handleMouseMove(e) {
11627
12135
  if (!dragging.current) return;
11628
12136
  const delta = startX.current - e.clientX;
@@ -11654,7 +12162,7 @@ function JudgmentDetailDrawerOutlet({
11654
12162
  const isNarrow = useIsNarrow2();
11655
12163
  const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
11656
12164
  if (!isOpen || !active) return null;
11657
- return /* @__PURE__ */ jsxs43(
12165
+ return /* @__PURE__ */ jsxs46(
11658
12166
  "div",
11659
12167
  {
11660
12168
  style: isNarrow ? {
@@ -11680,7 +12188,7 @@ function JudgmentDetailDrawerOutlet({
11680
12188
  width
11681
12189
  },
11682
12190
  children: [
11683
- !isNarrow && /* @__PURE__ */ jsx60(
12191
+ !isNarrow && /* @__PURE__ */ jsx62(
11684
12192
  "div",
11685
12193
  {
11686
12194
  "aria-label": "Resize judgment drawer",
@@ -11705,8 +12213,8 @@ function JudgmentDetailDrawerOutlet({
11705
12213
  }
11706
12214
  }
11707
12215
  ),
11708
- /* @__PURE__ */ jsx60(
11709
- Card20,
12216
+ /* @__PURE__ */ jsx62(
12217
+ Card21,
11710
12218
  {
11711
12219
  borderLeft: !isNarrow,
11712
12220
  style: {
@@ -11715,12 +12223,13 @@ function JudgmentDetailDrawerOutlet({
11715
12223
  flexDirection: "column",
11716
12224
  overflow: "hidden"
11717
12225
  },
11718
- children: /* @__PURE__ */ jsx60(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx60(
12226
+ children: /* @__PURE__ */ jsx62(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx62(
11719
12227
  JudgmentDetailDrawer,
11720
12228
  {
11721
12229
  artifactCache: active.artifactCache,
11722
12230
  judgment: active.judgment,
11723
12231
  onClose,
12232
+ onShowPrompts: active.onShowPrompts,
11724
12233
  testResult: active.testResult
11725
12234
  }
11726
12235
  ) })
@@ -11732,10 +12241,10 @@ function JudgmentDetailDrawerOutlet({
11732
12241
  }
11733
12242
 
11734
12243
  // src/components/ScoreTimeline.tsx
11735
- import { Card as Card21, Flex as Flex33, Select as Select2, Stack as Stack35, Text as Text45 } from "@sanity/ui";
11736
- import { useCallback as useCallback35, useEffect as useEffect14, useMemo as useMemo14, useState as useState26 } from "react";
12244
+ import { Card as Card22, Flex as Flex35, Select as Select2, Stack as Stack37, Text as Text47 } from "@sanity/ui";
12245
+ import { useCallback as useCallback35, useEffect as useEffect15, useMemo as useMemo16, useState as useState26 } from "react";
11737
12246
  import { useClient as useClient11 } from "sanity";
11738
- import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
12247
+ import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
11739
12248
  var CHART_HEIGHT = 220;
11740
12249
  var CHART_WIDTH = 800;
11741
12250
  var PAD_BOTTOM = 30;
@@ -11774,7 +12283,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11774
12283
  const [loading, setLoading] = useState26(true);
11775
12284
  const [rangeDays, setRangeDays] = useState26(30);
11776
12285
  const [selectedArea, setSelectedArea] = useState26(null);
11777
- const areaNames = useMemo14(() => {
12286
+ const areaNames = useMemo16(() => {
11778
12287
  const names = /* @__PURE__ */ new Set();
11779
12288
  for (const dp of dataPoints) {
11780
12289
  for (const s of dp.scores) {
@@ -11798,10 +12307,10 @@ function ScoreTimeline({ mode = null, source = null }) {
11798
12307
  setLoading(false);
11799
12308
  }
11800
12309
  }, [client, mode, rangeDays, source]);
11801
- useEffect14(() => {
12310
+ useEffect15(() => {
11802
12311
  void fetchData();
11803
12312
  }, [fetchData]);
11804
- const chartPoints = useMemo14(() => {
12313
+ const chartPoints = useMemo16(() => {
11805
12314
  const pts = [];
11806
12315
  const scored = dataPoints.map((dp) => ({
11807
12316
  date: dp.completedAt,
@@ -11815,7 +12324,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11815
12324
  });
11816
12325
  return pts;
11817
12326
  }, [dataPoints, selectedArea]);
11818
- const avgScore = useMemo14(() => {
12327
+ const avgScore = useMemo16(() => {
11819
12328
  if (chartPoints.length === 0) return 0;
11820
12329
  return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
11821
12330
  }, [chartPoints]);
@@ -11834,22 +12343,22 @@ function ScoreTimeline({ mode = null, source = null }) {
11834
12343
  []
11835
12344
  );
11836
12345
  const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
11837
- return /* @__PURE__ */ jsxs44(Stack35, { space: 4, children: [
11838
- /* @__PURE__ */ jsxs44(Flex33, { gap: 3, children: [
11839
- /* @__PURE__ */ jsx61(
12346
+ return /* @__PURE__ */ jsxs47(Stack37, { space: 4, children: [
12347
+ /* @__PURE__ */ jsxs47(Flex35, { gap: 3, children: [
12348
+ /* @__PURE__ */ jsx63(
11840
12349
  Select2,
11841
12350
  {
11842
12351
  onChange: handleRangeChange,
11843
12352
  value: rangeDays?.toString() ?? "all",
11844
- children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx61("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
12353
+ children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx63("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
11845
12354
  }
11846
12355
  ),
11847
- /* @__PURE__ */ jsxs44(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
11848
- /* @__PURE__ */ jsx61("option", { value: "", children: "Overall" }),
11849
- areaNames.map((name) => /* @__PURE__ */ jsx61("option", { value: name, children: name }, name))
12356
+ /* @__PURE__ */ jsxs47(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
12357
+ /* @__PURE__ */ jsx63("option", { value: "", children: "Overall" }),
12358
+ areaNames.map((name) => /* @__PURE__ */ jsx63("option", { value: name, children: name }, name))
11850
12359
  ] })
11851
12360
  ] }),
11852
- /* @__PURE__ */ jsx61(Card21, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx61(Flex33, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx61(Text45, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx61(Flex33, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx61(Text45, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs44(
12361
+ /* @__PURE__ */ jsx63(Card22, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs47(
11853
12362
  "svg",
11854
12363
  {
11855
12364
  style: { display: "block", width: "100%" },
@@ -11857,8 +12366,8 @@ function ScoreTimeline({ mode = null, source = null }) {
11857
12366
  children: [
11858
12367
  Y_TICKS.map((tick) => {
11859
12368
  const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
11860
- return /* @__PURE__ */ jsxs44("g", { children: [
11861
- /* @__PURE__ */ jsx61(
12369
+ return /* @__PURE__ */ jsxs47("g", { children: [
12370
+ /* @__PURE__ */ jsx63(
11862
12371
  "line",
11863
12372
  {
11864
12373
  stroke: "#ccc",
@@ -11869,7 +12378,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11869
12378
  y2: y
11870
12379
  }
11871
12380
  ),
11872
- /* @__PURE__ */ jsx61(
12381
+ /* @__PURE__ */ jsx63(
11873
12382
  "text",
11874
12383
  {
11875
12384
  dominantBaseline: "middle",
@@ -11889,7 +12398,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11889
12398
  chartPoints.length - 1
11890
12399
  ].map((idx) => {
11891
12400
  const p = chartPoints[idx];
11892
- return /* @__PURE__ */ jsx61(
12401
+ return /* @__PURE__ */ jsx63(
11893
12402
  "text",
11894
12403
  {
11895
12404
  fill: "#999",
@@ -11901,7 +12410,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11901
12410
  },
11902
12411
  idx
11903
12412
  );
11904
- }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx61(
12413
+ }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
11905
12414
  "text",
11906
12415
  {
11907
12416
  fill: "#999",
@@ -11913,7 +12422,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11913
12422
  },
11914
12423
  idx
11915
12424
  )),
11916
- /* @__PURE__ */ jsx61(
12425
+ /* @__PURE__ */ jsx63(
11917
12426
  "polyline",
11918
12427
  {
11919
12428
  fill: "none",
@@ -11923,7 +12432,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11923
12432
  strokeWidth: 2.5
11924
12433
  }
11925
12434
  ),
11926
- chartPoints.map((p, idx) => /* @__PURE__ */ jsx61(
12435
+ chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
11927
12436
  "circle",
11928
12437
  {
11929
12438
  cx: p.x,
@@ -11932,7 +12441,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11932
12441
  r: 4,
11933
12442
  stroke: "#fff",
11934
12443
  strokeWidth: 1.5,
11935
- children: /* @__PURE__ */ jsxs44("title", { children: [
12444
+ children: /* @__PURE__ */ jsxs47("title", { children: [
11936
12445
  formatDate(p.date),
11937
12446
  ": ",
11938
12447
  Math.round(p.score)
@@ -11943,7 +12452,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11943
12452
  ]
11944
12453
  }
11945
12454
  ) }),
11946
- /* @__PURE__ */ jsxs44(Text45, { muted: true, size: 2, children: [
12455
+ /* @__PURE__ */ jsxs47(Text47, { muted: true, size: 2, children: [
11947
12456
  chartPoints.length,
11948
12457
  " data point",
11949
12458
  chartPoints.length !== 1 ? "s" : ""
@@ -11953,20 +12462,20 @@ function ScoreTimeline({ mode = null, source = null }) {
11953
12462
  var ScoreTimeline_default = ScoreTimeline;
11954
12463
 
11955
12464
  // src/components/Dashboard.tsx
11956
- import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
12465
+ import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
11957
12466
  var VIEW_PARAM_MAP = {
11958
12467
  compare: "compare",
11959
12468
  timeline: "timeline"
11960
12469
  };
11961
12470
  function Dashboard() {
11962
- return /* @__PURE__ */ jsx62(HelpProvider, { children: /* @__PURE__ */ jsx62(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx62(DashboardShell, {}) }) });
12471
+ return /* @__PURE__ */ jsx64(HelpProvider, { children: /* @__PURE__ */ jsx64(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx64(DashboardShell, {}) }) });
11963
12472
  }
11964
12473
  function DashboardShell() {
11965
12474
  const router = useRouter3();
11966
12475
  const { close: closeDrawer } = useJudgmentDrawer();
11967
12476
  const routerState = router.state;
11968
12477
  const reportId = routerState.reportId ?? null;
11969
- useEffect15(() => {
12478
+ useEffect16(() => {
11970
12479
  if (!reportId) closeDrawer();
11971
12480
  }, [reportId, closeDrawer]);
11972
12481
  const handleJudgmentDrawerClose = useCallback36(() => {
@@ -11977,10 +12486,10 @@ function DashboardShell() {
11977
12486
  router.navigate(state);
11978
12487
  }
11979
12488
  }, [closeDrawer, router]);
11980
- return /* @__PURE__ */ jsxs45(Flex34, { style: { height: "100%" }, children: [
11981
- /* @__PURE__ */ jsx62(Box29, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx62(DashboardContent, {}) }),
11982
- /* @__PURE__ */ jsx62(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
11983
- /* @__PURE__ */ jsx62(HelpDrawer, {})
12489
+ return /* @__PURE__ */ jsxs48(Flex36, { style: { height: "100%" }, children: [
12490
+ /* @__PURE__ */ jsx64(Box31, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx64(DashboardContent, {}) }),
12491
+ /* @__PURE__ */ jsx64(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
12492
+ /* @__PURE__ */ jsx64(HelpDrawer, {})
11984
12493
  ] });
11985
12494
  }
11986
12495
  function DashboardContent() {
@@ -12026,13 +12535,13 @@ function DashboardContent() {
12026
12535
  const handleOpenHelp = useCallback36(() => {
12027
12536
  openHelp(defaultTopic);
12028
12537
  }, [openHelp, defaultTopic]);
12029
- return /* @__PURE__ */ jsx62(Container, { width: 4, children: /* @__PURE__ */ jsxs45(Stack36, { padding: 4, space: 4, children: [
12030
- /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 3, children: [
12031
- /* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 1, children: [
12032
- /* @__PURE__ */ jsx62(Text46, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
12033
- /* @__PURE__ */ jsx62(Text46, { muted: true, size: 2, children: "Evaluation reports and score trends" })
12538
+ return /* @__PURE__ */ jsx64(Container, { width: 4, children: /* @__PURE__ */ jsxs48(Stack38, { padding: 4, space: 4, children: [
12539
+ /* @__PURE__ */ jsxs48(Flex36, { align: "center", gap: 3, children: [
12540
+ /* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 1, children: [
12541
+ /* @__PURE__ */ jsx64(Text48, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
12542
+ /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Evaluation reports and score trends" })
12034
12543
  ] }),
12035
- /* @__PURE__ */ jsx62(
12544
+ /* @__PURE__ */ jsx64(
12036
12545
  Button10,
12037
12546
  {
12038
12547
  icon: HelpCircleIcon8,
@@ -12043,8 +12552,8 @@ function DashboardContent() {
12043
12552
  }
12044
12553
  )
12045
12554
  ] }),
12046
- !isDetail && /* @__PURE__ */ jsxs45(TabList3, { space: 1, children: [
12047
- /* @__PURE__ */ jsx62(
12555
+ !isDetail && /* @__PURE__ */ jsxs48(TabList3, { space: 1, children: [
12556
+ /* @__PURE__ */ jsx64(
12048
12557
  Tab3,
12049
12558
  {
12050
12559
  "aria-controls": "latest-panel",
@@ -12054,7 +12563,7 @@ function DashboardContent() {
12054
12563
  selected: activeTab === "latest"
12055
12564
  }
12056
12565
  ),
12057
- /* @__PURE__ */ jsx62(
12566
+ /* @__PURE__ */ jsx64(
12058
12567
  Tab3,
12059
12568
  {
12060
12569
  "aria-controls": "timeline-panel",
@@ -12064,7 +12573,7 @@ function DashboardContent() {
12064
12573
  selected: activeTab === "timeline"
12065
12574
  }
12066
12575
  ),
12067
- /* @__PURE__ */ jsx62(
12576
+ /* @__PURE__ */ jsx64(
12068
12577
  Tab3,
12069
12578
  {
12070
12579
  "aria-controls": "compare-panel",
@@ -12075,10 +12584,10 @@ function DashboardContent() {
12075
12584
  }
12076
12585
  )
12077
12586
  ] }),
12078
- !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx62(LatestReports, { onSelectReport: handleSelectReport }) }),
12079
- !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx62(ScoreTimeline_default, {}) }),
12080
- !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx62(ComparisonView, {}) }),
12081
- isDetail && reportId && /* @__PURE__ */ jsx62(
12587
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx64(LatestReports, { onSelectReport: handleSelectReport }) }),
12588
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx64(ScoreTimeline_default, {}) }),
12589
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx64(ComparisonView, {}) }),
12590
+ isDetail && reportId && /* @__PURE__ */ jsx64(
12082
12591
  ReportDetail,
12083
12592
  {
12084
12593
  activeTab: routerState.tab ?? null,
@@ -12114,7 +12623,7 @@ function ailfTool(options = {}) {
12114
12623
  // src/actions/RunEvaluationAction.tsx
12115
12624
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
12116
12625
  import { useToast as useToast10 } from "@sanity/ui";
12117
- import { useCallback as useCallback37, useEffect as useEffect16, useRef as useRef9, useState as useState27 } from "react";
12626
+ import { useCallback as useCallback37, useEffect as useEffect17, useRef as useRef9, useState as useState27 } from "react";
12118
12627
  import {
12119
12628
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
12120
12629
  useClient as useClient12,
@@ -12148,7 +12657,7 @@ function createRunEvaluationAction(options = {}) {
12148
12657
  const [state, setState] = useState27({ status: "loading" });
12149
12658
  const requestedAtRef = useRef9(null);
12150
12659
  const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
12151
- useEffect16(() => {
12660
+ useEffect17(() => {
12152
12661
  let cancelled = false;
12153
12662
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
12154
12663
  if (cancelled) return;
@@ -12171,7 +12680,7 @@ function createRunEvaluationAction(options = {}) {
12171
12680
  cancelled = true;
12172
12681
  };
12173
12682
  }, [client, perspectiveId]);
12174
- useEffect16(() => {
12683
+ useEffect17(() => {
12175
12684
  if (state.status !== "requested" && state.status !== "polling") return;
12176
12685
  const { requestId, startedAt } = state;
12177
12686
  if (state.status === "requested") {
@@ -12221,7 +12730,7 @@ function createRunEvaluationAction(options = {}) {
12221
12730
  }, POLL_INTERVAL_MS2);
12222
12731
  return () => clearInterval(interval);
12223
12732
  }, [client, perspectiveId, state]);
12224
- useEffect16(() => {
12733
+ useEffect17(() => {
12225
12734
  if (state.status !== "error") return;
12226
12735
  const timer = setTimeout(() => {
12227
12736
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {