@sanity/ailf-studio 1.7.2 → 1.8.1

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
@@ -100,6 +100,24 @@ import {
100
100
  useProjectId
101
101
  } from "sanity";
102
102
 
103
+ // ../shared/dist/feature-flags.js
104
+ var FEATURE_FLAGS = {
105
+ showFailureModes: {
106
+ enabled: false,
107
+ rationale: 'Current classification is too broad (majority "Unclassified") to be actionable in the diagnostics view.',
108
+ reEnableWhen: "Failure taxonomy is refined so non-Unclassified buckets carry meaningful signal.",
109
+ relatedWorkItem: "W0037-detect-model-output-failures",
110
+ addedAt: "2026-04-22"
111
+ },
112
+ showRegressedSinceLastRun: {
113
+ enabled: false,
114
+ rationale: "Bare list of regressed area names lacks explanatory context for why each regressed.",
115
+ reEnableWhen: "Per-area regression attribution can be surfaced alongside the list.",
116
+ relatedWorkItem: null,
117
+ addedAt: "2026-04-22"
118
+ }
119
+ };
120
+
103
121
  // ../shared/dist/score-grades.js
104
122
  var GRADE_BOUNDARIES = {
105
123
  good: 80,
@@ -1696,11 +1714,6 @@ var reportSchema = defineType4({
1696
1714
  name: "graderPrompts",
1697
1715
  title: "Grader Prompts"
1698
1716
  }),
1699
- defineField4({
1700
- ...artifactRefSchema(),
1701
- name: "taskDefinitions",
1702
- title: "Task Definitions"
1703
- }),
1704
1717
  defineField4({
1705
1718
  ...artifactRefSchema(),
1706
1719
  name: "traces",
@@ -3270,17 +3283,17 @@ import { route } from "sanity/router";
3270
3283
  // src/components/Dashboard.tsx
3271
3284
  import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
3272
3285
  import {
3273
- Box as Box29,
3286
+ Box as Box31,
3274
3287
  Button as Button10,
3275
3288
  Container,
3276
- Flex as Flex34,
3277
- Stack as Stack36,
3289
+ Flex as Flex36,
3290
+ Stack as Stack38,
3278
3291
  Tab as Tab3,
3279
3292
  TabList as TabList3,
3280
3293
  TabPanel as TabPanel3,
3281
- Text as Text46
3294
+ Text as Text48
3282
3295
  } from "@sanity/ui";
3283
- import { useCallback as useCallback36, useEffect as useEffect15 } from "react";
3296
+ import { useCallback as useCallback36, useEffect as useEffect16 } from "react";
3284
3297
  import { useRouter as useRouter3 } from "sanity/router";
3285
3298
 
3286
3299
  // src/lib/help-context.ts
@@ -6050,22 +6063,22 @@ function LatestReports({
6050
6063
  // src/components/report-detail/ReportDetail.tsx
6051
6064
  import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
6052
6065
  import {
6053
- Badge as Badge7,
6054
- Box as Box23,
6055
- Button as Button7,
6056
- Flex as Flex27,
6057
- Stack as Stack28,
6066
+ Badge as Badge8,
6067
+ Box as Box26,
6068
+ Button as Button8,
6069
+ Flex as Flex29,
6070
+ Stack as Stack30,
6058
6071
  Tab,
6059
6072
  TabList,
6060
6073
  TabPanel,
6061
- Text as Text36,
6062
- Tooltip as Tooltip9
6074
+ Text as Text39,
6075
+ Tooltip as Tooltip10
6063
6076
  } from "@sanity/ui";
6064
6077
  import {
6065
- useCallback as useCallback32,
6066
- useEffect as useEffect10,
6078
+ useCallback as useCallback33,
6079
+ useEffect as useEffect12,
6067
6080
  useMemo as useMemo15,
6068
- useState as useState22
6081
+ useState as useState23
6069
6082
  } from "react";
6070
6083
  import { useClient as useClient10 } from "sanity";
6071
6084
 
@@ -6604,14 +6617,7 @@ function GlossaryTip({ text }) {
6604
6617
  );
6605
6618
  }
6606
6619
 
6607
- // src/components/report-detail/DiagnosticsOverview.tsx
6608
- import {
6609
- ArrowDownIcon,
6610
- ArrowUpIcon,
6611
- CheckmarkCircleIcon,
6612
- ErrorOutlineIcon,
6613
- WarningOutlineIcon
6614
- } from "@sanity/icons";
6620
+ // src/components/report-detail/CostLatencyPanel.tsx
6615
6621
  import { Box as Box15, Flex as Flex14, Stack as Stack18, Text as Text23 } from "@sanity/ui";
6616
6622
 
6617
6623
  // src/components/report-detail/diagnostics-styles.ts
@@ -6720,8 +6726,271 @@ function sentimentTextColor(sentiment) {
6720
6726
  return COLORS[sentimentColorKey(sentiment)].text;
6721
6727
  }
6722
6728
 
6729
+ // src/components/report-detail/CostLatencyPanel.tsx
6730
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
6731
+ function median(values) {
6732
+ if (values.length === 0) return null;
6733
+ const sorted = values.slice().sort((a, b) => a - b);
6734
+ const mid = sorted.length >>> 1;
6735
+ return sorted.length % 2 === 0 ? Math.round((sorted[mid - 1] + sorted[mid]) / 2) : sorted[mid];
6736
+ }
6737
+ function rollup(testResults) {
6738
+ let totalCost = 0;
6739
+ let totalTokens = 0;
6740
+ let passed = 0;
6741
+ let failed = 0;
6742
+ const latencies = [];
6743
+ const byModel = /* @__PURE__ */ new Map();
6744
+ for (const t of testResults) {
6745
+ if (typeof t.cost === "number") totalCost += t.cost;
6746
+ if (typeof t.tokenUsage?.total === "number") {
6747
+ totalTokens += t.tokenUsage.total;
6748
+ }
6749
+ if (typeof t.latencyMs === "number") latencies.push(t.latencyMs);
6750
+ if (t.outputFailure) failed++;
6751
+ else passed++;
6752
+ const m = byModel.get(t.modelId) ?? {
6753
+ modelId: t.modelId,
6754
+ calls: 0,
6755
+ cost: 0,
6756
+ tokens: 0,
6757
+ passed: 0
6758
+ };
6759
+ m.calls++;
6760
+ if (typeof t.cost === "number") m.cost += t.cost;
6761
+ if (typeof t.tokenUsage?.total === "number") m.tokens += t.tokenUsage.total;
6762
+ if (!t.outputFailure) m.passed++;
6763
+ byModel.set(t.modelId, m);
6764
+ }
6765
+ return {
6766
+ totalCost,
6767
+ totalTokens,
6768
+ passed,
6769
+ failed,
6770
+ medianLatencyMs: median(latencies),
6771
+ perModel: [...byModel.values()].sort((a, b) => b.cost - a.cost)
6772
+ };
6773
+ }
6774
+ function aggregateRawResultsPreviews(entries) {
6775
+ let totalCost = 0;
6776
+ let totalTokens = 0;
6777
+ const totalLatencies = [];
6778
+ let hadCost = false;
6779
+ let hadTokens = false;
6780
+ let hadLatency = false;
6781
+ const perModelTokens = /* @__PURE__ */ new Map();
6782
+ for (const entry of entries) {
6783
+ const p = entry.preview;
6784
+ if (!p) continue;
6785
+ if (typeof p.cost === "number") {
6786
+ totalCost += p.cost;
6787
+ hadCost = true;
6788
+ }
6789
+ if (typeof p.totalTokens === "number") {
6790
+ totalTokens += p.totalTokens;
6791
+ hadTokens = true;
6792
+ const modelId = entry.association?.model;
6793
+ if (typeof modelId === "string") {
6794
+ perModelTokens.set(
6795
+ modelId,
6796
+ (perModelTokens.get(modelId) ?? 0) + p.totalTokens
6797
+ );
6798
+ }
6799
+ }
6800
+ if (typeof p.latencyMs === "number") {
6801
+ totalLatencies.push(p.latencyMs);
6802
+ hadLatency = true;
6803
+ }
6804
+ }
6805
+ return {
6806
+ totalCost,
6807
+ totalTokens,
6808
+ totalLatencies,
6809
+ hadCost,
6810
+ hadTokens,
6811
+ hadLatency,
6812
+ perModelTokens
6813
+ };
6814
+ }
6815
+ function formatUsd(n) {
6816
+ if (n === 0) return "$0.00";
6817
+ if (n < 0.01) return `$${n.toFixed(4)}`;
6818
+ return `$${n.toFixed(2)}`;
6819
+ }
6820
+ function formatTokens(n) {
6821
+ if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
6822
+ if (n >= 1e3) return `${(n / 1e3).toFixed(1)}k`;
6823
+ return String(n);
6824
+ }
6825
+ function formatLatency(ms) {
6826
+ if (ms === null) return "\u2014";
6827
+ if (ms >= 1e4) return `${(ms / 1e3).toFixed(1)}s`;
6828
+ if (ms >= 1e3) return `${(ms / 1e3).toFixed(2)}s`;
6829
+ return `${ms} ms`;
6830
+ }
6831
+ function shortModelId(id) {
6832
+ const colon = id.lastIndexOf(":");
6833
+ return colon >= 0 ? id.slice(colon + 1) : id;
6834
+ }
6835
+ function CostLatencyPanel({ testResults }) {
6836
+ const rawResultsRef = useArtifactRef("rawResults");
6837
+ if (!testResults || testResults.length === 0) return null;
6838
+ const hasAnyCost = testResults.some((t) => typeof t.cost === "number");
6839
+ const hasAnyLatency = testResults.some((t) => typeof t.latencyMs === "number");
6840
+ if (!hasAnyCost && !hasAnyLatency) return null;
6841
+ const r = rollup(testResults);
6842
+ const totalCalls = r.passed + r.failed;
6843
+ const passRate = totalCalls > 0 ? Math.round(r.passed / totalCalls * 100) : 0;
6844
+ const manifestAgg = aggregateRawResultsPreviews(rawResultsRef?.entries ?? []);
6845
+ const totalTokens = r.totalTokens === 0 && manifestAgg.hadTokens ? manifestAgg.totalTokens : r.totalTokens;
6846
+ const totalCost = r.totalCost === 0 && manifestAgg.hadCost ? manifestAgg.totalCost : r.totalCost;
6847
+ const medianLatencyMs = r.medianLatencyMs === null && manifestAgg.hadLatency ? median(manifestAgg.totalLatencies) : r.medianLatencyMs;
6848
+ const perModel = r.perModel.map((m) => {
6849
+ if (m.tokens > 0) return m;
6850
+ const fallback = manifestAgg.perModelTokens.get(m.modelId);
6851
+ return fallback === void 0 ? m : { ...m, tokens: fallback };
6852
+ });
6853
+ return /* @__PURE__ */ jsx27(Box15, { style: { ...neutralCardStyle, padding: "16px 20px" }, children: /* @__PURE__ */ jsxs21(Stack18, { space: 4, children: [
6854
+ /* @__PURE__ */ jsxs21(Flex14, { align: "baseline", gap: 2, wrap: "wrap", children: [
6855
+ /* @__PURE__ */ jsx27(Text23, { size: 2, weight: "semibold", children: "Cost & Latency" }),
6856
+ /* @__PURE__ */ jsxs21(Text23, { muted: true, size: 1, children: [
6857
+ totalCalls,
6858
+ " call",
6859
+ totalCalls === 1 ? "" : "s"
6860
+ ] })
6861
+ ] }),
6862
+ /* @__PURE__ */ jsxs21(Flex14, { gap: 4, wrap: "wrap", children: [
6863
+ /* @__PURE__ */ jsx27(Stat, { label: "Total cost", value: formatUsd(totalCost) }),
6864
+ /* @__PURE__ */ jsx27(Stat, { label: "Total tokens", value: formatTokens(totalTokens) }),
6865
+ /* @__PURE__ */ jsx27(Stat, { label: "Pass rate", value: `${passRate}%` }),
6866
+ /* @__PURE__ */ jsx27(Stat, { label: "Median latency", value: formatLatency(medianLatencyMs) })
6867
+ ] }),
6868
+ perModel.length > 1 && /* @__PURE__ */ jsxs21(Fragment8, { children: [
6869
+ /* @__PURE__ */ jsx27(Box15, { style: dividerStyle }),
6870
+ /* @__PURE__ */ jsxs21(Stack18, { space: 2, children: [
6871
+ /* @__PURE__ */ jsx27(
6872
+ Text23,
6873
+ {
6874
+ muted: true,
6875
+ size: 1,
6876
+ style: {
6877
+ letterSpacing: "0.05em",
6878
+ textTransform: "uppercase"
6879
+ },
6880
+ weight: "semibold",
6881
+ children: "By model"
6882
+ }
6883
+ ),
6884
+ /* @__PURE__ */ jsx27(Stack18, { space: 1, children: perModel.map((m) => /* @__PURE__ */ jsx27(ModelRow, { row: m }, m.modelId)) })
6885
+ ] })
6886
+ ] })
6887
+ ] }) });
6888
+ }
6889
+ function Stat({ label, value }) {
6890
+ return /* @__PURE__ */ jsxs21(Stack18, { space: 1, children: [
6891
+ /* @__PURE__ */ jsx27(Text23, { muted: true, size: 1, children: label }),
6892
+ /* @__PURE__ */ jsx27(
6893
+ Text23,
6894
+ {
6895
+ size: 3,
6896
+ style: {
6897
+ fontFamily: FONT_STACK_MONO2,
6898
+ fontVariantNumeric: "tabular-nums"
6899
+ },
6900
+ weight: "semibold",
6901
+ children: value
6902
+ }
6903
+ )
6904
+ ] });
6905
+ }
6906
+ function ModelRow({ row }) {
6907
+ const pct = row.calls > 0 ? Math.round(row.passed / row.calls * 100) : 0;
6908
+ return /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 3, style: { padding: "2px 0" }, wrap: "wrap", children: [
6909
+ /* @__PURE__ */ jsx27(
6910
+ Text23,
6911
+ {
6912
+ size: 1,
6913
+ style: {
6914
+ fontFamily: FONT_STACK_MONO2,
6915
+ minWidth: 140
6916
+ },
6917
+ weight: "medium",
6918
+ children: shortModelId(row.modelId)
6919
+ }
6920
+ ),
6921
+ /* @__PURE__ */ jsxs21(
6922
+ Text23,
6923
+ {
6924
+ muted: true,
6925
+ size: 1,
6926
+ style: {
6927
+ fontFamily: FONT_STACK_MONO2,
6928
+ fontVariantNumeric: "tabular-nums",
6929
+ minWidth: 80
6930
+ },
6931
+ children: [
6932
+ row.calls,
6933
+ " call",
6934
+ row.calls === 1 ? "" : "s"
6935
+ ]
6936
+ }
6937
+ ),
6938
+ /* @__PURE__ */ jsx27(
6939
+ Text23,
6940
+ {
6941
+ size: 1,
6942
+ style: {
6943
+ fontFamily: FONT_STACK_MONO2,
6944
+ fontVariantNumeric: "tabular-nums",
6945
+ minWidth: 80
6946
+ },
6947
+ children: formatUsd(row.cost)
6948
+ }
6949
+ ),
6950
+ /* @__PURE__ */ jsxs21(
6951
+ Text23,
6952
+ {
6953
+ muted: true,
6954
+ size: 1,
6955
+ style: {
6956
+ fontFamily: FONT_STACK_MONO2,
6957
+ fontVariantNumeric: "tabular-nums",
6958
+ minWidth: 80
6959
+ },
6960
+ children: [
6961
+ formatTokens(row.tokens),
6962
+ " tok"
6963
+ ]
6964
+ }
6965
+ ),
6966
+ /* @__PURE__ */ jsxs21(
6967
+ Text23,
6968
+ {
6969
+ muted: true,
6970
+ size: 1,
6971
+ style: {
6972
+ fontFamily: FONT_STACK_MONO2,
6973
+ fontVariantNumeric: "tabular-nums"
6974
+ },
6975
+ children: [
6976
+ pct,
6977
+ "% pass"
6978
+ ]
6979
+ }
6980
+ )
6981
+ ] });
6982
+ }
6983
+
6723
6984
  // src/components/report-detail/DiagnosticsOverview.tsx
6724
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
6985
+ import {
6986
+ ArrowDownIcon,
6987
+ ArrowUpIcon,
6988
+ CheckmarkCircleIcon,
6989
+ ErrorOutlineIcon,
6990
+ WarningOutlineIcon
6991
+ } from "@sanity/icons";
6992
+ import { Box as Box16, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
6993
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
6725
6994
  function DiagnosticsOverview({
6726
6995
  scores,
6727
6996
  overall,
@@ -6743,11 +7012,11 @@ function DiagnosticsOverview({
6743
7012
  const regressed = comparison?.regressed ?? [];
6744
7013
  const unchanged = comparison?.unchanged ?? [];
6745
7014
  const hasComparison = improved.length > 0 || regressed.length > 0 || unchanged.length > 0;
6746
- return /* @__PURE__ */ jsxs21(Stack18, { space: 4, children: [
6747
- /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6748
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Baseline" }) }),
6749
- /* @__PURE__ */ jsxs21(Stack18, { space: 3, padding: 3, children: [
6750
- /* @__PURE__ */ jsxs21(
7015
+ return /* @__PURE__ */ jsxs22(Stack19, { space: 4, children: [
7016
+ /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
7017
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Baseline" }) }),
7018
+ /* @__PURE__ */ jsxs22(Stack19, { space: 3, padding: 3, children: [
7019
+ /* @__PURE__ */ jsxs22(
6751
7020
  "div",
6752
7021
  {
6753
7022
  style: {
@@ -6756,7 +7025,7 @@ function DiagnosticsOverview({
6756
7025
  gridTemplateColumns: showDocMetrics ? "repeat(3, 1fr)" : "repeat(2, 1fr)"
6757
7026
  },
6758
7027
  children: [
6759
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx27(
7028
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.overallScore, children: /* @__PURE__ */ jsx28(
6760
7029
  ScoreCard,
6761
7030
  {
6762
7031
  delta: comparison?.deltas.overall,
@@ -6766,7 +7035,7 @@ function DiagnosticsOverview({
6766
7035
  value: Math.round(overall.avgScore)
6767
7036
  }
6768
7037
  ) }),
6769
- showDocMetrics && /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx27(
7038
+ showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.docLift, children: /* @__PURE__ */ jsx28(
6770
7039
  ScoreCard,
6771
7040
  {
6772
7041
  delta: comparison?.deltas.docLift,
@@ -6776,7 +7045,7 @@ function DiagnosticsOverview({
6776
7045
  value: Math.round(overall.avgDocLift)
6777
7046
  }
6778
7047
  ) }),
6779
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx27(
7048
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.tests, children: /* @__PURE__ */ jsx28(
6780
7049
  ScoreCard,
6781
7050
  {
6782
7051
  label: "TESTS",
@@ -6787,7 +7056,7 @@ function DiagnosticsOverview({
6787
7056
  ]
6788
7057
  }
6789
7058
  ),
6790
- /* @__PURE__ */ jsxs21(
7059
+ /* @__PURE__ */ jsxs22(
6791
7060
  "div",
6792
7061
  {
6793
7062
  style: {
@@ -6796,7 +7065,7 @@ function DiagnosticsOverview({
6796
7065
  gridTemplateColumns: showDocMetrics ? "repeat(2, 1fr)" : "1fr"
6797
7066
  },
6798
7067
  children: [
6799
- showDocMetrics && /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx27(
7068
+ showDocMetrics && /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.negativeDocLiftMetric, children: /* @__PURE__ */ jsx28(
6800
7069
  MetricCard,
6801
7070
  {
6802
7071
  label: "Negative Doc Lift",
@@ -6804,12 +7073,12 @@ function DiagnosticsOverview({
6804
7073
  value: `${negativeDocLiftCount} area${negativeDocLiftCount === 1 ? "" : "s"}`
6805
7074
  }
6806
7075
  ) }),
6807
- durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx27(
7076
+ durationMs != null && durationMs > 0 ? /* @__PURE__ */ jsx28(
6808
7077
  HoverTip,
6809
7078
  {
6810
7079
  display: "block",
6811
7080
  text: "Total wall-clock time for the evaluation pipeline run.",
6812
- children: /* @__PURE__ */ jsx27(
7081
+ children: /* @__PURE__ */ jsx28(
6813
7082
  MetricCard,
6814
7083
  {
6815
7084
  label: "Duration",
@@ -6817,15 +7086,15 @@ function DiagnosticsOverview({
6817
7086
  }
6818
7087
  )
6819
7088
  }
6820
- ) : /* @__PURE__ */ jsx27("div", {})
7089
+ ) : /* @__PURE__ */ jsx28("div", {})
6821
7090
  ]
6822
7091
  }
6823
7092
  )
6824
7093
  ] })
6825
7094
  ] }),
6826
- hasAgenticData && /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6827
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Agent Performance" }) }),
6828
- /* @__PURE__ */ jsx27(Stack18, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs21(
7095
+ hasAgenticData && /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
7096
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Agent Performance" }) }),
7097
+ /* @__PURE__ */ jsx28(Stack19, { space: 3, padding: 3, children: /* @__PURE__ */ jsxs22(
6829
7098
  "div",
6830
7099
  {
6831
7100
  style: {
@@ -6834,7 +7103,7 @@ function DiagnosticsOverview({
6834
7103
  gridTemplateColumns: "repeat(3, 1fr)"
6835
7104
  },
6836
7105
  children: [
6837
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx27(
7106
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.actualScore, children: /* @__PURE__ */ jsx28(
6838
7107
  ScoreCard,
6839
7108
  {
6840
7109
  delta: comparison?.deltas.actualDelta,
@@ -6844,7 +7113,7 @@ function DiagnosticsOverview({
6844
7113
  value: Math.round(overall.avgActualScore)
6845
7114
  }
6846
7115
  ) }),
6847
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx27(
7116
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.retrievalGap, children: /* @__PURE__ */ jsx28(
6848
7117
  ScoreCard,
6849
7118
  {
6850
7119
  label: "RETRIEVAL GAP",
@@ -6854,7 +7123,7 @@ function DiagnosticsOverview({
6854
7123
  value: overall.avgRetrievalGap != null ? Math.round(overall.avgRetrievalGap) : 0
6855
7124
  }
6856
7125
  ) }),
6857
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx27(
7126
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.infraEfficiency, children: /* @__PURE__ */ jsx28(
6858
7127
  ScoreCard,
6859
7128
  {
6860
7129
  label: "EFFICIENCY",
@@ -6868,9 +7137,9 @@ function DiagnosticsOverview({
6868
7137
  }
6869
7138
  ) })
6870
7139
  ] }),
6871
- /* @__PURE__ */ jsxs21(Box15, { style: sectionWrapperStyle, children: [
6872
- /* @__PURE__ */ jsx27(Box15, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx27(SectionLabel, { label: "Area Health" }) }),
6873
- /* @__PURE__ */ jsx27(Box15, { padding: 3, children: /* @__PURE__ */ jsxs21(
7140
+ /* @__PURE__ */ jsxs22(Box16, { style: sectionWrapperStyle, children: [
7141
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, style: sectionHeaderStyle, children: /* @__PURE__ */ jsx28(SectionLabel, { label: "Area Health" }) }),
7142
+ /* @__PURE__ */ jsx28(Box16, { padding: 3, children: /* @__PURE__ */ jsxs22(
6874
7143
  "div",
6875
7144
  {
6876
7145
  style: {
@@ -6879,30 +7148,30 @@ function DiagnosticsOverview({
6879
7148
  gridTemplateColumns: "1fr 1fr 1fr"
6880
7149
  },
6881
7150
  children: [
6882
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx27(
7151
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthStrong, children: /* @__PURE__ */ jsx28(
6883
7152
  HealthCard,
6884
7153
  {
6885
7154
  color: strong.length > 0 ? "emerald" : "muted",
6886
7155
  count: strong.length,
6887
- icon: /* @__PURE__ */ jsx27(CheckmarkCircleIcon, {}),
7156
+ icon: /* @__PURE__ */ jsx28(CheckmarkCircleIcon, {}),
6888
7157
  label: "Strong (80+)"
6889
7158
  }
6890
7159
  ) }),
6891
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx27(
7160
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthAttention, children: /* @__PURE__ */ jsx28(
6892
7161
  HealthCard,
6893
7162
  {
6894
7163
  color: attention.length === 0 ? "muted" : "amber",
6895
7164
  count: attention.length,
6896
- icon: /* @__PURE__ */ jsx27(WarningOutlineIcon, {}),
7165
+ icon: /* @__PURE__ */ jsx28(WarningOutlineIcon, {}),
6897
7166
  label: "Attention (70-79)"
6898
7167
  }
6899
7168
  ) }),
6900
- /* @__PURE__ */ jsx27(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx27(
7169
+ /* @__PURE__ */ jsx28(HoverTip, { display: "block", text: GLOSSARY.healthWeak, children: /* @__PURE__ */ jsx28(
6901
7170
  HealthCard,
6902
7171
  {
6903
7172
  color: weak.length === 0 ? "muted" : "red",
6904
7173
  count: weak.length,
6905
- icon: /* @__PURE__ */ jsx27(ErrorOutlineIcon, {}),
7174
+ icon: /* @__PURE__ */ jsx28(ErrorOutlineIcon, {}),
6906
7175
  label: "Weak (<70)"
6907
7176
  }
6908
7177
  ) })
@@ -6910,16 +7179,16 @@ function DiagnosticsOverview({
6910
7179
  }
6911
7180
  ) })
6912
7181
  ] }),
6913
- hasComparison && /* @__PURE__ */ jsxs21(Box15, { style: neutralCardStyle, children: [
6914
- /* @__PURE__ */ jsx27(
6915
- Box15,
7182
+ hasComparison && /* @__PURE__ */ jsxs22(Box16, { style: neutralCardStyle, children: [
7183
+ /* @__PURE__ */ jsx28(
7184
+ Box16,
6916
7185
  {
6917
7186
  padding: 4,
6918
7187
  style: { borderBottom: "1px solid var(--card-border-color)" },
6919
- children: /* @__PURE__ */ jsx27(Text23, { size: 3, weight: "semibold", children: "Change from Previous Run" })
7188
+ children: /* @__PURE__ */ jsx28(Text24, { size: 3, weight: "semibold", children: "Change from Previous Run" })
6920
7189
  }
6921
7190
  ),
6922
- /* @__PURE__ */ jsxs21(
7191
+ /* @__PURE__ */ jsxs22(
6923
7192
  "div",
6924
7193
  {
6925
7194
  style: {
@@ -6927,43 +7196,43 @@ function DiagnosticsOverview({
6927
7196
  gridTemplateColumns: "1fr 1fr 1fr"
6928
7197
  },
6929
7198
  children: [
6930
- /* @__PURE__ */ jsx27(Box15, { padding: 4, children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6931
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6932
- /* @__PURE__ */ jsx27(ArrowUpIcon, { style: { color: "#34d399" } }),
6933
- /* @__PURE__ */ jsxs21(Text23, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
7199
+ /* @__PURE__ */ jsx28(Box16, { padding: 4, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7200
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7201
+ /* @__PURE__ */ jsx28(ArrowUpIcon, { style: { color: "#34d399" } }),
7202
+ /* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#34d399" }, weight: "medium", children: [
6934
7203
  "Improved (",
6935
7204
  improved.length,
6936
7205
  ")"
6937
7206
  ] })
6938
7207
  ] }),
6939
- /* @__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" }) })
7208
+ /* @__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" }) })
6940
7209
  ] }) }),
6941
- /* @__PURE__ */ jsx27(
6942
- Box15,
7210
+ /* @__PURE__ */ jsx28(
7211
+ Box16,
6943
7212
  {
6944
7213
  padding: 4,
6945
7214
  style: { borderLeft: "1px solid var(--card-border-color)" },
6946
- children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6947
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6948
- /* @__PURE__ */ jsx27(ArrowDownIcon, { style: { color: "#f87171" } }),
6949
- /* @__PURE__ */ jsxs21(Text23, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
7215
+ children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7216
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7217
+ /* @__PURE__ */ jsx28(ArrowDownIcon, { style: { color: "#f87171" } }),
7218
+ /* @__PURE__ */ jsxs22(Text24, { size: 2, style: { color: "#f87171" }, weight: "medium", children: [
6950
7219
  "Regressed (",
6951
7220
  regressed.length,
6952
7221
  ")"
6953
7222
  ] })
6954
7223
  ] }),
6955
- /* @__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" }) })
7224
+ /* @__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" }) })
6956
7225
  ] })
6957
7226
  }
6958
7227
  ),
6959
- /* @__PURE__ */ jsx27(
6960
- Box15,
7228
+ /* @__PURE__ */ jsx28(
7229
+ Box16,
6961
7230
  {
6962
7231
  padding: 4,
6963
7232
  style: { borderLeft: "1px solid var(--card-border-color)" },
6964
- children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
6965
- /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 2, children: [
6966
- /* @__PURE__ */ jsx27(
7233
+ children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7234
+ /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 2, children: [
7235
+ /* @__PURE__ */ jsx28(
6967
7236
  "span",
6968
7237
  {
6969
7238
  style: {
@@ -6974,13 +7243,13 @@ function DiagnosticsOverview({
6974
7243
  children: "\u2014"
6975
7244
  }
6976
7245
  ),
6977
- /* @__PURE__ */ jsxs21(Text23, { muted: true, size: 2, weight: "medium", children: [
7246
+ /* @__PURE__ */ jsxs22(Text24, { muted: true, size: 2, weight: "medium", children: [
6978
7247
  "Unchanged (",
6979
7248
  unchanged.length,
6980
7249
  ")"
6981
7250
  ] })
6982
7251
  ] }),
6983
- /* @__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" }) })
7252
+ /* @__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" }) })
6984
7253
  ] })
6985
7254
  }
6986
7255
  )
@@ -6999,8 +7268,8 @@ var sectionHeaderStyle = {
6999
7268
  borderBottom: "1px solid var(--card-border-color)"
7000
7269
  };
7001
7270
  function SectionLabel({ label }) {
7002
- return /* @__PURE__ */ jsx27(
7003
- Text23,
7271
+ return /* @__PURE__ */ jsx28(
7272
+ Text24,
7004
7273
  {
7005
7274
  muted: true,
7006
7275
  size: 1,
@@ -7024,9 +7293,9 @@ function ScoreCard({
7024
7293
  border: "1px solid var(--card-border-color)",
7025
7294
  borderRadius: 6
7026
7295
  };
7027
- return /* @__PURE__ */ jsx27(Box15, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs21(Stack18, { space: 3, children: [
7028
- /* @__PURE__ */ jsx27(
7029
- Text23,
7296
+ return /* @__PURE__ */ jsx28(Box16, { padding: 4, style: cardStyle, children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7297
+ /* @__PURE__ */ jsx28(
7298
+ Text24,
7030
7299
  {
7031
7300
  muted: true,
7032
7301
  size: 1,
@@ -7037,8 +7306,8 @@ function ScoreCard({
7037
7306
  children: label
7038
7307
  }
7039
7308
  ),
7040
- /* @__PURE__ */ jsxs21(Flex14, { align: "baseline", gap: 2, children: [
7041
- /* @__PURE__ */ jsxs21(
7309
+ /* @__PURE__ */ jsxs22(Flex15, { align: "baseline", gap: 2, children: [
7310
+ /* @__PURE__ */ jsxs22(
7042
7311
  "span",
7043
7312
  {
7044
7313
  style: {
@@ -7050,13 +7319,13 @@ function ScoreCard({
7050
7319
  },
7051
7320
  children: [
7052
7321
  value,
7053
- suffix && /* @__PURE__ */ jsx27("span", { style: { fontSize: 24 }, children: suffix })
7322
+ suffix && /* @__PURE__ */ jsx28("span", { style: { fontSize: 24 }, children: suffix })
7054
7323
  ]
7055
7324
  }
7056
7325
  ),
7057
- delta != null && delta !== 0 && /* @__PURE__ */ jsx27(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
7326
+ delta != null && delta !== 0 && /* @__PURE__ */ jsx28(DeltaIndicator, { delta, icon: true, mono: true, size: 1 })
7058
7327
  ] }),
7059
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 1, children: subtitle })
7328
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 1, children: subtitle })
7060
7329
  ] }) });
7061
7330
  }
7062
7331
  function HealthCard({
@@ -7072,18 +7341,18 @@ function HealthCard({
7072
7341
  muted: "var(--card-muted-fg-color)"
7073
7342
  };
7074
7343
  const textColor = TEXT_COLORS[color];
7075
- return /* @__PURE__ */ jsx27(
7076
- Box15,
7344
+ return /* @__PURE__ */ jsx28(
7345
+ Box16,
7077
7346
  {
7078
7347
  padding: 4,
7079
7348
  style: {
7080
7349
  ...sectionStyle(color),
7081
7350
  minHeight: 80
7082
7351
  },
7083
- children: /* @__PURE__ */ jsxs21(Flex14, { align: "center", gap: 3, children: [
7084
- /* @__PURE__ */ jsx27("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
7085
- /* @__PURE__ */ jsxs21(Stack18, { space: 1, children: [
7086
- /* @__PURE__ */ jsx27(
7352
+ children: /* @__PURE__ */ jsxs22(Flex15, { align: "center", gap: 3, children: [
7353
+ /* @__PURE__ */ jsx28("span", { style: { color: textColor, fontSize: 28 }, children: icon }),
7354
+ /* @__PURE__ */ jsxs22(Stack19, { space: 1, children: [
7355
+ /* @__PURE__ */ jsx28(
7087
7356
  "span",
7088
7357
  {
7089
7358
  style: {
@@ -7096,7 +7365,7 @@ function HealthCard({
7096
7365
  children: count
7097
7366
  }
7098
7367
  ),
7099
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: label })
7368
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label })
7100
7369
  ] })
7101
7370
  ] })
7102
7371
  }
@@ -7117,9 +7386,9 @@ function MetricCard({
7117
7386
  padding: 16
7118
7387
  };
7119
7388
  const valueColor = sentiment ? sentimentTextColor(sentiment) : "var(--card-fg-color)";
7120
- return /* @__PURE__ */ jsx27(Box15, { style, children: /* @__PURE__ */ jsxs21(Stack18, { space: 2, children: [
7121
- /* @__PURE__ */ jsx27(Text23, { muted: true, size: 2, children: label }),
7122
- /* @__PURE__ */ jsx27(
7389
+ return /* @__PURE__ */ jsx28(Box16, { style, children: /* @__PURE__ */ jsxs22(Stack19, { space: 2, children: [
7390
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 2, children: label }),
7391
+ /* @__PURE__ */ jsx28(
7123
7392
  "span",
7124
7393
  {
7125
7394
  style: {
@@ -7147,7 +7416,7 @@ function Pill({
7147
7416
  }
7148
7417
  };
7149
7418
  const c = colors[color];
7150
- return /* @__PURE__ */ jsx27(
7419
+ return /* @__PURE__ */ jsx28(
7151
7420
  "span",
7152
7421
  {
7153
7422
  style: {
@@ -7165,7 +7434,7 @@ function Pill({
7165
7434
  }
7166
7435
 
7167
7436
  // src/components/report-detail/FailureModesPanel.tsx
7168
- import { Box as Box16, Flex as Flex15, Stack as Stack19, Text as Text24 } from "@sanity/ui";
7437
+ import { Box as Box17, Flex as Flex16, Stack as Stack20, Text as Text25 } from "@sanity/ui";
7169
7438
 
7170
7439
  // src/lib/useArtifactListRow.ts
7171
7440
  import { useCallback as useCallback18, useMemo as useMemo10 } from "react";
@@ -7561,7 +7830,7 @@ function useGraderJudgmentArtifact(key, listKeys) {
7561
7830
  }
7562
7831
 
7563
7832
  // src/components/report-detail/FailureModesPanel.tsx
7564
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
7833
+ import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
7565
7834
  function severityColor(severity) {
7566
7835
  switch (severity) {
7567
7836
  case "critical":
@@ -7581,25 +7850,25 @@ function FailureModesPanel({ failureModes }) {
7581
7850
  if (!failureModes || failureModes.topTitles.length === 0) return null;
7582
7851
  const allKeys = failureModes.topTitles.map((t) => t.id);
7583
7852
  const classificationPct = Math.round(failureModes.classificationRate);
7584
- return /* @__PURE__ */ jsx28(
7585
- Box16,
7853
+ return /* @__PURE__ */ jsx29(
7854
+ Box17,
7586
7855
  {
7587
7856
  style: {
7588
7857
  ...neutralCardStyle,
7589
7858
  padding: "12px 16px"
7590
7859
  },
7591
- children: /* @__PURE__ */ jsxs22(Stack19, { space: 3, children: [
7592
- /* @__PURE__ */ jsxs22(Flex15, { align: "baseline", gap: 2, wrap: "wrap", children: [
7593
- /* @__PURE__ */ jsx28(Text24, { size: 2, weight: "semibold", children: "Failure Categories" }),
7594
- /* @__PURE__ */ jsxs22(Text24, { muted: true, size: 1, children: [
7860
+ children: /* @__PURE__ */ jsxs23(Stack20, { space: 3, children: [
7861
+ /* @__PURE__ */ jsxs23(Flex16, { align: "baseline", gap: 2, wrap: "wrap", children: [
7862
+ /* @__PURE__ */ jsx29(Text25, { size: 2, weight: "semibold", children: "Failure Categories" }),
7863
+ /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 1, children: [
7595
7864
  failureModes.totalJudgments,
7596
7865
  " judgments \xB7 ",
7597
7866
  classificationPct,
7598
7867
  "% classified"
7599
7868
  ] })
7600
7869
  ] }),
7601
- /* @__PURE__ */ jsx28(Box16, { style: dividerStyle }),
7602
- /* @__PURE__ */ jsx28(Stack19, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx28(
7870
+ /* @__PURE__ */ jsx29(Box17, { style: dividerStyle }),
7871
+ /* @__PURE__ */ jsx29(Stack20, { space: 2, children: failureModes.topTitles.map((row) => /* @__PURE__ */ jsx29(
7603
7872
  FailureModeRow,
7604
7873
  {
7605
7874
  allKeys,
@@ -7623,8 +7892,8 @@ function FailureModeRow({
7623
7892
  const title = artifact.preview?.titlePreview ?? row.title ?? toTitleCase(category);
7624
7893
  const pct = total > 0 ? Math.round(row.count / total * 100) : 0;
7625
7894
  const sevColors = severityColor(severity);
7626
- return /* @__PURE__ */ jsxs22(
7627
- Flex15,
7895
+ return /* @__PURE__ */ jsxs23(
7896
+ Flex16,
7628
7897
  {
7629
7898
  align: "center",
7630
7899
  gap: 3,
@@ -7632,7 +7901,7 @@ function FailureModeRow({
7632
7901
  onMouseEnter: artifact.handlers.onMouseEnter,
7633
7902
  style: { padding: "4px 0" },
7634
7903
  children: [
7635
- /* @__PURE__ */ jsx28(
7904
+ /* @__PURE__ */ jsx29(
7636
7905
  "span",
7637
7906
  {
7638
7907
  style: {
@@ -7649,10 +7918,10 @@ function FailureModeRow({
7649
7918
  children: severity.toUpperCase()
7650
7919
  }
7651
7920
  ),
7652
- /* @__PURE__ */ jsx28(Text24, { size: 1, weight: "medium", children: title }),
7653
- /* @__PURE__ */ jsx28(Text24, { muted: true, size: 1, children: "\xB7" }),
7654
- /* @__PURE__ */ jsxs22(
7655
- Text24,
7921
+ /* @__PURE__ */ jsx29(Text25, { size: 1, weight: "medium", children: title }),
7922
+ /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, children: "\xB7" }),
7923
+ /* @__PURE__ */ jsxs23(
7924
+ Text25,
7656
7925
  {
7657
7926
  muted: true,
7658
7927
  size: 1,
@@ -7675,11 +7944,11 @@ function FailureModeRow({
7675
7944
 
7676
7945
  // src/components/report-detail/LineageCard.tsx
7677
7946
  import { LinkIcon as LinkIcon2 } from "@sanity/icons";
7678
- import { Badge as Badge6, Card as Card13, Flex as Flex16, Stack as Stack20, Text as Text25 } from "@sanity/ui";
7947
+ import { Badge as Badge6, Card as Card13, Flex as Flex17, Stack as Stack21, Text as Text26 } from "@sanity/ui";
7679
7948
  import { useCallback as useCallback19, useEffect as useEffect8, useState as useState14 } from "react";
7680
7949
  import { useClient as useClient5 } from "sanity";
7681
7950
  import { useRouter as useRouter2 } from "sanity/router";
7682
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
7951
+ import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
7683
7952
  var REPORT_TYPE2 = "ailf.report";
7684
7953
  var SPAWNED_REPORTS_QUERY = (
7685
7954
  /* groq */
@@ -7712,12 +7981,12 @@ function LineageCard({ provenance, reportId }) {
7712
7981
  }, [client, reportId]);
7713
7982
  const hasLineage = lineage?.rerunOf || lineage?.comparedAgainst;
7714
7983
  if (!hasLineage && spawned.length === 0) return null;
7715
- return /* @__PURE__ */ jsx29(Card13, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack20, { space: 4, children: [
7716
- /* @__PURE__ */ jsx29(Flex16, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs23(Text25, { size: 3, weight: "semibold", children: [
7717
- /* @__PURE__ */ jsx29(LinkIcon2, {}),
7984
+ return /* @__PURE__ */ jsx30(Card13, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack21, { space: 4, children: [
7985
+ /* @__PURE__ */ jsx30(Flex17, { align: "center", gap: 2, children: /* @__PURE__ */ jsxs24(Text26, { size: 3, weight: "semibold", children: [
7986
+ /* @__PURE__ */ jsx30(LinkIcon2, {}),
7718
7987
  " Lineage"
7719
7988
  ] }) }),
7720
- lineage?.rerunOf && /* @__PURE__ */ jsx29(
7989
+ lineage?.rerunOf && /* @__PURE__ */ jsx30(
7721
7990
  LineageLink,
7722
7991
  {
7723
7992
  label: "Re-run of",
@@ -7725,7 +7994,7 @@ function LineageCard({ provenance, reportId }) {
7725
7994
  router
7726
7995
  }
7727
7996
  ),
7728
- lineage?.comparedAgainst && /* @__PURE__ */ jsx29(
7997
+ lineage?.comparedAgainst && /* @__PURE__ */ jsx30(
7729
7998
  LineageLink,
7730
7999
  {
7731
8000
  label: "Compared against",
@@ -7733,9 +8002,9 @@ function LineageCard({ provenance, reportId }) {
7733
8002
  router
7734
8003
  }
7735
8004
  ),
7736
- spawned.length > 0 && /* @__PURE__ */ jsxs23(Stack20, { space: 2, children: [
7737
- /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
7738
- spawned.map((s) => /* @__PURE__ */ jsx29(SpawnedReportRow, { report: s, router }, s.reportId))
8005
+ spawned.length > 0 && /* @__PURE__ */ jsxs24(Stack21, { space: 2, children: [
8006
+ /* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, weight: "semibold", children: "SPAWNED RE-RUNS" }),
8007
+ spawned.map((s) => /* @__PURE__ */ jsx30(SpawnedReportRow, { report: s, router }, s.reportId))
7739
8008
  ] })
7740
8009
  ] }) });
7741
8010
  }
@@ -7747,12 +8016,12 @@ function LineageLink({
7747
8016
  const handleClick = useCallback19(() => {
7748
8017
  router.navigate({ reportId });
7749
8018
  }, [reportId, router]);
7750
- return /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
7751
- /* @__PURE__ */ jsxs23(Text25, { muted: true, size: 2, weight: "semibold", children: [
8019
+ return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8020
+ /* @__PURE__ */ jsxs24(Text26, { muted: true, size: 2, weight: "semibold", children: [
7752
8021
  label,
7753
8022
  ":"
7754
8023
  ] }),
7755
- /* @__PURE__ */ jsx29(Text25, { size: 2, children: /* @__PURE__ */ jsxs23(
8024
+ /* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsxs24(
7756
8025
  "a",
7757
8026
  {
7758
8027
  href: "#",
@@ -7778,8 +8047,8 @@ function SpawnedReportRow({
7778
8047
  }, [report.reportId, router]);
7779
8048
  const dateLabel = formatShortDate(report.completedAt);
7780
8049
  const label = report.title ?? report.tag ?? dateLabel;
7781
- return /* @__PURE__ */ jsxs23(Flex16, { align: "center", gap: 2, children: [
7782
- /* @__PURE__ */ jsx29(Text25, { size: 2, children: /* @__PURE__ */ jsx29(
8050
+ return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8051
+ /* @__PURE__ */ jsx30(Text26, { size: 2, children: /* @__PURE__ */ jsx30(
7783
8052
  "a",
7784
8053
  {
7785
8054
  href: "#",
@@ -7791,8 +8060,8 @@ function SpawnedReportRow({
7791
8060
  children: label
7792
8061
  }
7793
8062
  ) }),
7794
- (report.title ?? report.tag) && /* @__PURE__ */ jsx29(Text25, { muted: true, size: 1, children: dateLabel }),
7795
- /* @__PURE__ */ jsx29(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
8063
+ (report.title ?? report.tag) && /* @__PURE__ */ jsx30(Text26, { muted: true, size: 1, children: dateLabel }),
8064
+ /* @__PURE__ */ jsx30(Badge6, { fontSize: 1, mode: "outline", tone: "default", children: report.reportId.slice(0, 8) })
7796
8065
  ] });
7797
8066
  }
7798
8067
  function formatShortDate(iso) {
@@ -7808,18 +8077,294 @@ function formatShortDate(iso) {
7808
8077
  }
7809
8078
 
7810
8079
  // src/components/report-detail/JudgmentList.tsx
7811
- import React2, { useCallback as useCallback21, useEffect as useEffect9, useMemo as useMemo11, useRef as useRef6, useState as useState15 } from "react";
8080
+ import React2, { useCallback as useCallback22, useEffect as useEffect11, useMemo as useMemo11, useRef as useRef7, useState as useState16 } from "react";
7812
8081
  import {
7813
8082
  ChevronDownIcon,
7814
8083
  ChevronRightIcon,
7815
8084
  ErrorOutlineIcon as ErrorOutlineIcon2,
7816
8085
  HelpCircleIcon as HelpCircleIcon7
7817
8086
  } from "@sanity/icons";
7818
- import { Box as Box18, Flex as Flex18, Stack as Stack21, Text as Text28, Tooltip as Tooltip8 } from "@sanity/ui";
8087
+ import { Box as Box21, Flex as Flex20, Stack as Stack23, Text as Text31, Tooltip as Tooltip9 } from "@sanity/ui";
8088
+
8089
+ // src/components/report-detail/PromptReplayDrawer.tsx
8090
+ import { useEffect as useEffect10 } from "react";
8091
+ 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";
8092
+
8093
+ // src/components/CopyButton.tsx
8094
+ import {
8095
+ useCallback as useCallback20,
8096
+ useEffect as useEffect9,
8097
+ useRef as useRef6,
8098
+ useState as useState15
8099
+ } from "react";
8100
+ import { CheckmarkIcon, CopyIcon } from "@sanity/icons";
8101
+ import { Box as Box18, Button as Button3, Text as Text27, Tooltip as Tooltip7 } from "@sanity/ui";
8102
+ import { jsx as jsx31 } from "react/jsx-runtime";
8103
+ function CopyButton({
8104
+ copiedLabel = "Copied!",
8105
+ errorLabel = "Copy failed",
8106
+ label,
8107
+ revertAfterMs = 1500,
8108
+ style,
8109
+ text
8110
+ }) {
8111
+ const [status, setStatus] = useState15("idle");
8112
+ const timerRef = useRef6(null);
8113
+ const scheduleRevert = useCallback20(() => {
8114
+ if (timerRef.current !== null) window.clearTimeout(timerRef.current);
8115
+ timerRef.current = window.setTimeout(() => {
8116
+ setStatus("idle");
8117
+ timerRef.current = null;
8118
+ }, revertAfterMs);
8119
+ }, [revertAfterMs]);
8120
+ const handleCopy = useCallback20(() => {
8121
+ navigator.clipboard.writeText(text).then(
8122
+ () => {
8123
+ setStatus("copied");
8124
+ scheduleRevert();
8125
+ },
8126
+ () => {
8127
+ setStatus("error");
8128
+ scheduleRevert();
8129
+ }
8130
+ );
8131
+ }, [text, scheduleRevert]);
8132
+ useEffect9(() => {
8133
+ return () => {
8134
+ if (timerRef.current !== null) window.clearTimeout(timerRef.current);
8135
+ };
8136
+ }, []);
8137
+ const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
8138
+ const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
8139
+ const icon = status === "copied" ? CheckmarkIcon : CopyIcon;
8140
+ const idle = status === "idle";
8141
+ return /* @__PURE__ */ jsx31(
8142
+ Tooltip7,
8143
+ {
8144
+ content: /* @__PURE__ */ jsx31(Box18, { padding: 2, children: /* @__PURE__ */ jsx31(Text27, { size: 1, children: tooltipLabel }) }),
8145
+ placement: "left",
8146
+ portal: true,
8147
+ children: /* @__PURE__ */ jsx31(
8148
+ Button3,
8149
+ {
8150
+ "aria-label": label,
8151
+ fontSize: 1,
8152
+ icon,
8153
+ mode: "bleed",
8154
+ onBlur: (e) => {
8155
+ if (idle) e.currentTarget.style.opacity = "0.55";
8156
+ },
8157
+ onClick: handleCopy,
8158
+ onFocus: (e) => {
8159
+ if (idle) e.currentTarget.style.opacity = "1";
8160
+ },
8161
+ onMouseEnter: (e) => {
8162
+ if (idle) e.currentTarget.style.opacity = "1";
8163
+ },
8164
+ onMouseLeave: (e) => {
8165
+ if (idle) e.currentTarget.style.opacity = "0.55";
8166
+ },
8167
+ padding: 2,
8168
+ style: {
8169
+ opacity: idle ? 0.55 : 1,
8170
+ transition: "opacity 150ms ease",
8171
+ ...style
8172
+ },
8173
+ tone
8174
+ }
8175
+ )
8176
+ }
8177
+ );
8178
+ }
8179
+
8180
+ // src/components/report-detail/PromptReplayDrawer.tsx
8181
+ import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
8182
+ function useArtifactPane(type, entryKey, project) {
8183
+ const ref = useArtifactRef(type);
8184
+ const isLocalStore = ref?.store === "local";
8185
+ const entry = useArtifactEntry(type, entryKey ?? "");
8186
+ const [full, status, request] = useArtifactDetail(type, entryKey ?? "");
8187
+ useEffect10(() => {
8188
+ if (!entryKey) return;
8189
+ if (isLocalStore) return;
8190
+ if (status !== "idle") return;
8191
+ void request();
8192
+ }, [entryKey, status, request, isLocalStore]);
8193
+ const projected = project(entry.preview, full);
8194
+ return {
8195
+ charCount: projected.charCount,
8196
+ extra: projected.extra,
8197
+ fullText: projected.fullText,
8198
+ snippet: projected.snippet,
8199
+ status,
8200
+ isLocalStore,
8201
+ present: entry.present
8202
+ };
8203
+ }
8204
+ function useRenderedPrompt(entryKey) {
8205
+ return useArtifactPane(
8206
+ "renderedPrompts",
8207
+ entryKey,
8208
+ (preview, full) => {
8209
+ const fullText = typeof full?.prompt?.raw === "string" ? full.prompt.raw : null;
8210
+ return {
8211
+ charCount: fullText?.length ?? preview?.promptCharCount ?? 0,
8212
+ extra: preview?.label ?? null,
8213
+ fullText,
8214
+ snippet: preview?.snippet
8215
+ };
8216
+ }
8217
+ );
8218
+ }
8219
+ function useGraderRubric(entryKey) {
8220
+ return useArtifactPane(
8221
+ "graderPrompts",
8222
+ entryKey,
8223
+ (preview, full) => {
8224
+ const rubricText = typeof full?.assertion?.value === "string" ? full.assertion.value : null;
8225
+ return {
8226
+ charCount: rubricText?.length ?? preview?.rubricCharCount ?? 0,
8227
+ extra: preview?.rubricName ? `dim: ${preview.rubricName}` : null,
8228
+ fullText: rubricText,
8229
+ snippet: preview?.snippet
8230
+ };
8231
+ }
8232
+ );
8233
+ }
8234
+ function PromptReplayDrawer({
8235
+ open,
8236
+ renderedPromptKey,
8237
+ graderPromptKey,
8238
+ subtitle,
8239
+ onClose
8240
+ }) {
8241
+ if (!open) return null;
8242
+ return /* @__PURE__ */ jsx32(
8243
+ Dialog,
8244
+ {
8245
+ header: "Prompt replay",
8246
+ id: "prompt-replay-drawer",
8247
+ onClose,
8248
+ width: 4,
8249
+ children: /* @__PURE__ */ jsx32(Box19, { padding: 4, children: /* @__PURE__ */ jsxs25(Stack22, { space: 4, children: [
8250
+ /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: subtitle }),
8251
+ /* @__PURE__ */ jsxs25(Grid3, { columns: [1, 1, 2], gap: 4, children: [
8252
+ /* @__PURE__ */ jsx32(RenderedPromptPane, { entryKey: renderedPromptKey }),
8253
+ /* @__PURE__ */ jsx32(GraderRubricPane, { entryKey: graderPromptKey })
8254
+ ] })
8255
+ ] }) })
8256
+ }
8257
+ );
8258
+ }
8259
+ function RenderedPromptPane({ entryKey }) {
8260
+ const data = useRenderedPrompt(entryKey);
8261
+ return /* @__PURE__ */ jsx32(
8262
+ PromptPane,
8263
+ {
8264
+ copiedLabel: "Prompt copied",
8265
+ copyLabel: "Copy prompt",
8266
+ data,
8267
+ entryKey,
8268
+ paneLabel: "Rendered prompt"
8269
+ }
8270
+ );
8271
+ }
8272
+ function GraderRubricPane({ entryKey }) {
8273
+ const data = useGraderRubric(entryKey);
8274
+ return /* @__PURE__ */ jsx32(
8275
+ PromptPane,
8276
+ {
8277
+ copiedLabel: "Rubric copied",
8278
+ copyLabel: "Copy rubric",
8279
+ data,
8280
+ entryKey,
8281
+ paneLabel: "Grader rubric"
8282
+ }
8283
+ );
8284
+ }
8285
+ function PromptPane({
8286
+ copiedLabel,
8287
+ copyLabel,
8288
+ data,
8289
+ entryKey,
8290
+ paneLabel
8291
+ }) {
8292
+ if (!entryKey) {
8293
+ 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)." }) });
8294
+ }
8295
+ if (!data.present) {
8296
+ 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.)" }) });
8297
+ }
8298
+ const { fullText, snippet, charCount, extra, status, isLocalStore } = data;
8299
+ const displayText = fullText ?? snippet ?? "";
8300
+ const isPreviewOnly = fullText === null;
8301
+ 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;
8302
+ return /* @__PURE__ */ jsxs25(
8303
+ PaneCard,
8304
+ {
8305
+ badges: /* @__PURE__ */ jsxs25(Fragment9, { children: [
8306
+ /* @__PURE__ */ jsxs25(Badge7, { fontSize: 0, tone: "primary", children: [
8307
+ charCount.toLocaleString(),
8308
+ " char",
8309
+ charCount === 1 ? "" : "s"
8310
+ ] }),
8311
+ extra && /* @__PURE__ */ jsx32(Badge7, { fontSize: 0, tone: "default", children: extra })
8312
+ ] }),
8313
+ copyAction: displayText.length > 0 ? /* @__PURE__ */ jsx32(
8314
+ CopyButton,
8315
+ {
8316
+ copiedLabel,
8317
+ label: copyLabel,
8318
+ text: displayText
8319
+ }
8320
+ ) : null,
8321
+ paneLabel,
8322
+ children: [
8323
+ displayText.length === 0 ? /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "(empty)" }) : /* @__PURE__ */ jsx32(
8324
+ "pre",
8325
+ {
8326
+ style: {
8327
+ backgroundColor: "var(--card-muted-bg-color, rgba(0,0,0,0.2))",
8328
+ border: "1px solid var(--card-border-color)",
8329
+ borderRadius: 3,
8330
+ fontFamily: FONT_STACK_MONO2,
8331
+ fontSize: 12,
8332
+ lineHeight: 1.5,
8333
+ margin: 0,
8334
+ maxHeight: 480,
8335
+ overflow: "auto",
8336
+ padding: 12,
8337
+ whiteSpace: "pre-wrap",
8338
+ wordBreak: "break-word"
8339
+ },
8340
+ children: displayText
8341
+ }
8342
+ ),
8343
+ footer
8344
+ ]
8345
+ }
8346
+ );
8347
+ }
8348
+ function PaneCard({
8349
+ badges,
8350
+ children,
8351
+ copyAction,
8352
+ paneLabel
8353
+ }) {
8354
+ return /* @__PURE__ */ jsx32(Card14, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs25(Stack22, { space: 3, children: [
8355
+ /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
8356
+ /* @__PURE__ */ jsx32(Text28, { size: 1, weight: "semibold", children: paneLabel }),
8357
+ badges,
8358
+ /* @__PURE__ */ jsx32(Box19, { flex: 1 }),
8359
+ copyAction
8360
+ ] }),
8361
+ children
8362
+ ] }) });
8363
+ }
7819
8364
 
7820
8365
  // src/components/report-detail/judgment-formatting.tsx
7821
- import { Box as Box17, Text as Text26, Tooltip as Tooltip7 } from "@sanity/ui";
7822
- import { jsx as jsx30 } from "react/jsx-runtime";
8366
+ import { Box as Box20, Text as Text29, Tooltip as Tooltip8 } from "@sanity/ui";
8367
+ import { jsx as jsx33 } from "react/jsx-runtime";
7823
8368
  function judgmentSlug(j) {
7824
8369
  const sep = j.taskId.indexOf(" - ");
7825
8370
  const area = sep > 0 ? j.taskId.substring(0, sep) : j.taskId;
@@ -7836,7 +8381,7 @@ function dimensionLabel2(dim) {
7836
8381
  if (!dim) return "";
7837
8382
  return dim.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
7838
8383
  }
7839
- function shortModelId(id) {
8384
+ function shortModelId2(id) {
7840
8385
  const idx = id.lastIndexOf(":");
7841
8386
  if (idx < 0 || idx === id.length - 1) return id;
7842
8387
  return id.substring(idx + 1);
@@ -7854,13 +8399,13 @@ function splitVariant(taskName) {
7854
8399
  function VariantBadge({ variant }) {
7855
8400
  if (!variant) return null;
7856
8401
  const isGold = variant === "gold";
7857
- return /* @__PURE__ */ jsx30(
7858
- Tooltip7,
8402
+ return /* @__PURE__ */ jsx33(
8403
+ Tooltip8,
7859
8404
  {
7860
- 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." }) }),
8405
+ 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." }) }),
7861
8406
  placement: "bottom",
7862
8407
  portal: true,
7863
- children: /* @__PURE__ */ jsx30(
8408
+ children: /* @__PURE__ */ jsx33(
7864
8409
  "span",
7865
8410
  {
7866
8411
  style: {
@@ -7882,10 +8427,10 @@ function VariantBadge({ variant }) {
7882
8427
  }
7883
8428
 
7884
8429
  // src/components/report-detail/JudgmentListToolbar.tsx
7885
- import { Flex as Flex17, Text as Text27, TextInput as TextInput4 } from "@sanity/ui";
8430
+ import { Flex as Flex19, Text as Text30, TextInput as TextInput4 } from "@sanity/ui";
7886
8431
  import { ResetIcon as ResetIcon2, SearchIcon as SearchIcon5 } from "@sanity/icons";
7887
- import { useCallback as useCallback20 } from "react";
7888
- import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
8432
+ import { useCallback as useCallback21 } from "react";
8433
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
7889
8434
  var FILTERS_BOX_STYLE = {
7890
8435
  background: "var(--card-bg-color)",
7891
8436
  border: "1px solid var(--card-border-color)",
@@ -7978,17 +8523,17 @@ function JudgmentListToolbar({
7978
8523
  totalCount
7979
8524
  }) {
7980
8525
  const hasActiveFilters = query.trim() !== "" || scoreBand !== null || selectedDimensions.size > 0;
7981
- const handleQueryChange = useCallback20(
8526
+ const handleQueryChange = useCallback21(
7982
8527
  (e) => {
7983
8528
  onQueryChange(e.currentTarget.value);
7984
8529
  },
7985
8530
  [onQueryChange]
7986
8531
  );
7987
- return /* @__PURE__ */ jsx31("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs24(Flex17, { direction: "column", gap: 3, children: [
7988
- /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
7989
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
7990
- /* @__PURE__ */ jsx31("div", { style: { flex: "1 0 0px" } }),
7991
- hasActiveFilters && /* @__PURE__ */ jsxs24(
8532
+ return /* @__PURE__ */ jsx34("div", { style: FILTERS_BOX_STYLE, children: /* @__PURE__ */ jsxs26(Flex19, { direction: "column", gap: 3, children: [
8533
+ /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8534
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Filters" }),
8535
+ /* @__PURE__ */ jsx34("div", { style: { flex: "1 0 0px" } }),
8536
+ hasActiveFilters && /* @__PURE__ */ jsxs26(
7992
8537
  "button",
7993
8538
  {
7994
8539
  onBlur: (e) => {
@@ -8015,15 +8560,15 @@ function JudgmentListToolbar({
8015
8560
  },
8016
8561
  type: "button",
8017
8562
  children: [
8018
- /* @__PURE__ */ jsx31(ResetIcon2, { style: { fontSize: 14 } }),
8563
+ /* @__PURE__ */ jsx34(ResetIcon2, { style: { fontSize: 14 } }),
8019
8564
  "Reset"
8020
8565
  ]
8021
8566
  }
8022
8567
  ),
8023
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
8568
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: { whiteSpace: "nowrap" }, children: filteredCount === totalCount ? `${totalCount}` : `${filteredCount} of ${totalCount}` })
8024
8569
  ] }),
8025
- /* @__PURE__ */ jsxs24("div", { style: CONTROLS_ROW_STYLE, children: [
8026
- /* @__PURE__ */ jsx31("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx31(
8570
+ /* @__PURE__ */ jsxs26("div", { style: CONTROLS_ROW_STYLE, children: [
8571
+ /* @__PURE__ */ jsx34("div", { style: { flex: "1 1 220px", maxWidth: 360, minWidth: 160 }, children: /* @__PURE__ */ jsx34(
8027
8572
  TextInput4,
8028
8573
  {
8029
8574
  fontSize: 1,
@@ -8033,7 +8578,7 @@ function JudgmentListToolbar({
8033
8578
  value: query
8034
8579
  }
8035
8580
  ) }),
8036
- /* @__PURE__ */ jsx31(PillGroup2, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx31(
8581
+ /* @__PURE__ */ jsx34(PillGroup2, { label: "Score", children: SCORE_BANDS.map(({ band, label }) => /* @__PURE__ */ jsx34(
8037
8582
  "button",
8038
8583
  {
8039
8584
  onClick: () => onScoreBandChange(band),
@@ -8043,7 +8588,7 @@ function JudgmentListToolbar({
8043
8588
  },
8044
8589
  label
8045
8590
  )) }),
8046
- /* @__PURE__ */ jsx31(PillGroup2, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx31(
8591
+ /* @__PURE__ */ jsx34(PillGroup2, { label: "Sort", children: SORT_OPTIONS.map(({ order, label }) => /* @__PURE__ */ jsx34(
8047
8592
  "button",
8048
8593
  {
8049
8594
  onClick: () => onSortOrderChange(order),
@@ -8054,11 +8599,11 @@ function JudgmentListToolbar({
8054
8599
  order
8055
8600
  )) })
8056
8601
  ] }),
8057
- dimensions.length > 0 && /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, wrap: "wrap", children: [
8058
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
8602
+ dimensions.length > 0 && /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
8603
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: "Dimensions" }),
8059
8604
  dimensions.map((d) => {
8060
8605
  const active = selectedDimensions.has(d.key);
8061
- return /* @__PURE__ */ jsxs24(
8606
+ return /* @__PURE__ */ jsxs26(
8062
8607
  "button",
8063
8608
  {
8064
8609
  "aria-pressed": active,
@@ -8068,7 +8613,7 @@ function JudgmentListToolbar({
8068
8613
  children: [
8069
8614
  d.label,
8070
8615
  " ",
8071
- /* @__PURE__ */ jsx31(
8616
+ /* @__PURE__ */ jsx34(
8072
8617
  "span",
8073
8618
  {
8074
8619
  style: {
@@ -8091,14 +8636,14 @@ function PillGroup2({
8091
8636
  label,
8092
8637
  children
8093
8638
  }) {
8094
- return /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 2, children: [
8095
- /* @__PURE__ */ jsx31(Text27, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
8096
- /* @__PURE__ */ jsx31("div", { style: PILL_GROUP_STYLE2, children })
8639
+ return /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8640
+ /* @__PURE__ */ jsx34(Text30, { muted: true, size: 1, style: GROUP_LABEL_STYLE, weight: "semibold", children: label }),
8641
+ /* @__PURE__ */ jsx34("div", { style: PILL_GROUP_STYLE2, children })
8097
8642
  ] });
8098
8643
  }
8099
8644
 
8100
8645
  // src/components/report-detail/JudgmentList.tsx
8101
- import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
8646
+ import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
8102
8647
  function isOutputFailure(j) {
8103
8648
  if (j.outputFailure) return true;
8104
8649
  return j.score === 0 && j.taskId.includes("(baseline)");
@@ -8167,12 +8712,12 @@ function JudgmentList({
8167
8712
  onFocusChange,
8168
8713
  testResults
8169
8714
  }) {
8170
- const [query, setQuery] = useState15("");
8171
- const [selectedDimensions, setSelectedDimensions] = useState15(
8715
+ const [query, setQuery] = useState16("");
8716
+ const [selectedDimensions, setSelectedDimensions] = useState16(
8172
8717
  () => /* @__PURE__ */ new Set()
8173
8718
  );
8174
- const [scoreBand, setScoreBand] = useState15(null);
8175
- const [sortOrder, setSortOrder] = useState15("score-desc");
8719
+ const [scoreBand, setScoreBand] = useState16(null);
8720
+ const [sortOrder, setSortOrder] = useState16("score-desc");
8176
8721
  const testResultMap = useMemo11(() => {
8177
8722
  const map = /* @__PURE__ */ new Map();
8178
8723
  if (!testResults) return map;
@@ -8221,7 +8766,7 @@ function JudgmentList({
8221
8766
  focusedJudgment.modelId
8222
8767
  )
8223
8768
  ) : void 0;
8224
- const handleDimensionToggle = useCallback21((key) => {
8769
+ const handleDimensionToggle = useCallback22((key) => {
8225
8770
  setSelectedDimensions((prev) => {
8226
8771
  const next = new Set(prev);
8227
8772
  if (next.has(key)) next.delete(key);
@@ -8229,15 +8774,26 @@ function JudgmentList({
8229
8774
  return next;
8230
8775
  });
8231
8776
  }, []);
8232
- const handleReset = useCallback21(() => {
8777
+ const handleReset = useCallback22(() => {
8233
8778
  setQuery("");
8234
8779
  setSelectedDimensions(/* @__PURE__ */ new Set());
8235
8780
  setScoreBand(null);
8236
8781
  }, []);
8237
- const [collapsedAreas, setCollapsedAreas] = useState15(
8782
+ const [promptReplay, setPromptReplay] = useState16(null);
8783
+ const openPromptReplay = useCallback22((j) => {
8784
+ const sep = j.taskId.indexOf(" - ");
8785
+ const rawTaskName = sep > 0 ? j.taskId.substring(sep + 3) : j.taskId;
8786
+ setPromptReplay({
8787
+ renderedPromptKey: testOutputsEntryKey(j.taskId, j.modelId),
8788
+ graderPromptKey: j.id ?? null,
8789
+ subtitle: `${rawTaskName} \xB7 ${j.modelId} \xB7 ${dimensionLabel2(j.dimension)}`
8790
+ });
8791
+ }, []);
8792
+ const closePromptReplay = useCallback22(() => setPromptReplay(null), []);
8793
+ const [collapsedAreas, setCollapsedAreas] = useState16(
8238
8794
  () => /* @__PURE__ */ new Set()
8239
8795
  );
8240
- const toggleArea = useCallback21((area) => {
8796
+ const toggleArea = useCallback22((area) => {
8241
8797
  setCollapsedAreas((prev) => {
8242
8798
  const next = new Set(prev);
8243
8799
  if (next.has(area)) next.delete(area);
@@ -8245,7 +8801,7 @@ function JudgmentList({
8245
8801
  return next;
8246
8802
  });
8247
8803
  }, []);
8248
- useEffect9(() => {
8804
+ useEffect11(() => {
8249
8805
  if (!focusedJudgment) return;
8250
8806
  const area = areaOf(focusedJudgment.taskId);
8251
8807
  setCollapsedAreas((prev) => {
@@ -8255,7 +8811,7 @@ function JudgmentList({
8255
8811
  return next;
8256
8812
  });
8257
8813
  }, [focusedJudgment]);
8258
- const [activeRowSlug, setActiveRowSlug] = useState15(null);
8814
+ const [activeRowSlug, setActiveRowSlug] = useState16(null);
8259
8815
  const flatSlugs = useMemo11(
8260
8816
  () => grouped.flatMap(
8261
8817
  ([, areaJudgments]) => areaJudgments.map((j) => judgmentSlug(j))
@@ -8269,24 +8825,25 @@ function JudgmentList({
8269
8825
  [grouped]
8270
8826
  );
8271
8827
  const effectiveActiveSlug = activeRowSlug && flatSlugs.includes(activeRowSlug) ? activeRowSlug : flatSlugs[0] ?? null;
8272
- useEffect9(() => {
8828
+ useEffect11(() => {
8273
8829
  if (focus) setActiveRowSlug(focus);
8274
8830
  }, [focus]);
8275
- useEffect9(() => {
8831
+ useEffect11(() => {
8276
8832
  if (activeRowSlug && !flatSlugs.includes(activeRowSlug)) {
8277
8833
  setActiveRowSlug(null);
8278
8834
  }
8279
8835
  }, [flatSlugs, activeRowSlug]);
8280
8836
  const { close: closeDrawer, open: openDrawer } = useJudgmentDrawer();
8281
8837
  const { runId: artifactRunId, manifest: artifactManifest } = useReportArtifactContext();
8282
- useEffect9(() => {
8838
+ useEffect11(() => {
8283
8839
  if (focus && focusedJudgment) {
8284
8840
  openDrawer({
8285
8841
  artifactCache,
8286
8842
  judgment: focusedJudgment,
8287
8843
  testResult: focusedTestResult,
8288
8844
  runId: artifactRunId,
8289
- manifest: artifactManifest
8845
+ manifest: artifactManifest,
8846
+ onShowPrompts: openPromptReplay
8290
8847
  });
8291
8848
  } else if (!focus) {
8292
8849
  closeDrawer();
@@ -8299,10 +8856,11 @@ function JudgmentList({
8299
8856
  openDrawer,
8300
8857
  closeDrawer,
8301
8858
  artifactRunId,
8302
- artifactManifest
8859
+ artifactManifest,
8860
+ openPromptReplay
8303
8861
  ]);
8304
- const prevFocusRef = useRef6(focus);
8305
- useEffect9(() => {
8862
+ const prevFocusRef = useRef7(focus);
8863
+ useEffect11(() => {
8306
8864
  const prev = prevFocusRef.current;
8307
8865
  prevFocusRef.current = focus;
8308
8866
  if (prev && !focus) {
@@ -8312,7 +8870,7 @@ function JudgmentList({
8312
8870
  });
8313
8871
  }
8314
8872
  }, [focus, activeRowSlug]);
8315
- const handleListKeyDown = useCallback21(
8873
+ const handleListKeyDown = useCallback22(
8316
8874
  (e) => {
8317
8875
  const key = e.key;
8318
8876
  const isNav = key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End" || key === "j" || key === "k";
@@ -8347,20 +8905,20 @@ function JudgmentList({
8347
8905
  if (judgments.length === 0) return null;
8348
8906
  if (pruned.length === 0) return null;
8349
8907
  const outputFailureCount = judgments.length - pruned.length;
8350
- return /* @__PURE__ */ jsxs25(Stack21, { space: 3, children: [
8351
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, children: [
8352
- /* @__PURE__ */ jsx32(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
8353
- /* @__PURE__ */ jsx32(Text28, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
8354
- /* @__PURE__ */ jsx32(
8355
- Tooltip8,
8908
+ return /* @__PURE__ */ jsxs27(Stack23, { space: 3, children: [
8909
+ /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, children: [
8910
+ /* @__PURE__ */ jsx35(ErrorOutlineIcon2, { style: { color: "#fbbf24" } }),
8911
+ /* @__PURE__ */ jsx35(Text31, { size: 2, weight: "medium", children: "Low-Scoring Judgments" }),
8912
+ /* @__PURE__ */ jsx35(
8913
+ Tooltip9,
8356
8914
  {
8357
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx32(Text28, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
8915
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx35(Text31, { size: 2, children: GLOSSARY.lowScoringJudgments }) }),
8358
8916
  placement: "bottom",
8359
8917
  portal: true,
8360
- children: /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: /* @__PURE__ */ jsx32(HelpCircleIcon7, {}) })
8918
+ children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(HelpCircleIcon7, {}) })
8361
8919
  }
8362
8920
  ),
8363
- /* @__PURE__ */ jsxs25(
8921
+ /* @__PURE__ */ jsxs27(
8364
8922
  "span",
8365
8923
  {
8366
8924
  style: {
@@ -8379,10 +8937,10 @@ function JudgmentList({
8379
8937
  ]
8380
8938
  }
8381
8939
  ),
8382
- outputFailureCount > 0 && /* @__PURE__ */ jsx32(
8383
- Tooltip8,
8940
+ outputFailureCount > 0 && /* @__PURE__ */ jsx35(
8941
+ Tooltip9,
8384
8942
  {
8385
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs25(Text28, { size: 2, children: [
8943
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, style: { maxWidth: 280 }, children: /* @__PURE__ */ jsxs27(Text31, { size: 2, children: [
8386
8944
  outputFailureCount,
8387
8945
  " judgment",
8388
8946
  outputFailureCount === 1 ? "" : "s",
@@ -8390,7 +8948,7 @@ function JudgmentList({
8390
8948
  ] }) }),
8391
8949
  placement: "bottom",
8392
8950
  portal: true,
8393
- children: /* @__PURE__ */ jsxs25(
8951
+ children: /* @__PURE__ */ jsxs27(
8394
8952
  "span",
8395
8953
  {
8396
8954
  style: {
@@ -8412,7 +8970,7 @@ function JudgmentList({
8412
8970
  }
8413
8971
  )
8414
8972
  ] }),
8415
- /* @__PURE__ */ jsx32(
8973
+ /* @__PURE__ */ jsx35(
8416
8974
  JudgmentListToolbar,
8417
8975
  {
8418
8976
  dimensions: dimensionOptions,
@@ -8429,11 +8987,21 @@ function JudgmentList({
8429
8987
  totalCount: pruned.length
8430
8988
  }
8431
8989
  ),
8432
- filtered.length === 0 ? /* @__PURE__ */ jsx32(Box18, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8433
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 2, children: "No judgments match these filters." }),
8434
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
8435
- ] }) }) : /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8436
- /* @__PURE__ */ jsx32(
8990
+ /* @__PURE__ */ jsx35(
8991
+ PromptReplayDrawer,
8992
+ {
8993
+ graderPromptKey: promptReplay?.graderPromptKey ?? null,
8994
+ onClose: closePromptReplay,
8995
+ open: promptReplay !== null,
8996
+ renderedPromptKey: promptReplay?.renderedPromptKey ?? null,
8997
+ subtitle: promptReplay?.subtitle ?? ""
8998
+ }
8999
+ ),
9000
+ filtered.length === 0 ? /* @__PURE__ */ jsx35(Box21, { padding: 4, style: neutralCardStyle, children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
9001
+ /* @__PURE__ */ jsx35(Text31, { muted: true, size: 2, children: "No judgments match these filters." }),
9002
+ /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: "Try clearing a filter or widening the score band." })
9003
+ ] }) }) : /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
9004
+ /* @__PURE__ */ jsx35(
8437
9005
  AreaJumpRail,
8438
9006
  {
8439
9007
  areas: groupedWithStats.map(([area, list]) => ({
@@ -8442,20 +9010,20 @@ function JudgmentList({
8442
9010
  }))
8443
9011
  }
8444
9012
  ),
8445
- /* @__PURE__ */ jsx32(Box18, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
9013
+ /* @__PURE__ */ jsx35(Box21, { onKeyDown: handleListKeyDown, style: neutralCardStyle, children: groupedWithStats.map(
8446
9014
  ([area, areaJudgments, stats], groupIndex) => {
8447
9015
  const anchorId = areaAnchorId(area);
8448
9016
  const collapsed = collapsedAreas.has(area);
8449
9017
  const groupBodyId = `${anchorId}-body`;
8450
- return /* @__PURE__ */ jsx32(
8451
- Box18,
9018
+ return /* @__PURE__ */ jsx35(
9019
+ Box21,
8452
9020
  {
8453
9021
  id: anchorId,
8454
9022
  padding: 3,
8455
9023
  style: groupIndex > 0 ? dividerStyle : void 0,
8456
- children: /* @__PURE__ */ jsxs25(Stack21, { space: 2, children: [
8457
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
8458
- /* @__PURE__ */ jsxs25(
9024
+ children: /* @__PURE__ */ jsxs27(Stack23, { space: 2, children: [
9025
+ /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
9026
+ /* @__PURE__ */ jsxs27(
8459
9027
  "button",
8460
9028
  {
8461
9029
  "aria-controls": groupBodyId,
@@ -8469,7 +9037,7 @@ function JudgmentList({
8469
9037
  },
8470
9038
  type: "button",
8471
9039
  children: [
8472
- /* @__PURE__ */ jsx32(
9040
+ /* @__PURE__ */ jsx35(
8473
9041
  "span",
8474
9042
  {
8475
9043
  "aria-hidden": true,
@@ -8479,13 +9047,13 @@ function JudgmentList({
8479
9047
  display: "inline-flex",
8480
9048
  fontSize: 14
8481
9049
  },
8482
- children: collapsed ? /* @__PURE__ */ jsx32(ChevronRightIcon, {}) : /* @__PURE__ */ jsx32(ChevronDownIcon, {})
9050
+ children: collapsed ? /* @__PURE__ */ jsx35(ChevronRightIcon, {}) : /* @__PURE__ */ jsx35(ChevronDownIcon, {})
8483
9051
  }
8484
9052
  ),
8485
- /* @__PURE__ */ jsxs25(Text28, { size: 2, weight: "semibold", children: [
9053
+ /* @__PURE__ */ jsxs27(Text31, { size: 2, weight: "semibold", children: [
8486
9054
  area,
8487
9055
  " ",
8488
- /* @__PURE__ */ jsxs25(
9056
+ /* @__PURE__ */ jsxs27(
8489
9057
  "span",
8490
9058
  {
8491
9059
  style: {
@@ -8503,10 +9071,10 @@ function JudgmentList({
8503
9071
  ]
8504
9072
  }
8505
9073
  ),
8506
- /* @__PURE__ */ jsx32(
8507
- Tooltip8,
9074
+ /* @__PURE__ */ jsx35(
9075
+ Tooltip9,
8508
9076
  {
8509
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, children: /* @__PURE__ */ jsxs25(Text28, { size: 1, children: [
9077
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsxs27(Text31, { size: 1, children: [
8510
9078
  "Average score across the ",
8511
9079
  areaJudgments.length,
8512
9080
  " ",
@@ -8516,7 +9084,7 @@ function JudgmentList({
8516
9084
  ] }) }),
8517
9085
  placement: "bottom",
8518
9086
  portal: true,
8519
- children: /* @__PURE__ */ jsxs25(
9087
+ children: /* @__PURE__ */ jsxs27(
8520
9088
  "span",
8521
9089
  {
8522
9090
  style: {
@@ -8536,12 +9104,12 @@ function JudgmentList({
8536
9104
  )
8537
9105
  }
8538
9106
  ),
8539
- /* @__PURE__ */ jsx32(DistributionBar, { bands: stats.bands }),
8540
- stats.breakdown.length > 0 && /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
9107
+ /* @__PURE__ */ jsx35(DistributionBar, { bands: stats.bands }),
9108
+ stats.breakdown.length > 0 && /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: stats.breakdown.map((d) => `${d.label} ${d.count}`).join(" \xB7 ") })
8541
9109
  ] }),
8542
- !collapsed && /* @__PURE__ */ jsx32(Stack21, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
9110
+ !collapsed && /* @__PURE__ */ jsx35(Stack23, { id: groupBodyId, space: 1, children: areaJudgments.map((j) => {
8543
9111
  const slug = judgmentSlug(j);
8544
- return /* @__PURE__ */ jsx32(
9112
+ return /* @__PURE__ */ jsx35(
8545
9113
  JudgmentCard,
8546
9114
  {
8547
9115
  allKeys: flatKeys,
@@ -8571,7 +9139,7 @@ function JudgmentCard({
8571
9139
  slug,
8572
9140
  tabbable
8573
9141
  }) {
8574
- const cardRef = useRef6(null);
9142
+ const cardRef = useRef7(null);
8575
9143
  const judgmentId = judgment.id ?? "";
8576
9144
  const row = useGraderJudgmentArtifact(judgmentId, allKeys);
8577
9145
  const testOutputsPrefetch = useArtifactPrefetch("testOutputs");
@@ -8581,7 +9149,7 @@ function JudgmentCard({
8581
9149
  const sep = judgment.taskId.indexOf(" - ");
8582
9150
  const rawTaskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
8583
9151
  const { name: taskName, variant } = splitVariant(rawTaskName);
8584
- useEffect9(() => {
9152
+ useEffect11(() => {
8585
9153
  if (focused) {
8586
9154
  const timer = setTimeout(() => {
8587
9155
  cardRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
@@ -8589,10 +9157,10 @@ function JudgmentCard({
8589
9157
  return () => clearTimeout(timer);
8590
9158
  }
8591
9159
  }, []);
8592
- const handleClick = useCallback21(() => {
9160
+ const handleClick = useCallback22(() => {
8593
9161
  onFocusChange?.(focused ? null : slug);
8594
9162
  }, [focused, slug, onFocusChange]);
8595
- const handleKeyDown = useCallback21(
9163
+ const handleKeyDown = useCallback22(
8596
9164
  (e) => {
8597
9165
  if (e.key === "Enter" || e.key === " ") {
8598
9166
  e.preventDefault();
@@ -8605,16 +9173,16 @@ function JudgmentCard({
8605
9173
  () => testOutputsKey ? testOutputsPrefetch.onHover(testOutputsKey) : null,
8606
9174
  [testOutputsPrefetch, testOutputsKey]
8607
9175
  );
8608
- const handleMouseEnter = useCallback21(() => {
9176
+ const handleMouseEnter = useCallback22(() => {
8609
9177
  row.handlers.onMouseEnter();
8610
9178
  onHoverTestOutputs?.();
8611
9179
  }, [row.handlers, onHoverTestOutputs]);
8612
- const handleFocusPrefetch = useCallback21(() => {
9180
+ const handleFocusPrefetch = useCallback22(() => {
8613
9181
  row.handlers.onFocus();
8614
9182
  onHoverTestOutputs?.();
8615
9183
  }, [row.handlers, onHoverTestOutputs]);
8616
- return /* @__PURE__ */ jsx32(
8617
- Box18,
9184
+ return /* @__PURE__ */ jsx35(
9185
+ Box21,
8618
9186
  {
8619
9187
  "aria-expanded": focused,
8620
9188
  "aria-label": `${score} ${dimLabel}: ${taskName}`,
@@ -8637,8 +9205,8 @@ function JudgmentCard({
8637
9205
  } : {}
8638
9206
  },
8639
9207
  tabIndex: tabbable ? 0 : -1,
8640
- children: /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
8641
- /* @__PURE__ */ jsx32(
9208
+ children: /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
9209
+ /* @__PURE__ */ jsx35(
8642
9210
  "span",
8643
9211
  {
8644
9212
  style: {
@@ -8653,7 +9221,7 @@ function JudgmentCard({
8653
9221
  children: score
8654
9222
  }
8655
9223
  ),
8656
- /* @__PURE__ */ jsx32(
9224
+ /* @__PURE__ */ jsx35(
8657
9225
  "span",
8658
9226
  {
8659
9227
  style: {
@@ -8666,15 +9234,15 @@ function JudgmentCard({
8666
9234
  children: dimLabel
8667
9235
  }
8668
9236
  ),
8669
- /* @__PURE__ */ jsx32(Text28, { size: 1, weight: "medium", children: taskName }),
8670
- /* @__PURE__ */ jsx32(VariantBadge, { variant }),
8671
- /* @__PURE__ */ jsx32(
8672
- Tooltip8,
9237
+ /* @__PURE__ */ jsx35(Text31, { size: 1, weight: "medium", children: taskName }),
9238
+ /* @__PURE__ */ jsx35(VariantBadge, { variant }),
9239
+ /* @__PURE__ */ jsx35(
9240
+ Tooltip9,
8673
9241
  {
8674
- content: /* @__PURE__ */ jsx32(Box18, { padding: 2, children: /* @__PURE__ */ jsx32(Text28, { size: 1, children: judgment.modelId }) }),
9242
+ content: /* @__PURE__ */ jsx35(Box21, { padding: 2, children: /* @__PURE__ */ jsx35(Text31, { size: 1, children: judgment.modelId }) }),
8675
9243
  placement: "bottom",
8676
9244
  portal: true,
8677
- children: /* @__PURE__ */ jsx32(
9245
+ children: /* @__PURE__ */ jsx35(
8678
9246
  "span",
8679
9247
  {
8680
9248
  style: {
@@ -8686,12 +9254,12 @@ function JudgmentCard({
8686
9254
  fontSize: 11,
8687
9255
  padding: "1px 6px"
8688
9256
  },
8689
- children: shortModelId(judgment.modelId)
9257
+ children: shortModelId2(judgment.modelId)
8690
9258
  }
8691
9259
  )
8692
9260
  }
8693
9261
  ),
8694
- /* @__PURE__ */ jsx32(Text28, { muted: true, size: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx32(ChevronRightIcon, {}) })
9262
+ /* @__PURE__ */ jsx35(Flex20, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx35(Text31, { muted: true, size: 1, children: /* @__PURE__ */ jsx35(ChevronRightIcon, {}) }) })
8695
9263
  ] })
8696
9264
  }
8697
9265
  );
@@ -8721,13 +9289,13 @@ function DistributionBar({ bands }) {
8721
9289
  label: `${bands.borderline} borderline (50\u201369)`
8722
9290
  });
8723
9291
  }
8724
- return /* @__PURE__ */ jsx32(
8725
- Tooltip8,
9292
+ return /* @__PURE__ */ jsx35(
9293
+ Tooltip9,
8726
9294
  {
8727
- 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)) }) }),
9295
+ 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)) }) }),
8728
9296
  placement: "bottom",
8729
9297
  portal: true,
8730
- children: /* @__PURE__ */ jsx32(
9298
+ children: /* @__PURE__ */ jsx35(
8731
9299
  "div",
8732
9300
  {
8733
9301
  "aria-label": parts.map((p) => p.label).join(", "),
@@ -8741,7 +9309,7 @@ function DistributionBar({ bands }) {
8741
9309
  overflow: "hidden",
8742
9310
  width: 72
8743
9311
  },
8744
- children: parts.map((p) => /* @__PURE__ */ jsx32(
9312
+ children: parts.map((p) => /* @__PURE__ */ jsx35(
8745
9313
  "div",
8746
9314
  {
8747
9315
  style: {
@@ -8757,14 +9325,14 @@ function DistributionBar({ bands }) {
8757
9325
  );
8758
9326
  }
8759
9327
  function AreaJumpRail({ areas }) {
8760
- const handleJump = useCallback21((area) => {
9328
+ const handleJump = useCallback22((area) => {
8761
9329
  const el = document.getElementById(areaAnchorId(area));
8762
9330
  el?.scrollIntoView({ behavior: "smooth", block: "start" });
8763
9331
  }, []);
8764
9332
  if (areas.length <= 1) return null;
8765
- return /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
8766
- /* @__PURE__ */ jsx32(
8767
- Text28,
9333
+ return /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 2, style: { padding: "2px 0" }, wrap: "wrap", children: [
9334
+ /* @__PURE__ */ jsx35(
9335
+ Text31,
8768
9336
  {
8769
9337
  muted: true,
8770
9338
  size: 1,
@@ -8777,8 +9345,8 @@ function AreaJumpRail({ areas }) {
8777
9345
  children: "Jump to"
8778
9346
  }
8779
9347
  ),
8780
- areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs25(React2.Fragment, { children: [
8781
- i > 0 && /* @__PURE__ */ jsx32(
9348
+ areas.map(({ area, count }, i) => /* @__PURE__ */ jsxs27(React2.Fragment, { children: [
9349
+ i > 0 && /* @__PURE__ */ jsx35(
8782
9350
  "span",
8783
9351
  {
8784
9352
  "aria-hidden": true,
@@ -8789,7 +9357,7 @@ function AreaJumpRail({ areas }) {
8789
9357
  children: "\xB7"
8790
9358
  }
8791
9359
  ),
8792
- /* @__PURE__ */ jsxs25(
9360
+ /* @__PURE__ */ jsxs27(
8793
9361
  "button",
8794
9362
  {
8795
9363
  "aria-label": `Jump to ${area}, ${count} judgment${count === 1 ? "" : "s"}`,
@@ -8817,8 +9385,8 @@ function AreaJumpRail({ areas }) {
8817
9385
  },
8818
9386
  type: "button",
8819
9387
  children: [
8820
- /* @__PURE__ */ jsx32("span", { "aria-hidden": true, children: area }),
8821
- /* @__PURE__ */ jsx32(
9388
+ /* @__PURE__ */ jsx35("span", { "aria-hidden": true, children: area }),
9389
+ /* @__PURE__ */ jsx35(
8822
9390
  "span",
8823
9391
  {
8824
9392
  "aria-hidden": true,
@@ -8838,30 +9406,30 @@ function AreaJumpRail({ areas }) {
8838
9406
  }
8839
9407
 
8840
9408
  // src/components/report-detail/ProvenanceCard.tsx
8841
- import { Card as Card14, Flex as Flex19, Grid as Grid3, Stack as Stack22, Text as Text29 } from "@sanity/ui";
8842
- import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
9409
+ import { Card as Card15, Flex as Flex21, Grid as Grid4, Stack as Stack24, Text as Text32 } from "@sanity/ui";
9410
+ import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
8843
9411
  function ProvenanceCard({ provenance }) {
8844
- return /* @__PURE__ */ jsx33(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs26(Stack22, { space: 4, children: [
8845
- /* @__PURE__ */ jsx33(Text29, { size: 3, weight: "semibold", children: "Provenance" }),
8846
- /* @__PURE__ */ jsxs26(Grid3, { columns: [1, 2, 3], gap: 4, children: [
8847
- /* @__PURE__ */ jsx33(Field, { label: "Mode", value: provenance.mode }),
8848
- /* @__PURE__ */ jsx33(Field, { label: "Source", value: provenance.source.name }),
8849
- /* @__PURE__ */ jsx33(
9412
+ return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
9413
+ /* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Provenance" }),
9414
+ /* @__PURE__ */ jsxs28(Grid4, { columns: [1, 2, 3], gap: 4, children: [
9415
+ /* @__PURE__ */ jsx36(Field, { label: "Mode", value: provenance.mode }),
9416
+ /* @__PURE__ */ jsx36(Field, { label: "Source", value: provenance.source.name }),
9417
+ /* @__PURE__ */ jsx36(
8850
9418
  Field,
8851
9419
  {
8852
9420
  label: "Trigger",
8853
9421
  value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
8854
9422
  }
8855
9423
  ),
8856
- /* @__PURE__ */ jsx33(
9424
+ /* @__PURE__ */ jsx36(
8857
9425
  Field,
8858
9426
  {
8859
9427
  label: "Models",
8860
9428
  value: provenance.models.map((m) => m.label).join(", ")
8861
9429
  }
8862
9430
  ),
8863
- /* @__PURE__ */ jsx33(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
8864
- provenance.contextHash && /* @__PURE__ */ jsx33(
9431
+ /* @__PURE__ */ jsx36(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
9432
+ provenance.contextHash && /* @__PURE__ */ jsx36(
8865
9433
  Field,
8866
9434
  {
8867
9435
  label: "Context Hash",
@@ -8870,8 +9438,8 @@ function ProvenanceCard({ provenance }) {
8870
9438
  }
8871
9439
  )
8872
9440
  ] }),
8873
- provenance.git && /* @__PURE__ */ jsx33(GitInfo, { git: provenance.git }),
8874
- /* @__PURE__ */ jsx33(PromptfooLinks, { provenance })
9441
+ provenance.git && /* @__PURE__ */ jsx36(GitInfo, { git: provenance.git }),
9442
+ /* @__PURE__ */ jsx36(PromptfooLinks, { provenance })
8875
9443
  ] }) });
8876
9444
  }
8877
9445
  function Field({
@@ -8879,9 +9447,9 @@ function Field({
8879
9447
  mono,
8880
9448
  value
8881
9449
  }) {
8882
- return /* @__PURE__ */ jsxs26(Stack22, { space: 1, children: [
8883
- /* @__PURE__ */ jsx33(
8884
- Text29,
9450
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 1, children: [
9451
+ /* @__PURE__ */ jsx36(
9452
+ Text32,
8885
9453
  {
8886
9454
  muted: true,
8887
9455
  size: 1,
@@ -8890,7 +9458,7 @@ function Field({
8890
9458
  children: label
8891
9459
  }
8892
9460
  ),
8893
- /* @__PURE__ */ jsx33(Text29, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
9461
+ /* @__PURE__ */ jsx36(Text32, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
8894
9462
  ] });
8895
9463
  }
8896
9464
  function GitInfo({ git }) {
@@ -8898,15 +9466,15 @@ function GitInfo({ git }) {
8898
9466
  const branchUrl = `${repoUrl}/tree/${git.branch}`;
8899
9467
  const commitUrl = `${repoUrl}/commit/${git.sha}`;
8900
9468
  const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
8901
- return /* @__PURE__ */ jsx33(Card14, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 3, wrap: "wrap", children: [
8902
- /* @__PURE__ */ jsx33(Text29, { muted: true, size: 2, weight: "semibold", children: "Git" }),
8903
- /* @__PURE__ */ jsxs26(Text29, { size: 2, children: [
8904
- /* @__PURE__ */ jsx33("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
9469
+ return /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
9470
+ /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, weight: "semibold", children: "Git" }),
9471
+ /* @__PURE__ */ jsxs28(Text32, { size: 2, children: [
9472
+ /* @__PURE__ */ jsx36("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
8905
9473
  " / ",
8906
- /* @__PURE__ */ jsx33("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
9474
+ /* @__PURE__ */ jsx36("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
8907
9475
  ] }),
8908
- /* @__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) }) }),
8909
- prUrl && /* @__PURE__ */ jsx33(Text29, { size: 2, children: /* @__PURE__ */ jsxs26("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
9476
+ /* @__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) }) }),
9477
+ prUrl && /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
8910
9478
  "PR #",
8911
9479
  git.prNumber,
8912
9480
  " \u2192"
@@ -8917,14 +9485,14 @@ function PromptfooLinks({
8917
9485
  provenance
8918
9486
  }) {
8919
9487
  if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
8920
- 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: [
9488
+ 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: [
8921
9489
  "View in Promptfoo (",
8922
9490
  entry.mode,
8923
9491
  ") \u2192"
8924
9492
  ] }) }, entry.mode)) });
8925
9493
  }
8926
9494
  if (provenance.promptfooUrl) {
8927
- return /* @__PURE__ */ jsx33(Text29, { size: 2, children: /* @__PURE__ */ jsx33(
9495
+ return /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsx36(
8928
9496
  "a",
8929
9497
  {
8930
9498
  href: provenance.promptfooUrl,
@@ -8934,40 +9502,40 @@ function PromptfooLinks({
8934
9502
  }
8935
9503
  ) });
8936
9504
  }
8937
- return /* @__PURE__ */ jsx33(PromptfooUnavailable, { reason: "not-shared" });
9505
+ return /* @__PURE__ */ jsx36(PromptfooUnavailable, { reason: "not-shared" });
8938
9506
  }
8939
9507
  var UNAVAILABLE_TOOLTIPS = {
8940
9508
  "not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
8941
9509
  };
8942
9510
  function PromptfooUnavailable({ reason }) {
8943
- return /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 2, children: [
8944
- /* @__PURE__ */ jsx33(Text29, { muted: true, size: 2, children: "Promptfoo report not available" }),
8945
- /* @__PURE__ */ jsx33(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
9511
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
9512
+ /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Promptfoo report not available" }),
9513
+ /* @__PURE__ */ jsx36(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
8946
9514
  ] });
8947
9515
  }
8948
9516
 
8949
9517
  // src/components/report-detail/report-actions/ActionButton.tsx
8950
- import { Button as Button3, useToast as useToast2 } from "@sanity/ui";
8951
- import { jsx as jsx34 } from "react/jsx-runtime";
9518
+ import { Button as Button4, useToast as useToast2 } from "@sanity/ui";
9519
+ import { jsx as jsx37 } from "react/jsx-runtime";
8952
9520
 
8953
9521
  // src/components/report-detail/report-actions/JudgmentActions.tsx
8954
- import { LinkIcon as LinkIcon3 } from "@sanity/icons";
8955
- import { MenuItem, useToast as useToast3 } from "@sanity/ui";
8956
- import { useCallback as useCallback22 } from "react";
9522
+ import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
9523
+ import { MenuDivider, MenuItem, useToast as useToast3 } from "@sanity/ui";
9524
+ import { useCallback as useCallback23 } from "react";
8957
9525
 
8958
9526
  // src/components/report-detail/report-actions/SplitActionButton.tsx
8959
9527
  import { ChevronDownIcon as ChevronDownIcon2 } from "@sanity/icons";
8960
- import { Button as Button4, Flex as Flex20, Menu, MenuButton } from "@sanity/ui";
8961
- import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
9528
+ import { Button as Button5, Flex as Flex22, Menu, MenuButton } from "@sanity/ui";
9529
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
8962
9530
  function SplitActionButton({
8963
9531
  menu,
8964
9532
  menuId,
8965
9533
  placement = "bottom-end",
8966
9534
  primary
8967
9535
  }) {
8968
- return /* @__PURE__ */ jsxs27(Flex20, { children: [
8969
- /* @__PURE__ */ jsx35(
8970
- Button4,
9536
+ return /* @__PURE__ */ jsxs29(Flex22, { children: [
9537
+ /* @__PURE__ */ jsx38(
9538
+ Button5,
8971
9539
  {
8972
9540
  fontSize: primary.fontSize,
8973
9541
  icon: primary.icon,
@@ -8983,11 +9551,11 @@ function SplitActionButton({
8983
9551
  text: primary.text
8984
9552
  }
8985
9553
  ),
8986
- /* @__PURE__ */ jsx35(
9554
+ /* @__PURE__ */ jsx38(
8987
9555
  MenuButton,
8988
9556
  {
8989
- button: /* @__PURE__ */ jsx35(
8990
- Button4,
9557
+ button: /* @__PURE__ */ jsx38(
9558
+ Button5,
8991
9559
  {
8992
9560
  icon: ChevronDownIcon2,
8993
9561
  mode: "ghost",
@@ -9000,7 +9568,7 @@ function SplitActionButton({
9000
9568
  }
9001
9569
  ),
9002
9570
  id: menuId,
9003
- menu: /* @__PURE__ */ jsx35(Menu, { children: menu }),
9571
+ menu: /* @__PURE__ */ jsx38(Menu, { children: menu }),
9004
9572
  popover: { placement, portal: true }
9005
9573
  }
9006
9574
  )
@@ -9008,10 +9576,10 @@ function SplitActionButton({
9008
9576
  }
9009
9577
 
9010
9578
  // src/components/report-detail/report-actions/JudgmentActions.tsx
9011
- import { jsx as jsx36 } from "react/jsx-runtime";
9012
- function JudgmentActions() {
9579
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
9580
+ function JudgmentActions({ onShowPrompts } = {}) {
9013
9581
  const toast = useToast3();
9014
- const handleCopyLink = useCallback22(() => {
9582
+ const handleCopyLink = useCallback23(() => {
9015
9583
  navigator.clipboard.writeText(window.location.href).then(
9016
9584
  () => {
9017
9585
  toast.push({
@@ -9029,10 +9597,23 @@ function JudgmentActions() {
9029
9597
  }
9030
9598
  );
9031
9599
  }, [toast]);
9032
- return /* @__PURE__ */ jsx36(
9600
+ return /* @__PURE__ */ jsx39(
9033
9601
  SplitActionButton,
9034
9602
  {
9035
- menu: /* @__PURE__ */ jsx36(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" }),
9603
+ menu: /* @__PURE__ */ jsxs30(Fragment10, { children: [
9604
+ onShowPrompts && /* @__PURE__ */ jsxs30(Fragment10, { children: [
9605
+ /* @__PURE__ */ jsx39(
9606
+ MenuItem,
9607
+ {
9608
+ icon: DocumentTextIcon,
9609
+ onClick: onShowPrompts,
9610
+ text: "Show prompts"
9611
+ }
9612
+ ),
9613
+ /* @__PURE__ */ jsx39(MenuDivider, {})
9614
+ ] }),
9615
+ /* @__PURE__ */ jsx39(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
9616
+ ] }),
9036
9617
  menuId: "judgment-actions-menu",
9037
9618
  primary: {
9038
9619
  fontSize: 1,
@@ -9046,22 +9627,22 @@ function JudgmentActions() {
9046
9627
  }
9047
9628
 
9048
9629
  // src/components/report-detail/report-actions/ReportActions.tsx
9049
- import { CopyIcon as CopyIcon2 } from "@sanity/icons";
9050
- import { MenuDivider, useToast as useToast9 } from "@sanity/ui";
9051
- import { useCallback as useCallback28, useState as useState19 } from "react";
9630
+ import { CopyIcon as CopyIcon3 } from "@sanity/icons";
9631
+ import { MenuDivider as MenuDivider2, useToast as useToast9 } from "@sanity/ui";
9632
+ import { useCallback as useCallback29, useState as useState20 } from "react";
9052
9633
  import { useClient as useClient9 } from "sanity";
9053
9634
 
9054
9635
  // src/components/report-detail/report-actions/CopyReportAction.tsx
9055
9636
  import { ClipboardIcon } from "@sanity/icons";
9056
9637
  import { MenuItem as MenuItem2, useToast as useToast4 } from "@sanity/ui";
9057
- import { useCallback as useCallback23, useState as useState16 } from "react";
9638
+ import { useCallback as useCallback24, useState as useState17 } from "react";
9058
9639
  import { useClient as useClient6 } from "sanity";
9059
- import { jsx as jsx37 } from "react/jsx-runtime";
9640
+ import { jsx as jsx40 } from "react/jsx-runtime";
9060
9641
  function CopyReportAction({ documentId }) {
9061
9642
  const client = useClient6({ apiVersion: API_VERSION });
9062
9643
  const toast = useToast4();
9063
- const [copying, setCopying] = useState16(false);
9064
- const handleClick = useCallback23(async () => {
9644
+ const [copying, setCopying] = useState17(false);
9645
+ const handleClick = useCallback24(async () => {
9065
9646
  setCopying(true);
9066
9647
  try {
9067
9648
  const doc = await client.fetch(
@@ -9093,7 +9674,7 @@ function CopyReportAction({ documentId }) {
9093
9674
  setCopying(false);
9094
9675
  }
9095
9676
  }, [client, documentId, toast]);
9096
- return /* @__PURE__ */ jsx37(
9677
+ return /* @__PURE__ */ jsx40(
9097
9678
  MenuItem2,
9098
9679
  {
9099
9680
  disabled: copying,
@@ -9105,13 +9686,13 @@ function CopyReportAction({ documentId }) {
9105
9686
  }
9106
9687
 
9107
9688
  // src/components/report-detail/report-actions/CopyReportIdAction.tsx
9108
- import { CopyIcon } from "@sanity/icons";
9689
+ import { CopyIcon as CopyIcon2 } from "@sanity/icons";
9109
9690
  import { MenuItem as MenuItem3, useToast as useToast5 } from "@sanity/ui";
9110
- import { useCallback as useCallback24 } from "react";
9111
- import { jsx as jsx38 } from "react/jsx-runtime";
9691
+ import { useCallback as useCallback25 } from "react";
9692
+ import { jsx as jsx41 } from "react/jsx-runtime";
9112
9693
  function CopyReportIdAction({ reportId }) {
9113
9694
  const toast = useToast5();
9114
- const handleClick = useCallback24(() => {
9695
+ const handleClick = useCallback25(() => {
9115
9696
  navigator.clipboard.writeText(reportId).then(
9116
9697
  () => {
9117
9698
  toast.push({
@@ -9129,19 +9710,19 @@ function CopyReportIdAction({ reportId }) {
9129
9710
  }
9130
9711
  );
9131
9712
  }, [reportId, toast]);
9132
- return /* @__PURE__ */ jsx38(MenuItem3, { icon: CopyIcon, onClick: handleClick, text: "Copy report ID" });
9713
+ return /* @__PURE__ */ jsx41(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
9133
9714
  }
9134
9715
 
9135
9716
  // src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
9136
9717
  import { SearchIcon as SearchIcon6 } from "@sanity/icons";
9137
9718
  import { MenuItem as MenuItem4, useToast as useToast6 } from "@sanity/ui";
9138
- import { useCallback as useCallback25 } from "react";
9139
- import { jsx as jsx39 } from "react/jsx-runtime";
9719
+ import { useCallback as useCallback26 } from "react";
9720
+ import { jsx as jsx42 } from "react/jsx-runtime";
9140
9721
  function CopyVisionQueryAction({
9141
9722
  reportId
9142
9723
  }) {
9143
9724
  const toast = useToast6();
9144
- const handleClick = useCallback25(() => {
9725
+ const handleClick = useCallback26(() => {
9145
9726
  const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
9146
9727
  navigator.clipboard.writeText(query).then(
9147
9728
  () => {
@@ -9161,7 +9742,7 @@ function CopyVisionQueryAction({
9161
9742
  }
9162
9743
  );
9163
9744
  }, [reportId, toast]);
9164
- return /* @__PURE__ */ jsx39(
9745
+ return /* @__PURE__ */ jsx42(
9165
9746
  MenuItem4,
9166
9747
  {
9167
9748
  icon: SearchIcon6,
@@ -9172,25 +9753,25 @@ function CopyVisionQueryAction({
9172
9753
  }
9173
9754
 
9174
9755
  // src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
9175
- import { Box as Box19, Button as Button5, Card as Card15, Dialog, Flex as Flex21, Stack as Stack23, Text as Text30 } from "@sanity/ui";
9176
- import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
9756
+ 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";
9757
+ import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
9177
9758
  function DeleteConfirmDialog({
9178
9759
  isDeleting,
9179
9760
  onClose,
9180
9761
  onConfirm,
9181
9762
  reportId
9182
9763
  }) {
9183
- return /* @__PURE__ */ jsx40(
9184
- Dialog,
9764
+ return /* @__PURE__ */ jsx43(
9765
+ Dialog2,
9185
9766
  {
9186
9767
  header: "Delete Report",
9187
9768
  id: "delete-report-dialog",
9188
9769
  onClose,
9189
9770
  width: 1,
9190
- children: /* @__PURE__ */ jsx40(Box19, { padding: 4, children: /* @__PURE__ */ jsxs28(Stack23, { space: 4, children: [
9191
- /* @__PURE__ */ jsx40(Text30, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
9192
- /* @__PURE__ */ jsx40(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx40(
9193
- Text30,
9771
+ children: /* @__PURE__ */ jsx43(Box22, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack25, { space: 4, children: [
9772
+ /* @__PURE__ */ jsx43(Text33, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
9773
+ /* @__PURE__ */ jsx43(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx43(
9774
+ Text33,
9194
9775
  {
9195
9776
  muted: true,
9196
9777
  size: 1,
@@ -9198,9 +9779,9 @@ function DeleteConfirmDialog({
9198
9779
  children: reportId
9199
9780
  }
9200
9781
  ) }),
9201
- /* @__PURE__ */ jsxs28(Flex21, { gap: 2, justify: "flex-end", children: [
9202
- /* @__PURE__ */ jsx40(
9203
- Button5,
9782
+ /* @__PURE__ */ jsxs31(Flex23, { gap: 2, justify: "flex-end", children: [
9783
+ /* @__PURE__ */ jsx43(
9784
+ Button6,
9204
9785
  {
9205
9786
  disabled: isDeleting,
9206
9787
  mode: "ghost",
@@ -9208,8 +9789,8 @@ function DeleteConfirmDialog({
9208
9789
  text: "Cancel"
9209
9790
  }
9210
9791
  ),
9211
- /* @__PURE__ */ jsx40(
9212
- Button5,
9792
+ /* @__PURE__ */ jsx43(
9793
+ Button6,
9213
9794
  {
9214
9795
  disabled: isDeleting,
9215
9796
  onClick: onConfirm,
@@ -9226,11 +9807,11 @@ function DeleteConfirmDialog({
9226
9807
  // src/components/report-detail/report-actions/DeleteReportAction.tsx
9227
9808
  import { TrashIcon } from "@sanity/icons";
9228
9809
  import { MenuItem as MenuItem5 } from "@sanity/ui";
9229
- import { jsx as jsx41 } from "react/jsx-runtime";
9810
+ import { jsx as jsx44 } from "react/jsx-runtime";
9230
9811
  function DeleteReportAction({
9231
9812
  onRequestDelete
9232
9813
  }) {
9233
- return /* @__PURE__ */ jsx41(
9814
+ return /* @__PURE__ */ jsx44(
9234
9815
  MenuItem5,
9235
9816
  {
9236
9817
  icon: TrashIcon,
@@ -9244,17 +9825,17 @@ function DeleteReportAction({
9244
9825
  // src/components/report-detail/report-actions/DownloadReportAction.tsx
9245
9826
  import { DownloadIcon } from "@sanity/icons";
9246
9827
  import { MenuItem as MenuItem6, useToast as useToast7 } from "@sanity/ui";
9247
- import { useCallback as useCallback26, useState as useState17 } from "react";
9828
+ import { useCallback as useCallback27, useState as useState18 } from "react";
9248
9829
  import { useClient as useClient7 } from "sanity";
9249
- import { jsx as jsx42 } from "react/jsx-runtime";
9830
+ import { jsx as jsx45 } from "react/jsx-runtime";
9250
9831
  function DownloadReportAction({
9251
9832
  documentId,
9252
9833
  reportId
9253
9834
  }) {
9254
9835
  const client = useClient7({ apiVersion: API_VERSION });
9255
9836
  const toast = useToast7();
9256
- const [downloading, setDownloading] = useState17(false);
9257
- const handleClick = useCallback26(async () => {
9837
+ const [downloading, setDownloading] = useState18(false);
9838
+ const handleClick = useCallback27(async () => {
9258
9839
  setDownloading(true);
9259
9840
  try {
9260
9841
  const doc = await client.fetch(
@@ -9294,7 +9875,7 @@ function DownloadReportAction({
9294
9875
  setDownloading(false);
9295
9876
  }
9296
9877
  }, [client, documentId, reportId, toast]);
9297
- return /* @__PURE__ */ jsx42(
9878
+ return /* @__PURE__ */ jsx45(
9298
9879
  MenuItem6,
9299
9880
  {
9300
9881
  disabled: downloading,
@@ -9308,7 +9889,7 @@ function DownloadReportAction({
9308
9889
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9309
9890
  import { PlayIcon as PlayIcon2 } from "@sanity/icons";
9310
9891
  import { MenuItem as MenuItem7, useToast as useToast8 } from "@sanity/ui";
9311
- import { useCallback as useCallback27, useState as useState18 } from "react";
9892
+ import { useCallback as useCallback28, useState as useState19 } from "react";
9312
9893
  import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
9313
9894
 
9314
9895
  // src/lib/eval-scope.ts
@@ -9324,7 +9905,7 @@ function extractEvalScope(provenance) {
9324
9905
  }
9325
9906
 
9326
9907
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9327
- import { jsx as jsx43 } from "react/jsx-runtime";
9908
+ import { jsx as jsx46 } from "react/jsx-runtime";
9328
9909
  var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
9329
9910
  function slugify2(s) {
9330
9911
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
@@ -9363,8 +9944,8 @@ function RerunEvaluationAction({
9363
9944
  const client = useClient8({ apiVersion: API_VERSION });
9364
9945
  const currentUser = useCurrentUser3();
9365
9946
  const toast = useToast8();
9366
- const [requesting, setRequesting] = useState18(false);
9367
- const handleClick = useCallback27(async () => {
9947
+ const [requesting, setRequesting] = useState19(false);
9948
+ const handleClick = useCallback28(async () => {
9368
9949
  setRequesting(true);
9369
9950
  try {
9370
9951
  const scope = extractEvalScope(provenance);
@@ -9391,7 +9972,7 @@ function RerunEvaluationAction({
9391
9972
  setRequesting(false);
9392
9973
  }
9393
9974
  }, [client, currentUser?.id, provenance, reportId, toast]);
9394
- return /* @__PURE__ */ jsx43(
9975
+ return /* @__PURE__ */ jsx46(
9395
9976
  MenuItem7,
9396
9977
  {
9397
9978
  disabled: requesting,
@@ -9403,7 +9984,7 @@ function RerunEvaluationAction({
9403
9984
  }
9404
9985
 
9405
9986
  // src/components/report-detail/report-actions/ReportActions.tsx
9406
- import { Fragment as Fragment8, jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
9987
+ import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
9407
9988
  function ReportActions({
9408
9989
  documentId,
9409
9990
  onDeleted,
@@ -9412,7 +9993,7 @@ function ReportActions({
9412
9993
  }) {
9413
9994
  const client = useClient9({ apiVersion: API_VERSION });
9414
9995
  const toast = useToast9();
9415
- const handleCopyId = useCallback28(() => {
9996
+ const handleCopyId = useCallback29(() => {
9416
9997
  navigator.clipboard.writeText(reportId).then(
9417
9998
  () => {
9418
9999
  toast.push({
@@ -9430,15 +10011,15 @@ function ReportActions({
9430
10011
  }
9431
10012
  );
9432
10013
  }, [reportId, toast]);
9433
- const [deleteDialogOpen, setDeleteDialogOpen] = useState19(false);
9434
- const [deleting, setDeleting] = useState19(false);
9435
- const handleRequestDelete = useCallback28(() => {
10014
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState20(false);
10015
+ const [deleting, setDeleting] = useState20(false);
10016
+ const handleRequestDelete = useCallback29(() => {
9436
10017
  setDeleteDialogOpen(true);
9437
10018
  }, []);
9438
- const handleDeleteClose = useCallback28(() => {
10019
+ const handleDeleteClose = useCallback29(() => {
9439
10020
  if (!deleting) setDeleteDialogOpen(false);
9440
10021
  }, [deleting]);
9441
- const handleDeleteConfirm = useCallback28(async () => {
10022
+ const handleDeleteConfirm = useCallback29(async () => {
9442
10023
  setDeleting(true);
9443
10024
  try {
9444
10025
  await client.delete(documentId);
@@ -9459,35 +10040,35 @@ function ReportActions({
9459
10040
  setDeleting(false);
9460
10041
  }
9461
10042
  }, [client, documentId, onDeleted, toast]);
9462
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
9463
- /* @__PURE__ */ jsx44(
10043
+ return /* @__PURE__ */ jsxs32(Fragment11, { children: [
10044
+ /* @__PURE__ */ jsx47(
9464
10045
  SplitActionButton,
9465
10046
  {
9466
- menu: /* @__PURE__ */ jsxs29(Fragment8, { children: [
9467
- /* @__PURE__ */ jsx44(CopyReportIdAction, { reportId }),
9468
- /* @__PURE__ */ jsx44(
10047
+ menu: /* @__PURE__ */ jsxs32(Fragment11, { children: [
10048
+ /* @__PURE__ */ jsx47(CopyReportIdAction, { reportId }),
10049
+ /* @__PURE__ */ jsx47(
9469
10050
  RerunEvaluationAction,
9470
10051
  {
9471
10052
  provenance,
9472
10053
  reportId
9473
10054
  }
9474
10055
  ),
9475
- /* @__PURE__ */ jsx44(MenuDivider, {}),
9476
- /* @__PURE__ */ jsx44(DownloadReportAction, { documentId, reportId }),
9477
- /* @__PURE__ */ jsx44(CopyReportAction, { documentId }),
9478
- /* @__PURE__ */ jsx44(CopyVisionQueryAction, { reportId }),
9479
- /* @__PURE__ */ jsx44(MenuDivider, {}),
9480
- /* @__PURE__ */ jsx44(DeleteReportAction, { onRequestDelete: handleRequestDelete })
10056
+ /* @__PURE__ */ jsx47(MenuDivider2, {}),
10057
+ /* @__PURE__ */ jsx47(DownloadReportAction, { documentId, reportId }),
10058
+ /* @__PURE__ */ jsx47(CopyReportAction, { documentId }),
10059
+ /* @__PURE__ */ jsx47(CopyVisionQueryAction, { reportId }),
10060
+ /* @__PURE__ */ jsx47(MenuDivider2, {}),
10061
+ /* @__PURE__ */ jsx47(DeleteReportAction, { onRequestDelete: handleRequestDelete })
9481
10062
  ] }),
9482
10063
  menuId: "report-actions-menu",
9483
10064
  primary: {
9484
- icon: CopyIcon2,
10065
+ icon: CopyIcon3,
9485
10066
  onClick: handleCopyId,
9486
10067
  text: "Copy Report ID"
9487
10068
  }
9488
10069
  }
9489
10070
  ),
9490
- deleteDialogOpen && /* @__PURE__ */ jsx44(
10071
+ deleteDialogOpen && /* @__PURE__ */ jsx47(
9491
10072
  DeleteConfirmDialog,
9492
10073
  {
9493
10074
  isDeleting: deleting,
@@ -9501,8 +10082,8 @@ function ReportActions({
9501
10082
 
9502
10083
  // src/components/report-detail/ReportHeader.tsx
9503
10084
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
9504
- import { Button as Button6, Flex as Flex22, Stack as Stack24, Text as Text31 } from "@sanity/ui";
9505
- import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
10085
+ import { Button as Button7, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10086
+ import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
9506
10087
  function ReportHeader({
9507
10088
  completedAt,
9508
10089
  onBack,
@@ -9512,11 +10093,11 @@ function ReportHeader({
9512
10093
  const dateLabel = formatCardDate(completedAt);
9513
10094
  const displayTitle = title ?? tag ?? dateLabel;
9514
10095
  const hasSubtitle = Boolean(title ?? tag);
9515
- return /* @__PURE__ */ jsxs30(Flex22, { align: "center", gap: 3, children: [
9516
- /* @__PURE__ */ jsx45(Button6, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
9517
- /* @__PURE__ */ jsxs30(Stack24, { flex: 1, space: 1, children: [
9518
- /* @__PURE__ */ jsx45(Text31, { size: 4, weight: "bold", children: displayTitle }),
9519
- hasSubtitle && /* @__PURE__ */ jsx45(Text31, { muted: true, size: 2, children: dateLabel })
10096
+ return /* @__PURE__ */ jsxs33(Flex24, { align: "center", gap: 3, children: [
10097
+ /* @__PURE__ */ jsx48(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
10098
+ /* @__PURE__ */ jsxs33(Stack26, { flex: 1, space: 1, children: [
10099
+ /* @__PURE__ */ jsx48(Text34, { size: 4, weight: "bold", children: displayTitle }),
10100
+ hasSubtitle && /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: dateLabel })
9520
10101
  ] })
9521
10102
  ] });
9522
10103
  }
@@ -9524,17 +10105,17 @@ function ReportHeader({
9524
10105
  // src/components/report-detail/StrengthsList.tsx
9525
10106
  import { useMemo as useMemo14 } from "react";
9526
10107
  import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon7 } from "@sanity/icons";
9527
- import { Box as Box21, Flex as Flex25, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10108
+ import { Box as Box24, Flex as Flex27, Stack as Stack28, Text as Text37 } from "@sanity/ui";
9528
10109
 
9529
10110
  // src/components/report-detail/AreaScoresGrid.tsx
9530
10111
  import React3, {
9531
- useCallback as useCallback29,
10112
+ useCallback as useCallback30,
9532
10113
  useMemo as useMemo12,
9533
- useState as useState20
10114
+ useState as useState21
9534
10115
  } from "react";
9535
10116
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
9536
- import { Box as Box20, Flex as Flex23, Stack as Stack25, Text as Text32 } from "@sanity/ui";
9537
- import { Fragment as Fragment9, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
10117
+ import { Box as Box23, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10118
+ import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
9538
10119
  var DIMENSION_TOOLTIPS2 = {
9539
10120
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
9540
10121
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -9580,9 +10161,9 @@ function AreaScoresGrid({
9580
10161
  );
9581
10162
  const showLift = isLiteracyMode(mode);
9582
10163
  const dimKeys = useMemo12(() => collectDimensionKeys(scores), [scores]);
9583
- const [sortField, setSortField] = useState20("score");
9584
- const [sortDir, setSortDir] = useState20("desc");
9585
- const handleSort = useCallback29(
10164
+ const [sortField, setSortField] = useState21("score");
10165
+ const [sortDir, setSortDir] = useState21("desc");
10166
+ const handleSort = useCallback30(
9586
10167
  (field) => {
9587
10168
  if (field === sortField) {
9588
10169
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -9626,8 +10207,8 @@ function AreaScoresGrid({
9626
10207
  }
9627
10208
  return map;
9628
10209
  }, [perModel]);
9629
- return /* @__PURE__ */ jsxs31(Box20, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
9630
- /* @__PURE__ */ jsxs31(
10210
+ return /* @__PURE__ */ jsxs34(Box23, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
10211
+ /* @__PURE__ */ jsxs34(
9631
10212
  "div",
9632
10213
  {
9633
10214
  style: {
@@ -9643,7 +10224,7 @@ function AreaScoresGrid({
9643
10224
  padding: "12px 16px 8px"
9644
10225
  },
9645
10226
  children: [
9646
- /* @__PURE__ */ jsx46(
10227
+ /* @__PURE__ */ jsx49(
9647
10228
  ColHeader2,
9648
10229
  {
9649
10230
  active: sortField === "score",
@@ -9653,7 +10234,7 @@ function AreaScoresGrid({
9653
10234
  tooltip: GLOSSARY.score
9654
10235
  }
9655
10236
  ),
9656
- /* @__PURE__ */ jsx46(
10237
+ /* @__PURE__ */ jsx49(
9657
10238
  ColHeader2,
9658
10239
  {
9659
10240
  active: sortField === "area",
@@ -9662,7 +10243,7 @@ function AreaScoresGrid({
9662
10243
  onClick: () => handleSort("area")
9663
10244
  }
9664
10245
  ),
9665
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10246
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9666
10247
  ColHeader2,
9667
10248
  {
9668
10249
  active: sortField === key,
@@ -9673,7 +10254,7 @@ function AreaScoresGrid({
9673
10254
  },
9674
10255
  key
9675
10256
  )),
9676
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx46(
10257
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx49(
9677
10258
  ColHeader2,
9678
10259
  {
9679
10260
  active: sortField === "lift",
@@ -9683,12 +10264,12 @@ function AreaScoresGrid({
9683
10264
  tooltip: GLOSSARY.docLift
9684
10265
  }
9685
10266
  ),
9686
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
10267
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
9687
10268
  ]
9688
10269
  }
9689
10270
  ),
9690
- sorted.map((area) => /* @__PURE__ */ jsxs31(React3.Fragment, { children: [
9691
- /* @__PURE__ */ jsx46(
10271
+ sorted.map((area) => /* @__PURE__ */ jsxs34(React3.Fragment, { children: [
10272
+ /* @__PURE__ */ jsx49(
9692
10273
  AreaRow,
9693
10274
  {
9694
10275
  area,
@@ -9699,7 +10280,7 @@ function AreaScoresGrid({
9699
10280
  tier
9700
10281
  }
9701
10282
  ),
9702
- modelScoresByFeature && /* @__PURE__ */ jsx46(
10283
+ modelScoresByFeature && /* @__PURE__ */ jsx49(
9703
10284
  ModelSubRows,
9704
10285
  {
9705
10286
  dimKeys,
@@ -9720,8 +10301,8 @@ function ModelSubRows({
9720
10301
  tier
9721
10302
  }) {
9722
10303
  if (!models || models.length === 0) return null;
9723
- return /* @__PURE__ */ jsx46(Fragment9, { children: models.map((entry) => /* @__PURE__ */ jsx46(
9724
- ModelRow,
10304
+ return /* @__PURE__ */ jsx49(Fragment12, { children: models.map((entry) => /* @__PURE__ */ jsx49(
10305
+ ModelRow2,
9725
10306
  {
9726
10307
  dimKeys,
9727
10308
  hasActual,
@@ -9733,7 +10314,7 @@ function ModelSubRows({
9733
10314
  entry.label
9734
10315
  )) });
9735
10316
  }
9736
- function ModelRow({
10317
+ function ModelRow2({
9737
10318
  dimKeys,
9738
10319
  hasActual,
9739
10320
  label,
@@ -9742,7 +10323,7 @@ function ModelRow({
9742
10323
  tier
9743
10324
  }) {
9744
10325
  const isNarrow = tier === "narrow";
9745
- return /* @__PURE__ */ jsxs31(
10326
+ return /* @__PURE__ */ jsxs34(
9746
10327
  "div",
9747
10328
  {
9748
10329
  style: {
@@ -9760,8 +10341,8 @@ function ModelRow({
9760
10341
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
9761
10342
  },
9762
10343
  children: [
9763
- /* @__PURE__ */ jsx46(Flex23, { align: "center", children: /* @__PURE__ */ jsx46(
9764
- Text32,
10344
+ /* @__PURE__ */ jsx49(Flex25, { align: "center", children: /* @__PURE__ */ jsx49(
10345
+ Text35,
9765
10346
  {
9766
10347
  size: 1,
9767
10348
  style: {
@@ -9772,8 +10353,8 @@ function ModelRow({
9772
10353
  children: Math.round(scores.totalScore)
9773
10354
  }
9774
10355
  ) }),
9775
- /* @__PURE__ */ jsx46(Flex23, { align: "center", gap: 2, children: /* @__PURE__ */ jsx46(Text32, { muted: true, size: 1, children: label }) }),
9776
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10356
+ /* @__PURE__ */ jsx49(Flex25, { align: "center", gap: 2, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 1, children: label }) }),
10357
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9777
10358
  DimCell,
9778
10359
  {
9779
10360
  area: label,
@@ -9783,8 +10364,8 @@ function ModelRow({
9783
10364
  },
9784
10365
  key
9785
10366
  )),
9786
- !isNarrow && showLift && /* @__PURE__ */ jsxs31(
9787
- Text32,
10367
+ !isNarrow && showLift && /* @__PURE__ */ jsxs34(
10368
+ Text35,
9788
10369
  {
9789
10370
  size: 1,
9790
10371
  style: {
@@ -9798,8 +10379,8 @@ function ModelRow({
9798
10379
  ]
9799
10380
  }
9800
10381
  ),
9801
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(
9802
- Text32,
10382
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(
10383
+ Text35,
9803
10384
  {
9804
10385
  size: 1,
9805
10386
  style: {
@@ -9823,7 +10404,7 @@ function AreaRow({
9823
10404
  tier
9824
10405
  }) {
9825
10406
  const isNarrow = tier === "narrow";
9826
- return /* @__PURE__ */ jsxs31(
10407
+ return /* @__PURE__ */ jsxs34(
9827
10408
  "div",
9828
10409
  {
9829
10410
  style: {
@@ -9840,15 +10421,15 @@ function AreaRow({
9840
10421
  padding: isNarrow ? "8px 12px" : "10px 16px"
9841
10422
  },
9842
10423
  children: [
9843
- /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: isNarrow ? 0 : 2, children: [
9844
- /* @__PURE__ */ jsx46(
10424
+ /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: isNarrow ? 0 : 2, children: [
10425
+ /* @__PURE__ */ jsx49(
9845
10426
  HoverTip,
9846
10427
  {
9847
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9848
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area.feature }),
10428
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10429
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
9849
10430
  " score:",
9850
10431
  " ",
9851
- /* @__PURE__ */ jsx46(
10432
+ /* @__PURE__ */ jsx49(
9852
10433
  "span",
9853
10434
  {
9854
10435
  style: {
@@ -9859,12 +10440,12 @@ function AreaRow({
9859
10440
  children: Math.round(area.totalScore)
9860
10441
  }
9861
10442
  ),
9862
- /* @__PURE__ */ jsx46("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10443
+ /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
9863
10444
  ".",
9864
10445
  " ",
9865
10446
  GLOSSARY.score
9866
10447
  ] }),
9867
- children: /* @__PURE__ */ jsx46(
10448
+ children: /* @__PURE__ */ jsx49(
9868
10449
  "div",
9869
10450
  {
9870
10451
  style: {
@@ -9885,11 +10466,11 @@ function AreaRow({
9885
10466
  )
9886
10467
  }
9887
10468
  ),
9888
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx46(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx46(DeltaIndicator, { delta, icon: true, size: 1 }) })
10469
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx49(DeltaIndicator, { delta, icon: true, size: 1 }) })
9889
10470
  ] }),
9890
- /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: 2, wrap: "wrap", children: [
9891
- /* @__PURE__ */ jsx46(Text32, { size: 2, weight: "medium", children: area.feature }),
9892
- area.negativeDocLift && showLift && /* @__PURE__ */ jsx46(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx46(
10471
+ /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
10472
+ /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10473
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx49(
9893
10474
  "span",
9894
10475
  {
9895
10476
  style: {
@@ -9902,11 +10483,11 @@ function AreaRow({
9902
10483
  gap: 3,
9903
10484
  padding: "1px 5px"
9904
10485
  },
9905
- children: /* @__PURE__ */ jsx46(WarningOutlineIcon2, {})
10486
+ children: /* @__PURE__ */ jsx49(WarningOutlineIcon2, {})
9906
10487
  }
9907
10488
  ) })
9908
10489
  ] }),
9909
- dimKeys.map((key) => /* @__PURE__ */ jsx46(
10490
+ dimKeys.map((key) => /* @__PURE__ */ jsx49(
9910
10491
  DimCell,
9911
10492
  {
9912
10493
  area: area.feature,
@@ -9915,14 +10496,14 @@ function AreaRow({
9915
10496
  },
9916
10497
  key
9917
10498
  )),
9918
- !isNarrow && showLift && /* @__PURE__ */ jsx46(
10499
+ !isNarrow && showLift && /* @__PURE__ */ jsx49(
9919
10500
  HoverTip,
9920
10501
  {
9921
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9922
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area.feature }),
10502
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10503
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
9923
10504
  " doc lift:",
9924
10505
  " ",
9925
- /* @__PURE__ */ jsxs31(
10506
+ /* @__PURE__ */ jsxs34(
9926
10507
  "span",
9927
10508
  {
9928
10509
  style: {
@@ -9940,8 +10521,8 @@ function AreaRow({
9940
10521
  "pts. ",
9941
10522
  GLOSSARY.docLift
9942
10523
  ] }),
9943
- children: /* @__PURE__ */ jsxs31(
9944
- Text32,
10524
+ children: /* @__PURE__ */ jsxs34(
10525
+ Text35,
9945
10526
  {
9946
10527
  size: 2,
9947
10528
  style: {
@@ -9957,12 +10538,12 @@ function AreaRow({
9957
10538
  )
9958
10539
  }
9959
10540
  ),
9960
- tier === "full" && hasActual && /* @__PURE__ */ jsx46(
10541
+ tier === "full" && hasActual && /* @__PURE__ */ jsx49(
9961
10542
  HoverTip,
9962
10543
  {
9963
10544
  text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
9964
- children: /* @__PURE__ */ jsx46(
9965
- Text32,
10545
+ children: /* @__PURE__ */ jsx49(
10546
+ Text35,
9966
10547
  {
9967
10548
  size: 2,
9968
10549
  style: {
@@ -9991,17 +10572,17 @@ function DimCell({
9991
10572
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
9992
10573
  const textSize = size === "small" ? 0 : 1;
9993
10574
  const barHeight = size === "small" ? 3 : 4;
9994
- return /* @__PURE__ */ jsx46(
10575
+ return /* @__PURE__ */ jsx49(
9995
10576
  HoverTip,
9996
10577
  {
9997
- text: /* @__PURE__ */ jsxs31(Text32, { size: 2, style: { lineHeight: 1.5 }, children: [
9998
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: area }),
10578
+ text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10579
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area }),
9999
10580
  " \u2192",
10000
10581
  " ",
10001
- /* @__PURE__ */ jsx46("span", { style: { fontWeight: 600 }, children: dim }),
10582
+ /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: dim }),
10002
10583
  ":",
10003
10584
  " ",
10004
- /* @__PURE__ */ jsx46(
10585
+ /* @__PURE__ */ jsx49(
10005
10586
  "span",
10006
10587
  {
10007
10588
  style: {
@@ -10012,14 +10593,14 @@ function DimCell({
10012
10593
  children: Math.round(value)
10013
10594
  }
10014
10595
  ),
10015
- /* @__PURE__ */ jsx46("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10596
+ /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10016
10597
  ".",
10017
10598
  " ",
10018
10599
  tooltip
10019
10600
  ] }),
10020
- children: /* @__PURE__ */ jsxs31(Stack25, { space: 1, style: { width: "100%" }, children: [
10021
- /* @__PURE__ */ jsx46(
10022
- Text32,
10601
+ children: /* @__PURE__ */ jsxs34(Stack27, { space: 1, style: { width: "100%" }, children: [
10602
+ /* @__PURE__ */ jsx49(
10603
+ Text35,
10023
10604
  {
10024
10605
  size: textSize,
10025
10606
  style: {
@@ -10030,7 +10611,7 @@ function DimCell({
10030
10611
  children: Math.round(value)
10031
10612
  }
10032
10613
  ),
10033
- /* @__PURE__ */ jsx46(
10614
+ /* @__PURE__ */ jsx49(
10034
10615
  "div",
10035
10616
  {
10036
10617
  style: {
@@ -10040,7 +10621,7 @@ function DimCell({
10040
10621
  overflow: "hidden",
10041
10622
  width: "100%"
10042
10623
  },
10043
- children: /* @__PURE__ */ jsx46(
10624
+ children: /* @__PURE__ */ jsx49(
10044
10625
  "div",
10045
10626
  {
10046
10627
  style: {
@@ -10065,7 +10646,7 @@ function ColHeader2({
10065
10646
  onClick,
10066
10647
  tooltip
10067
10648
  }) {
10068
- const handleKeyDown = useCallback29(
10649
+ const handleKeyDown = useCallback30(
10069
10650
  (e) => {
10070
10651
  if (onClick && (e.key === "Enter" || e.key === " ")) {
10071
10652
  e.preventDefault();
@@ -10075,8 +10656,8 @@ function ColHeader2({
10075
10656
  [onClick]
10076
10657
  );
10077
10658
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
10078
- return /* @__PURE__ */ jsxs31(Flex23, { align: "center", gap: 1, children: [
10079
- /* @__PURE__ */ jsx46(
10659
+ return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 1, children: [
10660
+ /* @__PURE__ */ jsx49(
10080
10661
  "div",
10081
10662
  {
10082
10663
  onClick,
@@ -10087,8 +10668,8 @@ function ColHeader2({
10087
10668
  userSelect: "none"
10088
10669
  },
10089
10670
  tabIndex: onClick ? 0 : void 0,
10090
- children: /* @__PURE__ */ jsxs31(
10091
- Text32,
10671
+ children: /* @__PURE__ */ jsxs34(
10672
+ Text35,
10092
10673
  {
10093
10674
  muted: true,
10094
10675
  size: 1,
@@ -10105,14 +10686,14 @@ function ColHeader2({
10105
10686
  )
10106
10687
  }
10107
10688
  ),
10108
- tooltip && /* @__PURE__ */ jsx46(InfoTip, { text: tooltip })
10689
+ tooltip && /* @__PURE__ */ jsx49(InfoTip, { text: tooltip })
10109
10690
  ] });
10110
10691
  }
10111
10692
 
10112
10693
  // src/components/report-detail/ModelSelector.tsx
10113
- import { useCallback as useCallback30 } from "react";
10114
- import { Flex as Flex24, Text as Text33 } from "@sanity/ui";
10115
- import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
10694
+ import { useCallback as useCallback31 } from "react";
10695
+ import { Flex as Flex26, Text as Text36 } from "@sanity/ui";
10696
+ import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
10116
10697
  var pillBase = {
10117
10698
  borderColor: "var(--card-border-color)",
10118
10699
  borderRadius: 999,
@@ -10143,8 +10724,8 @@ function ModelSelector({
10143
10724
  selection,
10144
10725
  onChange
10145
10726
  }) {
10146
- return /* @__PURE__ */ jsxs32(Flex24, { align: "center", gap: 1, wrap: "wrap", children: [
10147
- /* @__PURE__ */ jsx47(
10727
+ return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, wrap: "wrap", children: [
10728
+ /* @__PURE__ */ jsx50(
10148
10729
  Pill2,
10149
10730
  {
10150
10731
  isSelected: selection === null,
@@ -10152,7 +10733,7 @@ function ModelSelector({
10152
10733
  onClick: () => onChange(null)
10153
10734
  }
10154
10735
  ),
10155
- models.map((model) => /* @__PURE__ */ jsx47(
10736
+ models.map((model) => /* @__PURE__ */ jsx50(
10156
10737
  Pill2,
10157
10738
  {
10158
10739
  isSelected: selection === model.modelId,
@@ -10161,7 +10742,7 @@ function ModelSelector({
10161
10742
  },
10162
10743
  model.modelId
10163
10744
  )),
10164
- /* @__PURE__ */ jsx47(
10745
+ /* @__PURE__ */ jsx50(
10165
10746
  "div",
10166
10747
  {
10167
10748
  style: {
@@ -10172,7 +10753,7 @@ function ModelSelector({
10172
10753
  }
10173
10754
  }
10174
10755
  ),
10175
- /* @__PURE__ */ jsx47(
10756
+ /* @__PURE__ */ jsx50(
10176
10757
  Pill2,
10177
10758
  {
10178
10759
  isSelected: selection === "expanded",
@@ -10187,7 +10768,7 @@ function Pill2({
10187
10768
  label,
10188
10769
  onClick
10189
10770
  }) {
10190
- const handleKeyDown = useCallback30(
10771
+ const handleKeyDown = useCallback31(
10191
10772
  (e) => {
10192
10773
  if (e.key === "Enter" || e.key === " ") {
10193
10774
  e.preventDefault();
@@ -10196,7 +10777,7 @@ function Pill2({
10196
10777
  },
10197
10778
  [onClick]
10198
10779
  );
10199
- return /* @__PURE__ */ jsx47(
10780
+ return /* @__PURE__ */ jsx50(
10200
10781
  "span",
10201
10782
  {
10202
10783
  onClick,
@@ -10204,8 +10785,8 @@ function Pill2({
10204
10785
  role: "button",
10205
10786
  style: isSelected ? pillSelected : pillDefault,
10206
10787
  tabIndex: 0,
10207
- children: /* @__PURE__ */ jsx47(
10208
- Text33,
10788
+ children: /* @__PURE__ */ jsx50(
10789
+ Text36,
10209
10790
  {
10210
10791
  size: 1,
10211
10792
  style: {
@@ -10220,13 +10801,13 @@ function Pill2({
10220
10801
  }
10221
10802
 
10222
10803
  // src/components/report-detail/useModelSelection.ts
10223
- import { useCallback as useCallback31, useMemo as useMemo13, useState as useState21 } from "react";
10804
+ import { useCallback as useCallback32, useMemo as useMemo13, useState as useState22 } from "react";
10224
10805
  function useModelSelection({
10225
10806
  scores,
10226
10807
  perModel
10227
10808
  }) {
10228
- const [selection, setSelection] = useState21(null);
10229
- const onSelectionChange = useCallback31((next) => {
10809
+ const [selection, setSelection] = useState22(null);
10810
+ const onSelectionChange = useCallback32((next) => {
10230
10811
  setSelection(next);
10231
10812
  }, []);
10232
10813
  const isExpanded = selection === "expanded";
@@ -10248,7 +10829,7 @@ function useModelSelection({
10248
10829
  }
10249
10830
 
10250
10831
  // src/components/report-detail/StrengthsList.tsx
10251
- import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
10832
+ import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
10252
10833
  function StrengthsList({
10253
10834
  mode,
10254
10835
  scores,
@@ -10272,13 +10853,13 @@ function StrengthsList({
10272
10853
  (a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
10273
10854
  );
10274
10855
  if (displayedScores.length === 0) return null;
10275
- return /* @__PURE__ */ jsxs33(Stack26, { space: 5, children: [
10276
- /* @__PURE__ */ jsxs33(Stack26, { space: 3, children: [
10277
- /* @__PURE__ */ jsxs33(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
10278
- /* @__PURE__ */ jsx48(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
10279
- /* @__PURE__ */ jsx48(Text34, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
10280
- /* @__PURE__ */ jsx48(InfoTip, { text: GLOSSARY.strengths }),
10281
- hasModels && /* @__PURE__ */ jsx48(Box21, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx48(
10856
+ return /* @__PURE__ */ jsxs36(Stack28, { space: 5, children: [
10857
+ /* @__PURE__ */ jsxs36(Stack28, { space: 3, children: [
10858
+ /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
10859
+ /* @__PURE__ */ jsx51(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
10860
+ /* @__PURE__ */ jsx51(Text37, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
10861
+ /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.strengths }),
10862
+ hasModels && /* @__PURE__ */ jsx51(Box24, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx51(
10282
10863
  ModelSelector,
10283
10864
  {
10284
10865
  models: perModel,
@@ -10287,7 +10868,7 @@ function StrengthsList({
10287
10868
  }
10288
10869
  ) })
10289
10870
  ] }),
10290
- /* @__PURE__ */ jsx48(
10871
+ /* @__PURE__ */ jsx51(
10291
10872
  AreaScoresGrid,
10292
10873
  {
10293
10874
  mode,
@@ -10297,33 +10878,33 @@ function StrengthsList({
10297
10878
  }
10298
10879
  )
10299
10880
  ] }),
10300
- retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs33(Box21, { style: neutralCardStyle, children: [
10301
- /* @__PURE__ */ jsx48(
10302
- Box21,
10881
+ retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs36(Box24, { style: neutralCardStyle, children: [
10882
+ /* @__PURE__ */ jsx51(
10883
+ Box24,
10303
10884
  {
10304
10885
  padding: 4,
10305
10886
  style: { borderBottom: "1px solid var(--card-border-color)" },
10306
- children: /* @__PURE__ */ jsxs33(Flex25, { align: "center", gap: 2, children: [
10307
- /* @__PURE__ */ jsx48(SearchIcon7, { style: { color: "#34d399" } }),
10308
- /* @__PURE__ */ jsxs33(Text34, { size: 2, weight: "medium", children: [
10887
+ children: /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, children: [
10888
+ /* @__PURE__ */ jsx51(SearchIcon7, { style: { color: "#34d399" } }),
10889
+ /* @__PURE__ */ jsxs36(Text37, { size: 2, weight: "medium", children: [
10309
10890
  "Retrieval Successes (",
10310
10891
  Math.round(EFFICIENCY_POSITIVE * 100),
10311
10892
  "%+ efficiency)"
10312
10893
  ] }),
10313
- /* @__PURE__ */ jsx48(InfoTip, { text: GLOSSARY.retrievalExcellence })
10894
+ /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.retrievalExcellence })
10314
10895
  ] })
10315
10896
  }
10316
10897
  ),
10317
- /* @__PURE__ */ jsx48(Stack26, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs33(
10318
- Flex25,
10898
+ /* @__PURE__ */ jsx51(Stack28, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs36(
10899
+ Flex27,
10319
10900
  {
10320
10901
  align: "center",
10321
10902
  justify: "space-between",
10322
10903
  padding: 4,
10323
10904
  style: i > 0 ? dividerStyle : void 0,
10324
10905
  children: [
10325
- /* @__PURE__ */ jsx48(Text34, { size: 2, children: area.feature }),
10326
- /* @__PURE__ */ jsx48(
10906
+ /* @__PURE__ */ jsx51(Text37, { size: 2, children: area.feature }),
10907
+ /* @__PURE__ */ jsx51(
10327
10908
  "span",
10328
10909
  {
10329
10910
  style: {
@@ -10353,8 +10934,8 @@ import {
10353
10934
  BoltIcon,
10354
10935
  ArrowDownIcon as ArrowDownIcon2
10355
10936
  } from "@sanity/icons";
10356
- import { Box as Box22, Flex as Flex26, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10357
- import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
10937
+ import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
10938
+ import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
10358
10939
  function WeaknessesList({
10359
10940
  mode,
10360
10941
  scores,
@@ -10382,15 +10963,15 @@ function WeaknessesList({
10382
10963
  const efficiencyAnomalies = scores.filter(
10383
10964
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency > EFFICIENCY_ANOMALY
10384
10965
  );
10385
- const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || regressed.length > 0 || efficiencyAnomalies.length > 0;
10966
+ const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 || efficiencyAnomalies.length > 0;
10386
10967
  if (!hasContent) return null;
10387
- return /* @__PURE__ */ jsxs34(Stack27, { space: 5, children: [
10388
- weakAreas.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10389
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
10390
- /* @__PURE__ */ jsx49(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10391
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
10392
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.weakAreas }),
10393
- hasModels && /* @__PURE__ */ jsx49(Box22, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx49(
10968
+ return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
10969
+ weakAreas.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10970
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
10971
+ /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10972
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
10973
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.weakAreas }),
10974
+ hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
10394
10975
  ModelSelector,
10395
10976
  {
10396
10977
  models: perModel,
@@ -10399,7 +10980,7 @@ function WeaknessesList({
10399
10980
  }
10400
10981
  ) })
10401
10982
  ] }),
10402
- /* @__PURE__ */ jsx49(
10983
+ /* @__PURE__ */ jsx52(
10403
10984
  AreaScoresGrid,
10404
10985
  {
10405
10986
  mode,
@@ -10409,22 +10990,22 @@ function WeaknessesList({
10409
10990
  }
10410
10991
  )
10411
10992
  ] }),
10412
- docsHurt.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10413
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10414
- /* @__PURE__ */ jsx49(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10415
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
10416
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.docsHurt })
10993
+ docsHurt.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10994
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
10995
+ /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10996
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
10997
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.docsHurt })
10417
10998
  ] }),
10418
- /* @__PURE__ */ jsx49(Box22, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs34(
10419
- Box22,
10999
+ /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs37(
11000
+ Box25,
10420
11001
  {
10421
11002
  padding: 4,
10422
11003
  style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
10423
11004
  children: [
10424
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", justify: "space-between", wrap: "wrap", children: [
10425
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10426
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10427
- /* @__PURE__ */ jsx49(
11005
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
11006
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11007
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11008
+ /* @__PURE__ */ jsx52(
10428
11009
  "span",
10429
11010
  {
10430
11011
  style: {
@@ -10439,7 +11020,7 @@ function WeaknessesList({
10439
11020
  }
10440
11021
  )
10441
11022
  ] }),
10442
- /* @__PURE__ */ jsx49(
11023
+ /* @__PURE__ */ jsx52(
10443
11024
  "span",
10444
11025
  {
10445
11026
  style: {
@@ -10452,8 +11033,8 @@ function WeaknessesList({
10452
11033
  }
10453
11034
  )
10454
11035
  ] }),
10455
- /* @__PURE__ */ jsx49(Box22, { paddingTop: 2, children: /* @__PURE__ */ jsxs34(Text35, { muted: true, size: 2, children: [
10456
- area.invertedRetrievalGap && /* @__PURE__ */ jsxs34("span", { style: { color: "#fbbf24" }, children: [
11036
+ /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
11037
+ area.invertedRetrievalGap && /* @__PURE__ */ jsxs37("span", { style: { color: "#fbbf24" }, children: [
10457
11038
  "Agent does better by NOT finding these docs.",
10458
11039
  " "
10459
11040
  ] }),
@@ -10468,22 +11049,22 @@ function WeaknessesList({
10468
11049
  area.feature
10469
11050
  )) })
10470
11051
  ] }),
10471
- retrievalIssues.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10472
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10473
- /* @__PURE__ */ jsx49(SearchIcon8, { style: { color: "#fbbf24" } }),
10474
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
10475
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.retrievalIssues })
11052
+ retrievalIssues.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11053
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11054
+ /* @__PURE__ */ jsx52(SearchIcon8, { style: { color: "#fbbf24" } }),
11055
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
11056
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalIssues })
10476
11057
  ] }),
10477
- /* @__PURE__ */ jsx49(Box22, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs34(
10478
- Box22,
11058
+ /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs37(
11059
+ Box25,
10479
11060
  {
10480
11061
  padding: 4,
10481
11062
  style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
10482
11063
  children: [
10483
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", justify: "space-between", wrap: "wrap", children: [
10484
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10485
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10486
- /* @__PURE__ */ jsx49(
11064
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
11065
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11066
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11067
+ /* @__PURE__ */ jsx52(
10487
11068
  "span",
10488
11069
  {
10489
11070
  style: {
@@ -10498,7 +11079,7 @@ function WeaknessesList({
10498
11079
  }
10499
11080
  )
10500
11081
  ] }),
10501
- /* @__PURE__ */ jsx49(
11082
+ /* @__PURE__ */ jsx52(
10502
11083
  "span",
10503
11084
  {
10504
11085
  style: {
@@ -10511,7 +11092,7 @@ function WeaknessesList({
10511
11092
  }
10512
11093
  )
10513
11094
  ] }),
10514
- /* @__PURE__ */ jsx49(Box22, { paddingTop: 2, children: /* @__PURE__ */ jsxs34(Text35, { muted: true, size: 2, children: [
11095
+ /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
10515
11096
  "Actual score (",
10516
11097
  Math.round(area.actualScore ?? 0),
10517
11098
  ") is much lower than ceiling (",
@@ -10526,21 +11107,21 @@ function WeaknessesList({
10526
11107
  area.feature
10527
11108
  )) })
10528
11109
  ] }),
10529
- dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs34(Stack27, { space: 3, children: [
10530
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10531
- /* @__PURE__ */ jsx49(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
10532
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
10533
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.dimWeaknesses })
11110
+ dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11111
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11112
+ /* @__PURE__ */ jsx52(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
11113
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
11114
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.dimWeaknesses })
10534
11115
  ] }),
10535
- /* @__PURE__ */ jsx49(Box22, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs34(
10536
- Box22,
11116
+ /* @__PURE__ */ jsx52(Box25, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs37(
11117
+ Box25,
10537
11118
  {
10538
11119
  padding: 4,
10539
11120
  style: i > 0 ? dividerStyle : void 0,
10540
11121
  children: [
10541
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, paddingBottom: 2, children: [
10542
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10543
- /* @__PURE__ */ jsx49(
11122
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, paddingBottom: 2, children: [
11123
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11124
+ /* @__PURE__ */ jsx52(
10544
11125
  "span",
10545
11126
  {
10546
11127
  style: {
@@ -10555,7 +11136,7 @@ function WeaknessesList({
10555
11136
  }
10556
11137
  )
10557
11138
  ] }),
10558
- /* @__PURE__ */ jsx49(Flex26, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx49(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs34(
11139
+ /* @__PURE__ */ jsx52(Flex28, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx52(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs37(
10559
11140
  "span",
10560
11141
  {
10561
11142
  style: {
@@ -10577,33 +11158,33 @@ function WeaknessesList({
10577
11158
  area.feature
10578
11159
  )) })
10579
11160
  ] }),
10580
- regressed.length > 0 && /* @__PURE__ */ jsxs34(Box22, { style: neutralCardStyle, children: [
10581
- /* @__PURE__ */ jsx49(
10582
- Box22,
11161
+ FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11162
+ /* @__PURE__ */ jsx52(
11163
+ Box25,
10583
11164
  {
10584
11165
  padding: 4,
10585
11166
  style: { borderBottom: "1px solid var(--card-border-color)" },
10586
- children: /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10587
- /* @__PURE__ */ jsx49(ArrowDownIcon2, { style: { color: "#f87171" } }),
10588
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
11167
+ children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11168
+ /* @__PURE__ */ jsx52(ArrowDownIcon2, { style: { color: "#f87171" } }),
11169
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
10589
11170
  ] })
10590
11171
  }
10591
11172
  ),
10592
- /* @__PURE__ */ jsx49(Stack27, { children: regressed.map((featureName, i) => {
11173
+ /* @__PURE__ */ jsx52(Stack29, { children: regressed.map((featureName, i) => {
10593
11174
  const area = scores.find((s) => s.feature === featureName);
10594
11175
  const areaDelta = perArea?.[featureName];
10595
- return /* @__PURE__ */ jsxs34(
10596
- Flex26,
11176
+ return /* @__PURE__ */ jsxs37(
11177
+ Flex28,
10597
11178
  {
10598
11179
  align: "center",
10599
11180
  justify: "space-between",
10600
11181
  padding: 4,
10601
11182
  style: i > 0 ? dividerStyle : void 0,
10602
11183
  children: [
10603
- /* @__PURE__ */ jsx49(Text35, { size: 2, children: featureName }),
10604
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 3, children: [
10605
- areaDelta != null && /* @__PURE__ */ jsx49(DeltaIndicator, { delta: areaDelta, icon: true }),
10606
- area && /* @__PURE__ */ jsx49(
11184
+ /* @__PURE__ */ jsx52(Text38, { size: 2, children: featureName }),
11185
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 3, children: [
11186
+ areaDelta != null && /* @__PURE__ */ jsx52(DeltaIndicator, { delta: areaDelta, icon: true }),
11187
+ area && /* @__PURE__ */ jsx52(
10607
11188
  "span",
10608
11189
  {
10609
11190
  style: {
@@ -10625,32 +11206,32 @@ function WeaknessesList({
10625
11206
  );
10626
11207
  }) })
10627
11208
  ] }),
10628
- efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs34(Box22, { style: neutralCardStyle, children: [
10629
- /* @__PURE__ */ jsx49(
10630
- Box22,
11209
+ efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11210
+ /* @__PURE__ */ jsx52(
11211
+ Box25,
10631
11212
  {
10632
11213
  padding: 4,
10633
11214
  style: { borderBottom: "1px solid var(--card-border-color)" },
10634
- children: /* @__PURE__ */ jsxs34(Stack27, { space: 2, children: [
10635
- /* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 2, children: [
10636
- /* @__PURE__ */ jsx49(BoltIcon, { style: { color: "#fbbf24" } }),
10637
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
10638
- /* @__PURE__ */ jsx49(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
11215
+ children: /* @__PURE__ */ jsxs37(Stack29, { space: 2, children: [
11216
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11217
+ /* @__PURE__ */ jsx52(BoltIcon, { style: { color: "#fbbf24" } }),
11218
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
11219
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
10639
11220
  ] }),
10640
- /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
11221
+ /* @__PURE__ */ jsx52(Text38, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
10641
11222
  ] })
10642
11223
  }
10643
11224
  ),
10644
- /* @__PURE__ */ jsx49(Stack27, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs34(
10645
- Flex26,
11225
+ /* @__PURE__ */ jsx52(Stack29, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs37(
11226
+ Flex28,
10646
11227
  {
10647
11228
  align: "center",
10648
11229
  justify: "space-between",
10649
11230
  padding: 4,
10650
11231
  style: i > 0 ? dividerStyle : void 0,
10651
11232
  children: [
10652
- /* @__PURE__ */ jsx49(Text35, { size: 2, children: area.feature }),
10653
- /* @__PURE__ */ jsx49(
11233
+ /* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
11234
+ /* @__PURE__ */ jsx52(
10654
11235
  "span",
10655
11236
  {
10656
11237
  style: {
@@ -10678,12 +11259,12 @@ var tipArea = {
10678
11259
  fontWeight: 600
10679
11260
  };
10680
11261
  function dimTip(area, dim, score, description) {
10681
- return /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10682
- /* @__PURE__ */ jsx49("span", { style: tipArea, children: area }),
11262
+ return /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11263
+ /* @__PURE__ */ jsx52("span", { style: tipArea, children: area }),
10683
11264
  " scores",
10684
11265
  " ",
10685
- /* @__PURE__ */ jsx49("span", { style: tipValue, children: score }),
10686
- /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11266
+ /* @__PURE__ */ jsx52("span", { style: tipValue, children: score }),
11267
+ /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10687
11268
  " on",
10688
11269
  " ",
10689
11270
  dim.toLowerCase(),
@@ -10712,7 +11293,7 @@ function getDimensionWeaknesses(area) {
10712
11293
  }
10713
11294
 
10714
11295
  // src/components/report-detail/ReportDetail.tsx
10715
- import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
11296
+ import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
10716
11297
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
10717
11298
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
10718
11299
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -10729,9 +11310,9 @@ function ReportDetail({
10729
11310
  subTab
10730
11311
  }) {
10731
11312
  const client = useClient10({ apiVersion: API_VERSION });
10732
- const [loading, setLoading] = useState22(true);
10733
- const [report, setReport] = useState22(null);
10734
- useEffect10(() => {
11313
+ const [loading, setLoading] = useState23(true);
11314
+ const [report, setReport] = useState23(null);
11315
+ useEffect12(() => {
10735
11316
  let cancelled = false;
10736
11317
  setLoading(true);
10737
11318
  client.fetch(reportDetailQuery, { reportId }).then((data) => {
@@ -10775,19 +11356,19 @@ function ReportDetail({
10775
11356
  if (disabledTabs.has(parsed)) return "overview";
10776
11357
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
10777
11358
  }, [activeTab, disabledTabs, tabs]);
10778
- const handleTabClick = useCallback32(
11359
+ const handleTabClick = useCallback33(
10779
11360
  (tabId) => {
10780
11361
  onTabChange(tabId === "overview" ? null : tabId, null, null);
10781
11362
  },
10782
11363
  [onTabChange]
10783
11364
  );
10784
11365
  if (loading) {
10785
- return /* @__PURE__ */ jsx50(LoadingState, { message: "Loading report\u2026" });
11366
+ return /* @__PURE__ */ jsx53(LoadingState, { message: "Loading report\u2026" });
10786
11367
  }
10787
11368
  if (!report || !summary) {
10788
- return /* @__PURE__ */ jsx50(Box23, { padding: 5, children: /* @__PURE__ */ jsxs35(Stack28, { space: 4, children: [
10789
- /* @__PURE__ */ jsx50(
10790
- Button7,
11369
+ return /* @__PURE__ */ jsx53(Box26, { padding: 5, children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11370
+ /* @__PURE__ */ jsx53(
11371
+ Button8,
10791
11372
  {
10792
11373
  icon: ArrowLeftIcon3,
10793
11374
  mode: "bleed",
@@ -10795,18 +11376,18 @@ function ReportDetail({
10795
11376
  text: "Back"
10796
11377
  }
10797
11378
  ),
10798
- /* @__PURE__ */ jsx50(Text36, { align: "center", muted: true, size: 3, children: "Report not found" })
11379
+ /* @__PURE__ */ jsx53(Text39, { align: "center", muted: true, size: 3, children: "Report not found" })
10799
11380
  ] }) });
10800
11381
  }
10801
11382
  const { comparison, provenance } = report;
10802
11383
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
10803
- return /* @__PURE__ */ jsx50(
11384
+ return /* @__PURE__ */ jsx53(
10804
11385
  ReportArtifactProvider,
10805
11386
  {
10806
11387
  runId: report.provenance?.runId,
10807
11388
  manifest: summary?.artifactManifest,
10808
- children: /* @__PURE__ */ jsx50(Box23, { padding: 4, children: /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
10809
- /* @__PURE__ */ jsx50(
11389
+ children: /* @__PURE__ */ jsx53(Box26, { padding: 4, children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11390
+ /* @__PURE__ */ jsx53(
10810
11391
  ReportHeader,
10811
11392
  {
10812
11393
  completedAt: report.completedAt,
@@ -10815,11 +11396,11 @@ function ReportDetail({
10815
11396
  title: report.title
10816
11397
  }
10817
11398
  ),
10818
- /* @__PURE__ */ jsxs35(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
10819
- /* @__PURE__ */ jsx50(TabList, { space: 1, children: tabs.map((tab) => {
11399
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
11400
+ /* @__PURE__ */ jsx53(TabList, { space: 1, children: tabs.map((tab) => {
10820
11401
  const isDisabled = disabledTabs.has(tab.id);
10821
11402
  const tooltip = getDisabledTabTooltip(tab.id, summary);
10822
- const tabElement = /* @__PURE__ */ jsx50(
11403
+ const tabElement = /* @__PURE__ */ jsx53(
10823
11404
  Tab,
10824
11405
  {
10825
11406
  "aria-controls": `panel-${tab.id}`,
@@ -10830,27 +11411,27 @@ function ReportDetail({
10830
11411
  selected: currentTab === tab.id
10831
11412
  }
10832
11413
  );
10833
- return isDisabled && tooltip ? /* @__PURE__ */ jsx50(
10834
- Tooltip9,
11414
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx53(
11415
+ Tooltip10,
10835
11416
  {
10836
- content: /* @__PURE__ */ jsx50(Box23, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
11417
+ content: /* @__PURE__ */ jsx53(Box26, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
10837
11418
  placement: "bottom",
10838
11419
  portal: true,
10839
- children: /* @__PURE__ */ jsx50("span", { style: { display: "inline-block" }, children: tabElement })
11420
+ children: /* @__PURE__ */ jsx53("span", { style: { display: "inline-block" }, children: tabElement })
10840
11421
  },
10841
11422
  tab.id
10842
- ) : /* @__PURE__ */ jsx50("span", { children: tabElement }, tab.id);
11423
+ ) : /* @__PURE__ */ jsx53("span", { children: tabElement }, tab.id);
10843
11424
  }) }),
10844
- /* @__PURE__ */ jsxs35(Flex27, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
10845
- /* @__PURE__ */ jsx50(
11425
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
11426
+ /* @__PURE__ */ jsx53(
10846
11427
  HoverTip,
10847
11428
  {
10848
11429
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
10849
- children: /* @__PURE__ */ jsx50(Badge7, { mode: "outline", tone: "default", children: provenance.source.name })
11430
+ children: /* @__PURE__ */ jsx53(Badge8, { mode: "outline", tone: "default", children: provenance.source.name })
10850
11431
  }
10851
11432
  ),
10852
- /* @__PURE__ */ jsx50(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx50(Badge7, { tone: "primary", children: provenance.mode }) }),
10853
- /* @__PURE__ */ jsx50(
11433
+ /* @__PURE__ */ jsx53(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx53(Badge8, { tone: "primary", children: provenance.mode }) }),
11434
+ /* @__PURE__ */ jsx53(
10854
11435
  ReportActions,
10855
11436
  {
10856
11437
  documentId: report._id,
@@ -10861,14 +11442,14 @@ function ReportDetail({
10861
11442
  )
10862
11443
  ] })
10863
11444
  ] }),
10864
- currentTab === "overview" && /* @__PURE__ */ jsx50(
11445
+ currentTab === "overview" && /* @__PURE__ */ jsx53(
10865
11446
  TabPanel,
10866
11447
  {
10867
11448
  "aria-labelledby": "tab-overview",
10868
11449
  hidden: currentTab !== "overview",
10869
11450
  id: "panel-overview",
10870
- children: /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
10871
- /* @__PURE__ */ jsx50(
11451
+ children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11452
+ /* @__PURE__ */ jsx53(
10872
11453
  DiagnosticsOverview,
10873
11454
  {
10874
11455
  comparison,
@@ -10879,18 +11460,19 @@ function ReportDetail({
10879
11460
  totalTests
10880
11461
  }
10881
11462
  ),
10882
- /* @__PURE__ */ jsx50(
11463
+ /* @__PURE__ */ jsx53(CostLatencyPanel, { testResults: summary.testResults }),
11464
+ /* @__PURE__ */ jsx53(
10883
11465
  LineageCard,
10884
11466
  {
10885
11467
  provenance,
10886
11468
  reportId: report.reportId
10887
11469
  }
10888
11470
  ),
10889
- /* @__PURE__ */ jsx50(ProvenanceCard, { provenance })
11471
+ /* @__PURE__ */ jsx53(ProvenanceCard, { provenance })
10890
11472
  ] })
10891
11473
  }
10892
11474
  ),
10893
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx50(
11475
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx53(
10894
11476
  DiagnosticsPanel,
10895
11477
  {
10896
11478
  artifactCache,
@@ -10906,13 +11488,13 @@ function ReportDetail({
10906
11488
  testResults: summary.testResults
10907
11489
  }
10908
11490
  ),
10909
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx50(
11491
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx53(
10910
11492
  TabPanel,
10911
11493
  {
10912
11494
  "aria-labelledby": "tab-activity",
10913
11495
  hidden: currentTab !== "activity",
10914
11496
  id: "panel-activity",
10915
- children: /* @__PURE__ */ jsx50(
11497
+ children: /* @__PURE__ */ jsx53(
10916
11498
  AgentBehaviorCard,
10917
11499
  {
10918
11500
  agentBehavior: summary.agentBehavior,
@@ -10950,9 +11532,9 @@ function DiagnosticsPanel({
10950
11532
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
10951
11533
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
10952
11534
  ).length;
10953
- return /* @__PURE__ */ jsx50(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs35(Stack28, { space: 4, children: [
10954
- /* @__PURE__ */ jsx50(
10955
- Flex27,
11535
+ return /* @__PURE__ */ jsx53(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11536
+ /* @__PURE__ */ jsx53(
11537
+ Flex29,
10956
11538
  {
10957
11539
  align: "center",
10958
11540
  gap: 1,
@@ -10961,7 +11543,7 @@ function DiagnosticsPanel({
10961
11543
  paddingBottom: 8
10962
11544
  },
10963
11545
  wrap: "wrap",
10964
- children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs35(
11546
+ children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs38(
10965
11547
  "button",
10966
11548
  {
10967
11549
  onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
@@ -10981,7 +11563,7 @@ function DiagnosticsPanel({
10981
11563
  type: "button",
10982
11564
  children: [
10983
11565
  tab.label,
10984
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx50(
11566
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx53(
10985
11567
  "span",
10986
11568
  {
10987
11569
  style: {
@@ -11001,7 +11583,7 @@ function DiagnosticsPanel({
11001
11583
  ))
11002
11584
  }
11003
11585
  ),
11004
- subTab === "strengths" && /* @__PURE__ */ jsx50(
11586
+ subTab === "strengths" && /* @__PURE__ */ jsx53(
11005
11587
  StrengthsList,
11006
11588
  {
11007
11589
  comparison,
@@ -11010,8 +11592,8 @@ function DiagnosticsPanel({
11010
11592
  scores
11011
11593
  }
11012
11594
  ),
11013
- subTab === "issues" && /* @__PURE__ */ jsxs35(Stack28, { space: 5, children: [
11014
- /* @__PURE__ */ jsx50(
11595
+ subTab === "issues" && /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11596
+ /* @__PURE__ */ jsx53(
11015
11597
  WeaknessesList,
11016
11598
  {
11017
11599
  comparison,
@@ -11020,8 +11602,8 @@ function DiagnosticsPanel({
11020
11602
  scores
11021
11603
  }
11022
11604
  ),
11023
- /* @__PURE__ */ jsx50(FailureModesPanel, { failureModes }),
11024
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx50(
11605
+ FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx53(FailureModesPanel, { failureModes }),
11606
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx53(
11025
11607
  JudgmentList,
11026
11608
  {
11027
11609
  artifactCache,
@@ -11057,17 +11639,17 @@ function getDisabledTabTooltip(tabId, summary) {
11057
11639
  if (!summary) return null;
11058
11640
  switch (tabId) {
11059
11641
  case "diagnostics":
11060
- return /* @__PURE__ */ jsx50(Text36, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
11642
+ return /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
11061
11643
  case "activity":
11062
- return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs35(Text36, { muted: true, size: 2, children: [
11644
+ return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
11063
11645
  "Not available for baseline-only evaluations. Run with",
11064
11646
  " ",
11065
- /* @__PURE__ */ jsx50("code", { style: inlineCodeStyle, children: "--mode full" }),
11647
+ /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode full" }),
11066
11648
  " or",
11067
11649
  " ",
11068
- /* @__PURE__ */ jsx50("code", { style: inlineCodeStyle, children: "--mode agentic" }),
11650
+ /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode agentic" }),
11069
11651
  " to capture agent browsing behavior."
11070
- ] }) : /* @__PURE__ */ jsx50(Text36, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
11652
+ ] }) : /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
11071
11653
  default:
11072
11654
  return null;
11073
11655
  }
@@ -11075,12 +11657,12 @@ function getDisabledTabTooltip(tabId, summary) {
11075
11657
 
11076
11658
  // src/components/report-detail/AreaScoreRow.tsx
11077
11659
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
11078
- import { Box as Box24, Flex as Flex28, Stack as Stack29, Text as Text37 } from "@sanity/ui";
11079
- import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
11660
+ import { Box as Box27, Flex as Flex30, Stack as Stack31, Text as Text40 } from "@sanity/ui";
11661
+ import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
11080
11662
 
11081
11663
  // src/components/report-detail/AreaScoreTable.tsx
11082
11664
  import React4 from "react";
11083
- import { Card as Card17, Stack as Stack30, Text as Text39 } from "@sanity/ui";
11665
+ import { Card as Card18, Stack as Stack32, Text as Text42 } from "@sanity/ui";
11084
11666
 
11085
11667
  // src/lib/scoring.ts
11086
11668
  var HEX_MAP = {
@@ -11097,138 +11679,49 @@ function scoreHex(score) {
11097
11679
  }
11098
11680
 
11099
11681
  // src/components/primitives/ScoreCell.tsx
11100
- import { Card as Card16, Text as Text38 } from "@sanity/ui";
11101
- import { jsx as jsx52 } from "react/jsx-runtime";
11682
+ import { Card as Card17, Text as Text41 } from "@sanity/ui";
11683
+ import { jsx as jsx55 } from "react/jsx-runtime";
11102
11684
 
11103
11685
  // src/components/report-detail/AreaScoreTable.tsx
11104
- import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
11686
+ import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
11105
11687
 
11106
11688
  // src/components/report-detail/AutoComparisonCard.tsx
11107
- 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";
11108
- import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
11689
+ 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";
11690
+ import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
11109
11691
 
11110
11692
  // src/components/report-detail/OverviewStats.tsx
11111
- import { Grid as Grid5 } from "@sanity/ui";
11112
- import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
11693
+ import { Grid as Grid6 } from "@sanity/ui";
11694
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
11113
11695
 
11114
11696
  // src/components/report-detail/RecommendationsSection.tsx
11115
11697
  import { BoltIcon as BoltIcon2 } from "@sanity/icons";
11116
- import { Box as Box26, Flex as Flex30, Stack as Stack32, Text as Text41 } from "@sanity/ui";
11117
- import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
11698
+ import { Box as Box29, Flex as Flex32, Stack as Stack34, Text as Text44 } from "@sanity/ui";
11699
+ import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
11118
11700
 
11119
11701
  // src/components/report-detail/ThreeLayerTable.tsx
11120
11702
  import React5 from "react";
11121
- import { Badge as Badge9, Card as Card19, Flex as Flex31, Stack as Stack33, Text as Text42 } from "@sanity/ui";
11122
- import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
11703
+ import { Badge as Badge10, Card as Card20, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
11704
+ import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
11123
11705
 
11124
11706
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
11125
- import { Card as Card20 } from "@sanity/ui";
11126
- import { useCallback as useCallback34, useEffect as useEffect13, useRef as useRef8, useState as useState25 } from "react";
11707
+ import { Card as Card21 } from "@sanity/ui";
11708
+ import { useCallback as useCallback34, useEffect as useEffect14, useRef as useRef8, useState as useState25 } from "react";
11127
11709
 
11128
11710
  // src/components/report-detail/JudgmentDetailDrawer.tsx
11129
- import { useEffect as useEffect12, useState as useState24 } from "react";
11711
+ import { useEffect as useEffect13, useState as useState24 } from "react";
11130
11712
  import { CloseIcon as CloseIcon2 } from "@sanity/icons";
11131
11713
  import {
11132
- Box as Box28,
11714
+ Box as Box30,
11133
11715
  Button as Button9,
11134
- Flex as Flex32,
11135
- Stack as Stack34,
11716
+ Flex as Flex34,
11717
+ Stack as Stack36,
11136
11718
  Tab as Tab2,
11137
11719
  TabList as TabList2,
11138
11720
  TabPanel as TabPanel2,
11139
- Text as Text44,
11721
+ Text as Text46,
11140
11722
  Tooltip as Tooltip12
11141
11723
  } from "@sanity/ui";
11142
-
11143
- // src/components/CopyButton.tsx
11144
- import {
11145
- useCallback as useCallback33,
11146
- useEffect as useEffect11,
11147
- useRef as useRef7,
11148
- useState as useState23
11149
- } from "react";
11150
- import { CheckmarkIcon, CopyIcon as CopyIcon3 } from "@sanity/icons";
11151
- import { Box as Box27, Button as Button8, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
11152
- import { jsx as jsx58 } from "react/jsx-runtime";
11153
- function CopyButton({
11154
- copiedLabel = "Copied!",
11155
- errorLabel = "Copy failed",
11156
- label,
11157
- revertAfterMs = 1500,
11158
- style,
11159
- text
11160
- }) {
11161
- const [status, setStatus] = useState23("idle");
11162
- const timerRef = useRef7(null);
11163
- const scheduleRevert = useCallback33(() => {
11164
- if (timerRef.current !== null) window.clearTimeout(timerRef.current);
11165
- timerRef.current = window.setTimeout(() => {
11166
- setStatus("idle");
11167
- timerRef.current = null;
11168
- }, revertAfterMs);
11169
- }, [revertAfterMs]);
11170
- const handleCopy = useCallback33(() => {
11171
- navigator.clipboard.writeText(text).then(
11172
- () => {
11173
- setStatus("copied");
11174
- scheduleRevert();
11175
- },
11176
- () => {
11177
- setStatus("error");
11178
- scheduleRevert();
11179
- }
11180
- );
11181
- }, [text, scheduleRevert]);
11182
- useEffect11(() => {
11183
- return () => {
11184
- if (timerRef.current !== null) window.clearTimeout(timerRef.current);
11185
- };
11186
- }, []);
11187
- const tooltipLabel = status === "copied" ? copiedLabel : status === "error" ? errorLabel : label;
11188
- const tone = status === "copied" ? "positive" : status === "error" ? "critical" : "default";
11189
- const icon = status === "copied" ? CheckmarkIcon : CopyIcon3;
11190
- const idle = status === "idle";
11191
- return /* @__PURE__ */ jsx58(
11192
- Tooltip11,
11193
- {
11194
- content: /* @__PURE__ */ jsx58(Box27, { padding: 2, children: /* @__PURE__ */ jsx58(Text43, { size: 1, children: tooltipLabel }) }),
11195
- placement: "left",
11196
- portal: true,
11197
- children: /* @__PURE__ */ jsx58(
11198
- Button8,
11199
- {
11200
- "aria-label": label,
11201
- fontSize: 1,
11202
- icon,
11203
- mode: "bleed",
11204
- onBlur: (e) => {
11205
- if (idle) e.currentTarget.style.opacity = "0.55";
11206
- },
11207
- onClick: handleCopy,
11208
- onFocus: (e) => {
11209
- if (idle) e.currentTarget.style.opacity = "1";
11210
- },
11211
- onMouseEnter: (e) => {
11212
- if (idle) e.currentTarget.style.opacity = "1";
11213
- },
11214
- onMouseLeave: (e) => {
11215
- if (idle) e.currentTarget.style.opacity = "0.55";
11216
- },
11217
- padding: 2,
11218
- style: {
11219
- opacity: idle ? 0.55 : 1,
11220
- transition: "opacity 150ms ease",
11221
- ...style
11222
- },
11223
- tone
11224
- }
11225
- )
11226
- }
11227
- );
11228
- }
11229
-
11230
- // src/components/report-detail/JudgmentDetailDrawer.tsx
11231
- import { jsx as jsx59, jsxs as jsxs42 } from "react/jsx-runtime";
11724
+ import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
11232
11725
  var HEADER_STYLE = {
11233
11726
  borderBottom: "1px solid var(--card-border-color)"
11234
11727
  };
@@ -11267,7 +11760,7 @@ function DocBadge({
11267
11760
  const [hovered, setHovered] = useState24(false);
11268
11761
  const isLinked = Boolean(doc.documentId);
11269
11762
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
11270
- const badge = /* @__PURE__ */ jsx59(
11763
+ const badge = /* @__PURE__ */ jsx61(
11271
11764
  "span",
11272
11765
  {
11273
11766
  style: {
@@ -11280,13 +11773,13 @@ function DocBadge({
11280
11773
  children: doc.slug
11281
11774
  }
11282
11775
  );
11283
- return /* @__PURE__ */ jsx59(
11776
+ return /* @__PURE__ */ jsx61(
11284
11777
  Tooltip12,
11285
11778
  {
11286
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 2, children: tooltipLabel }) }),
11779
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 2, children: tooltipLabel }) }),
11287
11780
  placement: "bottom",
11288
11781
  portal: true,
11289
- children: isLinked ? /* @__PURE__ */ jsx59(
11782
+ children: isLinked ? /* @__PURE__ */ jsx61(
11290
11783
  "a",
11291
11784
  {
11292
11785
  href: `/intent/edit/id=${doc.documentId}`,
@@ -11301,7 +11794,7 @@ function DocBadge({
11301
11794
  },
11302
11795
  children: badge
11303
11796
  }
11304
- ) : /* @__PURE__ */ jsx59("span", { children: badge })
11797
+ ) : /* @__PURE__ */ jsx61("span", { children: badge })
11305
11798
  }
11306
11799
  );
11307
11800
  }
@@ -11309,6 +11802,7 @@ function JudgmentDetailDrawer({
11309
11802
  artifactCache,
11310
11803
  judgment,
11311
11804
  onClose,
11805
+ onShowPrompts,
11312
11806
  testResult
11313
11807
  }) {
11314
11808
  const [tab, setTab] = useState24("reasoning");
@@ -11318,7 +11812,7 @@ function JudgmentDetailDrawer({
11318
11812
  const dimLabel = dimensionLabel2(judgment.dimension);
11319
11813
  const judgmentId = judgment.id ?? "";
11320
11814
  const [fullJudgment, fullStatus, requestFullJudgment] = useArtifactDetail("graderJudgments", judgmentId);
11321
- useEffect12(() => {
11815
+ useEffect13(() => {
11322
11816
  if (!judgmentId) return;
11323
11817
  if (fullStatus !== "idle") return;
11324
11818
  void requestFullJudgment();
@@ -11326,11 +11820,11 @@ function JudgmentDetailDrawer({
11326
11820
  const fullReason = typeof fullJudgment?.reason === "string" && fullJudgment.reason.length > 0 ? fullJudgment.reason : null;
11327
11821
  const reasoningText = fullReason ?? judgment.reason;
11328
11822
  const reasoningIsPreview = fullReason === null && judgmentId.length > 0 && fullStatus !== "error";
11329
- useEffect12(() => {
11823
+ useEffect13(() => {
11330
11824
  setTab("reasoning");
11331
11825
  }, [judgment.taskId, judgment.dimension, judgment.modelId]);
11332
11826
  const [fetchDispatched, setFetchDispatched] = useState24(false);
11333
- useEffect12(() => {
11827
+ useEffect13(() => {
11334
11828
  setFetchDispatched(false);
11335
11829
  }, [judgment.taskId, judgment.dimension, judgment.modelId]);
11336
11830
  const inlineOutput = testResult?.responseOutput;
@@ -11345,7 +11839,7 @@ function JudgmentDetailDrawer({
11345
11839
  const fetchFailed = canAttemptFetch && artifactCache?.status === "error";
11346
11840
  const entryUnavailable = canAttemptFetch && fetchDispatched && !fetchInFlight && !fetchFailed;
11347
11841
  const hasOutputTab = resolvedOutput != null || canAttemptFetch;
11348
- useEffect12(() => {
11842
+ useEffect13(() => {
11349
11843
  if (tab === "output" && canAttemptFetch && !fetchDispatched) {
11350
11844
  setFetchDispatched(true);
11351
11845
  void artifactCache.fetchOutput(judgment.taskId, judgment.modelId);
@@ -11358,22 +11852,22 @@ function JudgmentDetailDrawer({
11358
11852
  judgment.taskId,
11359
11853
  judgment.modelId
11360
11854
  ]);
11361
- useEffect12(() => {
11855
+ useEffect13(() => {
11362
11856
  const onKeyDown = (e) => {
11363
11857
  if (e.key === "Escape") onClose();
11364
11858
  };
11365
11859
  window.addEventListener("keydown", onKeyDown);
11366
11860
  return () => window.removeEventListener("keydown", onKeyDown);
11367
11861
  }, [onClose]);
11368
- return /* @__PURE__ */ jsxs42(
11369
- Flex32,
11862
+ return /* @__PURE__ */ jsxs45(
11863
+ Flex34,
11370
11864
  {
11371
11865
  "aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
11372
11866
  direction: "column",
11373
11867
  role: "dialog",
11374
11868
  style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
11375
11869
  children: [
11376
- /* @__PURE__ */ jsx59(
11870
+ /* @__PURE__ */ jsx61(
11377
11871
  "div",
11378
11872
  {
11379
11873
  "aria-hidden": true,
@@ -11386,10 +11880,10 @@ function JudgmentDetailDrawer({
11386
11880
  }
11387
11881
  }
11388
11882
  ),
11389
- /* @__PURE__ */ jsxs42(Flex32, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
11390
- /* @__PURE__ */ jsxs42(Stack34, { flex: 1, space: 2, children: [
11391
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 2, wrap: "wrap", children: [
11392
- /* @__PURE__ */ jsx59(
11883
+ /* @__PURE__ */ jsxs45(Flex34, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
11884
+ /* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 2, children: [
11885
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11886
+ /* @__PURE__ */ jsx61(
11393
11887
  "span",
11394
11888
  {
11395
11889
  style: {
@@ -11404,7 +11898,7 @@ function JudgmentDetailDrawer({
11404
11898
  children: judgment.score
11405
11899
  }
11406
11900
  ),
11407
- /* @__PURE__ */ jsx59(
11901
+ /* @__PURE__ */ jsx61(
11408
11902
  "span",
11409
11903
  {
11410
11904
  style: {
@@ -11417,13 +11911,13 @@ function JudgmentDetailDrawer({
11417
11911
  children: dimLabel
11418
11912
  }
11419
11913
  ),
11420
- /* @__PURE__ */ jsx59(
11914
+ /* @__PURE__ */ jsx61(
11421
11915
  Tooltip12,
11422
11916
  {
11423
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: judgment.modelId }) }),
11917
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: judgment.modelId }) }),
11424
11918
  placement: "bottom",
11425
11919
  portal: true,
11426
- children: /* @__PURE__ */ jsx59(
11920
+ children: /* @__PURE__ */ jsx61(
11427
11921
  "span",
11428
11922
  {
11429
11923
  style: {
@@ -11435,12 +11929,12 @@ function JudgmentDetailDrawer({
11435
11929
  fontSize: 12,
11436
11930
  padding: "2px 6px"
11437
11931
  },
11438
- children: shortModelId(judgment.modelId)
11932
+ children: shortModelId2(judgment.modelId)
11439
11933
  }
11440
11934
  )
11441
11935
  }
11442
11936
  ),
11443
- (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx59(
11937
+ (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx61(
11444
11938
  "span",
11445
11939
  {
11446
11940
  "aria-hidden": true,
@@ -11452,38 +11946,38 @@ function JudgmentDetailDrawer({
11452
11946
  }
11453
11947
  }
11454
11948
  ),
11455
- testResult?.latencyMs != null && /* @__PURE__ */ jsx59(
11949
+ testResult?.latencyMs != null && /* @__PURE__ */ jsx61(
11456
11950
  Tooltip12,
11457
11951
  {
11458
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: "End-to-end generation latency for this model call." }) }),
11952
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "End-to-end generation latency for this model call." }) }),
11459
11953
  placement: "bottom",
11460
11954
  portal: true,
11461
- children: /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, children: [
11955
+ children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
11462
11956
  (testResult.latencyMs / 1e3).toFixed(1),
11463
11957
  "s"
11464
11958
  ] })
11465
11959
  }
11466
11960
  ),
11467
- testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx59(
11961
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx61(
11468
11962
  Tooltip12,
11469
11963
  {
11470
- content: /* @__PURE__ */ jsx59(Box28, { padding: 2, children: /* @__PURE__ */ jsx59(Text44, { size: 1, children: "Provider-reported cost for this model call." }) }),
11964
+ content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "Provider-reported cost for this model call." }) }),
11471
11965
  placement: "bottom",
11472
11966
  portal: true,
11473
- children: /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, children: [
11967
+ children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
11474
11968
  "$",
11475
11969
  testResult.cost.toFixed(4)
11476
11970
  ] })
11477
11971
  }
11478
11972
  )
11479
11973
  ] }),
11480
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 2, wrap: "wrap", children: [
11481
- /* @__PURE__ */ jsx59(Text44, { size: 2, weight: "medium", children: taskName }),
11482
- /* @__PURE__ */ jsx59(VariantBadge, { variant })
11974
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11975
+ /* @__PURE__ */ jsx61(Text46, { size: 2, weight: "medium", children: taskName }),
11976
+ /* @__PURE__ */ jsx61(VariantBadge, { variant })
11483
11977
  ] })
11484
11978
  ] }),
11485
- /* @__PURE__ */ jsxs42(Flex32, { align: "center", gap: 1, children: [
11486
- /* @__PURE__ */ jsx59(
11979
+ /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 1, children: [
11980
+ /* @__PURE__ */ jsx61(
11487
11981
  "span",
11488
11982
  {
11489
11983
  style: {
@@ -11501,7 +11995,7 @@ function JudgmentDetailDrawer({
11501
11995
  children: "Esc"
11502
11996
  }
11503
11997
  ),
11504
- /* @__PURE__ */ jsx59(
11998
+ /* @__PURE__ */ jsx61(
11505
11999
  Button9,
11506
12000
  {
11507
12001
  "aria-label": "Close (Esc)",
@@ -11514,8 +12008,8 @@ function JudgmentDetailDrawer({
11514
12008
  )
11515
12009
  ] })
11516
12010
  ] }),
11517
- /* @__PURE__ */ jsxs42(
11518
- Flex32,
12011
+ /* @__PURE__ */ jsxs45(
12012
+ Flex34,
11519
12013
  {
11520
12014
  align: "center",
11521
12015
  gap: 2,
@@ -11524,8 +12018,8 @@ function JudgmentDetailDrawer({
11524
12018
  paddingY: 2,
11525
12019
  style: TAB_BAR_STYLE,
11526
12020
  children: [
11527
- /* @__PURE__ */ jsx59(Box28, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs42(TabList2, { space: 2, children: [
11528
- /* @__PURE__ */ jsx59(
12021
+ /* @__PURE__ */ jsx61(Box30, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs45(TabList2, { space: 2, children: [
12022
+ /* @__PURE__ */ jsx61(
11529
12023
  Tab2,
11530
12024
  {
11531
12025
  "aria-controls": "judgment-panel-reasoning",
@@ -11535,7 +12029,7 @@ function JudgmentDetailDrawer({
11535
12029
  selected: tab === "reasoning"
11536
12030
  }
11537
12031
  ),
11538
- hasOutputTab && /* @__PURE__ */ jsx59(
12032
+ hasOutputTab && /* @__PURE__ */ jsx61(
11539
12033
  Tab2,
11540
12034
  {
11541
12035
  "aria-controls": "judgment-panel-output",
@@ -11546,19 +12040,24 @@ function JudgmentDetailDrawer({
11546
12040
  }
11547
12041
  )
11548
12042
  ] }) }),
11549
- /* @__PURE__ */ jsx59(JudgmentActions, {})
12043
+ /* @__PURE__ */ jsx61(
12044
+ JudgmentActions,
12045
+ {
12046
+ onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
12047
+ }
12048
+ )
11550
12049
  ]
11551
12050
  }
11552
12051
  ),
11553
- /* @__PURE__ */ jsxs42(Box28, { padding: 4, style: CONTENT_STYLE, children: [
11554
- /* @__PURE__ */ jsx59(
12052
+ /* @__PURE__ */ jsxs45(Box30, { padding: 4, style: CONTENT_STYLE, children: [
12053
+ /* @__PURE__ */ jsx61(
11555
12054
  TabPanel2,
11556
12055
  {
11557
12056
  "aria-labelledby": "judgment-tab-reasoning",
11558
12057
  hidden: tab !== "reasoning",
11559
12058
  id: "judgment-panel-reasoning",
11560
- children: /* @__PURE__ */ jsxs42(Box28, { style: COPYABLE_BLOCK_STYLE, children: [
11561
- /* @__PURE__ */ jsx59(Box28, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx59(
12059
+ children: /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12060
+ /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
11562
12061
  CopyButton,
11563
12062
  {
11564
12063
  copiedLabel: "Reasoning copied",
@@ -11566,26 +12065,26 @@ function JudgmentDetailDrawer({
11566
12065
  text: reasoningText
11567
12066
  }
11568
12067
  ) }),
11569
- /* @__PURE__ */ jsx59(Markdown, { content: reasoningText }),
11570
- 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." })
12068
+ /* @__PURE__ */ jsx61(Markdown, { content: reasoningText }),
12069
+ 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." })
11571
12070
  ] })
11572
12071
  }
11573
12072
  ),
11574
- hasOutputTab && /* @__PURE__ */ jsxs42(
12073
+ hasOutputTab && /* @__PURE__ */ jsxs45(
11575
12074
  TabPanel2,
11576
12075
  {
11577
12076
  "aria-labelledby": "judgment-tab-output",
11578
12077
  hidden: tab !== "output",
11579
12078
  id: "judgment-panel-output",
11580
12079
  children: [
11581
- !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx59(Text44, { muted: true, size: 1, children: "Fetching model output\u2026" }),
11582
- !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs42(Text44, { muted: true, size: 1, style: { color: "#f87171" }, children: [
12080
+ !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Fetching model output\u2026" }),
12081
+ !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, style: { color: "#f87171" }, children: [
11583
12082
  "Failed to load model output",
11584
12083
  artifactCache?.error ? `: ${artifactCache.error}` : ""
11585
12084
  ] }),
11586
- !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx59(Text44, { muted: true, size: 1, children: "Model output not available for this entry." }),
11587
- resolvedOutput && /* @__PURE__ */ jsxs42(Box28, { style: COPYABLE_BLOCK_STYLE, children: [
11588
- /* @__PURE__ */ jsx59(Box28, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx59(
12085
+ !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Model output not available for this entry." }),
12086
+ resolvedOutput && /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12087
+ /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
11589
12088
  CopyButton,
11590
12089
  {
11591
12090
  copiedLabel: "Output copied",
@@ -11593,15 +12092,15 @@ function JudgmentDetailDrawer({
11593
12092
  text: resolvedOutput
11594
12093
  }
11595
12094
  ) }),
11596
- /* @__PURE__ */ jsx59(Markdown, { content: resolvedOutput })
12095
+ /* @__PURE__ */ jsx61(Markdown, { content: resolvedOutput })
11597
12096
  ] })
11598
12097
  ]
11599
12098
  }
11600
12099
  )
11601
12100
  ] }),
11602
- 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: [
11603
- /* @__PURE__ */ jsx59("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
11604
- judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx59(DocBadge, { doc }, doc.slug))
12101
+ 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: [
12102
+ /* @__PURE__ */ jsx61("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
12103
+ judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx61(DocBadge, { doc }, doc.slug))
11605
12104
  ] }) })
11606
12105
  ]
11607
12106
  }
@@ -11609,7 +12108,7 @@ function JudgmentDetailDrawer({
11609
12108
  }
11610
12109
 
11611
12110
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
11612
- import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
12111
+ import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
11613
12112
  var MIN_WIDTH2 = 480;
11614
12113
  var MAX_WIDTH2 = 900;
11615
12114
  var OVERLAY_BREAKPOINT2 = 1024;
@@ -11622,7 +12121,7 @@ function useIsNarrow2() {
11622
12121
  const [narrow, setNarrow] = useState25(
11623
12122
  () => typeof window !== "undefined" && window.innerWidth < OVERLAY_BREAKPOINT2
11624
12123
  );
11625
- useEffect13(() => {
12124
+ useEffect14(() => {
11626
12125
  function handleResize() {
11627
12126
  setNarrow(window.innerWidth < OVERLAY_BREAKPOINT2);
11628
12127
  }
@@ -11647,7 +12146,7 @@ function useResizable2(defaultWidth) {
11647
12146
  },
11648
12147
  [width]
11649
12148
  );
11650
- useEffect13(() => {
12149
+ useEffect14(() => {
11651
12150
  function handleMouseMove(e) {
11652
12151
  if (!dragging.current) return;
11653
12152
  const delta = startX.current - e.clientX;
@@ -11679,7 +12178,7 @@ function JudgmentDetailDrawerOutlet({
11679
12178
  const isNarrow = useIsNarrow2();
11680
12179
  const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
11681
12180
  if (!isOpen || !active) return null;
11682
- return /* @__PURE__ */ jsxs43(
12181
+ return /* @__PURE__ */ jsxs46(
11683
12182
  "div",
11684
12183
  {
11685
12184
  style: isNarrow ? {
@@ -11705,7 +12204,7 @@ function JudgmentDetailDrawerOutlet({
11705
12204
  width
11706
12205
  },
11707
12206
  children: [
11708
- !isNarrow && /* @__PURE__ */ jsx60(
12207
+ !isNarrow && /* @__PURE__ */ jsx62(
11709
12208
  "div",
11710
12209
  {
11711
12210
  "aria-label": "Resize judgment drawer",
@@ -11730,8 +12229,8 @@ function JudgmentDetailDrawerOutlet({
11730
12229
  }
11731
12230
  }
11732
12231
  ),
11733
- /* @__PURE__ */ jsx60(
11734
- Card20,
12232
+ /* @__PURE__ */ jsx62(
12233
+ Card21,
11735
12234
  {
11736
12235
  borderLeft: !isNarrow,
11737
12236
  style: {
@@ -11740,12 +12239,13 @@ function JudgmentDetailDrawerOutlet({
11740
12239
  flexDirection: "column",
11741
12240
  overflow: "hidden"
11742
12241
  },
11743
- children: /* @__PURE__ */ jsx60(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx60(
12242
+ children: /* @__PURE__ */ jsx62(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx62(
11744
12243
  JudgmentDetailDrawer,
11745
12244
  {
11746
12245
  artifactCache: active.artifactCache,
11747
12246
  judgment: active.judgment,
11748
12247
  onClose,
12248
+ onShowPrompts: active.onShowPrompts,
11749
12249
  testResult: active.testResult
11750
12250
  }
11751
12251
  ) })
@@ -11757,10 +12257,10 @@ function JudgmentDetailDrawerOutlet({
11757
12257
  }
11758
12258
 
11759
12259
  // src/components/ScoreTimeline.tsx
11760
- import { Card as Card21, Flex as Flex33, Select as Select2, Stack as Stack35, Text as Text45 } from "@sanity/ui";
11761
- import { useCallback as useCallback35, useEffect as useEffect14, useMemo as useMemo16, useState as useState26 } from "react";
12260
+ import { Card as Card22, Flex as Flex35, Select as Select2, Stack as Stack37, Text as Text47 } from "@sanity/ui";
12261
+ import { useCallback as useCallback35, useEffect as useEffect15, useMemo as useMemo16, useState as useState26 } from "react";
11762
12262
  import { useClient as useClient11 } from "sanity";
11763
- import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
12263
+ import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
11764
12264
  var CHART_HEIGHT = 220;
11765
12265
  var CHART_WIDTH = 800;
11766
12266
  var PAD_BOTTOM = 30;
@@ -11823,7 +12323,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11823
12323
  setLoading(false);
11824
12324
  }
11825
12325
  }, [client, mode, rangeDays, source]);
11826
- useEffect14(() => {
12326
+ useEffect15(() => {
11827
12327
  void fetchData();
11828
12328
  }, [fetchData]);
11829
12329
  const chartPoints = useMemo16(() => {
@@ -11859,22 +12359,22 @@ function ScoreTimeline({ mode = null, source = null }) {
11859
12359
  []
11860
12360
  );
11861
12361
  const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
11862
- return /* @__PURE__ */ jsxs44(Stack35, { space: 4, children: [
11863
- /* @__PURE__ */ jsxs44(Flex33, { gap: 3, children: [
11864
- /* @__PURE__ */ jsx61(
12362
+ return /* @__PURE__ */ jsxs47(Stack37, { space: 4, children: [
12363
+ /* @__PURE__ */ jsxs47(Flex35, { gap: 3, children: [
12364
+ /* @__PURE__ */ jsx63(
11865
12365
  Select2,
11866
12366
  {
11867
12367
  onChange: handleRangeChange,
11868
12368
  value: rangeDays?.toString() ?? "all",
11869
- children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx61("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
12369
+ children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx63("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
11870
12370
  }
11871
12371
  ),
11872
- /* @__PURE__ */ jsxs44(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
11873
- /* @__PURE__ */ jsx61("option", { value: "", children: "Overall" }),
11874
- areaNames.map((name) => /* @__PURE__ */ jsx61("option", { value: name, children: name }, name))
12372
+ /* @__PURE__ */ jsxs47(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
12373
+ /* @__PURE__ */ jsx63("option", { value: "", children: "Overall" }),
12374
+ areaNames.map((name) => /* @__PURE__ */ jsx63("option", { value: name, children: name }, name))
11875
12375
  ] })
11876
12376
  ] }),
11877
- /* @__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(
12377
+ /* @__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(
11878
12378
  "svg",
11879
12379
  {
11880
12380
  style: { display: "block", width: "100%" },
@@ -11882,8 +12382,8 @@ function ScoreTimeline({ mode = null, source = null }) {
11882
12382
  children: [
11883
12383
  Y_TICKS.map((tick) => {
11884
12384
  const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
11885
- return /* @__PURE__ */ jsxs44("g", { children: [
11886
- /* @__PURE__ */ jsx61(
12385
+ return /* @__PURE__ */ jsxs47("g", { children: [
12386
+ /* @__PURE__ */ jsx63(
11887
12387
  "line",
11888
12388
  {
11889
12389
  stroke: "#ccc",
@@ -11894,7 +12394,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11894
12394
  y2: y
11895
12395
  }
11896
12396
  ),
11897
- /* @__PURE__ */ jsx61(
12397
+ /* @__PURE__ */ jsx63(
11898
12398
  "text",
11899
12399
  {
11900
12400
  dominantBaseline: "middle",
@@ -11914,7 +12414,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11914
12414
  chartPoints.length - 1
11915
12415
  ].map((idx) => {
11916
12416
  const p = chartPoints[idx];
11917
- return /* @__PURE__ */ jsx61(
12417
+ return /* @__PURE__ */ jsx63(
11918
12418
  "text",
11919
12419
  {
11920
12420
  fill: "#999",
@@ -11926,7 +12426,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11926
12426
  },
11927
12427
  idx
11928
12428
  );
11929
- }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx61(
12429
+ }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
11930
12430
  "text",
11931
12431
  {
11932
12432
  fill: "#999",
@@ -11938,7 +12438,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11938
12438
  },
11939
12439
  idx
11940
12440
  )),
11941
- /* @__PURE__ */ jsx61(
12441
+ /* @__PURE__ */ jsx63(
11942
12442
  "polyline",
11943
12443
  {
11944
12444
  fill: "none",
@@ -11948,7 +12448,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11948
12448
  strokeWidth: 2.5
11949
12449
  }
11950
12450
  ),
11951
- chartPoints.map((p, idx) => /* @__PURE__ */ jsx61(
12451
+ chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
11952
12452
  "circle",
11953
12453
  {
11954
12454
  cx: p.x,
@@ -11957,7 +12457,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11957
12457
  r: 4,
11958
12458
  stroke: "#fff",
11959
12459
  strokeWidth: 1.5,
11960
- children: /* @__PURE__ */ jsxs44("title", { children: [
12460
+ children: /* @__PURE__ */ jsxs47("title", { children: [
11961
12461
  formatDate(p.date),
11962
12462
  ": ",
11963
12463
  Math.round(p.score)
@@ -11968,7 +12468,7 @@ function ScoreTimeline({ mode = null, source = null }) {
11968
12468
  ]
11969
12469
  }
11970
12470
  ) }),
11971
- /* @__PURE__ */ jsxs44(Text45, { muted: true, size: 2, children: [
12471
+ /* @__PURE__ */ jsxs47(Text47, { muted: true, size: 2, children: [
11972
12472
  chartPoints.length,
11973
12473
  " data point",
11974
12474
  chartPoints.length !== 1 ? "s" : ""
@@ -11978,20 +12478,20 @@ function ScoreTimeline({ mode = null, source = null }) {
11978
12478
  var ScoreTimeline_default = ScoreTimeline;
11979
12479
 
11980
12480
  // src/components/Dashboard.tsx
11981
- import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
12481
+ import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
11982
12482
  var VIEW_PARAM_MAP = {
11983
12483
  compare: "compare",
11984
12484
  timeline: "timeline"
11985
12485
  };
11986
12486
  function Dashboard() {
11987
- return /* @__PURE__ */ jsx62(HelpProvider, { children: /* @__PURE__ */ jsx62(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx62(DashboardShell, {}) }) });
12487
+ return /* @__PURE__ */ jsx64(HelpProvider, { children: /* @__PURE__ */ jsx64(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx64(DashboardShell, {}) }) });
11988
12488
  }
11989
12489
  function DashboardShell() {
11990
12490
  const router = useRouter3();
11991
12491
  const { close: closeDrawer } = useJudgmentDrawer();
11992
12492
  const routerState = router.state;
11993
12493
  const reportId = routerState.reportId ?? null;
11994
- useEffect15(() => {
12494
+ useEffect16(() => {
11995
12495
  if (!reportId) closeDrawer();
11996
12496
  }, [reportId, closeDrawer]);
11997
12497
  const handleJudgmentDrawerClose = useCallback36(() => {
@@ -12002,10 +12502,10 @@ function DashboardShell() {
12002
12502
  router.navigate(state);
12003
12503
  }
12004
12504
  }, [closeDrawer, router]);
12005
- return /* @__PURE__ */ jsxs45(Flex34, { style: { height: "100%" }, children: [
12006
- /* @__PURE__ */ jsx62(Box29, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx62(DashboardContent, {}) }),
12007
- /* @__PURE__ */ jsx62(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
12008
- /* @__PURE__ */ jsx62(HelpDrawer, {})
12505
+ return /* @__PURE__ */ jsxs48(Flex36, { style: { height: "100%" }, children: [
12506
+ /* @__PURE__ */ jsx64(Box31, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx64(DashboardContent, {}) }),
12507
+ /* @__PURE__ */ jsx64(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
12508
+ /* @__PURE__ */ jsx64(HelpDrawer, {})
12009
12509
  ] });
12010
12510
  }
12011
12511
  function DashboardContent() {
@@ -12051,13 +12551,13 @@ function DashboardContent() {
12051
12551
  const handleOpenHelp = useCallback36(() => {
12052
12552
  openHelp(defaultTopic);
12053
12553
  }, [openHelp, defaultTopic]);
12054
- return /* @__PURE__ */ jsx62(Container, { width: 4, children: /* @__PURE__ */ jsxs45(Stack36, { padding: 4, space: 4, children: [
12055
- /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 3, children: [
12056
- /* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 1, children: [
12057
- /* @__PURE__ */ jsx62(Text46, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
12058
- /* @__PURE__ */ jsx62(Text46, { muted: true, size: 2, children: "Evaluation reports and score trends" })
12554
+ return /* @__PURE__ */ jsx64(Container, { width: 4, children: /* @__PURE__ */ jsxs48(Stack38, { padding: 4, space: 4, children: [
12555
+ /* @__PURE__ */ jsxs48(Flex36, { align: "center", gap: 3, children: [
12556
+ /* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 1, children: [
12557
+ /* @__PURE__ */ jsx64(Text48, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
12558
+ /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Evaluation reports and score trends" })
12059
12559
  ] }),
12060
- /* @__PURE__ */ jsx62(
12560
+ /* @__PURE__ */ jsx64(
12061
12561
  Button10,
12062
12562
  {
12063
12563
  icon: HelpCircleIcon8,
@@ -12068,8 +12568,8 @@ function DashboardContent() {
12068
12568
  }
12069
12569
  )
12070
12570
  ] }),
12071
- !isDetail && /* @__PURE__ */ jsxs45(TabList3, { space: 1, children: [
12072
- /* @__PURE__ */ jsx62(
12571
+ !isDetail && /* @__PURE__ */ jsxs48(TabList3, { space: 1, children: [
12572
+ /* @__PURE__ */ jsx64(
12073
12573
  Tab3,
12074
12574
  {
12075
12575
  "aria-controls": "latest-panel",
@@ -12079,7 +12579,7 @@ function DashboardContent() {
12079
12579
  selected: activeTab === "latest"
12080
12580
  }
12081
12581
  ),
12082
- /* @__PURE__ */ jsx62(
12582
+ /* @__PURE__ */ jsx64(
12083
12583
  Tab3,
12084
12584
  {
12085
12585
  "aria-controls": "timeline-panel",
@@ -12089,7 +12589,7 @@ function DashboardContent() {
12089
12589
  selected: activeTab === "timeline"
12090
12590
  }
12091
12591
  ),
12092
- /* @__PURE__ */ jsx62(
12592
+ /* @__PURE__ */ jsx64(
12093
12593
  Tab3,
12094
12594
  {
12095
12595
  "aria-controls": "compare-panel",
@@ -12100,10 +12600,10 @@ function DashboardContent() {
12100
12600
  }
12101
12601
  )
12102
12602
  ] }),
12103
- !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx62(LatestReports, { onSelectReport: handleSelectReport }) }),
12104
- !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx62(ScoreTimeline_default, {}) }),
12105
- !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx62(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx62(ComparisonView, {}) }),
12106
- isDetail && reportId && /* @__PURE__ */ jsx62(
12603
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx64(LatestReports, { onSelectReport: handleSelectReport }) }),
12604
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx64(ScoreTimeline_default, {}) }),
12605
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx64(ComparisonView, {}) }),
12606
+ isDetail && reportId && /* @__PURE__ */ jsx64(
12107
12607
  ReportDetail,
12108
12608
  {
12109
12609
  activeTab: routerState.tab ?? null,
@@ -12139,7 +12639,7 @@ function ailfTool(options = {}) {
12139
12639
  // src/actions/RunEvaluationAction.tsx
12140
12640
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
12141
12641
  import { useToast as useToast10 } from "@sanity/ui";
12142
- import { useCallback as useCallback37, useEffect as useEffect16, useRef as useRef9, useState as useState27 } from "react";
12642
+ import { useCallback as useCallback37, useEffect as useEffect17, useRef as useRef9, useState as useState27 } from "react";
12143
12643
  import {
12144
12644
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
12145
12645
  useClient as useClient12,
@@ -12173,7 +12673,7 @@ function createRunEvaluationAction(options = {}) {
12173
12673
  const [state, setState] = useState27({ status: "loading" });
12174
12674
  const requestedAtRef = useRef9(null);
12175
12675
  const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
12176
- useEffect16(() => {
12676
+ useEffect17(() => {
12177
12677
  let cancelled = false;
12178
12678
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
12179
12679
  if (cancelled) return;
@@ -12196,7 +12696,7 @@ function createRunEvaluationAction(options = {}) {
12196
12696
  cancelled = true;
12197
12697
  };
12198
12698
  }, [client, perspectiveId]);
12199
- useEffect16(() => {
12699
+ useEffect17(() => {
12200
12700
  if (state.status !== "requested" && state.status !== "polling") return;
12201
12701
  const { requestId, startedAt } = state;
12202
12702
  if (state.status === "requested") {
@@ -12246,7 +12746,7 @@ function createRunEvaluationAction(options = {}) {
12246
12746
  }, POLL_INTERVAL_MS2);
12247
12747
  return () => clearInterval(interval);
12248
12748
  }, [client, perspectiveId, state]);
12249
- useEffect16(() => {
12749
+ useEffect17(() => {
12250
12750
  if (state.status !== "error") return;
12251
12751
  const timer = setTimeout(() => {
12252
12752
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {