@sanity/ailf-studio 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3544,7 +3544,7 @@ import {
3544
3544
  TabPanel as TabPanel3,
3545
3545
  Text as Text53
3546
3546
  } from "@sanity/ui";
3547
- import { useCallback as useCallback42, useEffect as useEffect18 } from "react";
3547
+ import { useCallback as useCallback43, useEffect as useEffect18 } from "react";
3548
3548
  import { useRouter as useRouter5 } from "sanity/router";
3549
3549
 
3550
3550
  // src/lib/help-context.ts
@@ -6781,7 +6781,7 @@ import {
6781
6781
  Tooltip as Tooltip10
6782
6782
  } from "@sanity/ui";
6783
6783
  import {
6784
- useCallback as useCallback36,
6784
+ useCallback as useCallback37,
6785
6785
  useEffect as useEffect13,
6786
6786
  useMemo as useMemo16,
6787
6787
  useState as useState27
@@ -10736,7 +10736,7 @@ function JudgmentActions({ onShowPrompts } = {}) {
10736
10736
  // src/components/report-detail/report-actions/ReportActions.tsx
10737
10737
  import { CopyIcon as CopyIcon3 } from "@sanity/icons";
10738
10738
  import { MenuDivider as MenuDivider3, useToast as useToast9 } from "@sanity/ui";
10739
- import { useCallback as useCallback32, useState as useState24 } from "react";
10739
+ import { useCallback as useCallback33, useState as useState24 } from "react";
10740
10740
  import { useClient as useClient11 } from "sanity";
10741
10741
 
10742
10742
  // src/components/report-detail/report-actions/CopyReportAction.tsx
@@ -11090,9 +11090,62 @@ function RerunEvaluationAction({
11090
11090
  );
11091
11091
  }
11092
11092
 
11093
+ // src/components/report-detail/report-actions/ViewArtifactsAction.tsx
11094
+ import { LaunchIcon } from "@sanity/icons";
11095
+ import { MenuItem as MenuItem9 } from "@sanity/ui";
11096
+ import { useCallback as useCallback32 } from "react";
11097
+ import { jsx as jsx50 } from "react/jsx-runtime";
11098
+ function commonPathPrefix(paths) {
11099
+ if (paths.length === 0) return "";
11100
+ const segmented = paths.map((p) => p.split("/").filter(Boolean));
11101
+ if (segmented.length === 1) {
11102
+ const segs = segmented[0];
11103
+ const last = segs.at(-1) ?? "";
11104
+ return (last.includes(".") ? segs.slice(0, -1) : segs).join("/");
11105
+ }
11106
+ const min = Math.min(...segmented.map((s) => s.length));
11107
+ const common = [];
11108
+ for (let i = 0; i < min; i++) {
11109
+ const seg = segmented[0][i];
11110
+ if (segmented.every((s) => s[i] === seg)) common.push(seg);
11111
+ else break;
11112
+ }
11113
+ return common.join("/");
11114
+ }
11115
+ function buildArtifactBrowseUrl(manifest) {
11116
+ if (!manifest) return null;
11117
+ const refs = Object.values(manifest).filter(
11118
+ (ref) => ref?.store === "gcs" && Boolean(ref.bucket)
11119
+ );
11120
+ if (refs.length === 0) return null;
11121
+ const owned = refs.filter((r) => !r.sourceRunId);
11122
+ const usable = owned.length > 0 ? owned : refs;
11123
+ const bucket = usable[0].bucket;
11124
+ const sameBucket = usable.filter((r) => r.bucket === bucket);
11125
+ const prefix = commonPathPrefix(sameBucket.map((r) => r.path));
11126
+ const base = `https://console.cloud.google.com/storage/browser/${encodeURIComponent(bucket)}`;
11127
+ return prefix ? `${base}/${prefix.split("/").map(encodeURIComponent).join("/")}` : base;
11128
+ }
11129
+ function ViewArtifactsAction({ manifest }) {
11130
+ const url = buildArtifactBrowseUrl(manifest);
11131
+ const handleClick = useCallback32(() => {
11132
+ if (url) window.open(url, "_blank", "noopener,noreferrer");
11133
+ }, [url]);
11134
+ if (!url) return null;
11135
+ return /* @__PURE__ */ jsx50(
11136
+ MenuItem9,
11137
+ {
11138
+ icon: LaunchIcon,
11139
+ onClick: handleClick,
11140
+ text: "View run artifacts"
11141
+ }
11142
+ );
11143
+ }
11144
+
11093
11145
  // src/components/report-detail/report-actions/ReportActions.tsx
11094
- import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
11146
+ import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
11095
11147
  function ReportActions({
11148
+ artifactManifest,
11096
11149
  documentId,
11097
11150
  onDeleted,
11098
11151
  provenance,
@@ -11100,7 +11153,7 @@ function ReportActions({
11100
11153
  }) {
11101
11154
  const client = useClient11({ apiVersion: API_VERSION });
11102
11155
  const toast = useToast9();
11103
- const handleCopyId = useCallback32(() => {
11156
+ const handleCopyId = useCallback33(() => {
11104
11157
  navigator.clipboard.writeText(reportId).then(
11105
11158
  () => {
11106
11159
  toast.push({
@@ -11120,13 +11173,13 @@ function ReportActions({
11120
11173
  }, [reportId, toast]);
11121
11174
  const [deleteDialogOpen, setDeleteDialogOpen] = useState24(false);
11122
11175
  const [deleting, setDeleting] = useState24(false);
11123
- const handleRequestDelete = useCallback32(() => {
11176
+ const handleRequestDelete = useCallback33(() => {
11124
11177
  setDeleteDialogOpen(true);
11125
11178
  }, []);
11126
- const handleDeleteClose = useCallback32(() => {
11179
+ const handleDeleteClose = useCallback33(() => {
11127
11180
  if (!deleting) setDeleteDialogOpen(false);
11128
11181
  }, [deleting]);
11129
- const handleDeleteConfirm = useCallback32(async () => {
11182
+ const handleDeleteConfirm = useCallback33(async () => {
11130
11183
  setDeleting(true);
11131
11184
  try {
11132
11185
  await client.delete(documentId);
@@ -11148,24 +11201,25 @@ function ReportActions({
11148
11201
  }
11149
11202
  }, [client, documentId, onDeleted, toast]);
11150
11203
  return /* @__PURE__ */ jsxs35(Fragment13, { children: [
11151
- /* @__PURE__ */ jsx50(
11204
+ /* @__PURE__ */ jsx51(
11152
11205
  SplitActionButton,
11153
11206
  {
11154
11207
  menu: /* @__PURE__ */ jsxs35(Fragment13, { children: [
11155
- /* @__PURE__ */ jsx50(CopyReportIdAction, { reportId }),
11156
- /* @__PURE__ */ jsx50(
11208
+ /* @__PURE__ */ jsx51(CopyReportIdAction, { reportId }),
11209
+ /* @__PURE__ */ jsx51(
11157
11210
  RerunEvaluationAction,
11158
11211
  {
11159
11212
  provenance,
11160
11213
  reportId
11161
11214
  }
11162
11215
  ),
11163
- /* @__PURE__ */ jsx50(MenuDivider3, {}),
11164
- /* @__PURE__ */ jsx50(DownloadReportAction, { documentId, reportId }),
11165
- /* @__PURE__ */ jsx50(CopyReportAction, { documentId }),
11166
- /* @__PURE__ */ jsx50(CopyVisionQueryAction, { reportId }),
11167
- /* @__PURE__ */ jsx50(MenuDivider3, {}),
11168
- /* @__PURE__ */ jsx50(DeleteReportAction, { onRequestDelete: handleRequestDelete })
11216
+ /* @__PURE__ */ jsx51(MenuDivider3, {}),
11217
+ /* @__PURE__ */ jsx51(DownloadReportAction, { documentId, reportId }),
11218
+ /* @__PURE__ */ jsx51(ViewArtifactsAction, { manifest: artifactManifest }),
11219
+ /* @__PURE__ */ jsx51(CopyReportAction, { documentId }),
11220
+ /* @__PURE__ */ jsx51(CopyVisionQueryAction, { reportId }),
11221
+ /* @__PURE__ */ jsx51(MenuDivider3, {}),
11222
+ /* @__PURE__ */ jsx51(DeleteReportAction, { onRequestDelete: handleRequestDelete })
11169
11223
  ] }),
11170
11224
  menuId: "report-actions-menu",
11171
11225
  primary: {
@@ -11175,7 +11229,7 @@ function ReportActions({
11175
11229
  }
11176
11230
  }
11177
11231
  ),
11178
- deleteDialogOpen && /* @__PURE__ */ jsx50(
11232
+ deleteDialogOpen && /* @__PURE__ */ jsx51(
11179
11233
  DeleteConfirmDialog,
11180
11234
  {
11181
11235
  isDeleting: deleting,
@@ -11190,7 +11244,7 @@ function ReportActions({
11190
11244
  // src/components/report-detail/ReportHeader.tsx
11191
11245
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
11192
11246
  import { Button as Button10, Flex as Flex25, Stack as Stack28, Text as Text37 } from "@sanity/ui";
11193
- import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
11247
+ import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
11194
11248
  function ReportHeader({
11195
11249
  completedAt,
11196
11250
  onBack,
@@ -11201,10 +11255,10 @@ function ReportHeader({
11201
11255
  const displayTitle = title ?? tag ?? dateLabel;
11202
11256
  const hasSubtitle = Boolean(title ?? tag);
11203
11257
  return /* @__PURE__ */ jsxs36(Flex25, { align: "center", gap: 3, children: [
11204
- /* @__PURE__ */ jsx51(Button10, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
11258
+ /* @__PURE__ */ jsx52(Button10, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
11205
11259
  /* @__PURE__ */ jsxs36(Stack28, { flex: 1, space: 1, children: [
11206
- /* @__PURE__ */ jsx51(Text37, { size: 4, weight: "bold", children: displayTitle }),
11207
- hasSubtitle && /* @__PURE__ */ jsx51(Text37, { muted: true, size: 2, children: dateLabel })
11260
+ /* @__PURE__ */ jsx52(Text37, { size: 4, weight: "bold", children: displayTitle }),
11261
+ hasSubtitle && /* @__PURE__ */ jsx52(Text37, { muted: true, size: 2, children: dateLabel })
11208
11262
  ] })
11209
11263
  ] });
11210
11264
  }
@@ -11216,13 +11270,13 @@ import { Box as Box27, Flex as Flex28, Stack as Stack30, Text as Text40 } from "
11216
11270
 
11217
11271
  // src/components/report-detail/AreaScoresGrid.tsx
11218
11272
  import React3, {
11219
- useCallback as useCallback33,
11273
+ useCallback as useCallback34,
11220
11274
  useMemo as useMemo13,
11221
11275
  useState as useState25
11222
11276
  } from "react";
11223
11277
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
11224
11278
  import { Box as Box26, Flex as Flex26, Stack as Stack29, Text as Text38 } from "@sanity/ui";
11225
- import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
11279
+ import { Fragment as Fragment14, jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
11226
11280
  var DIMENSION_TOOLTIPS2 = {
11227
11281
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
11228
11282
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -11270,7 +11324,7 @@ function AreaScoresGrid({
11270
11324
  const dimKeys = useMemo13(() => collectDimensionKeys(scores), [scores]);
11271
11325
  const [sortField, setSortField] = useState25("score");
11272
11326
  const [sortDir, setSortDir] = useState25("desc");
11273
- const handleSort = useCallback33(
11327
+ const handleSort = useCallback34(
11274
11328
  (field) => {
11275
11329
  if (field === sortField) {
11276
11330
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -11331,7 +11385,7 @@ function AreaScoresGrid({
11331
11385
  padding: "12px 16px 8px"
11332
11386
  },
11333
11387
  children: [
11334
- /* @__PURE__ */ jsx52(
11388
+ /* @__PURE__ */ jsx53(
11335
11389
  ColHeader2,
11336
11390
  {
11337
11391
  active: sortField === "score",
@@ -11341,7 +11395,7 @@ function AreaScoresGrid({
11341
11395
  tooltip: GLOSSARY.score
11342
11396
  }
11343
11397
  ),
11344
- /* @__PURE__ */ jsx52(
11398
+ /* @__PURE__ */ jsx53(
11345
11399
  ColHeader2,
11346
11400
  {
11347
11401
  active: sortField === "area",
@@ -11350,7 +11404,7 @@ function AreaScoresGrid({
11350
11404
  onClick: () => handleSort("area")
11351
11405
  }
11352
11406
  ),
11353
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11407
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11354
11408
  ColHeader2,
11355
11409
  {
11356
11410
  active: sortField === key,
@@ -11361,7 +11415,7 @@ function AreaScoresGrid({
11361
11415
  },
11362
11416
  key
11363
11417
  )),
11364
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx52(
11418
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx53(
11365
11419
  ColHeader2,
11366
11420
  {
11367
11421
  active: sortField === "lift",
@@ -11371,23 +11425,23 @@ function AreaScoresGrid({
11371
11425
  tooltip: GLOSSARY.docLift
11372
11426
  }
11373
11427
  ),
11374
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
11428
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
11375
11429
  ]
11376
11430
  }
11377
11431
  ),
11378
11432
  sorted.map((area) => /* @__PURE__ */ jsxs37(React3.Fragment, { children: [
11379
- /* @__PURE__ */ jsx52(
11433
+ /* @__PURE__ */ jsx53(
11380
11434
  AreaRow,
11381
11435
  {
11382
11436
  area,
11383
- delta: perArea?.[area.feature],
11437
+ delta: perArea?.find((p) => p.area === area.feature)?.delta,
11384
11438
  dimKeys,
11385
11439
  hasActual,
11386
11440
  showLift,
11387
11441
  tier
11388
11442
  }
11389
11443
  ),
11390
- modelScoresByFeature && /* @__PURE__ */ jsx52(
11444
+ modelScoresByFeature && /* @__PURE__ */ jsx53(
11391
11445
  ModelSubRows,
11392
11446
  {
11393
11447
  dimKeys,
@@ -11408,7 +11462,7 @@ function ModelSubRows({
11408
11462
  tier
11409
11463
  }) {
11410
11464
  if (!models || models.length === 0) return null;
11411
- return /* @__PURE__ */ jsx52(Fragment14, { children: models.map((entry) => /* @__PURE__ */ jsx52(
11465
+ return /* @__PURE__ */ jsx53(Fragment14, { children: models.map((entry) => /* @__PURE__ */ jsx53(
11412
11466
  ModelRow2,
11413
11467
  {
11414
11468
  dimKeys,
@@ -11448,7 +11502,7 @@ function ModelRow2({
11448
11502
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
11449
11503
  },
11450
11504
  children: [
11451
- /* @__PURE__ */ jsx52(Flex26, { align: "center", children: /* @__PURE__ */ jsx52(
11505
+ /* @__PURE__ */ jsx53(Flex26, { align: "center", children: /* @__PURE__ */ jsx53(
11452
11506
  Text38,
11453
11507
  {
11454
11508
  size: 1,
@@ -11460,8 +11514,8 @@ function ModelRow2({
11460
11514
  children: Math.round(scores.totalScore)
11461
11515
  }
11462
11516
  ) }),
11463
- /* @__PURE__ */ jsx52(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx52(Text38, { muted: true, size: 1, children: label }) }),
11464
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11517
+ /* @__PURE__ */ jsx53(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx53(Text38, { muted: true, size: 1, children: label }) }),
11518
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11465
11519
  DimCell,
11466
11520
  {
11467
11521
  area: label,
@@ -11486,7 +11540,7 @@ function ModelRow2({
11486
11540
  ]
11487
11541
  }
11488
11542
  ),
11489
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(
11543
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(
11490
11544
  Text38,
11491
11545
  {
11492
11546
  size: 1,
@@ -11529,14 +11583,14 @@ function AreaRow({
11529
11583
  },
11530
11584
  children: [
11531
11585
  /* @__PURE__ */ jsxs37(Flex26, { align: "center", gap: isNarrow ? 0 : 2, children: [
11532
- /* @__PURE__ */ jsx52(
11586
+ /* @__PURE__ */ jsx53(
11533
11587
  HoverTip,
11534
11588
  {
11535
11589
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11536
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area.feature }),
11590
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area.feature }),
11537
11591
  " score:",
11538
11592
  " ",
11539
- /* @__PURE__ */ jsx52(
11593
+ /* @__PURE__ */ jsx53(
11540
11594
  "span",
11541
11595
  {
11542
11596
  style: {
@@ -11547,12 +11601,12 @@ function AreaRow({
11547
11601
  children: Math.round(area.totalScore)
11548
11602
  }
11549
11603
  ),
11550
- /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11604
+ /* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11551
11605
  ".",
11552
11606
  " ",
11553
11607
  GLOSSARY.score
11554
11608
  ] }),
11555
- children: /* @__PURE__ */ jsx52(
11609
+ children: /* @__PURE__ */ jsx53(
11556
11610
  "div",
11557
11611
  {
11558
11612
  style: {
@@ -11573,11 +11627,11 @@ function AreaRow({
11573
11627
  )
11574
11628
  }
11575
11629
  ),
11576
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx52(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx52(DeltaIndicator, { delta, icon: true, size: 1 }) })
11630
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx53(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx53(DeltaIndicator, { delta, icon: true, size: 1 }) })
11577
11631
  ] }),
11578
11632
  /* @__PURE__ */ jsxs37(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
11579
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11580
- area.negativeDocLift && showLift && /* @__PURE__ */ jsx52(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx52(
11633
+ /* @__PURE__ */ jsx53(Text38, { size: 2, weight: "medium", children: area.feature }),
11634
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx53(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx53(
11581
11635
  "span",
11582
11636
  {
11583
11637
  style: {
@@ -11590,11 +11644,11 @@ function AreaRow({
11590
11644
  gap: 3,
11591
11645
  padding: "1px 5px"
11592
11646
  },
11593
- children: /* @__PURE__ */ jsx52(WarningOutlineIcon2, {})
11647
+ children: /* @__PURE__ */ jsx53(WarningOutlineIcon2, {})
11594
11648
  }
11595
11649
  ) })
11596
11650
  ] }),
11597
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11651
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11598
11652
  DimCell,
11599
11653
  {
11600
11654
  area: area.feature,
@@ -11603,11 +11657,11 @@ function AreaRow({
11603
11657
  },
11604
11658
  key
11605
11659
  )),
11606
- !isNarrow && showLift && /* @__PURE__ */ jsx52(
11660
+ !isNarrow && showLift && /* @__PURE__ */ jsx53(
11607
11661
  HoverTip,
11608
11662
  {
11609
11663
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11610
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area.feature }),
11664
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area.feature }),
11611
11665
  " doc lift:",
11612
11666
  " ",
11613
11667
  /* @__PURE__ */ jsxs37(
@@ -11645,11 +11699,11 @@ function AreaRow({
11645
11699
  )
11646
11700
  }
11647
11701
  ),
11648
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(
11702
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(
11649
11703
  HoverTip,
11650
11704
  {
11651
11705
  text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
11652
- children: /* @__PURE__ */ jsx52(
11706
+ children: /* @__PURE__ */ jsx53(
11653
11707
  Text38,
11654
11708
  {
11655
11709
  size: 2,
@@ -11679,17 +11733,17 @@ function DimCell({
11679
11733
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
11680
11734
  const textSize = size === "small" ? 0 : 1;
11681
11735
  const barHeight = size === "small" ? 3 : 4;
11682
- return /* @__PURE__ */ jsx52(
11736
+ return /* @__PURE__ */ jsx53(
11683
11737
  HoverTip,
11684
11738
  {
11685
11739
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11686
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area }),
11740
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area }),
11687
11741
  " \u2192",
11688
11742
  " ",
11689
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: dim }),
11743
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: dim }),
11690
11744
  ":",
11691
11745
  " ",
11692
- /* @__PURE__ */ jsx52(
11746
+ /* @__PURE__ */ jsx53(
11693
11747
  "span",
11694
11748
  {
11695
11749
  style: {
@@ -11700,13 +11754,13 @@ function DimCell({
11700
11754
  children: Math.round(value)
11701
11755
  }
11702
11756
  ),
11703
- /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11757
+ /* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11704
11758
  ".",
11705
11759
  " ",
11706
11760
  tooltip
11707
11761
  ] }),
11708
11762
  children: /* @__PURE__ */ jsxs37(Stack29, { space: 1, style: { width: "100%" }, children: [
11709
- /* @__PURE__ */ jsx52(
11763
+ /* @__PURE__ */ jsx53(
11710
11764
  Text38,
11711
11765
  {
11712
11766
  size: textSize,
@@ -11718,7 +11772,7 @@ function DimCell({
11718
11772
  children: Math.round(value)
11719
11773
  }
11720
11774
  ),
11721
- /* @__PURE__ */ jsx52(
11775
+ /* @__PURE__ */ jsx53(
11722
11776
  "div",
11723
11777
  {
11724
11778
  style: {
@@ -11728,7 +11782,7 @@ function DimCell({
11728
11782
  overflow: "hidden",
11729
11783
  width: "100%"
11730
11784
  },
11731
- children: /* @__PURE__ */ jsx52(
11785
+ children: /* @__PURE__ */ jsx53(
11732
11786
  "div",
11733
11787
  {
11734
11788
  style: {
@@ -11753,7 +11807,7 @@ function ColHeader2({
11753
11807
  onClick,
11754
11808
  tooltip
11755
11809
  }) {
11756
- const handleKeyDown = useCallback33(
11810
+ const handleKeyDown = useCallback34(
11757
11811
  (e) => {
11758
11812
  if (onClick && (e.key === "Enter" || e.key === " ")) {
11759
11813
  e.preventDefault();
@@ -11764,7 +11818,7 @@ function ColHeader2({
11764
11818
  );
11765
11819
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
11766
11820
  return /* @__PURE__ */ jsxs37(Flex26, { align: "center", gap: 1, children: [
11767
- /* @__PURE__ */ jsx52(
11821
+ /* @__PURE__ */ jsx53(
11768
11822
  "div",
11769
11823
  {
11770
11824
  onClick,
@@ -11793,14 +11847,14 @@ function ColHeader2({
11793
11847
  )
11794
11848
  }
11795
11849
  ),
11796
- tooltip && /* @__PURE__ */ jsx52(InfoTip, { text: tooltip })
11850
+ tooltip && /* @__PURE__ */ jsx53(InfoTip, { text: tooltip })
11797
11851
  ] });
11798
11852
  }
11799
11853
 
11800
11854
  // src/components/report-detail/ModelSelector.tsx
11801
- import { useCallback as useCallback34 } from "react";
11855
+ import { useCallback as useCallback35 } from "react";
11802
11856
  import { Flex as Flex27, Text as Text39 } from "@sanity/ui";
11803
- import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
11857
+ import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
11804
11858
  var pillBase = {
11805
11859
  borderColor: "var(--card-border-color)",
11806
11860
  borderRadius: 999,
@@ -11832,7 +11886,7 @@ function ModelSelector({
11832
11886
  onChange
11833
11887
  }) {
11834
11888
  return /* @__PURE__ */ jsxs38(Flex27, { align: "center", gap: 1, wrap: "wrap", children: [
11835
- /* @__PURE__ */ jsx53(
11889
+ /* @__PURE__ */ jsx54(
11836
11890
  Pill2,
11837
11891
  {
11838
11892
  isSelected: selection === null,
@@ -11840,7 +11894,7 @@ function ModelSelector({
11840
11894
  onClick: () => onChange(null)
11841
11895
  }
11842
11896
  ),
11843
- models.map((model) => /* @__PURE__ */ jsx53(
11897
+ models.map((model) => /* @__PURE__ */ jsx54(
11844
11898
  Pill2,
11845
11899
  {
11846
11900
  isSelected: selection === model.modelId,
@@ -11849,7 +11903,7 @@ function ModelSelector({
11849
11903
  },
11850
11904
  model.modelId
11851
11905
  )),
11852
- /* @__PURE__ */ jsx53(
11906
+ /* @__PURE__ */ jsx54(
11853
11907
  "div",
11854
11908
  {
11855
11909
  style: {
@@ -11860,7 +11914,7 @@ function ModelSelector({
11860
11914
  }
11861
11915
  }
11862
11916
  ),
11863
- /* @__PURE__ */ jsx53(
11917
+ /* @__PURE__ */ jsx54(
11864
11918
  Pill2,
11865
11919
  {
11866
11920
  isSelected: selection === "expanded",
@@ -11875,7 +11929,7 @@ function Pill2({
11875
11929
  label,
11876
11930
  onClick
11877
11931
  }) {
11878
- const handleKeyDown = useCallback34(
11932
+ const handleKeyDown = useCallback35(
11879
11933
  (e) => {
11880
11934
  if (e.key === "Enter" || e.key === " ") {
11881
11935
  e.preventDefault();
@@ -11884,7 +11938,7 @@ function Pill2({
11884
11938
  },
11885
11939
  [onClick]
11886
11940
  );
11887
- return /* @__PURE__ */ jsx53(
11941
+ return /* @__PURE__ */ jsx54(
11888
11942
  "span",
11889
11943
  {
11890
11944
  onClick,
@@ -11892,7 +11946,7 @@ function Pill2({
11892
11946
  role: "button",
11893
11947
  style: isSelected ? pillSelected : pillDefault,
11894
11948
  tabIndex: 0,
11895
- children: /* @__PURE__ */ jsx53(
11949
+ children: /* @__PURE__ */ jsx54(
11896
11950
  Text39,
11897
11951
  {
11898
11952
  size: 1,
@@ -11908,13 +11962,13 @@ function Pill2({
11908
11962
  }
11909
11963
 
11910
11964
  // src/components/report-detail/useModelSelection.ts
11911
- import { useCallback as useCallback35, useMemo as useMemo14, useState as useState26 } from "react";
11965
+ import { useCallback as useCallback36, useMemo as useMemo14, useState as useState26 } from "react";
11912
11966
  function useModelSelection({
11913
11967
  scores,
11914
11968
  perModel
11915
11969
  }) {
11916
11970
  const [selection, setSelection] = useState26(null);
11917
- const onSelectionChange = useCallback35((next) => {
11971
+ const onSelectionChange = useCallback36((next) => {
11918
11972
  setSelection(next);
11919
11973
  }, []);
11920
11974
  const isExpanded = selection === "expanded";
@@ -11936,7 +11990,7 @@ function useModelSelection({
11936
11990
  }
11937
11991
 
11938
11992
  // src/components/report-detail/StrengthsList.tsx
11939
- import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
11993
+ import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
11940
11994
  function StrengthsList({
11941
11995
  mode,
11942
11996
  scores,
@@ -11963,10 +12017,10 @@ function StrengthsList({
11963
12017
  return /* @__PURE__ */ jsxs39(Stack30, { space: 5, children: [
11964
12018
  /* @__PURE__ */ jsxs39(Stack30, { space: 3, children: [
11965
12019
  /* @__PURE__ */ jsxs39(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
11966
- /* @__PURE__ */ jsx54(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
11967
- /* @__PURE__ */ jsx54(Text40, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
11968
- /* @__PURE__ */ jsx54(InfoTip, { text: GLOSSARY.strengths }),
11969
- hasModels && /* @__PURE__ */ jsx54(Box27, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx54(
12020
+ /* @__PURE__ */ jsx55(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
12021
+ /* @__PURE__ */ jsx55(Text40, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
12022
+ /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.strengths }),
12023
+ hasModels && /* @__PURE__ */ jsx55(Box27, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx55(
11970
12024
  ModelSelector,
11971
12025
  {
11972
12026
  models: perModel,
@@ -11975,7 +12029,7 @@ function StrengthsList({
11975
12029
  }
11976
12030
  ) })
11977
12031
  ] }),
11978
- /* @__PURE__ */ jsx54(
12032
+ /* @__PURE__ */ jsx55(
11979
12033
  AreaScoresGrid,
11980
12034
  {
11981
12035
  mode,
@@ -11986,23 +12040,23 @@ function StrengthsList({
11986
12040
  )
11987
12041
  ] }),
11988
12042
  retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs39(Box27, { style: neutralCardStyle, children: [
11989
- /* @__PURE__ */ jsx54(
12043
+ /* @__PURE__ */ jsx55(
11990
12044
  Box27,
11991
12045
  {
11992
12046
  padding: 4,
11993
12047
  style: { borderBottom: "1px solid var(--card-border-color)" },
11994
12048
  children: /* @__PURE__ */ jsxs39(Flex28, { align: "center", gap: 2, children: [
11995
- /* @__PURE__ */ jsx54(SearchIcon8, { style: { color: "#34d399" } }),
12049
+ /* @__PURE__ */ jsx55(SearchIcon8, { style: { color: "#34d399" } }),
11996
12050
  /* @__PURE__ */ jsxs39(Text40, { size: 2, weight: "medium", children: [
11997
12051
  "Retrieval Successes (",
11998
12052
  Math.round(EFFICIENCY_POSITIVE * 100),
11999
12053
  "%+ efficiency)"
12000
12054
  ] }),
12001
- /* @__PURE__ */ jsx54(InfoTip, { text: GLOSSARY.retrievalExcellence })
12055
+ /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.retrievalExcellence })
12002
12056
  ] })
12003
12057
  }
12004
12058
  ),
12005
- /* @__PURE__ */ jsx54(Stack30, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs39(
12059
+ /* @__PURE__ */ jsx55(Stack30, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs39(
12006
12060
  Flex28,
12007
12061
  {
12008
12062
  align: "center",
@@ -12010,8 +12064,8 @@ function StrengthsList({
12010
12064
  padding: 4,
12011
12065
  style: i > 0 ? dividerStyle : void 0,
12012
12066
  children: [
12013
- /* @__PURE__ */ jsx54(Text40, { size: 2, children: area.feature }),
12014
- /* @__PURE__ */ jsx54(
12067
+ /* @__PURE__ */ jsx55(Text40, { size: 2, children: area.feature }),
12068
+ /* @__PURE__ */ jsx55(
12015
12069
  "span",
12016
12070
  {
12017
12071
  style: {
@@ -12042,7 +12096,7 @@ import {
12042
12096
  ArrowDownIcon as ArrowDownIcon2
12043
12097
  } from "@sanity/icons";
12044
12098
  import { Box as Box28, Flex as Flex29, Stack as Stack31, Text as Text41 } from "@sanity/ui";
12045
- import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
12099
+ import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
12046
12100
  function WeaknessesList({
12047
12101
  mode,
12048
12102
  scores,
@@ -12075,10 +12129,10 @@ function WeaknessesList({
12075
12129
  return /* @__PURE__ */ jsxs40(Stack31, { space: 5, children: [
12076
12130
  weakAreas.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12077
12131
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
12078
- /* @__PURE__ */ jsx55(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12079
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
12080
- /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.weakAreas }),
12081
- hasModels && /* @__PURE__ */ jsx55(Box28, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx55(
12132
+ /* @__PURE__ */ jsx56(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12133
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
12134
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.weakAreas }),
12135
+ hasModels && /* @__PURE__ */ jsx56(Box28, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx56(
12082
12136
  ModelSelector,
12083
12137
  {
12084
12138
  models: perModel,
@@ -12087,7 +12141,7 @@ function WeaknessesList({
12087
12141
  }
12088
12142
  ) })
12089
12143
  ] }),
12090
- /* @__PURE__ */ jsx55(
12144
+ /* @__PURE__ */ jsx56(
12091
12145
  AreaScoresGrid,
12092
12146
  {
12093
12147
  mode,
@@ -12099,11 +12153,11 @@ function WeaknessesList({
12099
12153
  ] }),
12100
12154
  docsHurt.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12101
12155
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12102
- /* @__PURE__ */ jsx55(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12103
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
12104
- /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.docsHurt })
12156
+ /* @__PURE__ */ jsx56(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12157
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
12158
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.docsHurt })
12105
12159
  ] }),
12106
- /* @__PURE__ */ jsx55(Box28, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs40(
12160
+ /* @__PURE__ */ jsx56(Box28, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs40(
12107
12161
  Box28,
12108
12162
  {
12109
12163
  padding: 4,
@@ -12111,8 +12165,8 @@ function WeaknessesList({
12111
12165
  children: [
12112
12166
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
12113
12167
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12114
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12115
- /* @__PURE__ */ jsx55(
12168
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12169
+ /* @__PURE__ */ jsx56(
12116
12170
  "span",
12117
12171
  {
12118
12172
  style: {
@@ -12127,7 +12181,7 @@ function WeaknessesList({
12127
12181
  }
12128
12182
  )
12129
12183
  ] }),
12130
- /* @__PURE__ */ jsx55(
12184
+ /* @__PURE__ */ jsx56(
12131
12185
  "span",
12132
12186
  {
12133
12187
  style: {
@@ -12140,7 +12194,7 @@ function WeaknessesList({
12140
12194
  }
12141
12195
  )
12142
12196
  ] }),
12143
- /* @__PURE__ */ jsx55(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12197
+ /* @__PURE__ */ jsx56(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12144
12198
  area.invertedRetrievalGap && /* @__PURE__ */ jsxs40("span", { style: { color: "#fbbf24" }, children: [
12145
12199
  "Agent does better by NOT finding these docs.",
12146
12200
  " "
@@ -12158,11 +12212,11 @@ function WeaknessesList({
12158
12212
  ] }),
12159
12213
  retrievalIssues.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12160
12214
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12161
- /* @__PURE__ */ jsx55(SearchIcon9, { style: { color: "#fbbf24" } }),
12162
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
12163
- /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.retrievalIssues })
12215
+ /* @__PURE__ */ jsx56(SearchIcon9, { style: { color: "#fbbf24" } }),
12216
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
12217
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.retrievalIssues })
12164
12218
  ] }),
12165
- /* @__PURE__ */ jsx55(Box28, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs40(
12219
+ /* @__PURE__ */ jsx56(Box28, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs40(
12166
12220
  Box28,
12167
12221
  {
12168
12222
  padding: 4,
@@ -12170,8 +12224,8 @@ function WeaknessesList({
12170
12224
  children: [
12171
12225
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
12172
12226
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12173
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12174
- /* @__PURE__ */ jsx55(
12227
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12228
+ /* @__PURE__ */ jsx56(
12175
12229
  "span",
12176
12230
  {
12177
12231
  style: {
@@ -12186,7 +12240,7 @@ function WeaknessesList({
12186
12240
  }
12187
12241
  )
12188
12242
  ] }),
12189
- /* @__PURE__ */ jsx55(
12243
+ /* @__PURE__ */ jsx56(
12190
12244
  "span",
12191
12245
  {
12192
12246
  style: {
@@ -12199,7 +12253,7 @@ function WeaknessesList({
12199
12253
  }
12200
12254
  )
12201
12255
  ] }),
12202
- /* @__PURE__ */ jsx55(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12256
+ /* @__PURE__ */ jsx56(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12203
12257
  "Actual score (",
12204
12258
  Math.round(area.actualScore ?? 0),
12205
12259
  ") is much lower than ceiling (",
@@ -12216,19 +12270,19 @@ function WeaknessesList({
12216
12270
  ] }),
12217
12271
  dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12218
12272
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12219
- /* @__PURE__ */ jsx55(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
12220
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
12221
- /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.dimWeaknesses })
12273
+ /* @__PURE__ */ jsx56(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
12274
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
12275
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.dimWeaknesses })
12222
12276
  ] }),
12223
- /* @__PURE__ */ jsx55(Box28, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs40(
12277
+ /* @__PURE__ */ jsx56(Box28, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs40(
12224
12278
  Box28,
12225
12279
  {
12226
12280
  padding: 4,
12227
12281
  style: i > 0 ? dividerStyle : void 0,
12228
12282
  children: [
12229
12283
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, paddingBottom: 2, children: [
12230
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12231
- /* @__PURE__ */ jsx55(
12284
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12285
+ /* @__PURE__ */ jsx56(
12232
12286
  "span",
12233
12287
  {
12234
12288
  style: {
@@ -12243,7 +12297,7 @@ function WeaknessesList({
12243
12297
  }
12244
12298
  )
12245
12299
  ] }),
12246
- /* @__PURE__ */ jsx55(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx55(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs40(
12300
+ /* @__PURE__ */ jsx56(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx56(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs40(
12247
12301
  "span",
12248
12302
  {
12249
12303
  style: {
@@ -12266,20 +12320,22 @@ function WeaknessesList({
12266
12320
  )) })
12267
12321
  ] }),
12268
12322
  FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs40(Box28, { style: neutralCardStyle, children: [
12269
- /* @__PURE__ */ jsx55(
12323
+ /* @__PURE__ */ jsx56(
12270
12324
  Box28,
12271
12325
  {
12272
12326
  padding: 4,
12273
12327
  style: { borderBottom: "1px solid var(--card-border-color)" },
12274
12328
  children: /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12275
- /* @__PURE__ */ jsx55(ArrowDownIcon2, { style: { color: "#f87171" } }),
12276
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
12329
+ /* @__PURE__ */ jsx56(ArrowDownIcon2, { style: { color: "#f87171" } }),
12330
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
12277
12331
  ] })
12278
12332
  }
12279
12333
  ),
12280
- /* @__PURE__ */ jsx55(Stack31, { children: regressed.map((featureName, i) => {
12334
+ /* @__PURE__ */ jsx56(Stack31, { children: regressed.map((featureName, i) => {
12281
12335
  const area = scores.find((s) => s.feature === featureName);
12282
- const areaDelta = perArea?.[featureName];
12336
+ const areaDelta = perArea?.find(
12337
+ (p) => p.area === featureName
12338
+ )?.delta;
12283
12339
  return /* @__PURE__ */ jsxs40(
12284
12340
  Flex29,
12285
12341
  {
@@ -12288,10 +12344,10 @@ function WeaknessesList({
12288
12344
  padding: 4,
12289
12345
  style: i > 0 ? dividerStyle : void 0,
12290
12346
  children: [
12291
- /* @__PURE__ */ jsx55(Text41, { size: 2, children: featureName }),
12347
+ /* @__PURE__ */ jsx56(Text41, { size: 2, children: featureName }),
12292
12348
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 3, children: [
12293
- areaDelta != null && /* @__PURE__ */ jsx55(DeltaIndicator, { delta: areaDelta, icon: true }),
12294
- area && /* @__PURE__ */ jsx55(
12349
+ areaDelta != null && /* @__PURE__ */ jsx56(DeltaIndicator, { delta: areaDelta, icon: true }),
12350
+ area && /* @__PURE__ */ jsx56(
12295
12351
  "span",
12296
12352
  {
12297
12353
  style: {
@@ -12314,22 +12370,22 @@ function WeaknessesList({
12314
12370
  }) })
12315
12371
  ] }),
12316
12372
  efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs40(Box28, { style: neutralCardStyle, children: [
12317
- /* @__PURE__ */ jsx55(
12373
+ /* @__PURE__ */ jsx56(
12318
12374
  Box28,
12319
12375
  {
12320
12376
  padding: 4,
12321
12377
  style: { borderBottom: "1px solid var(--card-border-color)" },
12322
12378
  children: /* @__PURE__ */ jsxs40(Stack31, { space: 2, children: [
12323
12379
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12324
- /* @__PURE__ */ jsx55(BoltIcon, { style: { color: "#fbbf24" } }),
12325
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
12326
- /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
12380
+ /* @__PURE__ */ jsx56(BoltIcon, { style: { color: "#fbbf24" } }),
12381
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
12382
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
12327
12383
  ] }),
12328
- /* @__PURE__ */ jsx55(Text41, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
12384
+ /* @__PURE__ */ jsx56(Text41, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
12329
12385
  ] })
12330
12386
  }
12331
12387
  ),
12332
- /* @__PURE__ */ jsx55(Stack31, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs40(
12388
+ /* @__PURE__ */ jsx56(Stack31, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs40(
12333
12389
  Flex29,
12334
12390
  {
12335
12391
  align: "center",
@@ -12337,8 +12393,8 @@ function WeaknessesList({
12337
12393
  padding: 4,
12338
12394
  style: i > 0 ? dividerStyle : void 0,
12339
12395
  children: [
12340
- /* @__PURE__ */ jsx55(Text41, { size: 2, children: area.feature }),
12341
- /* @__PURE__ */ jsx55(
12396
+ /* @__PURE__ */ jsx56(Text41, { size: 2, children: area.feature }),
12397
+ /* @__PURE__ */ jsx56(
12342
12398
  "span",
12343
12399
  {
12344
12400
  style: {
@@ -12367,11 +12423,11 @@ var tipArea = {
12367
12423
  };
12368
12424
  function dimTip(area, dim, score, description) {
12369
12425
  return /* @__PURE__ */ jsxs40(Text41, { size: 2, style: { lineHeight: 1.5 }, children: [
12370
- /* @__PURE__ */ jsx55("span", { style: tipArea, children: area }),
12426
+ /* @__PURE__ */ jsx56("span", { style: tipArea, children: area }),
12371
12427
  " scores",
12372
12428
  " ",
12373
- /* @__PURE__ */ jsx55("span", { style: tipValue, children: score }),
12374
- /* @__PURE__ */ jsx55("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
12429
+ /* @__PURE__ */ jsx56("span", { style: tipValue, children: score }),
12430
+ /* @__PURE__ */ jsx56("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
12375
12431
  " on",
12376
12432
  " ",
12377
12433
  dim.toLowerCase(),
@@ -12400,7 +12456,7 @@ function getDimensionWeaknesses(area) {
12400
12456
  }
12401
12457
 
12402
12458
  // src/components/report-detail/ReportDetail.tsx
12403
- import { jsx as jsx56, jsxs as jsxs41 } from "react/jsx-runtime";
12459
+ import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
12404
12460
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
12405
12461
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
12406
12462
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -12463,18 +12519,18 @@ function ReportDetail({
12463
12519
  if (disabledTabs.has(parsed)) return "overview";
12464
12520
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
12465
12521
  }, [activeTab, disabledTabs, tabs]);
12466
- const handleTabClick = useCallback36(
12522
+ const handleTabClick = useCallback37(
12467
12523
  (tabId) => {
12468
12524
  onTabChange(tabId === "overview" ? null : tabId, null, null);
12469
12525
  },
12470
12526
  [onTabChange]
12471
12527
  );
12472
12528
  if (loading) {
12473
- return /* @__PURE__ */ jsx56(LoadingState, { message: "Loading report\u2026" });
12529
+ return /* @__PURE__ */ jsx57(LoadingState, { message: "Loading report\u2026" });
12474
12530
  }
12475
12531
  if (!report || !summary) {
12476
- return /* @__PURE__ */ jsx56(Box29, { padding: 5, children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12477
- /* @__PURE__ */ jsx56(
12532
+ return /* @__PURE__ */ jsx57(Box29, { padding: 5, children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12533
+ /* @__PURE__ */ jsx57(
12478
12534
  Button11,
12479
12535
  {
12480
12536
  icon: ArrowLeftIcon3,
@@ -12483,18 +12539,18 @@ function ReportDetail({
12483
12539
  text: "Back"
12484
12540
  }
12485
12541
  ),
12486
- /* @__PURE__ */ jsx56(Text42, { align: "center", muted: true, size: 3, children: "Report not found" })
12542
+ /* @__PURE__ */ jsx57(Text42, { align: "center", muted: true, size: 3, children: "Report not found" })
12487
12543
  ] }) });
12488
12544
  }
12489
12545
  const { comparison, provenance } = report;
12490
12546
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
12491
- return /* @__PURE__ */ jsx56(
12547
+ return /* @__PURE__ */ jsx57(
12492
12548
  ReportArtifactProvider,
12493
12549
  {
12494
12550
  runId: report.provenance?.runId,
12495
12551
  manifest: summary?.artifactManifest,
12496
- children: /* @__PURE__ */ jsx56(Box29, { padding: 4, children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12497
- /* @__PURE__ */ jsx56(
12552
+ children: /* @__PURE__ */ jsx57(Box29, { padding: 4, children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12553
+ /* @__PURE__ */ jsx57(
12498
12554
  ReportHeader,
12499
12555
  {
12500
12556
  completedAt: report.completedAt,
@@ -12504,10 +12560,10 @@ function ReportDetail({
12504
12560
  }
12505
12561
  ),
12506
12562
  /* @__PURE__ */ jsxs41(Flex30, { align: "center", gap: 2, wrap: "wrap", children: [
12507
- /* @__PURE__ */ jsx56(TabList, { space: 1, children: tabs.map((tab) => {
12563
+ /* @__PURE__ */ jsx57(TabList, { space: 1, children: tabs.map((tab) => {
12508
12564
  const isDisabled = disabledTabs.has(tab.id);
12509
12565
  const tooltip = getDisabledTabTooltip(tab.id, summary);
12510
- const tabElement = /* @__PURE__ */ jsx56(
12566
+ const tabElement = /* @__PURE__ */ jsx57(
12511
12567
  Tab,
12512
12568
  {
12513
12569
  "aria-controls": `panel-${tab.id}`,
@@ -12518,29 +12574,30 @@ function ReportDetail({
12518
12574
  selected: currentTab === tab.id
12519
12575
  }
12520
12576
  );
12521
- return isDisabled && tooltip ? /* @__PURE__ */ jsx56(
12577
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx57(
12522
12578
  Tooltip10,
12523
12579
  {
12524
- content: /* @__PURE__ */ jsx56(Box29, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
12580
+ content: /* @__PURE__ */ jsx57(Box29, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
12525
12581
  placement: "bottom",
12526
12582
  portal: true,
12527
- children: /* @__PURE__ */ jsx56("span", { style: { display: "inline-block" }, children: tabElement })
12583
+ children: /* @__PURE__ */ jsx57("span", { style: { display: "inline-block" }, children: tabElement })
12528
12584
  },
12529
12585
  tab.id
12530
- ) : /* @__PURE__ */ jsx56("span", { children: tabElement }, tab.id);
12586
+ ) : /* @__PURE__ */ jsx57("span", { children: tabElement }, tab.id);
12531
12587
  }) }),
12532
12588
  /* @__PURE__ */ jsxs41(Flex30, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
12533
- /* @__PURE__ */ jsx56(
12589
+ /* @__PURE__ */ jsx57(
12534
12590
  HoverTip,
12535
12591
  {
12536
12592
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
12537
- children: /* @__PURE__ */ jsx56(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
12593
+ children: /* @__PURE__ */ jsx57(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
12538
12594
  }
12539
12595
  ),
12540
- /* @__PURE__ */ jsx56(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx56(Badge10, { tone: "primary", children: provenance.mode }) }),
12541
- /* @__PURE__ */ jsx56(
12596
+ /* @__PURE__ */ jsx57(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx57(Badge10, { tone: "primary", children: provenance.mode }) }),
12597
+ /* @__PURE__ */ jsx57(
12542
12598
  ReportActions,
12543
12599
  {
12600
+ artifactManifest: summary.artifactManifest,
12544
12601
  documentId: report._id,
12545
12602
  onDeleted: onBack,
12546
12603
  provenance,
@@ -12549,14 +12606,14 @@ function ReportDetail({
12549
12606
  )
12550
12607
  ] })
12551
12608
  ] }),
12552
- currentTab === "overview" && /* @__PURE__ */ jsx56(
12609
+ currentTab === "overview" && /* @__PURE__ */ jsx57(
12553
12610
  TabPanel,
12554
12611
  {
12555
12612
  "aria-labelledby": "tab-overview",
12556
12613
  hidden: currentTab !== "overview",
12557
12614
  id: "panel-overview",
12558
12615
  children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12559
- /* @__PURE__ */ jsx56(
12616
+ /* @__PURE__ */ jsx57(
12560
12617
  DiagnosticsOverview,
12561
12618
  {
12562
12619
  comparison,
@@ -12567,20 +12624,20 @@ function ReportDetail({
12567
12624
  totalTests
12568
12625
  }
12569
12626
  ),
12570
- /* @__PURE__ */ jsx56(CostLatencyPanel, { testResults: summary.testResults }),
12571
- /* @__PURE__ */ jsx56(
12627
+ /* @__PURE__ */ jsx57(CostLatencyPanel, { testResults: summary.testResults }),
12628
+ /* @__PURE__ */ jsx57(
12572
12629
  LineageCard,
12573
12630
  {
12574
12631
  provenance,
12575
12632
  reportId: report.reportId
12576
12633
  }
12577
12634
  ),
12578
- /* @__PURE__ */ jsx56(ProvenanceCard, { provenance }),
12579
- /* @__PURE__ */ jsx56(PipelineExecutionPanel, {})
12635
+ /* @__PURE__ */ jsx57(ProvenanceCard, { provenance }),
12636
+ /* @__PURE__ */ jsx57(PipelineExecutionPanel, {})
12580
12637
  ] })
12581
12638
  }
12582
12639
  ),
12583
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx56(
12640
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx57(
12584
12641
  DiagnosticsPanel,
12585
12642
  {
12586
12643
  artifactCache,
@@ -12596,13 +12653,13 @@ function ReportDetail({
12596
12653
  testResults: summary.testResults
12597
12654
  }
12598
12655
  ),
12599
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx56(
12656
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx57(
12600
12657
  TabPanel,
12601
12658
  {
12602
12659
  "aria-labelledby": "tab-activity",
12603
12660
  hidden: currentTab !== "activity",
12604
12661
  id: "panel-activity",
12605
- children: /* @__PURE__ */ jsx56(
12662
+ children: /* @__PURE__ */ jsx57(
12606
12663
  AgentBehaviorCard,
12607
12664
  {
12608
12665
  agentBehavior: summary.agentBehavior,
@@ -12640,8 +12697,8 @@ function DiagnosticsPanel({
12640
12697
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
12641
12698
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
12642
12699
  ).length;
12643
- return /* @__PURE__ */ jsx56(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12644
- /* @__PURE__ */ jsx56(
12700
+ return /* @__PURE__ */ jsx57(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12701
+ /* @__PURE__ */ jsx57(
12645
12702
  Flex30,
12646
12703
  {
12647
12704
  align: "center",
@@ -12671,7 +12728,7 @@ function DiagnosticsPanel({
12671
12728
  type: "button",
12672
12729
  children: [
12673
12730
  tab.label,
12674
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx56(
12731
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx57(
12675
12732
  "span",
12676
12733
  {
12677
12734
  style: {
@@ -12691,7 +12748,7 @@ function DiagnosticsPanel({
12691
12748
  ))
12692
12749
  }
12693
12750
  ),
12694
- subTab === "strengths" && /* @__PURE__ */ jsx56(
12751
+ subTab === "strengths" && /* @__PURE__ */ jsx57(
12695
12752
  StrengthsList,
12696
12753
  {
12697
12754
  comparison,
@@ -12701,7 +12758,7 @@ function DiagnosticsPanel({
12701
12758
  }
12702
12759
  ),
12703
12760
  subTab === "issues" && /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12704
- /* @__PURE__ */ jsx56(
12761
+ /* @__PURE__ */ jsx57(
12705
12762
  WeaknessesList,
12706
12763
  {
12707
12764
  comparison,
@@ -12710,8 +12767,8 @@ function DiagnosticsPanel({
12710
12767
  scores
12711
12768
  }
12712
12769
  ),
12713
- FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx56(FailureModesPanel, { failureModes }),
12714
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx56(
12770
+ FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx57(FailureModesPanel, { failureModes }),
12771
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx57(
12715
12772
  JudgmentList,
12716
12773
  {
12717
12774
  artifactCache,
@@ -12747,17 +12804,17 @@ function getDisabledTabTooltip(tabId, summary) {
12747
12804
  if (!summary) return null;
12748
12805
  switch (tabId) {
12749
12806
  case "diagnostics":
12750
- return /* @__PURE__ */ jsx56(Text42, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
12807
+ return /* @__PURE__ */ jsx57(Text42, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
12751
12808
  case "activity":
12752
12809
  return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs41(Text42, { muted: true, size: 2, children: [
12753
12810
  "Not available for baseline-only evaluations. Run with",
12754
12811
  " ",
12755
- /* @__PURE__ */ jsx56("code", { style: inlineCodeStyle, children: "--mode full" }),
12812
+ /* @__PURE__ */ jsx57("code", { style: inlineCodeStyle, children: "--mode full" }),
12756
12813
  " or",
12757
12814
  " ",
12758
- /* @__PURE__ */ jsx56("code", { style: inlineCodeStyle, children: "--mode agentic" }),
12815
+ /* @__PURE__ */ jsx57("code", { style: inlineCodeStyle, children: "--mode agentic" }),
12759
12816
  " to capture agent browsing behavior."
12760
- ] }) : /* @__PURE__ */ jsx56(Text42, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
12817
+ ] }) : /* @__PURE__ */ jsx57(Text42, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
12761
12818
  default:
12762
12819
  return null;
12763
12820
  }
@@ -12766,7 +12823,7 @@ function getDisabledTabTooltip(tabId, summary) {
12766
12823
  // src/components/report-detail/AreaScoreRow.tsx
12767
12824
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
12768
12825
  import { Box as Box30, Flex as Flex31, Stack as Stack33, Text as Text43 } from "@sanity/ui";
12769
- import { jsx as jsx57, jsxs as jsxs42 } from "react/jsx-runtime";
12826
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
12770
12827
 
12771
12828
  // src/components/report-detail/AreaScoreTable.tsx
12772
12829
  import React4 from "react";
@@ -12800,32 +12857,32 @@ function scoreHex(score) {
12800
12857
 
12801
12858
  // src/components/primitives/ScoreCell.tsx
12802
12859
  import { Card as Card18, Text as Text44 } from "@sanity/ui";
12803
- import { jsx as jsx58 } from "react/jsx-runtime";
12860
+ import { jsx as jsx59 } from "react/jsx-runtime";
12804
12861
 
12805
12862
  // src/components/report-detail/AreaScoreTable.tsx
12806
- import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
12863
+ import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
12807
12864
 
12808
12865
  // src/components/report-detail/AutoComparisonCard.tsx
12809
12866
  import { Badge as Badge11, Box as Box31, Card as Card20, Flex as Flex32, Grid as Grid5, Stack as Stack35, Text as Text46, Tooltip as Tooltip11 } from "@sanity/ui";
12810
- import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
12867
+ import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
12811
12868
 
12812
12869
  // src/components/report-detail/OverviewStats.tsx
12813
12870
  import { Grid as Grid6 } from "@sanity/ui";
12814
- import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
12871
+ import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
12815
12872
 
12816
12873
  // src/components/report-detail/RecommendationsSection.tsx
12817
12874
  import { BoltIcon as BoltIcon2 } from "@sanity/icons";
12818
12875
  import { Box as Box32, Flex as Flex33, Stack as Stack36, Text as Text47 } from "@sanity/ui";
12819
- import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
12876
+ import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
12820
12877
 
12821
12878
  // src/components/report-detail/ThreeLayerTable.tsx
12822
12879
  import React5 from "react";
12823
12880
  import { Badge as Badge12, Card as Card21, Flex as Flex34, Stack as Stack37, Text as Text48 } from "@sanity/ui";
12824
- import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
12881
+ import { jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
12825
12882
 
12826
12883
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
12827
12884
  import { Card as Card22 } from "@sanity/ui";
12828
- import { useCallback as useCallback37, useEffect as useEffect15, useRef as useRef8, useState as useState29 } from "react";
12885
+ import { useCallback as useCallback38, useEffect as useEffect15, useRef as useRef8, useState as useState29 } from "react";
12829
12886
 
12830
12887
  // src/components/report-detail/JudgmentDetailDrawer.tsx
12831
12888
  import { useEffect as useEffect14, useState as useState28 } from "react";
@@ -12841,7 +12898,7 @@ import {
12841
12898
  Text as Text49,
12842
12899
  Tooltip as Tooltip12
12843
12900
  } from "@sanity/ui";
12844
- import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
12901
+ import { jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
12845
12902
  var HEADER_STYLE = {
12846
12903
  borderBottom: "1px solid var(--card-border-color)"
12847
12904
  };
@@ -12880,7 +12937,7 @@ function DocBadge({
12880
12937
  const [hovered, setHovered] = useState28(false);
12881
12938
  const isLinked = Boolean(doc.documentId);
12882
12939
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
12883
- const badge = /* @__PURE__ */ jsx64(
12940
+ const badge = /* @__PURE__ */ jsx65(
12884
12941
  "span",
12885
12942
  {
12886
12943
  style: {
@@ -12893,13 +12950,13 @@ function DocBadge({
12893
12950
  children: doc.slug
12894
12951
  }
12895
12952
  );
12896
- return /* @__PURE__ */ jsx64(
12953
+ return /* @__PURE__ */ jsx65(
12897
12954
  Tooltip12,
12898
12955
  {
12899
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 2, children: tooltipLabel }) }),
12956
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 2, children: tooltipLabel }) }),
12900
12957
  placement: "bottom",
12901
12958
  portal: true,
12902
- children: isLinked ? /* @__PURE__ */ jsx64(
12959
+ children: isLinked ? /* @__PURE__ */ jsx65(
12903
12960
  "a",
12904
12961
  {
12905
12962
  href: `/intent/edit/id=${doc.documentId}`,
@@ -12914,7 +12971,7 @@ function DocBadge({
12914
12971
  },
12915
12972
  children: badge
12916
12973
  }
12917
- ) : /* @__PURE__ */ jsx64("span", { children: badge })
12974
+ ) : /* @__PURE__ */ jsx65("span", { children: badge })
12918
12975
  }
12919
12976
  );
12920
12977
  }
@@ -12987,7 +13044,7 @@ function JudgmentDetailDrawer({
12987
13044
  role: "dialog",
12988
13045
  style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
12989
13046
  children: [
12990
- /* @__PURE__ */ jsx64(
13047
+ /* @__PURE__ */ jsx65(
12991
13048
  "div",
12992
13049
  {
12993
13050
  "aria-hidden": true,
@@ -13003,7 +13060,7 @@ function JudgmentDetailDrawer({
13003
13060
  /* @__PURE__ */ jsxs48(Flex35, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
13004
13061
  /* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 2, children: [
13005
13062
  /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
13006
- /* @__PURE__ */ jsx64(
13063
+ /* @__PURE__ */ jsx65(
13007
13064
  "span",
13008
13065
  {
13009
13066
  style: {
@@ -13018,7 +13075,7 @@ function JudgmentDetailDrawer({
13018
13075
  children: judgment.score
13019
13076
  }
13020
13077
  ),
13021
- /* @__PURE__ */ jsx64(
13078
+ /* @__PURE__ */ jsx65(
13022
13079
  "span",
13023
13080
  {
13024
13081
  style: {
@@ -13031,13 +13088,13 @@ function JudgmentDetailDrawer({
13031
13088
  children: dimLabel
13032
13089
  }
13033
13090
  ),
13034
- /* @__PURE__ */ jsx64(
13091
+ /* @__PURE__ */ jsx65(
13035
13092
  Tooltip12,
13036
13093
  {
13037
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: judgment.modelId }) }),
13094
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: judgment.modelId }) }),
13038
13095
  placement: "bottom",
13039
13096
  portal: true,
13040
- children: /* @__PURE__ */ jsx64(
13097
+ children: /* @__PURE__ */ jsx65(
13041
13098
  "span",
13042
13099
  {
13043
13100
  style: {
@@ -13054,7 +13111,7 @@ function JudgmentDetailDrawer({
13054
13111
  )
13055
13112
  }
13056
13113
  ),
13057
- (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx64(
13114
+ (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx65(
13058
13115
  "span",
13059
13116
  {
13060
13117
  "aria-hidden": true,
@@ -13066,10 +13123,10 @@ function JudgmentDetailDrawer({
13066
13123
  }
13067
13124
  }
13068
13125
  ),
13069
- testResult?.latencyMs != null && /* @__PURE__ */ jsx64(
13126
+ testResult?.latencyMs != null && /* @__PURE__ */ jsx65(
13070
13127
  Tooltip12,
13071
13128
  {
13072
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: "End-to-end generation latency for this model call." }) }),
13129
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: "End-to-end generation latency for this model call." }) }),
13073
13130
  placement: "bottom",
13074
13131
  portal: true,
13075
13132
  children: /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, children: [
@@ -13078,10 +13135,10 @@ function JudgmentDetailDrawer({
13078
13135
  ] })
13079
13136
  }
13080
13137
  ),
13081
- testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx64(
13138
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx65(
13082
13139
  Tooltip12,
13083
13140
  {
13084
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: "Provider-reported cost for this model call." }) }),
13141
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: "Provider-reported cost for this model call." }) }),
13085
13142
  placement: "bottom",
13086
13143
  portal: true,
13087
13144
  children: /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, children: [
@@ -13092,12 +13149,12 @@ function JudgmentDetailDrawer({
13092
13149
  )
13093
13150
  ] }),
13094
13151
  /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
13095
- /* @__PURE__ */ jsx64(Text49, { size: 2, weight: "medium", children: taskName }),
13096
- /* @__PURE__ */ jsx64(VariantBadge, { variant })
13152
+ /* @__PURE__ */ jsx65(Text49, { size: 2, weight: "medium", children: taskName }),
13153
+ /* @__PURE__ */ jsx65(VariantBadge, { variant })
13097
13154
  ] })
13098
13155
  ] }),
13099
13156
  /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 1, children: [
13100
- /* @__PURE__ */ jsx64(
13157
+ /* @__PURE__ */ jsx65(
13101
13158
  "span",
13102
13159
  {
13103
13160
  style: {
@@ -13115,7 +13172,7 @@ function JudgmentDetailDrawer({
13115
13172
  children: "Esc"
13116
13173
  }
13117
13174
  ),
13118
- /* @__PURE__ */ jsx64(
13175
+ /* @__PURE__ */ jsx65(
13119
13176
  Button12,
13120
13177
  {
13121
13178
  "aria-label": "Close (Esc)",
@@ -13138,8 +13195,8 @@ function JudgmentDetailDrawer({
13138
13195
  paddingY: 2,
13139
13196
  style: TAB_BAR_STYLE,
13140
13197
  children: [
13141
- /* @__PURE__ */ jsx64(Box33, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs48(TabList2, { space: 2, children: [
13142
- /* @__PURE__ */ jsx64(
13198
+ /* @__PURE__ */ jsx65(Box33, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs48(TabList2, { space: 2, children: [
13199
+ /* @__PURE__ */ jsx65(
13143
13200
  Tab2,
13144
13201
  {
13145
13202
  "aria-controls": "judgment-panel-reasoning",
@@ -13149,7 +13206,7 @@ function JudgmentDetailDrawer({
13149
13206
  selected: tab === "reasoning"
13150
13207
  }
13151
13208
  ),
13152
- hasOutputTab && /* @__PURE__ */ jsx64(
13209
+ hasOutputTab && /* @__PURE__ */ jsx65(
13153
13210
  Tab2,
13154
13211
  {
13155
13212
  "aria-controls": "judgment-panel-output",
@@ -13160,7 +13217,7 @@ function JudgmentDetailDrawer({
13160
13217
  }
13161
13218
  )
13162
13219
  ] }) }),
13163
- /* @__PURE__ */ jsx64(
13220
+ /* @__PURE__ */ jsx65(
13164
13221
  JudgmentActions,
13165
13222
  {
13166
13223
  onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
@@ -13170,14 +13227,14 @@ function JudgmentDetailDrawer({
13170
13227
  }
13171
13228
  ),
13172
13229
  /* @__PURE__ */ jsxs48(Box33, { padding: 4, style: CONTENT_STYLE, children: [
13173
- /* @__PURE__ */ jsx64(
13230
+ /* @__PURE__ */ jsx65(
13174
13231
  TabPanel2,
13175
13232
  {
13176
13233
  "aria-labelledby": "judgment-tab-reasoning",
13177
13234
  hidden: tab !== "reasoning",
13178
13235
  id: "judgment-panel-reasoning",
13179
13236
  children: /* @__PURE__ */ jsxs48(Box33, { style: COPYABLE_BLOCK_STYLE, children: [
13180
- /* @__PURE__ */ jsx64(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx64(
13237
+ /* @__PURE__ */ jsx65(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx65(
13181
13238
  CopyButton,
13182
13239
  {
13183
13240
  copiedLabel: "Reasoning copied",
@@ -13185,8 +13242,8 @@ function JudgmentDetailDrawer({
13185
13242
  text: reasoningText
13186
13243
  }
13187
13244
  ) }),
13188
- /* @__PURE__ */ jsx64(Markdown, { content: reasoningText }),
13189
- reasoningIsPreview && /* @__PURE__ */ jsx64(Text49, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
13245
+ /* @__PURE__ */ jsx65(Markdown, { content: reasoningText }),
13246
+ reasoningIsPreview && /* @__PURE__ */ jsx65(Text49, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
13190
13247
  ] })
13191
13248
  }
13192
13249
  ),
@@ -13197,14 +13254,14 @@ function JudgmentDetailDrawer({
13197
13254
  hidden: tab !== "output",
13198
13255
  id: "judgment-panel-output",
13199
13256
  children: [
13200
- !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx64(Text49, { muted: true, size: 1, children: "Fetching model output\u2026" }),
13257
+ !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx65(Text49, { muted: true, size: 1, children: "Fetching model output\u2026" }),
13201
13258
  !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, style: { color: "#f87171" }, children: [
13202
13259
  "Failed to load model output",
13203
13260
  artifactCache?.error ? `: ${artifactCache.error}` : ""
13204
13261
  ] }),
13205
- !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx64(Text49, { muted: true, size: 1, children: "Model output not available for this entry." }),
13262
+ !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx65(Text49, { muted: true, size: 1, children: "Model output not available for this entry." }),
13206
13263
  resolvedOutput && /* @__PURE__ */ jsxs48(Box33, { style: COPYABLE_BLOCK_STYLE, children: [
13207
- /* @__PURE__ */ jsx64(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx64(
13264
+ /* @__PURE__ */ jsx65(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx65(
13208
13265
  CopyButton,
13209
13266
  {
13210
13267
  copiedLabel: "Output copied",
@@ -13212,15 +13269,15 @@ function JudgmentDetailDrawer({
13212
13269
  text: resolvedOutput
13213
13270
  }
13214
13271
  ) }),
13215
- /* @__PURE__ */ jsx64(Markdown, { content: resolvedOutput })
13272
+ /* @__PURE__ */ jsx65(Markdown, { content: resolvedOutput })
13216
13273
  ] })
13217
13274
  ]
13218
13275
  }
13219
13276
  )
13220
13277
  ] }),
13221
- judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx64(Box33, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
13222
- /* @__PURE__ */ jsx64("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
13223
- judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx64(DocBadge, { doc }, doc.slug))
13278
+ judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx65(Box33, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
13279
+ /* @__PURE__ */ jsx65("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
13280
+ judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx65(DocBadge, { doc }, doc.slug))
13224
13281
  ] }) })
13225
13282
  ]
13226
13283
  }
@@ -13228,7 +13285,7 @@ function JudgmentDetailDrawer({
13228
13285
  }
13229
13286
 
13230
13287
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
13231
- import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
13288
+ import { jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
13232
13289
  var MIN_WIDTH2 = 480;
13233
13290
  var MAX_WIDTH2 = 900;
13234
13291
  var OVERLAY_BREAKPOINT2 = 1024;
@@ -13255,7 +13312,7 @@ function useResizable2(defaultWidth) {
13255
13312
  const dragging = useRef8(false);
13256
13313
  const startX = useRef8(0);
13257
13314
  const startWidth = useRef8(0);
13258
- const handleMouseDown = useCallback37(
13315
+ const handleMouseDown = useCallback38(
13259
13316
  (e) => {
13260
13317
  e.preventDefault();
13261
13318
  dragging.current = true;
@@ -13324,7 +13381,7 @@ function JudgmentDetailDrawerOutlet({
13324
13381
  width
13325
13382
  },
13326
13383
  children: [
13327
- !isNarrow && /* @__PURE__ */ jsx65(
13384
+ !isNarrow && /* @__PURE__ */ jsx66(
13328
13385
  "div",
13329
13386
  {
13330
13387
  "aria-label": "Resize judgment drawer",
@@ -13349,7 +13406,7 @@ function JudgmentDetailDrawerOutlet({
13349
13406
  }
13350
13407
  }
13351
13408
  ),
13352
- /* @__PURE__ */ jsx65(
13409
+ /* @__PURE__ */ jsx66(
13353
13410
  Card22,
13354
13411
  {
13355
13412
  borderLeft: !isNarrow,
@@ -13359,7 +13416,7 @@ function JudgmentDetailDrawerOutlet({
13359
13416
  flexDirection: "column",
13360
13417
  overflow: "hidden"
13361
13418
  },
13362
- children: /* @__PURE__ */ jsx65(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx65(
13419
+ children: /* @__PURE__ */ jsx66(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx66(
13363
13420
  JudgmentDetailDrawer,
13364
13421
  {
13365
13422
  artifactCache: active.artifactCache,
@@ -13378,13 +13435,13 @@ function JudgmentDetailDrawerOutlet({
13378
13435
 
13379
13436
  // src/components/ScoreTimeline.tsx
13380
13437
  import { Card as Card25, Flex as Flex38, Spinner, Stack as Stack41, Text as Text52 } from "@sanity/ui";
13381
- import { useCallback as useCallback41, useMemo as useMemo19, useState as useState32 } from "react";
13438
+ import { useCallback as useCallback42, useMemo as useMemo19, useState as useState32 } from "react";
13382
13439
  import { useRouter as useRouter4 } from "sanity/router";
13383
13440
 
13384
13441
  // src/components/timeline/TimelineChart.tsx
13385
13442
  import { Box as Box34, Card as Card23, Flex as Flex36, Stack as Stack39, Text as Text50 } from "@sanity/ui";
13386
13443
  import {
13387
- useCallback as useCallback38,
13444
+ useCallback as useCallback39,
13388
13445
  useEffect as useEffect16,
13389
13446
  useMemo as useMemo17,
13390
13447
  useRef as useRef9,
@@ -13632,7 +13689,7 @@ function effectiveStartDate(rangeDays, floor = TIMELINE_DATA_START_DATE) {
13632
13689
  }
13633
13690
 
13634
13691
  // src/components/timeline/TimelineChart.tsx
13635
- import { jsx as jsx66, jsxs as jsxs50 } from "react/jsx-runtime";
13692
+ import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
13636
13693
  var CHART_HEIGHT = 280;
13637
13694
  var PAD_BOTTOM = 36;
13638
13695
  var PAD_LEFT = 44;
@@ -13666,11 +13723,11 @@ function TimelineChart({
13666
13723
  }, []);
13667
13724
  const plotWidth = width - PAD_LEFT - PAD_RIGHT;
13668
13725
  const plotHeight = CHART_HEIGHT - PAD_TOP - PAD_BOTTOM;
13669
- const xFor = useCallback38(
13726
+ const xFor = useCallback39(
13670
13727
  (i, n) => PAD_LEFT + (n === 1 ? plotWidth / 2 : i / (n - 1) * plotWidth),
13671
13728
  [plotWidth]
13672
13729
  );
13673
- const yFor = useCallback38(
13730
+ const yFor = useCallback39(
13674
13731
  (score) => PAD_TOP + plotHeight - score / Y_MAX * plotHeight,
13675
13732
  [plotHeight]
13676
13733
  );
@@ -13705,7 +13762,7 @@ function TimelineChart({
13705
13762
  }
13706
13763
  return Array.from(new Set(out));
13707
13764
  }, [computed]);
13708
- const findNearestIndex = useCallback38(
13765
+ const findNearestIndex = useCallback39(
13709
13766
  (clientX, rect) => {
13710
13767
  if (computed.length === 0) return null;
13711
13768
  const localX = (clientX - rect.left) * width / rect.width;
@@ -13722,7 +13779,7 @@ function TimelineChart({
13722
13779
  },
13723
13780
  [computed, width]
13724
13781
  );
13725
- const handleMouseMove = useCallback38(
13782
+ const handleMouseMove = useCallback39(
13726
13783
  (e) => {
13727
13784
  const rect = e.currentTarget.getBoundingClientRect();
13728
13785
  const idx = findNearestIndex(e.clientX, rect);
@@ -13730,10 +13787,10 @@ function TimelineChart({
13730
13787
  },
13731
13788
  [findNearestIndex]
13732
13789
  );
13733
- const handleMouseLeave = useCallback38(() => {
13790
+ const handleMouseLeave = useCallback39(() => {
13734
13791
  setHoverIdx(null);
13735
13792
  }, []);
13736
- const handlePointClick = useCallback38(
13793
+ const handlePointClick = useCallback39(
13737
13794
  (idx) => {
13738
13795
  const datum = computed[idx];
13739
13796
  if (!datum) return;
@@ -13741,14 +13798,14 @@ function TimelineChart({
13741
13798
  },
13742
13799
  [computed, onSelectPoint]
13743
13800
  );
13744
- const handleFocus = useCallback38(() => {
13801
+ const handleFocus = useCallback39(() => {
13745
13802
  setFocusIdx((prev) => prev ?? 0);
13746
13803
  }, []);
13747
- const moveTo = useCallback38((idx) => {
13804
+ const moveTo = useCallback39((idx) => {
13748
13805
  setFocusIdx(idx);
13749
13806
  setHoverIdx(idx);
13750
13807
  }, []);
13751
- const handleKey = useCallback38(
13808
+ const handleKey = useCallback39(
13752
13809
  (e) => {
13753
13810
  if (computed.length === 0) return;
13754
13811
  const last = computed.length - 1;
@@ -13781,9 +13838,9 @@ function TimelineChart({
13781
13838
  const activeIdx = hoverIdx ?? focusIdx;
13782
13839
  const active = activeIdx !== null ? computed[activeIdx] : null;
13783
13840
  if (computed.length === 0) {
13784
- return /* @__PURE__ */ jsx66(Card23, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsx66(Flex36, { align: "center", justify: "center", style: { height: 220 }, children: /* @__PURE__ */ jsx66(Text50, { muted: true, size: 2, children: "No reports found in this window. Adjust the filters or extend the time range." }) }) });
13841
+ return /* @__PURE__ */ jsx67(Card23, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsx67(Flex36, { align: "center", justify: "center", style: { height: 220 }, children: /* @__PURE__ */ jsx67(Text50, { muted: true, size: 2, children: "No reports found in this window. Adjust the filters or extend the time range." }) }) });
13785
13842
  }
13786
- return /* @__PURE__ */ jsx66(Card23, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13843
+ return /* @__PURE__ */ jsx67(Card23, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13787
13844
  /* @__PURE__ */ jsxs50(Box34, { ref: containerRef, style: { position: "relative", width: "100%" }, children: [
13788
13845
  /* @__PURE__ */ jsxs50(
13789
13846
  "svg",
@@ -13801,7 +13858,7 @@ function TimelineChart({
13801
13858
  Y_TICKS.map((tick) => {
13802
13859
  const y = yFor(tick);
13803
13860
  return /* @__PURE__ */ jsxs50("g", { children: [
13804
- /* @__PURE__ */ jsx66(
13861
+ /* @__PURE__ */ jsx67(
13805
13862
  "line",
13806
13863
  {
13807
13864
  stroke: "var(--card-border-color, #ddd)",
@@ -13812,7 +13869,7 @@ function TimelineChart({
13812
13869
  y2: y
13813
13870
  }
13814
13871
  ),
13815
- /* @__PURE__ */ jsx66(
13872
+ /* @__PURE__ */ jsx67(
13816
13873
  "text",
13817
13874
  {
13818
13875
  dominantBaseline: "middle",
@@ -13826,7 +13883,7 @@ function TimelineChart({
13826
13883
  )
13827
13884
  ] }, tick);
13828
13885
  }),
13829
- avgScore > 0 ? /* @__PURE__ */ jsx66(
13886
+ avgScore > 0 ? /* @__PURE__ */ jsx67(
13830
13887
  "rect",
13831
13888
  {
13832
13889
  fill: scoreHex(avgScore),
@@ -13843,7 +13900,7 @@ function TimelineChart({
13843
13900
  xLabelIndexes.map((i) => {
13844
13901
  const p = computed[i];
13845
13902
  if (!p) return null;
13846
- return /* @__PURE__ */ jsx66(
13903
+ return /* @__PURE__ */ jsx67(
13847
13904
  "text",
13848
13905
  {
13849
13906
  fill: "var(--card-muted-fg-color, #999)",
@@ -13856,7 +13913,7 @@ function TimelineChart({
13856
13913
  i
13857
13914
  );
13858
13915
  }),
13859
- showMovingAverage && maPoints ? /* @__PURE__ */ jsx66(
13916
+ showMovingAverage && maPoints ? /* @__PURE__ */ jsx67(
13860
13917
  "polyline",
13861
13918
  {
13862
13919
  fill: "none",
@@ -13867,7 +13924,7 @@ function TimelineChart({
13867
13924
  strokeWidth: 1.5
13868
13925
  }
13869
13926
  ) : null,
13870
- /* @__PURE__ */ jsx66(
13927
+ /* @__PURE__ */ jsx67(
13871
13928
  "polyline",
13872
13929
  {
13873
13930
  fill: "none",
@@ -13877,7 +13934,7 @@ function TimelineChart({
13877
13934
  strokeWidth: 2.5
13878
13935
  }
13879
13936
  ),
13880
- active ? /* @__PURE__ */ jsx66(
13937
+ active ? /* @__PURE__ */ jsx67(
13881
13938
  "line",
13882
13939
  {
13883
13940
  stroke: "var(--card-border-color, #bbb)",
@@ -13890,7 +13947,7 @@ function TimelineChart({
13890
13947
  ) : null,
13891
13948
  computed.map((p, idx) => {
13892
13949
  const isActive = idx === activeIdx;
13893
- return /* @__PURE__ */ jsx66(
13950
+ return /* @__PURE__ */ jsx67(
13894
13951
  "circle",
13895
13952
  {
13896
13953
  cx: p.x,
@@ -13908,11 +13965,11 @@ function TimelineChart({
13908
13965
  ]
13909
13966
  }
13910
13967
  ),
13911
- active ? /* @__PURE__ */ jsx66(Tooltip13, { active, chartWidth: width }) : null
13968
+ active ? /* @__PURE__ */ jsx67(Tooltip13, { active, chartWidth: width }) : null
13912
13969
  ] }),
13913
13970
  /* @__PURE__ */ jsxs50(Flex36, { gap: 3, align: "center", children: [
13914
- /* @__PURE__ */ jsx66(LegendDot, { color: scoreHex(avgScore), label: "Score" }),
13915
- showMovingAverage ? /* @__PURE__ */ jsx66(
13971
+ /* @__PURE__ */ jsx67(LegendDot, { color: scoreHex(avgScore), label: "Score" }),
13972
+ showMovingAverage ? /* @__PURE__ */ jsx67(
13916
13973
  LegendDot,
13917
13974
  {
13918
13975
  color: "var(--card-muted-fg-color, #888)",
@@ -13920,7 +13977,7 @@ function TimelineChart({
13920
13977
  label: "5-point moving average"
13921
13978
  }
13922
13979
  ) : null,
13923
- /* @__PURE__ */ jsx66(Text50, { muted: true, size: 1, children: "Click a point to open the report" })
13980
+ /* @__PURE__ */ jsx67(Text50, { muted: true, size: 1, children: "Click a point to open the report" })
13924
13981
  ] })
13925
13982
  ] }) });
13926
13983
  }
@@ -13930,7 +13987,7 @@ function LegendDot({
13930
13987
  label
13931
13988
  }) {
13932
13989
  return /* @__PURE__ */ jsxs50(Flex36, { align: "center", gap: 2, children: [
13933
- /* @__PURE__ */ jsx66("svg", { height: "10", width: "22", children: /* @__PURE__ */ jsx66(
13990
+ /* @__PURE__ */ jsx67("svg", { height: "10", width: "22", children: /* @__PURE__ */ jsx67(
13934
13991
  "line",
13935
13992
  {
13936
13993
  stroke: color,
@@ -13942,14 +13999,14 @@ function LegendDot({
13942
13999
  y2: "5"
13943
14000
  }
13944
14001
  ) }),
13945
- /* @__PURE__ */ jsx66(Text50, { muted: true, size: 1, children: label })
14002
+ /* @__PURE__ */ jsx67(Text50, { muted: true, size: 1, children: label })
13946
14003
  ] });
13947
14004
  }
13948
14005
  function Tooltip13({ active, chartWidth }) {
13949
14006
  const cssX = active.x;
13950
14007
  const isRightEdge = cssX > chartWidth - 220;
13951
14008
  const left = isRightEdge ? cssX - 220 : cssX + 12;
13952
- return /* @__PURE__ */ jsx66(
14009
+ return /* @__PURE__ */ jsx67(
13953
14010
  Box34,
13954
14011
  {
13955
14012
  style: {
@@ -13966,9 +14023,9 @@ function Tooltip13({ active, chartWidth }) {
13966
14023
  top: 8
13967
14024
  },
13968
14025
  children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13969
- /* @__PURE__ */ jsx66(Text50, { size: 1, weight: "semibold", children: formatDateTime(active.date) }),
14026
+ /* @__PURE__ */ jsx67(Text50, { size: 1, weight: "semibold", children: formatDateTime(active.date) }),
13970
14027
  /* @__PURE__ */ jsxs50(Flex36, { gap: 2, align: "center", children: [
13971
- /* @__PURE__ */ jsx66(
14028
+ /* @__PURE__ */ jsx67(
13972
14029
  Box34,
13973
14030
  {
13974
14031
  style: {
@@ -13979,14 +14036,14 @@ function Tooltip13({ active, chartWidth }) {
13979
14036
  }
13980
14037
  }
13981
14038
  ),
13982
- /* @__PURE__ */ jsx66(Text50, { size: 2, weight: "bold", children: Math.round(active.score) }),
14039
+ /* @__PURE__ */ jsx67(Text50, { size: 2, weight: "bold", children: Math.round(active.score) }),
13983
14040
  active.count > 1 ? /* @__PURE__ */ jsxs50(Text50, { muted: true, size: 1, children: [
13984
14041
  "avg of ",
13985
14042
  active.count,
13986
14043
  " reports"
13987
14044
  ] }) : null
13988
14045
  ] }),
13989
- active.source.title ? /* @__PURE__ */ jsx66(Text50, { size: 1, children: active.source.title }) : null,
14046
+ active.source.title ? /* @__PURE__ */ jsx67(Text50, { size: 1, children: active.source.title }) : null,
13990
14047
  /* @__PURE__ */ jsxs50(Text50, { muted: true, size: 1, children: [
13991
14048
  active.source.mode,
13992
14049
  active.source.source ? ` \xB7 ${active.source.source}` : ""
@@ -14007,14 +14064,14 @@ import {
14007
14064
  LinkIcon as LinkIcon4,
14008
14065
  RefreshIcon
14009
14066
  } from "@sanity/icons";
14010
- import { Box as Box35, Button as Button14, Inline as Inline3, MenuDivider as MenuDivider4, MenuItem as MenuItem10 } from "@sanity/ui";
14011
- import { useCallback as useCallback39 } from "react";
14067
+ import { Box as Box35, Button as Button14, Inline as Inline3, MenuDivider as MenuDivider4, MenuItem as MenuItem11 } from "@sanity/ui";
14068
+ import { useCallback as useCallback40 } from "react";
14012
14069
 
14013
14070
  // src/components/timeline/SelectChip.tsx
14014
14071
  import { ChevronDownIcon as ChevronDownIcon5 } from "@sanity/icons";
14015
- import { Button as Button13, Menu as Menu3, MenuButton as MenuButton3, MenuItem as MenuItem9 } from "@sanity/ui";
14072
+ import { Button as Button13, Menu as Menu3, MenuButton as MenuButton3, MenuItem as MenuItem10 } from "@sanity/ui";
14016
14073
  import { useId as useId2 } from "react";
14017
- import { jsx as jsx67 } from "react/jsx-runtime";
14074
+ import { jsx as jsx68 } from "react/jsx-runtime";
14018
14075
  function SelectChip({
14019
14076
  defaultValue,
14020
14077
  label,
@@ -14026,10 +14083,10 @@ function SelectChip({
14026
14083
  const current = options.find((o) => o.value === value);
14027
14084
  const displayValue = current?.label ?? value;
14028
14085
  const isActive = defaultValue !== void 0 && value !== defaultValue;
14029
- return /* @__PURE__ */ jsx67(
14086
+ return /* @__PURE__ */ jsx68(
14030
14087
  MenuButton3,
14031
14088
  {
14032
- button: /* @__PURE__ */ jsx67(
14089
+ button: /* @__PURE__ */ jsx68(
14033
14090
  Button13,
14034
14091
  {
14035
14092
  fontSize: 1,
@@ -14042,8 +14099,8 @@ function SelectChip({
14042
14099
  }
14043
14100
  ),
14044
14101
  id: menuId,
14045
- menu: /* @__PURE__ */ jsx67(Menu3, { style: { minWidth: 160 }, children: options.map((opt) => /* @__PURE__ */ jsx67(
14046
- MenuItem9,
14102
+ menu: /* @__PURE__ */ jsx68(Menu3, { style: { minWidth: 160 }, children: options.map((opt) => /* @__PURE__ */ jsx68(
14103
+ MenuItem10,
14047
14104
  {
14048
14105
  onClick: () => onChange(opt.value),
14049
14106
  selected: value === opt.value,
@@ -14062,7 +14119,7 @@ function SelectChip({
14062
14119
  }
14063
14120
 
14064
14121
  // src/components/timeline/TimelineFilters.tsx
14065
- import { Fragment as Fragment15, jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
14122
+ import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs51 } from "react/jsx-runtime";
14066
14123
  var BAR_STYLE2 = {
14067
14124
  alignItems: "center",
14068
14125
  background: "var(--card-bg-color)",
@@ -14099,11 +14156,11 @@ function TimelineFilters(props) {
14099
14156
  source,
14100
14157
  sourceOptions
14101
14158
  } = props;
14102
- const handleMaToggle = useCallback39(() => {
14159
+ const handleMaToggle = useCallback40(() => {
14103
14160
  onShowMovingAverageChange(!showMovingAverage);
14104
14161
  }, [onShowMovingAverageChange, showMovingAverage]);
14105
14162
  return /* @__PURE__ */ jsxs51("div", { style: BAR_STYLE2, children: [
14106
- /* @__PURE__ */ jsx68(
14163
+ /* @__PURE__ */ jsx69(
14107
14164
  SelectChip,
14108
14165
  {
14109
14166
  defaultValue: DEFAULT_RANGE,
@@ -14113,7 +14170,7 @@ function TimelineFilters(props) {
14113
14170
  value: range
14114
14171
  }
14115
14172
  ),
14116
- /* @__PURE__ */ jsx68(
14173
+ /* @__PURE__ */ jsx69(
14117
14174
  SelectChip,
14118
14175
  {
14119
14176
  defaultValue: DEFAULT_GRANULARITY,
@@ -14123,7 +14180,7 @@ function TimelineFilters(props) {
14123
14180
  value: granularity
14124
14181
  }
14125
14182
  ),
14126
- areaOptions.length > 0 && /* @__PURE__ */ jsx68(
14183
+ areaOptions.length > 0 && /* @__PURE__ */ jsx69(
14127
14184
  FilterChip,
14128
14185
  {
14129
14186
  label: "Area",
@@ -14133,7 +14190,7 @@ function TimelineFilters(props) {
14133
14190
  value: area
14134
14191
  }
14135
14192
  ),
14136
- modeOptions.length > 0 && /* @__PURE__ */ jsx68(
14193
+ modeOptions.length > 0 && /* @__PURE__ */ jsx69(
14137
14194
  FilterChip,
14138
14195
  {
14139
14196
  label: "Mode",
@@ -14142,7 +14199,7 @@ function TimelineFilters(props) {
14142
14199
  value: mode
14143
14200
  }
14144
14201
  ),
14145
- sourceOptions.length > 0 && /* @__PURE__ */ jsx68(
14202
+ sourceOptions.length > 0 && /* @__PURE__ */ jsx69(
14146
14203
  FilterChip,
14147
14204
  {
14148
14205
  label: "Source",
@@ -14151,7 +14208,7 @@ function TimelineFilters(props) {
14151
14208
  value: source
14152
14209
  }
14153
14210
  ),
14154
- ownerTeamOptions.length > 0 && /* @__PURE__ */ jsx68(
14211
+ ownerTeamOptions.length > 0 && /* @__PURE__ */ jsx69(
14155
14212
  FilterChip,
14156
14213
  {
14157
14214
  label: "Team",
@@ -14161,9 +14218,9 @@ function TimelineFilters(props) {
14161
14218
  value: ownerTeam
14162
14219
  }
14163
14220
  ),
14164
- /* @__PURE__ */ jsx68(Box35, { style: { flex: "1 0 0px" } }),
14221
+ /* @__PURE__ */ jsx69(Box35, { style: { flex: "1 0 0px" } }),
14165
14222
  /* @__PURE__ */ jsxs51(Inline3, { space: 1, children: [
14166
- /* @__PURE__ */ jsx68(
14223
+ /* @__PURE__ */ jsx69(
14167
14224
  Button14,
14168
14225
  {
14169
14226
  fontSize: 1,
@@ -14175,7 +14232,7 @@ function TimelineFilters(props) {
14175
14232
  tone: showMovingAverage ? "primary" : "default"
14176
14233
  }
14177
14234
  ),
14178
- /* @__PURE__ */ jsx68(
14235
+ /* @__PURE__ */ jsx69(
14179
14236
  Button14,
14180
14237
  {
14181
14238
  fontSize: 1,
@@ -14188,22 +14245,22 @@ function TimelineFilters(props) {
14188
14245
  text: "Refresh"
14189
14246
  }
14190
14247
  ),
14191
- /* @__PURE__ */ jsx68(
14248
+ /* @__PURE__ */ jsx69(
14192
14249
  SplitActionButton,
14193
14250
  {
14194
14251
  menuId: "timeline-share-actions",
14195
14252
  menu: /* @__PURE__ */ jsxs51(Fragment15, { children: [
14196
- /* @__PURE__ */ jsx68(
14197
- MenuItem10,
14253
+ /* @__PURE__ */ jsx69(
14254
+ MenuItem11,
14198
14255
  {
14199
14256
  icon: ClipboardIcon2,
14200
14257
  onClick: onCopyCsv,
14201
14258
  text: "Copy CSV to clipboard"
14202
14259
  }
14203
14260
  ),
14204
- /* @__PURE__ */ jsx68(MenuDivider4, {}),
14205
- /* @__PURE__ */ jsx68(
14206
- MenuItem10,
14261
+ /* @__PURE__ */ jsx69(MenuDivider4, {}),
14262
+ /* @__PURE__ */ jsx69(
14263
+ MenuItem11,
14207
14264
  {
14208
14265
  icon: DownloadIcon2,
14209
14266
  onClick: onExportCsv,
@@ -14226,12 +14283,12 @@ function TimelineFilters(props) {
14226
14283
 
14227
14284
  // src/components/timeline/TimelineSummary.tsx
14228
14285
  import { Badge as Badge13, Box as Box36, Card as Card24, Flex as Flex37, Grid as Grid7, Stack as Stack40, Text as Text51 } from "@sanity/ui";
14229
- import { jsx as jsx69, jsxs as jsxs52 } from "react/jsx-runtime";
14286
+ import { jsx as jsx70, jsxs as jsxs52 } from "react/jsx-runtime";
14230
14287
  function TimelineSummary({ area, stats }) {
14231
14288
  if (stats.count === 0) return null;
14232
- return /* @__PURE__ */ jsx69(Card24, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs52(Stack40, { space: 3, children: [
14289
+ return /* @__PURE__ */ jsx70(Card24, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs52(Stack40, { space: 3, children: [
14233
14290
  /* @__PURE__ */ jsxs52(Flex37, { align: "center", gap: 2, children: [
14234
- /* @__PURE__ */ jsx69(Text51, { size: 1, weight: "semibold", children: "Summary" }),
14291
+ /* @__PURE__ */ jsx70(Text51, { size: 1, weight: "semibold", children: "Summary" }),
14235
14292
  /* @__PURE__ */ jsxs52(Text51, { muted: true, size: 1, children: [
14236
14293
  area ? `Area: ${area}` : "Overall score",
14237
14294
  " \xB7 ",
@@ -14239,11 +14296,11 @@ function TimelineSummary({ area, stats }) {
14239
14296
  " report",
14240
14297
  stats.count === 1 ? "" : "s"
14241
14298
  ] }),
14242
- /* @__PURE__ */ jsx69(Box36, { flex: 1 }),
14243
- /* @__PURE__ */ jsx69(TrendPill, { stats })
14299
+ /* @__PURE__ */ jsx70(Box36, { flex: 1 }),
14300
+ /* @__PURE__ */ jsx70(TrendPill, { stats })
14244
14301
  ] }),
14245
14302
  /* @__PURE__ */ jsxs52(Grid7, { columns: [2, 2, 4], gap: 3, children: [
14246
- /* @__PURE__ */ jsx69(
14303
+ /* @__PURE__ */ jsx70(
14247
14304
  StatTile,
14248
14305
  {
14249
14306
  label: "Mean",
@@ -14251,8 +14308,8 @@ function TimelineSummary({ area, stats }) {
14251
14308
  sub: stats.stdev !== null ? `\xB1 ${stats.stdev.toFixed(1)} stdev` : null
14252
14309
  }
14253
14310
  ),
14254
- /* @__PURE__ */ jsx69(StatTile, { label: "Median", score: stats.median, sub: null }),
14255
- /* @__PURE__ */ jsx69(
14311
+ /* @__PURE__ */ jsx70(StatTile, { label: "Median", score: stats.median, sub: null }),
14312
+ /* @__PURE__ */ jsx70(
14256
14313
  StatTile,
14257
14314
  {
14258
14315
  label: "Best",
@@ -14260,7 +14317,7 @@ function TimelineSummary({ area, stats }) {
14260
14317
  sub: stats.max ? formatDateShort(stats.max.date) : null
14261
14318
  }
14262
14319
  ),
14263
- /* @__PURE__ */ jsx69(
14320
+ /* @__PURE__ */ jsx70(
14264
14321
  StatTile,
14265
14322
  {
14266
14323
  label: "Worst",
@@ -14273,10 +14330,10 @@ function TimelineSummary({ area, stats }) {
14273
14330
  }
14274
14331
  function TrendPill({ stats }) {
14275
14332
  if (stats.delta === null || stats.count < 2) {
14276
- return /* @__PURE__ */ jsx69(Badge13, { fontSize: 1, mode: "outline", tone: "default", children: "Single data point" });
14333
+ return /* @__PURE__ */ jsx70(Badge13, { fontSize: 1, mode: "outline", tone: "default", children: "Single data point" });
14277
14334
  }
14278
14335
  const { label, tone } = trendBadgeContent(stats.trend, stats.delta);
14279
- return /* @__PURE__ */ jsx69(Badge13, { fontSize: 1, mode: "default", tone, children: label });
14336
+ return /* @__PURE__ */ jsx70(Badge13, { fontSize: 1, mode: "default", tone, children: label });
14280
14337
  }
14281
14338
  function trendBadgeContent(trend, delta) {
14282
14339
  switch (trend) {
@@ -14294,14 +14351,14 @@ function StatTile({
14294
14351
  sub
14295
14352
  }) {
14296
14353
  return /* @__PURE__ */ jsxs52(Stack40, { space: 2, children: [
14297
- /* @__PURE__ */ jsx69(Text51, { muted: true, size: 1, weight: "medium", children: label }),
14298
- score === null ? /* @__PURE__ */ jsx69(Text51, { muted: true, size: 3, children: "\u2014" }) : /* @__PURE__ */ jsx69(Badge13, { fontSize: 2, mode: "default", tone: scoreTone(score), children: score.toFixed(1) }),
14299
- score !== null && sub ? /* @__PURE__ */ jsx69(Text51, { muted: true, size: 1, children: sub }) : null
14354
+ /* @__PURE__ */ jsx70(Text51, { muted: true, size: 1, weight: "medium", children: label }),
14355
+ score === null ? /* @__PURE__ */ jsx70(Text51, { muted: true, size: 3, children: "\u2014" }) : /* @__PURE__ */ jsx70(Badge13, { fontSize: 2, mode: "default", tone: scoreTone(score), children: score.toFixed(1) }),
14356
+ score !== null && sub ? /* @__PURE__ */ jsx70(Text51, { muted: true, size: 1, children: sub }) : null
14300
14357
  ] });
14301
14358
  }
14302
14359
 
14303
14360
  // src/components/timeline/useTimelineData.ts
14304
- import { useCallback as useCallback40, useEffect as useEffect17, useMemo as useMemo18, useState as useState31 } from "react";
14361
+ import { useCallback as useCallback41, useEffect as useEffect17, useMemo as useMemo18, useState as useState31 } from "react";
14305
14362
  import { useClient as useClient13 } from "sanity";
14306
14363
  function useTimelineData({
14307
14364
  mode,
@@ -14314,7 +14371,7 @@ function useTimelineData({
14314
14371
  const [loading, setLoading] = useState31(true);
14315
14372
  const [error, setError] = useState31(null);
14316
14373
  const [reloadCounter, setReloadCounter] = useState31(0);
14317
- const refresh = useCallback40(() => {
14374
+ const refresh = useCallback41(() => {
14318
14375
  setReloadCounter((n) => n + 1);
14319
14376
  }, []);
14320
14377
  const effectiveStart = useMemo18(
@@ -14356,7 +14413,7 @@ function useTimelineData({
14356
14413
  }
14357
14414
 
14358
14415
  // src/components/ScoreTimeline.tsx
14359
- import { Fragment as Fragment16, jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
14416
+ import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs53 } from "react/jsx-runtime";
14360
14417
  function buildSearchParams2(filters) {
14361
14418
  const params = [];
14362
14419
  if (filters.range !== DEFAULT_RANGE) params.push(["range", filters.range]);
@@ -14440,27 +14497,27 @@ function ScoreTimeline({
14440
14497
  [area, dataPoints, granularity]
14441
14498
  );
14442
14499
  const stats = useMemo19(() => computeStats(chartPoints, 5), [chartPoints]);
14443
- const handleSelectPoint = useCallback41(
14500
+ const handleSelectPoint = useCallback42(
14444
14501
  (point) => {
14445
14502
  const id = point.reportId ?? point._id;
14446
14503
  router.navigate({ reportId: id });
14447
14504
  },
14448
14505
  [router]
14449
14506
  );
14450
- const handleCopyUrl = useCallback41(() => {
14507
+ const handleCopyUrl = useCallback42(() => {
14451
14508
  if (typeof window === "undefined") return;
14452
14509
  void copyTextToClipboard(window.location.href);
14453
14510
  }, []);
14454
- const handleCopyCsv = useCallback41(() => {
14511
+ const handleCopyCsv = useCallback42(() => {
14455
14512
  void copyTextToClipboard(toCsv(dataPoints, area));
14456
14513
  }, [area, dataPoints]);
14457
- const handleExportCsv = useCallback41(() => {
14514
+ const handleExportCsv = useCallback42(() => {
14458
14515
  const csv = toCsv(dataPoints, area);
14459
14516
  const ts = (/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-").slice(0, 19);
14460
14517
  downloadCsv(csv, `score-timeline-${ts}.csv`);
14461
14518
  }, [area, dataPoints]);
14462
14519
  return /* @__PURE__ */ jsxs53(Stack41, { space: 4, children: [
14463
- /* @__PURE__ */ jsx70(
14520
+ /* @__PURE__ */ jsx71(
14464
14521
  TimelineFilters,
14465
14522
  {
14466
14523
  area,
@@ -14488,15 +14545,15 @@ function ScoreTimeline({
14488
14545
  sourceOptions
14489
14546
  }
14490
14547
  ),
14491
- error ? /* @__PURE__ */ jsx70(Card25, { padding: 4, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs53(Text52, { size: 2, children: [
14548
+ error ? /* @__PURE__ */ jsx71(Card25, { padding: 4, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs53(Text52, { size: 2, children: [
14492
14549
  "Failed to load timeline: ",
14493
14550
  error
14494
14551
  ] }) }) : null,
14495
- loading ? /* @__PURE__ */ jsx70(Card25, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs53(Flex38, { align: "center", gap: 2, justify: "center", style: { height: 220 }, children: [
14496
- /* @__PURE__ */ jsx70(Spinner, { muted: true }),
14497
- /* @__PURE__ */ jsx70(Text52, { muted: true, size: 2, children: "Loading timeline\u2026" })
14552
+ loading ? /* @__PURE__ */ jsx71(Card25, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs53(Flex38, { align: "center", gap: 2, justify: "center", style: { height: 220 }, children: [
14553
+ /* @__PURE__ */ jsx71(Spinner, { muted: true }),
14554
+ /* @__PURE__ */ jsx71(Text52, { muted: true, size: 2, children: "Loading timeline\u2026" })
14498
14555
  ] }) }) : /* @__PURE__ */ jsxs53(Fragment16, { children: [
14499
- /* @__PURE__ */ jsx70(
14556
+ /* @__PURE__ */ jsx71(
14500
14557
  TimelineChart,
14501
14558
  {
14502
14559
  movingAverage: stats.movingAverage,
@@ -14505,20 +14562,20 @@ function ScoreTimeline({
14505
14562
  showMovingAverage
14506
14563
  }
14507
14564
  ),
14508
- /* @__PURE__ */ jsx70(TimelineSummary, { area, stats })
14565
+ /* @__PURE__ */ jsx71(TimelineSummary, { area, stats })
14509
14566
  ] })
14510
14567
  ] });
14511
14568
  }
14512
14569
  var ScoreTimeline_default = ScoreTimeline;
14513
14570
 
14514
14571
  // src/components/Dashboard.tsx
14515
- import { jsx as jsx71, jsxs as jsxs54 } from "react/jsx-runtime";
14572
+ import { jsx as jsx72, jsxs as jsxs54 } from "react/jsx-runtime";
14516
14573
  var VIEW_PARAM_MAP = {
14517
14574
  compare: "compare",
14518
14575
  timeline: "timeline"
14519
14576
  };
14520
14577
  function Dashboard() {
14521
- return /* @__PURE__ */ jsx71(HelpProvider, { children: /* @__PURE__ */ jsx71(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx71(DashboardShell, {}) }) });
14578
+ return /* @__PURE__ */ jsx72(HelpProvider, { children: /* @__PURE__ */ jsx72(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx72(DashboardShell, {}) }) });
14522
14579
  }
14523
14580
  function DashboardShell() {
14524
14581
  const router = useRouter5();
@@ -14528,7 +14585,7 @@ function DashboardShell() {
14528
14585
  useEffect18(() => {
14529
14586
  if (!reportId) closeDrawer();
14530
14587
  }, [reportId, closeDrawer]);
14531
- const handleJudgmentDrawerClose = useCallback42(() => {
14588
+ const handleJudgmentDrawerClose = useCallback43(() => {
14532
14589
  closeDrawer();
14533
14590
  const state = { ...router.state };
14534
14591
  if (state.focus) {
@@ -14537,9 +14594,9 @@ function DashboardShell() {
14537
14594
  }
14538
14595
  }, [closeDrawer, router]);
14539
14596
  return /* @__PURE__ */ jsxs54(Flex39, { style: { height: "100%" }, children: [
14540
- /* @__PURE__ */ jsx71(Box37, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx71(DashboardContent, {}) }),
14541
- /* @__PURE__ */ jsx71(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
14542
- /* @__PURE__ */ jsx71(HelpDrawer, {})
14597
+ /* @__PURE__ */ jsx72(Box37, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx72(DashboardContent, {}) }),
14598
+ /* @__PURE__ */ jsx72(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
14599
+ /* @__PURE__ */ jsx72(HelpDrawer, {})
14543
14600
  ] });
14544
14601
  }
14545
14602
  function DashboardContent() {
@@ -14550,7 +14607,7 @@ function DashboardContent() {
14550
14607
  const isDetail = reportId !== null;
14551
14608
  const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
14552
14609
  const defaultTopic = deriveHelpTopic(routerState);
14553
- const navigateToTab = useCallback42(
14610
+ const navigateToTab = useCallback43(
14554
14611
  (tab) => {
14555
14612
  if (tab === "latest") {
14556
14613
  router.navigate({});
@@ -14560,13 +14617,13 @@ function DashboardContent() {
14560
14617
  },
14561
14618
  [router]
14562
14619
  );
14563
- const handleSelectReport = useCallback42(
14620
+ const handleSelectReport = useCallback43(
14564
14621
  (id) => {
14565
14622
  router.navigate({ reportId: id });
14566
14623
  },
14567
14624
  [router]
14568
14625
  );
14569
- const handleTabChange = useCallback42(
14626
+ const handleTabChange = useCallback43(
14570
14627
  (tab, subTab, focus) => {
14571
14628
  if (!routerState.reportId) return;
14572
14629
  const state = {
@@ -14579,19 +14636,19 @@ function DashboardContent() {
14579
14636
  },
14580
14637
  [router, routerState.reportId]
14581
14638
  );
14582
- const handleBack = useCallback42(() => {
14639
+ const handleBack = useCallback43(() => {
14583
14640
  router.navigate({});
14584
14641
  }, [router]);
14585
- const handleOpenHelp = useCallback42(() => {
14642
+ const handleOpenHelp = useCallback43(() => {
14586
14643
  openHelp(defaultTopic);
14587
14644
  }, [openHelp, defaultTopic]);
14588
- return /* @__PURE__ */ jsx71(Container, { width: 4, children: /* @__PURE__ */ jsxs54(Stack42, { padding: 4, space: 4, children: [
14645
+ return /* @__PURE__ */ jsx72(Container, { width: 4, children: /* @__PURE__ */ jsxs54(Stack42, { padding: 4, space: 4, children: [
14589
14646
  /* @__PURE__ */ jsxs54(Flex39, { align: "center", gap: 3, children: [
14590
14647
  /* @__PURE__ */ jsxs54(Stack42, { flex: 1, space: 1, children: [
14591
- /* @__PURE__ */ jsx71(Text53, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
14592
- /* @__PURE__ */ jsx71(Text53, { muted: true, size: 2, children: "Evaluation reports and score trends" })
14648
+ /* @__PURE__ */ jsx72(Text53, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
14649
+ /* @__PURE__ */ jsx72(Text53, { muted: true, size: 2, children: "Evaluation reports and score trends" })
14593
14650
  ] }),
14594
- /* @__PURE__ */ jsx71(
14651
+ /* @__PURE__ */ jsx72(
14595
14652
  Button15,
14596
14653
  {
14597
14654
  icon: HelpCircleIcon8,
@@ -14603,7 +14660,7 @@ function DashboardContent() {
14603
14660
  )
14604
14661
  ] }),
14605
14662
  !isDetail && /* @__PURE__ */ jsxs54(TabList3, { space: 1, children: [
14606
- /* @__PURE__ */ jsx71(
14663
+ /* @__PURE__ */ jsx72(
14607
14664
  Tab3,
14608
14665
  {
14609
14666
  "aria-controls": "latest-panel",
@@ -14613,7 +14670,7 @@ function DashboardContent() {
14613
14670
  selected: activeTab === "latest"
14614
14671
  }
14615
14672
  ),
14616
- /* @__PURE__ */ jsx71(
14673
+ /* @__PURE__ */ jsx72(
14617
14674
  Tab3,
14618
14675
  {
14619
14676
  "aria-controls": "timeline-panel",
@@ -14623,7 +14680,7 @@ function DashboardContent() {
14623
14680
  selected: activeTab === "timeline"
14624
14681
  }
14625
14682
  ),
14626
- /* @__PURE__ */ jsx71(
14683
+ /* @__PURE__ */ jsx72(
14627
14684
  Tab3,
14628
14685
  {
14629
14686
  "aria-controls": "compare-panel",
@@ -14634,10 +14691,10 @@ function DashboardContent() {
14634
14691
  }
14635
14692
  )
14636
14693
  ] }),
14637
- !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx71(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx71(LatestReports, { onSelectReport: handleSelectReport }) }),
14638
- !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx71(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx71(ScoreTimeline_default, {}) }),
14639
- !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx71(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx71(ComparisonView, {}) }),
14640
- isDetail && reportId && /* @__PURE__ */ jsx71(
14694
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx72(LatestReports, { onSelectReport: handleSelectReport }) }),
14695
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx72(ScoreTimeline_default, {}) }),
14696
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx72(ComparisonView, {}) }),
14697
+ isDetail && reportId && /* @__PURE__ */ jsx72(
14641
14698
  ReportDetail,
14642
14699
  {
14643
14700
  activeTab: routerState.tab ?? null,
@@ -14705,7 +14762,7 @@ var ailfStructure = (S) => S.list().id("root").title("Content").items([
14705
14762
  // src/actions/RunEvaluationAction.tsx
14706
14763
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
14707
14764
  import { useToast as useToast10 } from "@sanity/ui";
14708
- import { useCallback as useCallback43, useEffect as useEffect19, useRef as useRef10, useState as useState33 } from "react";
14765
+ import { useCallback as useCallback44, useEffect as useEffect19, useRef as useRef10, useState as useState33 } from "react";
14709
14766
  import {
14710
14767
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
14711
14768
  useClient as useClient14,
@@ -14832,7 +14889,7 @@ function createRunEvaluationAction(options = {}) {
14832
14889
  }, 15e3);
14833
14890
  return () => clearTimeout(timer);
14834
14891
  }, [client, perspectiveId, state]);
14835
- const handleRequest = useCallback43(async () => {
14892
+ const handleRequest = useCallback44(async () => {
14836
14893
  const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
14837
14894
  const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
14838
14895
  const now = Date.now();