@sanity/ailf-studio 1.13.0 → 1.15.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +19 -12
  2. package/dist/index.js +416 -334
  3. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -11,6 +11,9 @@ import { useClient } from "sanity";
11
11
  var API_VERSION = "2026-03-11";
12
12
  var isProduction = process.env.NODE_ENV === "production";
13
13
  var ARTIFACT_API_BASE_URL = isProduction ? "https://ailf-api.sanity.build/v1" : "http://localhost:3000/v1";
14
+ var ENV = globalThis.process?.env ?? {};
15
+ var REFERENCE_DATASET = ENV.SANITY_STUDIO_AILF_REF_DATASET ?? "next";
16
+ var REFERENCE_WORKSPACE = ENV.SANITY_STUDIO_AILF_REF_WORKSPACE ?? "editorial";
14
17
 
15
18
  // src/actions/ArchiveTaskAction.tsx
16
19
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -2634,6 +2637,11 @@ function ReleasePicker(props) {
2634
2637
  }
2635
2638
 
2636
2639
  // src/schema/task.ts
2640
+ function articleStudioUrl(document2) {
2641
+ const origin = typeof window !== "undefined" && window.location?.origin ? window.location.origin : "";
2642
+ const typePart = document2.type ? `;type=${document2.type}` : "";
2643
+ return `${origin}/${REFERENCE_WORKSPACE}/intent/edit/id=${document2.id}${typePart}/`;
2644
+ }
2637
2645
  var ASSERTION_TYPES = [
2638
2646
  { title: "LLM Rubric", value: "llm-rubric" },
2639
2647
  { title: "Contains", value: "contains" },
@@ -2811,13 +2819,30 @@ var taskSchema = defineType5({
2811
2819
  validation: (rule) => rule.required()
2812
2820
  }),
2813
2821
  // --- Article reference (Document mode) ---
2822
+ // Cross-dataset reference — `ailf.task` lives in the AILF private
2823
+ // dataset; `article` lives in the editorial dataset (REFERENCE_DATASET,
2824
+ // default `next`). See D0043.
2825
+ //
2826
+ // `weak: true` keeps AILF tasks publishable when the referenced
2827
+ // editorial article is retired or deleted — AILF's lifecycle is
2828
+ // independent of editorial content (D0043, spike Finding 16).
2814
2829
  defineField5({
2830
+ dataset: REFERENCE_DATASET,
2815
2831
  description: "The article this canonical doc entry points to. The pipeline resolves the slug, path, and _id from this reference.",
2816
2832
  hidden: ({ parent }) => parent?.refType === "perspective",
2817
2833
  name: "doc",
2834
+ studioUrl: articleStudioUrl,
2818
2835
  title: "Document",
2819
- to: [{ type: "article" }],
2820
- type: "reference"
2836
+ to: [
2837
+ {
2838
+ preview: {
2839
+ select: { subtitle: "slug.current", title: "title" }
2840
+ },
2841
+ type: "article"
2842
+ }
2843
+ ],
2844
+ type: "crossDatasetReference",
2845
+ weak: true
2821
2846
  }),
2822
2847
  // --- Path (hidden — only populated by mirrored YAML tasks) ---
2823
2848
  defineField5({
@@ -3544,7 +3569,7 @@ import {
3544
3569
  TabPanel as TabPanel3,
3545
3570
  Text as Text53
3546
3571
  } from "@sanity/ui";
3547
- import { useCallback as useCallback42, useEffect as useEffect18 } from "react";
3572
+ import { useCallback as useCallback43, useEffect as useEffect18 } from "react";
3548
3573
  import { useRouter as useRouter5 } from "sanity/router";
3549
3574
 
3550
3575
  // src/lib/help-context.ts
@@ -6781,7 +6806,7 @@ import {
6781
6806
  Tooltip as Tooltip10
6782
6807
  } from "@sanity/ui";
6783
6808
  import {
6784
- useCallback as useCallback36,
6809
+ useCallback as useCallback37,
6785
6810
  useEffect as useEffect13,
6786
6811
  useMemo as useMemo16,
6787
6812
  useState as useState27
@@ -10736,7 +10761,7 @@ function JudgmentActions({ onShowPrompts } = {}) {
10736
10761
  // src/components/report-detail/report-actions/ReportActions.tsx
10737
10762
  import { CopyIcon as CopyIcon3 } from "@sanity/icons";
10738
10763
  import { MenuDivider as MenuDivider3, useToast as useToast9 } from "@sanity/ui";
10739
- import { useCallback as useCallback32, useState as useState24 } from "react";
10764
+ import { useCallback as useCallback33, useState as useState24 } from "react";
10740
10765
  import { useClient as useClient11 } from "sanity";
10741
10766
 
10742
10767
  // src/components/report-detail/report-actions/CopyReportAction.tsx
@@ -11090,9 +11115,62 @@ function RerunEvaluationAction({
11090
11115
  );
11091
11116
  }
11092
11117
 
11118
+ // src/components/report-detail/report-actions/ViewArtifactsAction.tsx
11119
+ import { LaunchIcon } from "@sanity/icons";
11120
+ import { MenuItem as MenuItem9 } from "@sanity/ui";
11121
+ import { useCallback as useCallback32 } from "react";
11122
+ import { jsx as jsx50 } from "react/jsx-runtime";
11123
+ function commonPathPrefix(paths) {
11124
+ if (paths.length === 0) return "";
11125
+ const segmented = paths.map((p) => p.split("/").filter(Boolean));
11126
+ if (segmented.length === 1) {
11127
+ const segs = segmented[0];
11128
+ const last = segs.at(-1) ?? "";
11129
+ return (last.includes(".") ? segs.slice(0, -1) : segs).join("/");
11130
+ }
11131
+ const min = Math.min(...segmented.map((s) => s.length));
11132
+ const common = [];
11133
+ for (let i = 0; i < min; i++) {
11134
+ const seg = segmented[0][i];
11135
+ if (segmented.every((s) => s[i] === seg)) common.push(seg);
11136
+ else break;
11137
+ }
11138
+ return common.join("/");
11139
+ }
11140
+ function buildArtifactBrowseUrl(manifest) {
11141
+ if (!manifest) return null;
11142
+ const refs = Object.values(manifest).filter(
11143
+ (ref) => ref?.store === "gcs" && Boolean(ref.bucket)
11144
+ );
11145
+ if (refs.length === 0) return null;
11146
+ const owned = refs.filter((r) => !r.sourceRunId);
11147
+ const usable = owned.length > 0 ? owned : refs;
11148
+ const bucket = usable[0].bucket;
11149
+ const sameBucket = usable.filter((r) => r.bucket === bucket);
11150
+ const prefix = commonPathPrefix(sameBucket.map((r) => r.path));
11151
+ const base = `https://console.cloud.google.com/storage/browser/${encodeURIComponent(bucket)}`;
11152
+ return prefix ? `${base}/${prefix.split("/").map(encodeURIComponent).join("/")}` : base;
11153
+ }
11154
+ function ViewArtifactsAction({ manifest }) {
11155
+ const url = buildArtifactBrowseUrl(manifest);
11156
+ const handleClick = useCallback32(() => {
11157
+ if (url) window.open(url, "_blank", "noopener,noreferrer");
11158
+ }, [url]);
11159
+ if (!url) return null;
11160
+ return /* @__PURE__ */ jsx50(
11161
+ MenuItem9,
11162
+ {
11163
+ icon: LaunchIcon,
11164
+ onClick: handleClick,
11165
+ text: "View run artifacts"
11166
+ }
11167
+ );
11168
+ }
11169
+
11093
11170
  // src/components/report-detail/report-actions/ReportActions.tsx
11094
- import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
11171
+ import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
11095
11172
  function ReportActions({
11173
+ artifactManifest,
11096
11174
  documentId,
11097
11175
  onDeleted,
11098
11176
  provenance,
@@ -11100,7 +11178,7 @@ function ReportActions({
11100
11178
  }) {
11101
11179
  const client = useClient11({ apiVersion: API_VERSION });
11102
11180
  const toast = useToast9();
11103
- const handleCopyId = useCallback32(() => {
11181
+ const handleCopyId = useCallback33(() => {
11104
11182
  navigator.clipboard.writeText(reportId).then(
11105
11183
  () => {
11106
11184
  toast.push({
@@ -11120,13 +11198,13 @@ function ReportActions({
11120
11198
  }, [reportId, toast]);
11121
11199
  const [deleteDialogOpen, setDeleteDialogOpen] = useState24(false);
11122
11200
  const [deleting, setDeleting] = useState24(false);
11123
- const handleRequestDelete = useCallback32(() => {
11201
+ const handleRequestDelete = useCallback33(() => {
11124
11202
  setDeleteDialogOpen(true);
11125
11203
  }, []);
11126
- const handleDeleteClose = useCallback32(() => {
11204
+ const handleDeleteClose = useCallback33(() => {
11127
11205
  if (!deleting) setDeleteDialogOpen(false);
11128
11206
  }, [deleting]);
11129
- const handleDeleteConfirm = useCallback32(async () => {
11207
+ const handleDeleteConfirm = useCallback33(async () => {
11130
11208
  setDeleting(true);
11131
11209
  try {
11132
11210
  await client.delete(documentId);
@@ -11148,24 +11226,25 @@ function ReportActions({
11148
11226
  }
11149
11227
  }, [client, documentId, onDeleted, toast]);
11150
11228
  return /* @__PURE__ */ jsxs35(Fragment13, { children: [
11151
- /* @__PURE__ */ jsx50(
11229
+ /* @__PURE__ */ jsx51(
11152
11230
  SplitActionButton,
11153
11231
  {
11154
11232
  menu: /* @__PURE__ */ jsxs35(Fragment13, { children: [
11155
- /* @__PURE__ */ jsx50(CopyReportIdAction, { reportId }),
11156
- /* @__PURE__ */ jsx50(
11233
+ /* @__PURE__ */ jsx51(CopyReportIdAction, { reportId }),
11234
+ /* @__PURE__ */ jsx51(
11157
11235
  RerunEvaluationAction,
11158
11236
  {
11159
11237
  provenance,
11160
11238
  reportId
11161
11239
  }
11162
11240
  ),
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 })
11241
+ /* @__PURE__ */ jsx51(MenuDivider3, {}),
11242
+ /* @__PURE__ */ jsx51(DownloadReportAction, { documentId, reportId }),
11243
+ /* @__PURE__ */ jsx51(ViewArtifactsAction, { manifest: artifactManifest }),
11244
+ /* @__PURE__ */ jsx51(CopyReportAction, { documentId }),
11245
+ /* @__PURE__ */ jsx51(CopyVisionQueryAction, { reportId }),
11246
+ /* @__PURE__ */ jsx51(MenuDivider3, {}),
11247
+ /* @__PURE__ */ jsx51(DeleteReportAction, { onRequestDelete: handleRequestDelete })
11169
11248
  ] }),
11170
11249
  menuId: "report-actions-menu",
11171
11250
  primary: {
@@ -11175,7 +11254,7 @@ function ReportActions({
11175
11254
  }
11176
11255
  }
11177
11256
  ),
11178
- deleteDialogOpen && /* @__PURE__ */ jsx50(
11257
+ deleteDialogOpen && /* @__PURE__ */ jsx51(
11179
11258
  DeleteConfirmDialog,
11180
11259
  {
11181
11260
  isDeleting: deleting,
@@ -11190,7 +11269,7 @@ function ReportActions({
11190
11269
  // src/components/report-detail/ReportHeader.tsx
11191
11270
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
11192
11271
  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";
11272
+ import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
11194
11273
  function ReportHeader({
11195
11274
  completedAt,
11196
11275
  onBack,
@@ -11201,10 +11280,10 @@ function ReportHeader({
11201
11280
  const displayTitle = title ?? tag ?? dateLabel;
11202
11281
  const hasSubtitle = Boolean(title ?? tag);
11203
11282
  return /* @__PURE__ */ jsxs36(Flex25, { align: "center", gap: 3, children: [
11204
- /* @__PURE__ */ jsx51(Button10, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
11283
+ /* @__PURE__ */ jsx52(Button10, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
11205
11284
  /* @__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 })
11285
+ /* @__PURE__ */ jsx52(Text37, { size: 4, weight: "bold", children: displayTitle }),
11286
+ hasSubtitle && /* @__PURE__ */ jsx52(Text37, { muted: true, size: 2, children: dateLabel })
11208
11287
  ] })
11209
11288
  ] });
11210
11289
  }
@@ -11216,13 +11295,13 @@ import { Box as Box27, Flex as Flex28, Stack as Stack30, Text as Text40 } from "
11216
11295
 
11217
11296
  // src/components/report-detail/AreaScoresGrid.tsx
11218
11297
  import React3, {
11219
- useCallback as useCallback33,
11298
+ useCallback as useCallback34,
11220
11299
  useMemo as useMemo13,
11221
11300
  useState as useState25
11222
11301
  } from "react";
11223
11302
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
11224
11303
  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";
11304
+ import { Fragment as Fragment14, jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
11226
11305
  var DIMENSION_TOOLTIPS2 = {
11227
11306
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
11228
11307
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -11270,7 +11349,7 @@ function AreaScoresGrid({
11270
11349
  const dimKeys = useMemo13(() => collectDimensionKeys(scores), [scores]);
11271
11350
  const [sortField, setSortField] = useState25("score");
11272
11351
  const [sortDir, setSortDir] = useState25("desc");
11273
- const handleSort = useCallback33(
11352
+ const handleSort = useCallback34(
11274
11353
  (field) => {
11275
11354
  if (field === sortField) {
11276
11355
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -11331,7 +11410,7 @@ function AreaScoresGrid({
11331
11410
  padding: "12px 16px 8px"
11332
11411
  },
11333
11412
  children: [
11334
- /* @__PURE__ */ jsx52(
11413
+ /* @__PURE__ */ jsx53(
11335
11414
  ColHeader2,
11336
11415
  {
11337
11416
  active: sortField === "score",
@@ -11341,7 +11420,7 @@ function AreaScoresGrid({
11341
11420
  tooltip: GLOSSARY.score
11342
11421
  }
11343
11422
  ),
11344
- /* @__PURE__ */ jsx52(
11423
+ /* @__PURE__ */ jsx53(
11345
11424
  ColHeader2,
11346
11425
  {
11347
11426
  active: sortField === "area",
@@ -11350,7 +11429,7 @@ function AreaScoresGrid({
11350
11429
  onClick: () => handleSort("area")
11351
11430
  }
11352
11431
  ),
11353
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11432
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11354
11433
  ColHeader2,
11355
11434
  {
11356
11435
  active: sortField === key,
@@ -11361,7 +11440,7 @@ function AreaScoresGrid({
11361
11440
  },
11362
11441
  key
11363
11442
  )),
11364
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx52(
11443
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx53(
11365
11444
  ColHeader2,
11366
11445
  {
11367
11446
  active: sortField === "lift",
@@ -11371,23 +11450,23 @@ function AreaScoresGrid({
11371
11450
  tooltip: GLOSSARY.docLift
11372
11451
  }
11373
11452
  ),
11374
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
11453
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
11375
11454
  ]
11376
11455
  }
11377
11456
  ),
11378
11457
  sorted.map((area) => /* @__PURE__ */ jsxs37(React3.Fragment, { children: [
11379
- /* @__PURE__ */ jsx52(
11458
+ /* @__PURE__ */ jsx53(
11380
11459
  AreaRow,
11381
11460
  {
11382
11461
  area,
11383
- delta: perArea?.[area.feature],
11462
+ delta: perArea?.find((p) => p.area === area.feature)?.delta,
11384
11463
  dimKeys,
11385
11464
  hasActual,
11386
11465
  showLift,
11387
11466
  tier
11388
11467
  }
11389
11468
  ),
11390
- modelScoresByFeature && /* @__PURE__ */ jsx52(
11469
+ modelScoresByFeature && /* @__PURE__ */ jsx53(
11391
11470
  ModelSubRows,
11392
11471
  {
11393
11472
  dimKeys,
@@ -11408,7 +11487,7 @@ function ModelSubRows({
11408
11487
  tier
11409
11488
  }) {
11410
11489
  if (!models || models.length === 0) return null;
11411
- return /* @__PURE__ */ jsx52(Fragment14, { children: models.map((entry) => /* @__PURE__ */ jsx52(
11490
+ return /* @__PURE__ */ jsx53(Fragment14, { children: models.map((entry) => /* @__PURE__ */ jsx53(
11412
11491
  ModelRow2,
11413
11492
  {
11414
11493
  dimKeys,
@@ -11448,7 +11527,7 @@ function ModelRow2({
11448
11527
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
11449
11528
  },
11450
11529
  children: [
11451
- /* @__PURE__ */ jsx52(Flex26, { align: "center", children: /* @__PURE__ */ jsx52(
11530
+ /* @__PURE__ */ jsx53(Flex26, { align: "center", children: /* @__PURE__ */ jsx53(
11452
11531
  Text38,
11453
11532
  {
11454
11533
  size: 1,
@@ -11460,8 +11539,8 @@ function ModelRow2({
11460
11539
  children: Math.round(scores.totalScore)
11461
11540
  }
11462
11541
  ) }),
11463
- /* @__PURE__ */ jsx52(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx52(Text38, { muted: true, size: 1, children: label }) }),
11464
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11542
+ /* @__PURE__ */ jsx53(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx53(Text38, { muted: true, size: 1, children: label }) }),
11543
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11465
11544
  DimCell,
11466
11545
  {
11467
11546
  area: label,
@@ -11486,7 +11565,7 @@ function ModelRow2({
11486
11565
  ]
11487
11566
  }
11488
11567
  ),
11489
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(
11568
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(
11490
11569
  Text38,
11491
11570
  {
11492
11571
  size: 1,
@@ -11529,14 +11608,14 @@ function AreaRow({
11529
11608
  },
11530
11609
  children: [
11531
11610
  /* @__PURE__ */ jsxs37(Flex26, { align: "center", gap: isNarrow ? 0 : 2, children: [
11532
- /* @__PURE__ */ jsx52(
11611
+ /* @__PURE__ */ jsx53(
11533
11612
  HoverTip,
11534
11613
  {
11535
11614
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11536
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area.feature }),
11615
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area.feature }),
11537
11616
  " score:",
11538
11617
  " ",
11539
- /* @__PURE__ */ jsx52(
11618
+ /* @__PURE__ */ jsx53(
11540
11619
  "span",
11541
11620
  {
11542
11621
  style: {
@@ -11547,12 +11626,12 @@ function AreaRow({
11547
11626
  children: Math.round(area.totalScore)
11548
11627
  }
11549
11628
  ),
11550
- /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11629
+ /* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11551
11630
  ".",
11552
11631
  " ",
11553
11632
  GLOSSARY.score
11554
11633
  ] }),
11555
- children: /* @__PURE__ */ jsx52(
11634
+ children: /* @__PURE__ */ jsx53(
11556
11635
  "div",
11557
11636
  {
11558
11637
  style: {
@@ -11573,11 +11652,11 @@ function AreaRow({
11573
11652
  )
11574
11653
  }
11575
11654
  ),
11576
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx52(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx52(DeltaIndicator, { delta, icon: true, size: 1 }) })
11655
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx53(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx53(DeltaIndicator, { delta, icon: true, size: 1 }) })
11577
11656
  ] }),
11578
11657
  /* @__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(
11658
+ /* @__PURE__ */ jsx53(Text38, { size: 2, weight: "medium", children: area.feature }),
11659
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx53(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx53(
11581
11660
  "span",
11582
11661
  {
11583
11662
  style: {
@@ -11590,11 +11669,11 @@ function AreaRow({
11590
11669
  gap: 3,
11591
11670
  padding: "1px 5px"
11592
11671
  },
11593
- children: /* @__PURE__ */ jsx52(WarningOutlineIcon2, {})
11672
+ children: /* @__PURE__ */ jsx53(WarningOutlineIcon2, {})
11594
11673
  }
11595
11674
  ) })
11596
11675
  ] }),
11597
- dimKeys.map((key) => /* @__PURE__ */ jsx52(
11676
+ dimKeys.map((key) => /* @__PURE__ */ jsx53(
11598
11677
  DimCell,
11599
11678
  {
11600
11679
  area: area.feature,
@@ -11603,11 +11682,11 @@ function AreaRow({
11603
11682
  },
11604
11683
  key
11605
11684
  )),
11606
- !isNarrow && showLift && /* @__PURE__ */ jsx52(
11685
+ !isNarrow && showLift && /* @__PURE__ */ jsx53(
11607
11686
  HoverTip,
11608
11687
  {
11609
11688
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11610
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area.feature }),
11689
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area.feature }),
11611
11690
  " doc lift:",
11612
11691
  " ",
11613
11692
  /* @__PURE__ */ jsxs37(
@@ -11645,11 +11724,11 @@ function AreaRow({
11645
11724
  )
11646
11725
  }
11647
11726
  ),
11648
- tier === "full" && hasActual && /* @__PURE__ */ jsx52(
11727
+ tier === "full" && hasActual && /* @__PURE__ */ jsx53(
11649
11728
  HoverTip,
11650
11729
  {
11651
11730
  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(
11731
+ children: /* @__PURE__ */ jsx53(
11653
11732
  Text38,
11654
11733
  {
11655
11734
  size: 2,
@@ -11679,17 +11758,17 @@ function DimCell({
11679
11758
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
11680
11759
  const textSize = size === "small" ? 0 : 1;
11681
11760
  const barHeight = size === "small" ? 3 : 4;
11682
- return /* @__PURE__ */ jsx52(
11761
+ return /* @__PURE__ */ jsx53(
11683
11762
  HoverTip,
11684
11763
  {
11685
11764
  text: /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11686
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: area }),
11765
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: area }),
11687
11766
  " \u2192",
11688
11767
  " ",
11689
- /* @__PURE__ */ jsx52("span", { style: { fontWeight: 600 }, children: dim }),
11768
+ /* @__PURE__ */ jsx53("span", { style: { fontWeight: 600 }, children: dim }),
11690
11769
  ":",
11691
11770
  " ",
11692
- /* @__PURE__ */ jsx52(
11771
+ /* @__PURE__ */ jsx53(
11693
11772
  "span",
11694
11773
  {
11695
11774
  style: {
@@ -11700,13 +11779,13 @@ function DimCell({
11700
11779
  children: Math.round(value)
11701
11780
  }
11702
11781
  ),
11703
- /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11782
+ /* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11704
11783
  ".",
11705
11784
  " ",
11706
11785
  tooltip
11707
11786
  ] }),
11708
11787
  children: /* @__PURE__ */ jsxs37(Stack29, { space: 1, style: { width: "100%" }, children: [
11709
- /* @__PURE__ */ jsx52(
11788
+ /* @__PURE__ */ jsx53(
11710
11789
  Text38,
11711
11790
  {
11712
11791
  size: textSize,
@@ -11718,7 +11797,7 @@ function DimCell({
11718
11797
  children: Math.round(value)
11719
11798
  }
11720
11799
  ),
11721
- /* @__PURE__ */ jsx52(
11800
+ /* @__PURE__ */ jsx53(
11722
11801
  "div",
11723
11802
  {
11724
11803
  style: {
@@ -11728,7 +11807,7 @@ function DimCell({
11728
11807
  overflow: "hidden",
11729
11808
  width: "100%"
11730
11809
  },
11731
- children: /* @__PURE__ */ jsx52(
11810
+ children: /* @__PURE__ */ jsx53(
11732
11811
  "div",
11733
11812
  {
11734
11813
  style: {
@@ -11753,7 +11832,7 @@ function ColHeader2({
11753
11832
  onClick,
11754
11833
  tooltip
11755
11834
  }) {
11756
- const handleKeyDown = useCallback33(
11835
+ const handleKeyDown = useCallback34(
11757
11836
  (e) => {
11758
11837
  if (onClick && (e.key === "Enter" || e.key === " ")) {
11759
11838
  e.preventDefault();
@@ -11764,7 +11843,7 @@ function ColHeader2({
11764
11843
  );
11765
11844
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
11766
11845
  return /* @__PURE__ */ jsxs37(Flex26, { align: "center", gap: 1, children: [
11767
- /* @__PURE__ */ jsx52(
11846
+ /* @__PURE__ */ jsx53(
11768
11847
  "div",
11769
11848
  {
11770
11849
  onClick,
@@ -11793,14 +11872,14 @@ function ColHeader2({
11793
11872
  )
11794
11873
  }
11795
11874
  ),
11796
- tooltip && /* @__PURE__ */ jsx52(InfoTip, { text: tooltip })
11875
+ tooltip && /* @__PURE__ */ jsx53(InfoTip, { text: tooltip })
11797
11876
  ] });
11798
11877
  }
11799
11878
 
11800
11879
  // src/components/report-detail/ModelSelector.tsx
11801
- import { useCallback as useCallback34 } from "react";
11880
+ import { useCallback as useCallback35 } from "react";
11802
11881
  import { Flex as Flex27, Text as Text39 } from "@sanity/ui";
11803
- import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
11882
+ import { jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
11804
11883
  var pillBase = {
11805
11884
  borderColor: "var(--card-border-color)",
11806
11885
  borderRadius: 999,
@@ -11832,7 +11911,7 @@ function ModelSelector({
11832
11911
  onChange
11833
11912
  }) {
11834
11913
  return /* @__PURE__ */ jsxs38(Flex27, { align: "center", gap: 1, wrap: "wrap", children: [
11835
- /* @__PURE__ */ jsx53(
11914
+ /* @__PURE__ */ jsx54(
11836
11915
  Pill2,
11837
11916
  {
11838
11917
  isSelected: selection === null,
@@ -11840,7 +11919,7 @@ function ModelSelector({
11840
11919
  onClick: () => onChange(null)
11841
11920
  }
11842
11921
  ),
11843
- models.map((model) => /* @__PURE__ */ jsx53(
11922
+ models.map((model) => /* @__PURE__ */ jsx54(
11844
11923
  Pill2,
11845
11924
  {
11846
11925
  isSelected: selection === model.modelId,
@@ -11849,7 +11928,7 @@ function ModelSelector({
11849
11928
  },
11850
11929
  model.modelId
11851
11930
  )),
11852
- /* @__PURE__ */ jsx53(
11931
+ /* @__PURE__ */ jsx54(
11853
11932
  "div",
11854
11933
  {
11855
11934
  style: {
@@ -11860,7 +11939,7 @@ function ModelSelector({
11860
11939
  }
11861
11940
  }
11862
11941
  ),
11863
- /* @__PURE__ */ jsx53(
11942
+ /* @__PURE__ */ jsx54(
11864
11943
  Pill2,
11865
11944
  {
11866
11945
  isSelected: selection === "expanded",
@@ -11875,7 +11954,7 @@ function Pill2({
11875
11954
  label,
11876
11955
  onClick
11877
11956
  }) {
11878
- const handleKeyDown = useCallback34(
11957
+ const handleKeyDown = useCallback35(
11879
11958
  (e) => {
11880
11959
  if (e.key === "Enter" || e.key === " ") {
11881
11960
  e.preventDefault();
@@ -11884,7 +11963,7 @@ function Pill2({
11884
11963
  },
11885
11964
  [onClick]
11886
11965
  );
11887
- return /* @__PURE__ */ jsx53(
11966
+ return /* @__PURE__ */ jsx54(
11888
11967
  "span",
11889
11968
  {
11890
11969
  onClick,
@@ -11892,7 +11971,7 @@ function Pill2({
11892
11971
  role: "button",
11893
11972
  style: isSelected ? pillSelected : pillDefault,
11894
11973
  tabIndex: 0,
11895
- children: /* @__PURE__ */ jsx53(
11974
+ children: /* @__PURE__ */ jsx54(
11896
11975
  Text39,
11897
11976
  {
11898
11977
  size: 1,
@@ -11908,13 +11987,13 @@ function Pill2({
11908
11987
  }
11909
11988
 
11910
11989
  // src/components/report-detail/useModelSelection.ts
11911
- import { useCallback as useCallback35, useMemo as useMemo14, useState as useState26 } from "react";
11990
+ import { useCallback as useCallback36, useMemo as useMemo14, useState as useState26 } from "react";
11912
11991
  function useModelSelection({
11913
11992
  scores,
11914
11993
  perModel
11915
11994
  }) {
11916
11995
  const [selection, setSelection] = useState26(null);
11917
- const onSelectionChange = useCallback35((next) => {
11996
+ const onSelectionChange = useCallback36((next) => {
11918
11997
  setSelection(next);
11919
11998
  }, []);
11920
11999
  const isExpanded = selection === "expanded";
@@ -11936,7 +12015,7 @@ function useModelSelection({
11936
12015
  }
11937
12016
 
11938
12017
  // src/components/report-detail/StrengthsList.tsx
11939
- import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
12018
+ import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
11940
12019
  function StrengthsList({
11941
12020
  mode,
11942
12021
  scores,
@@ -11963,10 +12042,10 @@ function StrengthsList({
11963
12042
  return /* @__PURE__ */ jsxs39(Stack30, { space: 5, children: [
11964
12043
  /* @__PURE__ */ jsxs39(Stack30, { space: 3, children: [
11965
12044
  /* @__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(
12045
+ /* @__PURE__ */ jsx55(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
12046
+ /* @__PURE__ */ jsx55(Text40, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
12047
+ /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.strengths }),
12048
+ hasModels && /* @__PURE__ */ jsx55(Box27, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx55(
11970
12049
  ModelSelector,
11971
12050
  {
11972
12051
  models: perModel,
@@ -11975,7 +12054,7 @@ function StrengthsList({
11975
12054
  }
11976
12055
  ) })
11977
12056
  ] }),
11978
- /* @__PURE__ */ jsx54(
12057
+ /* @__PURE__ */ jsx55(
11979
12058
  AreaScoresGrid,
11980
12059
  {
11981
12060
  mode,
@@ -11986,23 +12065,23 @@ function StrengthsList({
11986
12065
  )
11987
12066
  ] }),
11988
12067
  retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs39(Box27, { style: neutralCardStyle, children: [
11989
- /* @__PURE__ */ jsx54(
12068
+ /* @__PURE__ */ jsx55(
11990
12069
  Box27,
11991
12070
  {
11992
12071
  padding: 4,
11993
12072
  style: { borderBottom: "1px solid var(--card-border-color)" },
11994
12073
  children: /* @__PURE__ */ jsxs39(Flex28, { align: "center", gap: 2, children: [
11995
- /* @__PURE__ */ jsx54(SearchIcon8, { style: { color: "#34d399" } }),
12074
+ /* @__PURE__ */ jsx55(SearchIcon8, { style: { color: "#34d399" } }),
11996
12075
  /* @__PURE__ */ jsxs39(Text40, { size: 2, weight: "medium", children: [
11997
12076
  "Retrieval Successes (",
11998
12077
  Math.round(EFFICIENCY_POSITIVE * 100),
11999
12078
  "%+ efficiency)"
12000
12079
  ] }),
12001
- /* @__PURE__ */ jsx54(InfoTip, { text: GLOSSARY.retrievalExcellence })
12080
+ /* @__PURE__ */ jsx55(InfoTip, { text: GLOSSARY.retrievalExcellence })
12002
12081
  ] })
12003
12082
  }
12004
12083
  ),
12005
- /* @__PURE__ */ jsx54(Stack30, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs39(
12084
+ /* @__PURE__ */ jsx55(Stack30, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs39(
12006
12085
  Flex28,
12007
12086
  {
12008
12087
  align: "center",
@@ -12010,8 +12089,8 @@ function StrengthsList({
12010
12089
  padding: 4,
12011
12090
  style: i > 0 ? dividerStyle : void 0,
12012
12091
  children: [
12013
- /* @__PURE__ */ jsx54(Text40, { size: 2, children: area.feature }),
12014
- /* @__PURE__ */ jsx54(
12092
+ /* @__PURE__ */ jsx55(Text40, { size: 2, children: area.feature }),
12093
+ /* @__PURE__ */ jsx55(
12015
12094
  "span",
12016
12095
  {
12017
12096
  style: {
@@ -12042,7 +12121,7 @@ import {
12042
12121
  ArrowDownIcon as ArrowDownIcon2
12043
12122
  } from "@sanity/icons";
12044
12123
  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";
12124
+ import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
12046
12125
  function WeaknessesList({
12047
12126
  mode,
12048
12127
  scores,
@@ -12075,10 +12154,10 @@ function WeaknessesList({
12075
12154
  return /* @__PURE__ */ jsxs40(Stack31, { space: 5, children: [
12076
12155
  weakAreas.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12077
12156
  /* @__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(
12157
+ /* @__PURE__ */ jsx56(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12158
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
12159
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.weakAreas }),
12160
+ hasModels && /* @__PURE__ */ jsx56(Box28, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx56(
12082
12161
  ModelSelector,
12083
12162
  {
12084
12163
  models: perModel,
@@ -12087,7 +12166,7 @@ function WeaknessesList({
12087
12166
  }
12088
12167
  ) })
12089
12168
  ] }),
12090
- /* @__PURE__ */ jsx55(
12169
+ /* @__PURE__ */ jsx56(
12091
12170
  AreaScoresGrid,
12092
12171
  {
12093
12172
  mode,
@@ -12099,11 +12178,11 @@ function WeaknessesList({
12099
12178
  ] }),
12100
12179
  docsHurt.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12101
12180
  /* @__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 })
12181
+ /* @__PURE__ */ jsx56(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
12182
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
12183
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.docsHurt })
12105
12184
  ] }),
12106
- /* @__PURE__ */ jsx55(Box28, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs40(
12185
+ /* @__PURE__ */ jsx56(Box28, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs40(
12107
12186
  Box28,
12108
12187
  {
12109
12188
  padding: 4,
@@ -12111,8 +12190,8 @@ function WeaknessesList({
12111
12190
  children: [
12112
12191
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
12113
12192
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12114
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12115
- /* @__PURE__ */ jsx55(
12193
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12194
+ /* @__PURE__ */ jsx56(
12116
12195
  "span",
12117
12196
  {
12118
12197
  style: {
@@ -12127,7 +12206,7 @@ function WeaknessesList({
12127
12206
  }
12128
12207
  )
12129
12208
  ] }),
12130
- /* @__PURE__ */ jsx55(
12209
+ /* @__PURE__ */ jsx56(
12131
12210
  "span",
12132
12211
  {
12133
12212
  style: {
@@ -12140,7 +12219,7 @@ function WeaknessesList({
12140
12219
  }
12141
12220
  )
12142
12221
  ] }),
12143
- /* @__PURE__ */ jsx55(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12222
+ /* @__PURE__ */ jsx56(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12144
12223
  area.invertedRetrievalGap && /* @__PURE__ */ jsxs40("span", { style: { color: "#fbbf24" }, children: [
12145
12224
  "Agent does better by NOT finding these docs.",
12146
12225
  " "
@@ -12158,11 +12237,11 @@ function WeaknessesList({
12158
12237
  ] }),
12159
12238
  retrievalIssues.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12160
12239
  /* @__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 })
12240
+ /* @__PURE__ */ jsx56(SearchIcon9, { style: { color: "#fbbf24" } }),
12241
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
12242
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.retrievalIssues })
12164
12243
  ] }),
12165
- /* @__PURE__ */ jsx55(Box28, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs40(
12244
+ /* @__PURE__ */ jsx56(Box28, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs40(
12166
12245
  Box28,
12167
12246
  {
12168
12247
  padding: 4,
@@ -12170,8 +12249,8 @@ function WeaknessesList({
12170
12249
  children: [
12171
12250
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
12172
12251
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, children: [
12173
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12174
- /* @__PURE__ */ jsx55(
12252
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12253
+ /* @__PURE__ */ jsx56(
12175
12254
  "span",
12176
12255
  {
12177
12256
  style: {
@@ -12186,7 +12265,7 @@ function WeaknessesList({
12186
12265
  }
12187
12266
  )
12188
12267
  ] }),
12189
- /* @__PURE__ */ jsx55(
12268
+ /* @__PURE__ */ jsx56(
12190
12269
  "span",
12191
12270
  {
12192
12271
  style: {
@@ -12199,7 +12278,7 @@ function WeaknessesList({
12199
12278
  }
12200
12279
  )
12201
12280
  ] }),
12202
- /* @__PURE__ */ jsx55(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12281
+ /* @__PURE__ */ jsx56(Box28, { paddingTop: 2, children: /* @__PURE__ */ jsxs40(Text41, { muted: true, size: 2, children: [
12203
12282
  "Actual score (",
12204
12283
  Math.round(area.actualScore ?? 0),
12205
12284
  ") is much lower than ceiling (",
@@ -12216,19 +12295,19 @@ function WeaknessesList({
12216
12295
  ] }),
12217
12296
  dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs40(Stack31, { space: 3, children: [
12218
12297
  /* @__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 })
12298
+ /* @__PURE__ */ jsx56(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
12299
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
12300
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.dimWeaknesses })
12222
12301
  ] }),
12223
- /* @__PURE__ */ jsx55(Box28, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs40(
12302
+ /* @__PURE__ */ jsx56(Box28, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs40(
12224
12303
  Box28,
12225
12304
  {
12226
12305
  padding: 4,
12227
12306
  style: i > 0 ? dividerStyle : void 0,
12228
12307
  children: [
12229
12308
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 2, paddingBottom: 2, children: [
12230
- /* @__PURE__ */ jsx55(Text41, { size: 2, weight: "medium", children: area.feature }),
12231
- /* @__PURE__ */ jsx55(
12309
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: area.feature }),
12310
+ /* @__PURE__ */ jsx56(
12232
12311
  "span",
12233
12312
  {
12234
12313
  style: {
@@ -12243,7 +12322,7 @@ function WeaknessesList({
12243
12322
  }
12244
12323
  )
12245
12324
  ] }),
12246
- /* @__PURE__ */ jsx55(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx55(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs40(
12325
+ /* @__PURE__ */ jsx56(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx56(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs40(
12247
12326
  "span",
12248
12327
  {
12249
12328
  style: {
@@ -12266,20 +12345,22 @@ function WeaknessesList({
12266
12345
  )) })
12267
12346
  ] }),
12268
12347
  FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs40(Box28, { style: neutralCardStyle, children: [
12269
- /* @__PURE__ */ jsx55(
12348
+ /* @__PURE__ */ jsx56(
12270
12349
  Box28,
12271
12350
  {
12272
12351
  padding: 4,
12273
12352
  style: { borderBottom: "1px solid var(--card-border-color)" },
12274
12353
  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" })
12354
+ /* @__PURE__ */ jsx56(ArrowDownIcon2, { style: { color: "#f87171" } }),
12355
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
12277
12356
  ] })
12278
12357
  }
12279
12358
  ),
12280
- /* @__PURE__ */ jsx55(Stack31, { children: regressed.map((featureName, i) => {
12359
+ /* @__PURE__ */ jsx56(Stack31, { children: regressed.map((featureName, i) => {
12281
12360
  const area = scores.find((s) => s.feature === featureName);
12282
- const areaDelta = perArea?.[featureName];
12361
+ const areaDelta = perArea?.find(
12362
+ (p) => p.area === featureName
12363
+ )?.delta;
12283
12364
  return /* @__PURE__ */ jsxs40(
12284
12365
  Flex29,
12285
12366
  {
@@ -12288,10 +12369,10 @@ function WeaknessesList({
12288
12369
  padding: 4,
12289
12370
  style: i > 0 ? dividerStyle : void 0,
12290
12371
  children: [
12291
- /* @__PURE__ */ jsx55(Text41, { size: 2, children: featureName }),
12372
+ /* @__PURE__ */ jsx56(Text41, { size: 2, children: featureName }),
12292
12373
  /* @__PURE__ */ jsxs40(Flex29, { align: "center", gap: 3, children: [
12293
- areaDelta != null && /* @__PURE__ */ jsx55(DeltaIndicator, { delta: areaDelta, icon: true }),
12294
- area && /* @__PURE__ */ jsx55(
12374
+ areaDelta != null && /* @__PURE__ */ jsx56(DeltaIndicator, { delta: areaDelta, icon: true }),
12375
+ area && /* @__PURE__ */ jsx56(
12295
12376
  "span",
12296
12377
  {
12297
12378
  style: {
@@ -12314,22 +12395,22 @@ function WeaknessesList({
12314
12395
  }) })
12315
12396
  ] }),
12316
12397
  efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs40(Box28, { style: neutralCardStyle, children: [
12317
- /* @__PURE__ */ jsx55(
12398
+ /* @__PURE__ */ jsx56(
12318
12399
  Box28,
12319
12400
  {
12320
12401
  padding: 4,
12321
12402
  style: { borderBottom: "1px solid var(--card-border-color)" },
12322
12403
  children: /* @__PURE__ */ jsxs40(Stack31, { space: 2, children: [
12323
12404
  /* @__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 })
12405
+ /* @__PURE__ */ jsx56(BoltIcon, { style: { color: "#fbbf24" } }),
12406
+ /* @__PURE__ */ jsx56(Text41, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
12407
+ /* @__PURE__ */ jsx56(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
12327
12408
  ] }),
12328
- /* @__PURE__ */ jsx55(Text41, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
12409
+ /* @__PURE__ */ jsx56(Text41, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
12329
12410
  ] })
12330
12411
  }
12331
12412
  ),
12332
- /* @__PURE__ */ jsx55(Stack31, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs40(
12413
+ /* @__PURE__ */ jsx56(Stack31, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs40(
12333
12414
  Flex29,
12334
12415
  {
12335
12416
  align: "center",
@@ -12337,8 +12418,8 @@ function WeaknessesList({
12337
12418
  padding: 4,
12338
12419
  style: i > 0 ? dividerStyle : void 0,
12339
12420
  children: [
12340
- /* @__PURE__ */ jsx55(Text41, { size: 2, children: area.feature }),
12341
- /* @__PURE__ */ jsx55(
12421
+ /* @__PURE__ */ jsx56(Text41, { size: 2, children: area.feature }),
12422
+ /* @__PURE__ */ jsx56(
12342
12423
  "span",
12343
12424
  {
12344
12425
  style: {
@@ -12367,11 +12448,11 @@ var tipArea = {
12367
12448
  };
12368
12449
  function dimTip(area, dim, score, description) {
12369
12450
  return /* @__PURE__ */ jsxs40(Text41, { size: 2, style: { lineHeight: 1.5 }, children: [
12370
- /* @__PURE__ */ jsx55("span", { style: tipArea, children: area }),
12451
+ /* @__PURE__ */ jsx56("span", { style: tipArea, children: area }),
12371
12452
  " scores",
12372
12453
  " ",
12373
- /* @__PURE__ */ jsx55("span", { style: tipValue, children: score }),
12374
- /* @__PURE__ */ jsx55("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
12454
+ /* @__PURE__ */ jsx56("span", { style: tipValue, children: score }),
12455
+ /* @__PURE__ */ jsx56("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
12375
12456
  " on",
12376
12457
  " ",
12377
12458
  dim.toLowerCase(),
@@ -12400,7 +12481,7 @@ function getDimensionWeaknesses(area) {
12400
12481
  }
12401
12482
 
12402
12483
  // src/components/report-detail/ReportDetail.tsx
12403
- import { jsx as jsx56, jsxs as jsxs41 } from "react/jsx-runtime";
12484
+ import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
12404
12485
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
12405
12486
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
12406
12487
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -12463,18 +12544,18 @@ function ReportDetail({
12463
12544
  if (disabledTabs.has(parsed)) return "overview";
12464
12545
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
12465
12546
  }, [activeTab, disabledTabs, tabs]);
12466
- const handleTabClick = useCallback36(
12547
+ const handleTabClick = useCallback37(
12467
12548
  (tabId) => {
12468
12549
  onTabChange(tabId === "overview" ? null : tabId, null, null);
12469
12550
  },
12470
12551
  [onTabChange]
12471
12552
  );
12472
12553
  if (loading) {
12473
- return /* @__PURE__ */ jsx56(LoadingState, { message: "Loading report\u2026" });
12554
+ return /* @__PURE__ */ jsx57(LoadingState, { message: "Loading report\u2026" });
12474
12555
  }
12475
12556
  if (!report || !summary) {
12476
- return /* @__PURE__ */ jsx56(Box29, { padding: 5, children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12477
- /* @__PURE__ */ jsx56(
12557
+ return /* @__PURE__ */ jsx57(Box29, { padding: 5, children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12558
+ /* @__PURE__ */ jsx57(
12478
12559
  Button11,
12479
12560
  {
12480
12561
  icon: ArrowLeftIcon3,
@@ -12483,18 +12564,18 @@ function ReportDetail({
12483
12564
  text: "Back"
12484
12565
  }
12485
12566
  ),
12486
- /* @__PURE__ */ jsx56(Text42, { align: "center", muted: true, size: 3, children: "Report not found" })
12567
+ /* @__PURE__ */ jsx57(Text42, { align: "center", muted: true, size: 3, children: "Report not found" })
12487
12568
  ] }) });
12488
12569
  }
12489
12570
  const { comparison, provenance } = report;
12490
12571
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
12491
- return /* @__PURE__ */ jsx56(
12572
+ return /* @__PURE__ */ jsx57(
12492
12573
  ReportArtifactProvider,
12493
12574
  {
12494
12575
  runId: report.provenance?.runId,
12495
12576
  manifest: summary?.artifactManifest,
12496
- children: /* @__PURE__ */ jsx56(Box29, { padding: 4, children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12497
- /* @__PURE__ */ jsx56(
12577
+ children: /* @__PURE__ */ jsx57(Box29, { padding: 4, children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12578
+ /* @__PURE__ */ jsx57(
12498
12579
  ReportHeader,
12499
12580
  {
12500
12581
  completedAt: report.completedAt,
@@ -12504,10 +12585,10 @@ function ReportDetail({
12504
12585
  }
12505
12586
  ),
12506
12587
  /* @__PURE__ */ jsxs41(Flex30, { align: "center", gap: 2, wrap: "wrap", children: [
12507
- /* @__PURE__ */ jsx56(TabList, { space: 1, children: tabs.map((tab) => {
12588
+ /* @__PURE__ */ jsx57(TabList, { space: 1, children: tabs.map((tab) => {
12508
12589
  const isDisabled = disabledTabs.has(tab.id);
12509
12590
  const tooltip = getDisabledTabTooltip(tab.id, summary);
12510
- const tabElement = /* @__PURE__ */ jsx56(
12591
+ const tabElement = /* @__PURE__ */ jsx57(
12511
12592
  Tab,
12512
12593
  {
12513
12594
  "aria-controls": `panel-${tab.id}`,
@@ -12518,29 +12599,30 @@ function ReportDetail({
12518
12599
  selected: currentTab === tab.id
12519
12600
  }
12520
12601
  );
12521
- return isDisabled && tooltip ? /* @__PURE__ */ jsx56(
12602
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx57(
12522
12603
  Tooltip10,
12523
12604
  {
12524
- content: /* @__PURE__ */ jsx56(Box29, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
12605
+ content: /* @__PURE__ */ jsx57(Box29, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
12525
12606
  placement: "bottom",
12526
12607
  portal: true,
12527
- children: /* @__PURE__ */ jsx56("span", { style: { display: "inline-block" }, children: tabElement })
12608
+ children: /* @__PURE__ */ jsx57("span", { style: { display: "inline-block" }, children: tabElement })
12528
12609
  },
12529
12610
  tab.id
12530
- ) : /* @__PURE__ */ jsx56("span", { children: tabElement }, tab.id);
12611
+ ) : /* @__PURE__ */ jsx57("span", { children: tabElement }, tab.id);
12531
12612
  }) }),
12532
12613
  /* @__PURE__ */ jsxs41(Flex30, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
12533
- /* @__PURE__ */ jsx56(
12614
+ /* @__PURE__ */ jsx57(
12534
12615
  HoverTip,
12535
12616
  {
12536
12617
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
12537
- children: /* @__PURE__ */ jsx56(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
12618
+ children: /* @__PURE__ */ jsx57(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
12538
12619
  }
12539
12620
  ),
12540
- /* @__PURE__ */ jsx56(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx56(Badge10, { tone: "primary", children: provenance.mode }) }),
12541
- /* @__PURE__ */ jsx56(
12621
+ /* @__PURE__ */ jsx57(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx57(Badge10, { tone: "primary", children: provenance.mode }) }),
12622
+ /* @__PURE__ */ jsx57(
12542
12623
  ReportActions,
12543
12624
  {
12625
+ artifactManifest: summary.artifactManifest,
12544
12626
  documentId: report._id,
12545
12627
  onDeleted: onBack,
12546
12628
  provenance,
@@ -12549,14 +12631,14 @@ function ReportDetail({
12549
12631
  )
12550
12632
  ] })
12551
12633
  ] }),
12552
- currentTab === "overview" && /* @__PURE__ */ jsx56(
12634
+ currentTab === "overview" && /* @__PURE__ */ jsx57(
12553
12635
  TabPanel,
12554
12636
  {
12555
12637
  "aria-labelledby": "tab-overview",
12556
12638
  hidden: currentTab !== "overview",
12557
12639
  id: "panel-overview",
12558
12640
  children: /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12559
- /* @__PURE__ */ jsx56(
12641
+ /* @__PURE__ */ jsx57(
12560
12642
  DiagnosticsOverview,
12561
12643
  {
12562
12644
  comparison,
@@ -12567,20 +12649,20 @@ function ReportDetail({
12567
12649
  totalTests
12568
12650
  }
12569
12651
  ),
12570
- /* @__PURE__ */ jsx56(CostLatencyPanel, { testResults: summary.testResults }),
12571
- /* @__PURE__ */ jsx56(
12652
+ /* @__PURE__ */ jsx57(CostLatencyPanel, { testResults: summary.testResults }),
12653
+ /* @__PURE__ */ jsx57(
12572
12654
  LineageCard,
12573
12655
  {
12574
12656
  provenance,
12575
12657
  reportId: report.reportId
12576
12658
  }
12577
12659
  ),
12578
- /* @__PURE__ */ jsx56(ProvenanceCard, { provenance }),
12579
- /* @__PURE__ */ jsx56(PipelineExecutionPanel, {})
12660
+ /* @__PURE__ */ jsx57(ProvenanceCard, { provenance }),
12661
+ /* @__PURE__ */ jsx57(PipelineExecutionPanel, {})
12580
12662
  ] })
12581
12663
  }
12582
12664
  ),
12583
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx56(
12665
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx57(
12584
12666
  DiagnosticsPanel,
12585
12667
  {
12586
12668
  artifactCache,
@@ -12596,13 +12678,13 @@ function ReportDetail({
12596
12678
  testResults: summary.testResults
12597
12679
  }
12598
12680
  ),
12599
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx56(
12681
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx57(
12600
12682
  TabPanel,
12601
12683
  {
12602
12684
  "aria-labelledby": "tab-activity",
12603
12685
  hidden: currentTab !== "activity",
12604
12686
  id: "panel-activity",
12605
- children: /* @__PURE__ */ jsx56(
12687
+ children: /* @__PURE__ */ jsx57(
12606
12688
  AgentBehaviorCard,
12607
12689
  {
12608
12690
  agentBehavior: summary.agentBehavior,
@@ -12640,8 +12722,8 @@ function DiagnosticsPanel({
12640
12722
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
12641
12723
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
12642
12724
  ).length;
12643
- return /* @__PURE__ */ jsx56(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12644
- /* @__PURE__ */ jsx56(
12725
+ return /* @__PURE__ */ jsx57(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs41(Stack32, { space: 4, children: [
12726
+ /* @__PURE__ */ jsx57(
12645
12727
  Flex30,
12646
12728
  {
12647
12729
  align: "center",
@@ -12671,7 +12753,7 @@ function DiagnosticsPanel({
12671
12753
  type: "button",
12672
12754
  children: [
12673
12755
  tab.label,
12674
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx56(
12756
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx57(
12675
12757
  "span",
12676
12758
  {
12677
12759
  style: {
@@ -12691,7 +12773,7 @@ function DiagnosticsPanel({
12691
12773
  ))
12692
12774
  }
12693
12775
  ),
12694
- subTab === "strengths" && /* @__PURE__ */ jsx56(
12776
+ subTab === "strengths" && /* @__PURE__ */ jsx57(
12695
12777
  StrengthsList,
12696
12778
  {
12697
12779
  comparison,
@@ -12701,7 +12783,7 @@ function DiagnosticsPanel({
12701
12783
  }
12702
12784
  ),
12703
12785
  subTab === "issues" && /* @__PURE__ */ jsxs41(Stack32, { space: 5, children: [
12704
- /* @__PURE__ */ jsx56(
12786
+ /* @__PURE__ */ jsx57(
12705
12787
  WeaknessesList,
12706
12788
  {
12707
12789
  comparison,
@@ -12710,8 +12792,8 @@ function DiagnosticsPanel({
12710
12792
  scores
12711
12793
  }
12712
12794
  ),
12713
- FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx56(FailureModesPanel, { failureModes }),
12714
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx56(
12795
+ FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx57(FailureModesPanel, { failureModes }),
12796
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx57(
12715
12797
  JudgmentList,
12716
12798
  {
12717
12799
  artifactCache,
@@ -12747,17 +12829,17 @@ function getDisabledTabTooltip(tabId, summary) {
12747
12829
  if (!summary) return null;
12748
12830
  switch (tabId) {
12749
12831
  case "diagnostics":
12750
- return /* @__PURE__ */ jsx56(Text42, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
12832
+ return /* @__PURE__ */ jsx57(Text42, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
12751
12833
  case "activity":
12752
12834
  return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs41(Text42, { muted: true, size: 2, children: [
12753
12835
  "Not available for baseline-only evaluations. Run with",
12754
12836
  " ",
12755
- /* @__PURE__ */ jsx56("code", { style: inlineCodeStyle, children: "--mode full" }),
12837
+ /* @__PURE__ */ jsx57("code", { style: inlineCodeStyle, children: "--mode full" }),
12756
12838
  " or",
12757
12839
  " ",
12758
- /* @__PURE__ */ jsx56("code", { style: inlineCodeStyle, children: "--mode agentic" }),
12840
+ /* @__PURE__ */ jsx57("code", { style: inlineCodeStyle, children: "--mode agentic" }),
12759
12841
  " to capture agent browsing behavior."
12760
- ] }) : /* @__PURE__ */ jsx56(Text42, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
12842
+ ] }) : /* @__PURE__ */ jsx57(Text42, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
12761
12843
  default:
12762
12844
  return null;
12763
12845
  }
@@ -12766,7 +12848,7 @@ function getDisabledTabTooltip(tabId, summary) {
12766
12848
  // src/components/report-detail/AreaScoreRow.tsx
12767
12849
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
12768
12850
  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";
12851
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
12770
12852
 
12771
12853
  // src/components/report-detail/AreaScoreTable.tsx
12772
12854
  import React4 from "react";
@@ -12800,32 +12882,32 @@ function scoreHex(score) {
12800
12882
 
12801
12883
  // src/components/primitives/ScoreCell.tsx
12802
12884
  import { Card as Card18, Text as Text44 } from "@sanity/ui";
12803
- import { jsx as jsx58 } from "react/jsx-runtime";
12885
+ import { jsx as jsx59 } from "react/jsx-runtime";
12804
12886
 
12805
12887
  // src/components/report-detail/AreaScoreTable.tsx
12806
- import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
12888
+ import { jsx as jsx60, jsxs as jsxs43 } from "react/jsx-runtime";
12807
12889
 
12808
12890
  // src/components/report-detail/AutoComparisonCard.tsx
12809
12891
  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";
12892
+ import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
12811
12893
 
12812
12894
  // src/components/report-detail/OverviewStats.tsx
12813
12895
  import { Grid as Grid6 } from "@sanity/ui";
12814
- import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
12896
+ import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
12815
12897
 
12816
12898
  // src/components/report-detail/RecommendationsSection.tsx
12817
12899
  import { BoltIcon as BoltIcon2 } from "@sanity/icons";
12818
12900
  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";
12901
+ import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
12820
12902
 
12821
12903
  // src/components/report-detail/ThreeLayerTable.tsx
12822
12904
  import React5 from "react";
12823
12905
  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";
12906
+ import { jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
12825
12907
 
12826
12908
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
12827
12909
  import { Card as Card22 } from "@sanity/ui";
12828
- import { useCallback as useCallback37, useEffect as useEffect15, useRef as useRef8, useState as useState29 } from "react";
12910
+ import { useCallback as useCallback38, useEffect as useEffect15, useRef as useRef8, useState as useState29 } from "react";
12829
12911
 
12830
12912
  // src/components/report-detail/JudgmentDetailDrawer.tsx
12831
12913
  import { useEffect as useEffect14, useState as useState28 } from "react";
@@ -12841,7 +12923,7 @@ import {
12841
12923
  Text as Text49,
12842
12924
  Tooltip as Tooltip12
12843
12925
  } from "@sanity/ui";
12844
- import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
12926
+ import { jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
12845
12927
  var HEADER_STYLE = {
12846
12928
  borderBottom: "1px solid var(--card-border-color)"
12847
12929
  };
@@ -12880,7 +12962,7 @@ function DocBadge({
12880
12962
  const [hovered, setHovered] = useState28(false);
12881
12963
  const isLinked = Boolean(doc.documentId);
12882
12964
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
12883
- const badge = /* @__PURE__ */ jsx64(
12965
+ const badge = /* @__PURE__ */ jsx65(
12884
12966
  "span",
12885
12967
  {
12886
12968
  style: {
@@ -12893,13 +12975,13 @@ function DocBadge({
12893
12975
  children: doc.slug
12894
12976
  }
12895
12977
  );
12896
- return /* @__PURE__ */ jsx64(
12978
+ return /* @__PURE__ */ jsx65(
12897
12979
  Tooltip12,
12898
12980
  {
12899
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 2, children: tooltipLabel }) }),
12981
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 2, children: tooltipLabel }) }),
12900
12982
  placement: "bottom",
12901
12983
  portal: true,
12902
- children: isLinked ? /* @__PURE__ */ jsx64(
12984
+ children: isLinked ? /* @__PURE__ */ jsx65(
12903
12985
  "a",
12904
12986
  {
12905
12987
  href: `/intent/edit/id=${doc.documentId}`,
@@ -12914,7 +12996,7 @@ function DocBadge({
12914
12996
  },
12915
12997
  children: badge
12916
12998
  }
12917
- ) : /* @__PURE__ */ jsx64("span", { children: badge })
12999
+ ) : /* @__PURE__ */ jsx65("span", { children: badge })
12918
13000
  }
12919
13001
  );
12920
13002
  }
@@ -12987,7 +13069,7 @@ function JudgmentDetailDrawer({
12987
13069
  role: "dialog",
12988
13070
  style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
12989
13071
  children: [
12990
- /* @__PURE__ */ jsx64(
13072
+ /* @__PURE__ */ jsx65(
12991
13073
  "div",
12992
13074
  {
12993
13075
  "aria-hidden": true,
@@ -13003,7 +13085,7 @@ function JudgmentDetailDrawer({
13003
13085
  /* @__PURE__ */ jsxs48(Flex35, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
13004
13086
  /* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 2, children: [
13005
13087
  /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
13006
- /* @__PURE__ */ jsx64(
13088
+ /* @__PURE__ */ jsx65(
13007
13089
  "span",
13008
13090
  {
13009
13091
  style: {
@@ -13018,7 +13100,7 @@ function JudgmentDetailDrawer({
13018
13100
  children: judgment.score
13019
13101
  }
13020
13102
  ),
13021
- /* @__PURE__ */ jsx64(
13103
+ /* @__PURE__ */ jsx65(
13022
13104
  "span",
13023
13105
  {
13024
13106
  style: {
@@ -13031,13 +13113,13 @@ function JudgmentDetailDrawer({
13031
13113
  children: dimLabel
13032
13114
  }
13033
13115
  ),
13034
- /* @__PURE__ */ jsx64(
13116
+ /* @__PURE__ */ jsx65(
13035
13117
  Tooltip12,
13036
13118
  {
13037
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: judgment.modelId }) }),
13119
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: judgment.modelId }) }),
13038
13120
  placement: "bottom",
13039
13121
  portal: true,
13040
- children: /* @__PURE__ */ jsx64(
13122
+ children: /* @__PURE__ */ jsx65(
13041
13123
  "span",
13042
13124
  {
13043
13125
  style: {
@@ -13054,7 +13136,7 @@ function JudgmentDetailDrawer({
13054
13136
  )
13055
13137
  }
13056
13138
  ),
13057
- (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx64(
13139
+ (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx65(
13058
13140
  "span",
13059
13141
  {
13060
13142
  "aria-hidden": true,
@@ -13066,10 +13148,10 @@ function JudgmentDetailDrawer({
13066
13148
  }
13067
13149
  }
13068
13150
  ),
13069
- testResult?.latencyMs != null && /* @__PURE__ */ jsx64(
13151
+ testResult?.latencyMs != null && /* @__PURE__ */ jsx65(
13070
13152
  Tooltip12,
13071
13153
  {
13072
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: "End-to-end generation latency for this model call." }) }),
13154
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: "End-to-end generation latency for this model call." }) }),
13073
13155
  placement: "bottom",
13074
13156
  portal: true,
13075
13157
  children: /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, children: [
@@ -13078,10 +13160,10 @@ function JudgmentDetailDrawer({
13078
13160
  ] })
13079
13161
  }
13080
13162
  ),
13081
- testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx64(
13163
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx65(
13082
13164
  Tooltip12,
13083
13165
  {
13084
- content: /* @__PURE__ */ jsx64(Box33, { padding: 2, children: /* @__PURE__ */ jsx64(Text49, { size: 1, children: "Provider-reported cost for this model call." }) }),
13166
+ content: /* @__PURE__ */ jsx65(Box33, { padding: 2, children: /* @__PURE__ */ jsx65(Text49, { size: 1, children: "Provider-reported cost for this model call." }) }),
13085
13167
  placement: "bottom",
13086
13168
  portal: true,
13087
13169
  children: /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, children: [
@@ -13092,12 +13174,12 @@ function JudgmentDetailDrawer({
13092
13174
  )
13093
13175
  ] }),
13094
13176
  /* @__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 })
13177
+ /* @__PURE__ */ jsx65(Text49, { size: 2, weight: "medium", children: taskName }),
13178
+ /* @__PURE__ */ jsx65(VariantBadge, { variant })
13097
13179
  ] })
13098
13180
  ] }),
13099
13181
  /* @__PURE__ */ jsxs48(Flex35, { align: "center", gap: 1, children: [
13100
- /* @__PURE__ */ jsx64(
13182
+ /* @__PURE__ */ jsx65(
13101
13183
  "span",
13102
13184
  {
13103
13185
  style: {
@@ -13115,7 +13197,7 @@ function JudgmentDetailDrawer({
13115
13197
  children: "Esc"
13116
13198
  }
13117
13199
  ),
13118
- /* @__PURE__ */ jsx64(
13200
+ /* @__PURE__ */ jsx65(
13119
13201
  Button12,
13120
13202
  {
13121
13203
  "aria-label": "Close (Esc)",
@@ -13138,8 +13220,8 @@ function JudgmentDetailDrawer({
13138
13220
  paddingY: 2,
13139
13221
  style: TAB_BAR_STYLE,
13140
13222
  children: [
13141
- /* @__PURE__ */ jsx64(Box33, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs48(TabList2, { space: 2, children: [
13142
- /* @__PURE__ */ jsx64(
13223
+ /* @__PURE__ */ jsx65(Box33, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs48(TabList2, { space: 2, children: [
13224
+ /* @__PURE__ */ jsx65(
13143
13225
  Tab2,
13144
13226
  {
13145
13227
  "aria-controls": "judgment-panel-reasoning",
@@ -13149,7 +13231,7 @@ function JudgmentDetailDrawer({
13149
13231
  selected: tab === "reasoning"
13150
13232
  }
13151
13233
  ),
13152
- hasOutputTab && /* @__PURE__ */ jsx64(
13234
+ hasOutputTab && /* @__PURE__ */ jsx65(
13153
13235
  Tab2,
13154
13236
  {
13155
13237
  "aria-controls": "judgment-panel-output",
@@ -13160,7 +13242,7 @@ function JudgmentDetailDrawer({
13160
13242
  }
13161
13243
  )
13162
13244
  ] }) }),
13163
- /* @__PURE__ */ jsx64(
13245
+ /* @__PURE__ */ jsx65(
13164
13246
  JudgmentActions,
13165
13247
  {
13166
13248
  onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
@@ -13170,14 +13252,14 @@ function JudgmentDetailDrawer({
13170
13252
  }
13171
13253
  ),
13172
13254
  /* @__PURE__ */ jsxs48(Box33, { padding: 4, style: CONTENT_STYLE, children: [
13173
- /* @__PURE__ */ jsx64(
13255
+ /* @__PURE__ */ jsx65(
13174
13256
  TabPanel2,
13175
13257
  {
13176
13258
  "aria-labelledby": "judgment-tab-reasoning",
13177
13259
  hidden: tab !== "reasoning",
13178
13260
  id: "judgment-panel-reasoning",
13179
13261
  children: /* @__PURE__ */ jsxs48(Box33, { style: COPYABLE_BLOCK_STYLE, children: [
13180
- /* @__PURE__ */ jsx64(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx64(
13262
+ /* @__PURE__ */ jsx65(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx65(
13181
13263
  CopyButton,
13182
13264
  {
13183
13265
  copiedLabel: "Reasoning copied",
@@ -13185,8 +13267,8 @@ function JudgmentDetailDrawer({
13185
13267
  text: reasoningText
13186
13268
  }
13187
13269
  ) }),
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." })
13270
+ /* @__PURE__ */ jsx65(Markdown, { content: reasoningText }),
13271
+ 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
13272
  ] })
13191
13273
  }
13192
13274
  ),
@@ -13197,14 +13279,14 @@ function JudgmentDetailDrawer({
13197
13279
  hidden: tab !== "output",
13198
13280
  id: "judgment-panel-output",
13199
13281
  children: [
13200
- !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx64(Text49, { muted: true, size: 1, children: "Fetching model output\u2026" }),
13282
+ !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx65(Text49, { muted: true, size: 1, children: "Fetching model output\u2026" }),
13201
13283
  !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs48(Text49, { muted: true, size: 1, style: { color: "#f87171" }, children: [
13202
13284
  "Failed to load model output",
13203
13285
  artifactCache?.error ? `: ${artifactCache.error}` : ""
13204
13286
  ] }),
13205
- !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx64(Text49, { muted: true, size: 1, children: "Model output not available for this entry." }),
13287
+ !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx65(Text49, { muted: true, size: 1, children: "Model output not available for this entry." }),
13206
13288
  resolvedOutput && /* @__PURE__ */ jsxs48(Box33, { style: COPYABLE_BLOCK_STYLE, children: [
13207
- /* @__PURE__ */ jsx64(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx64(
13289
+ /* @__PURE__ */ jsx65(Box33, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx65(
13208
13290
  CopyButton,
13209
13291
  {
13210
13292
  copiedLabel: "Output copied",
@@ -13212,15 +13294,15 @@ function JudgmentDetailDrawer({
13212
13294
  text: resolvedOutput
13213
13295
  }
13214
13296
  ) }),
13215
- /* @__PURE__ */ jsx64(Markdown, { content: resolvedOutput })
13297
+ /* @__PURE__ */ jsx65(Markdown, { content: resolvedOutput })
13216
13298
  ] })
13217
13299
  ]
13218
13300
  }
13219
13301
  )
13220
13302
  ] }),
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))
13303
+ 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: [
13304
+ /* @__PURE__ */ jsx65("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
13305
+ judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx65(DocBadge, { doc }, doc.slug))
13224
13306
  ] }) })
13225
13307
  ]
13226
13308
  }
@@ -13228,7 +13310,7 @@ function JudgmentDetailDrawer({
13228
13310
  }
13229
13311
 
13230
13312
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
13231
- import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
13313
+ import { jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
13232
13314
  var MIN_WIDTH2 = 480;
13233
13315
  var MAX_WIDTH2 = 900;
13234
13316
  var OVERLAY_BREAKPOINT2 = 1024;
@@ -13255,7 +13337,7 @@ function useResizable2(defaultWidth) {
13255
13337
  const dragging = useRef8(false);
13256
13338
  const startX = useRef8(0);
13257
13339
  const startWidth = useRef8(0);
13258
- const handleMouseDown = useCallback37(
13340
+ const handleMouseDown = useCallback38(
13259
13341
  (e) => {
13260
13342
  e.preventDefault();
13261
13343
  dragging.current = true;
@@ -13324,7 +13406,7 @@ function JudgmentDetailDrawerOutlet({
13324
13406
  width
13325
13407
  },
13326
13408
  children: [
13327
- !isNarrow && /* @__PURE__ */ jsx65(
13409
+ !isNarrow && /* @__PURE__ */ jsx66(
13328
13410
  "div",
13329
13411
  {
13330
13412
  "aria-label": "Resize judgment drawer",
@@ -13349,7 +13431,7 @@ function JudgmentDetailDrawerOutlet({
13349
13431
  }
13350
13432
  }
13351
13433
  ),
13352
- /* @__PURE__ */ jsx65(
13434
+ /* @__PURE__ */ jsx66(
13353
13435
  Card22,
13354
13436
  {
13355
13437
  borderLeft: !isNarrow,
@@ -13359,7 +13441,7 @@ function JudgmentDetailDrawerOutlet({
13359
13441
  flexDirection: "column",
13360
13442
  overflow: "hidden"
13361
13443
  },
13362
- children: /* @__PURE__ */ jsx65(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx65(
13444
+ children: /* @__PURE__ */ jsx66(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx66(
13363
13445
  JudgmentDetailDrawer,
13364
13446
  {
13365
13447
  artifactCache: active.artifactCache,
@@ -13378,13 +13460,13 @@ function JudgmentDetailDrawerOutlet({
13378
13460
 
13379
13461
  // src/components/ScoreTimeline.tsx
13380
13462
  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";
13463
+ import { useCallback as useCallback42, useMemo as useMemo19, useState as useState32 } from "react";
13382
13464
  import { useRouter as useRouter4 } from "sanity/router";
13383
13465
 
13384
13466
  // src/components/timeline/TimelineChart.tsx
13385
13467
  import { Box as Box34, Card as Card23, Flex as Flex36, Stack as Stack39, Text as Text50 } from "@sanity/ui";
13386
13468
  import {
13387
- useCallback as useCallback38,
13469
+ useCallback as useCallback39,
13388
13470
  useEffect as useEffect16,
13389
13471
  useMemo as useMemo17,
13390
13472
  useRef as useRef9,
@@ -13632,7 +13714,7 @@ function effectiveStartDate(rangeDays, floor = TIMELINE_DATA_START_DATE) {
13632
13714
  }
13633
13715
 
13634
13716
  // src/components/timeline/TimelineChart.tsx
13635
- import { jsx as jsx66, jsxs as jsxs50 } from "react/jsx-runtime";
13717
+ import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
13636
13718
  var CHART_HEIGHT = 280;
13637
13719
  var PAD_BOTTOM = 36;
13638
13720
  var PAD_LEFT = 44;
@@ -13666,11 +13748,11 @@ function TimelineChart({
13666
13748
  }, []);
13667
13749
  const plotWidth = width - PAD_LEFT - PAD_RIGHT;
13668
13750
  const plotHeight = CHART_HEIGHT - PAD_TOP - PAD_BOTTOM;
13669
- const xFor = useCallback38(
13751
+ const xFor = useCallback39(
13670
13752
  (i, n) => PAD_LEFT + (n === 1 ? plotWidth / 2 : i / (n - 1) * plotWidth),
13671
13753
  [plotWidth]
13672
13754
  );
13673
- const yFor = useCallback38(
13755
+ const yFor = useCallback39(
13674
13756
  (score) => PAD_TOP + plotHeight - score / Y_MAX * plotHeight,
13675
13757
  [plotHeight]
13676
13758
  );
@@ -13705,7 +13787,7 @@ function TimelineChart({
13705
13787
  }
13706
13788
  return Array.from(new Set(out));
13707
13789
  }, [computed]);
13708
- const findNearestIndex = useCallback38(
13790
+ const findNearestIndex = useCallback39(
13709
13791
  (clientX, rect) => {
13710
13792
  if (computed.length === 0) return null;
13711
13793
  const localX = (clientX - rect.left) * width / rect.width;
@@ -13722,7 +13804,7 @@ function TimelineChart({
13722
13804
  },
13723
13805
  [computed, width]
13724
13806
  );
13725
- const handleMouseMove = useCallback38(
13807
+ const handleMouseMove = useCallback39(
13726
13808
  (e) => {
13727
13809
  const rect = e.currentTarget.getBoundingClientRect();
13728
13810
  const idx = findNearestIndex(e.clientX, rect);
@@ -13730,10 +13812,10 @@ function TimelineChart({
13730
13812
  },
13731
13813
  [findNearestIndex]
13732
13814
  );
13733
- const handleMouseLeave = useCallback38(() => {
13815
+ const handleMouseLeave = useCallback39(() => {
13734
13816
  setHoverIdx(null);
13735
13817
  }, []);
13736
- const handlePointClick = useCallback38(
13818
+ const handlePointClick = useCallback39(
13737
13819
  (idx) => {
13738
13820
  const datum = computed[idx];
13739
13821
  if (!datum) return;
@@ -13741,14 +13823,14 @@ function TimelineChart({
13741
13823
  },
13742
13824
  [computed, onSelectPoint]
13743
13825
  );
13744
- const handleFocus = useCallback38(() => {
13826
+ const handleFocus = useCallback39(() => {
13745
13827
  setFocusIdx((prev) => prev ?? 0);
13746
13828
  }, []);
13747
- const moveTo = useCallback38((idx) => {
13829
+ const moveTo = useCallback39((idx) => {
13748
13830
  setFocusIdx(idx);
13749
13831
  setHoverIdx(idx);
13750
13832
  }, []);
13751
- const handleKey = useCallback38(
13833
+ const handleKey = useCallback39(
13752
13834
  (e) => {
13753
13835
  if (computed.length === 0) return;
13754
13836
  const last = computed.length - 1;
@@ -13781,9 +13863,9 @@ function TimelineChart({
13781
13863
  const activeIdx = hoverIdx ?? focusIdx;
13782
13864
  const active = activeIdx !== null ? computed[activeIdx] : null;
13783
13865
  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." }) }) });
13866
+ 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
13867
  }
13786
- return /* @__PURE__ */ jsx66(Card23, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13868
+ return /* @__PURE__ */ jsx67(Card23, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13787
13869
  /* @__PURE__ */ jsxs50(Box34, { ref: containerRef, style: { position: "relative", width: "100%" }, children: [
13788
13870
  /* @__PURE__ */ jsxs50(
13789
13871
  "svg",
@@ -13801,7 +13883,7 @@ function TimelineChart({
13801
13883
  Y_TICKS.map((tick) => {
13802
13884
  const y = yFor(tick);
13803
13885
  return /* @__PURE__ */ jsxs50("g", { children: [
13804
- /* @__PURE__ */ jsx66(
13886
+ /* @__PURE__ */ jsx67(
13805
13887
  "line",
13806
13888
  {
13807
13889
  stroke: "var(--card-border-color, #ddd)",
@@ -13812,7 +13894,7 @@ function TimelineChart({
13812
13894
  y2: y
13813
13895
  }
13814
13896
  ),
13815
- /* @__PURE__ */ jsx66(
13897
+ /* @__PURE__ */ jsx67(
13816
13898
  "text",
13817
13899
  {
13818
13900
  dominantBaseline: "middle",
@@ -13826,7 +13908,7 @@ function TimelineChart({
13826
13908
  )
13827
13909
  ] }, tick);
13828
13910
  }),
13829
- avgScore > 0 ? /* @__PURE__ */ jsx66(
13911
+ avgScore > 0 ? /* @__PURE__ */ jsx67(
13830
13912
  "rect",
13831
13913
  {
13832
13914
  fill: scoreHex(avgScore),
@@ -13843,7 +13925,7 @@ function TimelineChart({
13843
13925
  xLabelIndexes.map((i) => {
13844
13926
  const p = computed[i];
13845
13927
  if (!p) return null;
13846
- return /* @__PURE__ */ jsx66(
13928
+ return /* @__PURE__ */ jsx67(
13847
13929
  "text",
13848
13930
  {
13849
13931
  fill: "var(--card-muted-fg-color, #999)",
@@ -13856,7 +13938,7 @@ function TimelineChart({
13856
13938
  i
13857
13939
  );
13858
13940
  }),
13859
- showMovingAverage && maPoints ? /* @__PURE__ */ jsx66(
13941
+ showMovingAverage && maPoints ? /* @__PURE__ */ jsx67(
13860
13942
  "polyline",
13861
13943
  {
13862
13944
  fill: "none",
@@ -13867,7 +13949,7 @@ function TimelineChart({
13867
13949
  strokeWidth: 1.5
13868
13950
  }
13869
13951
  ) : null,
13870
- /* @__PURE__ */ jsx66(
13952
+ /* @__PURE__ */ jsx67(
13871
13953
  "polyline",
13872
13954
  {
13873
13955
  fill: "none",
@@ -13877,7 +13959,7 @@ function TimelineChart({
13877
13959
  strokeWidth: 2.5
13878
13960
  }
13879
13961
  ),
13880
- active ? /* @__PURE__ */ jsx66(
13962
+ active ? /* @__PURE__ */ jsx67(
13881
13963
  "line",
13882
13964
  {
13883
13965
  stroke: "var(--card-border-color, #bbb)",
@@ -13890,7 +13972,7 @@ function TimelineChart({
13890
13972
  ) : null,
13891
13973
  computed.map((p, idx) => {
13892
13974
  const isActive = idx === activeIdx;
13893
- return /* @__PURE__ */ jsx66(
13975
+ return /* @__PURE__ */ jsx67(
13894
13976
  "circle",
13895
13977
  {
13896
13978
  cx: p.x,
@@ -13908,11 +13990,11 @@ function TimelineChart({
13908
13990
  ]
13909
13991
  }
13910
13992
  ),
13911
- active ? /* @__PURE__ */ jsx66(Tooltip13, { active, chartWidth: width }) : null
13993
+ active ? /* @__PURE__ */ jsx67(Tooltip13, { active, chartWidth: width }) : null
13912
13994
  ] }),
13913
13995
  /* @__PURE__ */ jsxs50(Flex36, { gap: 3, align: "center", children: [
13914
- /* @__PURE__ */ jsx66(LegendDot, { color: scoreHex(avgScore), label: "Score" }),
13915
- showMovingAverage ? /* @__PURE__ */ jsx66(
13996
+ /* @__PURE__ */ jsx67(LegendDot, { color: scoreHex(avgScore), label: "Score" }),
13997
+ showMovingAverage ? /* @__PURE__ */ jsx67(
13916
13998
  LegendDot,
13917
13999
  {
13918
14000
  color: "var(--card-muted-fg-color, #888)",
@@ -13920,7 +14002,7 @@ function TimelineChart({
13920
14002
  label: "5-point moving average"
13921
14003
  }
13922
14004
  ) : null,
13923
- /* @__PURE__ */ jsx66(Text50, { muted: true, size: 1, children: "Click a point to open the report" })
14005
+ /* @__PURE__ */ jsx67(Text50, { muted: true, size: 1, children: "Click a point to open the report" })
13924
14006
  ] })
13925
14007
  ] }) });
13926
14008
  }
@@ -13930,7 +14012,7 @@ function LegendDot({
13930
14012
  label
13931
14013
  }) {
13932
14014
  return /* @__PURE__ */ jsxs50(Flex36, { align: "center", gap: 2, children: [
13933
- /* @__PURE__ */ jsx66("svg", { height: "10", width: "22", children: /* @__PURE__ */ jsx66(
14015
+ /* @__PURE__ */ jsx67("svg", { height: "10", width: "22", children: /* @__PURE__ */ jsx67(
13934
14016
  "line",
13935
14017
  {
13936
14018
  stroke: color,
@@ -13942,14 +14024,14 @@ function LegendDot({
13942
14024
  y2: "5"
13943
14025
  }
13944
14026
  ) }),
13945
- /* @__PURE__ */ jsx66(Text50, { muted: true, size: 1, children: label })
14027
+ /* @__PURE__ */ jsx67(Text50, { muted: true, size: 1, children: label })
13946
14028
  ] });
13947
14029
  }
13948
14030
  function Tooltip13({ active, chartWidth }) {
13949
14031
  const cssX = active.x;
13950
14032
  const isRightEdge = cssX > chartWidth - 220;
13951
14033
  const left = isRightEdge ? cssX - 220 : cssX + 12;
13952
- return /* @__PURE__ */ jsx66(
14034
+ return /* @__PURE__ */ jsx67(
13953
14035
  Box34,
13954
14036
  {
13955
14037
  style: {
@@ -13966,9 +14048,9 @@ function Tooltip13({ active, chartWidth }) {
13966
14048
  top: 8
13967
14049
  },
13968
14050
  children: /* @__PURE__ */ jsxs50(Stack39, { space: 2, children: [
13969
- /* @__PURE__ */ jsx66(Text50, { size: 1, weight: "semibold", children: formatDateTime(active.date) }),
14051
+ /* @__PURE__ */ jsx67(Text50, { size: 1, weight: "semibold", children: formatDateTime(active.date) }),
13970
14052
  /* @__PURE__ */ jsxs50(Flex36, { gap: 2, align: "center", children: [
13971
- /* @__PURE__ */ jsx66(
14053
+ /* @__PURE__ */ jsx67(
13972
14054
  Box34,
13973
14055
  {
13974
14056
  style: {
@@ -13979,14 +14061,14 @@ function Tooltip13({ active, chartWidth }) {
13979
14061
  }
13980
14062
  }
13981
14063
  ),
13982
- /* @__PURE__ */ jsx66(Text50, { size: 2, weight: "bold", children: Math.round(active.score) }),
14064
+ /* @__PURE__ */ jsx67(Text50, { size: 2, weight: "bold", children: Math.round(active.score) }),
13983
14065
  active.count > 1 ? /* @__PURE__ */ jsxs50(Text50, { muted: true, size: 1, children: [
13984
14066
  "avg of ",
13985
14067
  active.count,
13986
14068
  " reports"
13987
14069
  ] }) : null
13988
14070
  ] }),
13989
- active.source.title ? /* @__PURE__ */ jsx66(Text50, { size: 1, children: active.source.title }) : null,
14071
+ active.source.title ? /* @__PURE__ */ jsx67(Text50, { size: 1, children: active.source.title }) : null,
13990
14072
  /* @__PURE__ */ jsxs50(Text50, { muted: true, size: 1, children: [
13991
14073
  active.source.mode,
13992
14074
  active.source.source ? ` \xB7 ${active.source.source}` : ""
@@ -14007,14 +14089,14 @@ import {
14007
14089
  LinkIcon as LinkIcon4,
14008
14090
  RefreshIcon
14009
14091
  } 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";
14092
+ import { Box as Box35, Button as Button14, Inline as Inline3, MenuDivider as MenuDivider4, MenuItem as MenuItem11 } from "@sanity/ui";
14093
+ import { useCallback as useCallback40 } from "react";
14012
14094
 
14013
14095
  // src/components/timeline/SelectChip.tsx
14014
14096
  import { ChevronDownIcon as ChevronDownIcon5 } from "@sanity/icons";
14015
- import { Button as Button13, Menu as Menu3, MenuButton as MenuButton3, MenuItem as MenuItem9 } from "@sanity/ui";
14097
+ import { Button as Button13, Menu as Menu3, MenuButton as MenuButton3, MenuItem as MenuItem10 } from "@sanity/ui";
14016
14098
  import { useId as useId2 } from "react";
14017
- import { jsx as jsx67 } from "react/jsx-runtime";
14099
+ import { jsx as jsx68 } from "react/jsx-runtime";
14018
14100
  function SelectChip({
14019
14101
  defaultValue,
14020
14102
  label,
@@ -14026,10 +14108,10 @@ function SelectChip({
14026
14108
  const current = options.find((o) => o.value === value);
14027
14109
  const displayValue = current?.label ?? value;
14028
14110
  const isActive = defaultValue !== void 0 && value !== defaultValue;
14029
- return /* @__PURE__ */ jsx67(
14111
+ return /* @__PURE__ */ jsx68(
14030
14112
  MenuButton3,
14031
14113
  {
14032
- button: /* @__PURE__ */ jsx67(
14114
+ button: /* @__PURE__ */ jsx68(
14033
14115
  Button13,
14034
14116
  {
14035
14117
  fontSize: 1,
@@ -14042,8 +14124,8 @@ function SelectChip({
14042
14124
  }
14043
14125
  ),
14044
14126
  id: menuId,
14045
- menu: /* @__PURE__ */ jsx67(Menu3, { style: { minWidth: 160 }, children: options.map((opt) => /* @__PURE__ */ jsx67(
14046
- MenuItem9,
14127
+ menu: /* @__PURE__ */ jsx68(Menu3, { style: { minWidth: 160 }, children: options.map((opt) => /* @__PURE__ */ jsx68(
14128
+ MenuItem10,
14047
14129
  {
14048
14130
  onClick: () => onChange(opt.value),
14049
14131
  selected: value === opt.value,
@@ -14062,7 +14144,7 @@ function SelectChip({
14062
14144
  }
14063
14145
 
14064
14146
  // src/components/timeline/TimelineFilters.tsx
14065
- import { Fragment as Fragment15, jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
14147
+ import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs51 } from "react/jsx-runtime";
14066
14148
  var BAR_STYLE2 = {
14067
14149
  alignItems: "center",
14068
14150
  background: "var(--card-bg-color)",
@@ -14099,11 +14181,11 @@ function TimelineFilters(props) {
14099
14181
  source,
14100
14182
  sourceOptions
14101
14183
  } = props;
14102
- const handleMaToggle = useCallback39(() => {
14184
+ const handleMaToggle = useCallback40(() => {
14103
14185
  onShowMovingAverageChange(!showMovingAverage);
14104
14186
  }, [onShowMovingAverageChange, showMovingAverage]);
14105
14187
  return /* @__PURE__ */ jsxs51("div", { style: BAR_STYLE2, children: [
14106
- /* @__PURE__ */ jsx68(
14188
+ /* @__PURE__ */ jsx69(
14107
14189
  SelectChip,
14108
14190
  {
14109
14191
  defaultValue: DEFAULT_RANGE,
@@ -14113,7 +14195,7 @@ function TimelineFilters(props) {
14113
14195
  value: range
14114
14196
  }
14115
14197
  ),
14116
- /* @__PURE__ */ jsx68(
14198
+ /* @__PURE__ */ jsx69(
14117
14199
  SelectChip,
14118
14200
  {
14119
14201
  defaultValue: DEFAULT_GRANULARITY,
@@ -14123,7 +14205,7 @@ function TimelineFilters(props) {
14123
14205
  value: granularity
14124
14206
  }
14125
14207
  ),
14126
- areaOptions.length > 0 && /* @__PURE__ */ jsx68(
14208
+ areaOptions.length > 0 && /* @__PURE__ */ jsx69(
14127
14209
  FilterChip,
14128
14210
  {
14129
14211
  label: "Area",
@@ -14133,7 +14215,7 @@ function TimelineFilters(props) {
14133
14215
  value: area
14134
14216
  }
14135
14217
  ),
14136
- modeOptions.length > 0 && /* @__PURE__ */ jsx68(
14218
+ modeOptions.length > 0 && /* @__PURE__ */ jsx69(
14137
14219
  FilterChip,
14138
14220
  {
14139
14221
  label: "Mode",
@@ -14142,7 +14224,7 @@ function TimelineFilters(props) {
14142
14224
  value: mode
14143
14225
  }
14144
14226
  ),
14145
- sourceOptions.length > 0 && /* @__PURE__ */ jsx68(
14227
+ sourceOptions.length > 0 && /* @__PURE__ */ jsx69(
14146
14228
  FilterChip,
14147
14229
  {
14148
14230
  label: "Source",
@@ -14151,7 +14233,7 @@ function TimelineFilters(props) {
14151
14233
  value: source
14152
14234
  }
14153
14235
  ),
14154
- ownerTeamOptions.length > 0 && /* @__PURE__ */ jsx68(
14236
+ ownerTeamOptions.length > 0 && /* @__PURE__ */ jsx69(
14155
14237
  FilterChip,
14156
14238
  {
14157
14239
  label: "Team",
@@ -14161,9 +14243,9 @@ function TimelineFilters(props) {
14161
14243
  value: ownerTeam
14162
14244
  }
14163
14245
  ),
14164
- /* @__PURE__ */ jsx68(Box35, { style: { flex: "1 0 0px" } }),
14246
+ /* @__PURE__ */ jsx69(Box35, { style: { flex: "1 0 0px" } }),
14165
14247
  /* @__PURE__ */ jsxs51(Inline3, { space: 1, children: [
14166
- /* @__PURE__ */ jsx68(
14248
+ /* @__PURE__ */ jsx69(
14167
14249
  Button14,
14168
14250
  {
14169
14251
  fontSize: 1,
@@ -14175,7 +14257,7 @@ function TimelineFilters(props) {
14175
14257
  tone: showMovingAverage ? "primary" : "default"
14176
14258
  }
14177
14259
  ),
14178
- /* @__PURE__ */ jsx68(
14260
+ /* @__PURE__ */ jsx69(
14179
14261
  Button14,
14180
14262
  {
14181
14263
  fontSize: 1,
@@ -14188,22 +14270,22 @@ function TimelineFilters(props) {
14188
14270
  text: "Refresh"
14189
14271
  }
14190
14272
  ),
14191
- /* @__PURE__ */ jsx68(
14273
+ /* @__PURE__ */ jsx69(
14192
14274
  SplitActionButton,
14193
14275
  {
14194
14276
  menuId: "timeline-share-actions",
14195
14277
  menu: /* @__PURE__ */ jsxs51(Fragment15, { children: [
14196
- /* @__PURE__ */ jsx68(
14197
- MenuItem10,
14278
+ /* @__PURE__ */ jsx69(
14279
+ MenuItem11,
14198
14280
  {
14199
14281
  icon: ClipboardIcon2,
14200
14282
  onClick: onCopyCsv,
14201
14283
  text: "Copy CSV to clipboard"
14202
14284
  }
14203
14285
  ),
14204
- /* @__PURE__ */ jsx68(MenuDivider4, {}),
14205
- /* @__PURE__ */ jsx68(
14206
- MenuItem10,
14286
+ /* @__PURE__ */ jsx69(MenuDivider4, {}),
14287
+ /* @__PURE__ */ jsx69(
14288
+ MenuItem11,
14207
14289
  {
14208
14290
  icon: DownloadIcon2,
14209
14291
  onClick: onExportCsv,
@@ -14226,12 +14308,12 @@ function TimelineFilters(props) {
14226
14308
 
14227
14309
  // src/components/timeline/TimelineSummary.tsx
14228
14310
  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";
14311
+ import { jsx as jsx70, jsxs as jsxs52 } from "react/jsx-runtime";
14230
14312
  function TimelineSummary({ area, stats }) {
14231
14313
  if (stats.count === 0) return null;
14232
- return /* @__PURE__ */ jsx69(Card24, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs52(Stack40, { space: 3, children: [
14314
+ return /* @__PURE__ */ jsx70(Card24, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs52(Stack40, { space: 3, children: [
14233
14315
  /* @__PURE__ */ jsxs52(Flex37, { align: "center", gap: 2, children: [
14234
- /* @__PURE__ */ jsx69(Text51, { size: 1, weight: "semibold", children: "Summary" }),
14316
+ /* @__PURE__ */ jsx70(Text51, { size: 1, weight: "semibold", children: "Summary" }),
14235
14317
  /* @__PURE__ */ jsxs52(Text51, { muted: true, size: 1, children: [
14236
14318
  area ? `Area: ${area}` : "Overall score",
14237
14319
  " \xB7 ",
@@ -14239,11 +14321,11 @@ function TimelineSummary({ area, stats }) {
14239
14321
  " report",
14240
14322
  stats.count === 1 ? "" : "s"
14241
14323
  ] }),
14242
- /* @__PURE__ */ jsx69(Box36, { flex: 1 }),
14243
- /* @__PURE__ */ jsx69(TrendPill, { stats })
14324
+ /* @__PURE__ */ jsx70(Box36, { flex: 1 }),
14325
+ /* @__PURE__ */ jsx70(TrendPill, { stats })
14244
14326
  ] }),
14245
14327
  /* @__PURE__ */ jsxs52(Grid7, { columns: [2, 2, 4], gap: 3, children: [
14246
- /* @__PURE__ */ jsx69(
14328
+ /* @__PURE__ */ jsx70(
14247
14329
  StatTile,
14248
14330
  {
14249
14331
  label: "Mean",
@@ -14251,8 +14333,8 @@ function TimelineSummary({ area, stats }) {
14251
14333
  sub: stats.stdev !== null ? `\xB1 ${stats.stdev.toFixed(1)} stdev` : null
14252
14334
  }
14253
14335
  ),
14254
- /* @__PURE__ */ jsx69(StatTile, { label: "Median", score: stats.median, sub: null }),
14255
- /* @__PURE__ */ jsx69(
14336
+ /* @__PURE__ */ jsx70(StatTile, { label: "Median", score: stats.median, sub: null }),
14337
+ /* @__PURE__ */ jsx70(
14256
14338
  StatTile,
14257
14339
  {
14258
14340
  label: "Best",
@@ -14260,7 +14342,7 @@ function TimelineSummary({ area, stats }) {
14260
14342
  sub: stats.max ? formatDateShort(stats.max.date) : null
14261
14343
  }
14262
14344
  ),
14263
- /* @__PURE__ */ jsx69(
14345
+ /* @__PURE__ */ jsx70(
14264
14346
  StatTile,
14265
14347
  {
14266
14348
  label: "Worst",
@@ -14273,10 +14355,10 @@ function TimelineSummary({ area, stats }) {
14273
14355
  }
14274
14356
  function TrendPill({ stats }) {
14275
14357
  if (stats.delta === null || stats.count < 2) {
14276
- return /* @__PURE__ */ jsx69(Badge13, { fontSize: 1, mode: "outline", tone: "default", children: "Single data point" });
14358
+ return /* @__PURE__ */ jsx70(Badge13, { fontSize: 1, mode: "outline", tone: "default", children: "Single data point" });
14277
14359
  }
14278
14360
  const { label, tone } = trendBadgeContent(stats.trend, stats.delta);
14279
- return /* @__PURE__ */ jsx69(Badge13, { fontSize: 1, mode: "default", tone, children: label });
14361
+ return /* @__PURE__ */ jsx70(Badge13, { fontSize: 1, mode: "default", tone, children: label });
14280
14362
  }
14281
14363
  function trendBadgeContent(trend, delta) {
14282
14364
  switch (trend) {
@@ -14294,14 +14376,14 @@ function StatTile({
14294
14376
  sub
14295
14377
  }) {
14296
14378
  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
14379
+ /* @__PURE__ */ jsx70(Text51, { muted: true, size: 1, weight: "medium", children: label }),
14380
+ 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) }),
14381
+ score !== null && sub ? /* @__PURE__ */ jsx70(Text51, { muted: true, size: 1, children: sub }) : null
14300
14382
  ] });
14301
14383
  }
14302
14384
 
14303
14385
  // src/components/timeline/useTimelineData.ts
14304
- import { useCallback as useCallback40, useEffect as useEffect17, useMemo as useMemo18, useState as useState31 } from "react";
14386
+ import { useCallback as useCallback41, useEffect as useEffect17, useMemo as useMemo18, useState as useState31 } from "react";
14305
14387
  import { useClient as useClient13 } from "sanity";
14306
14388
  function useTimelineData({
14307
14389
  mode,
@@ -14314,7 +14396,7 @@ function useTimelineData({
14314
14396
  const [loading, setLoading] = useState31(true);
14315
14397
  const [error, setError] = useState31(null);
14316
14398
  const [reloadCounter, setReloadCounter] = useState31(0);
14317
- const refresh = useCallback40(() => {
14399
+ const refresh = useCallback41(() => {
14318
14400
  setReloadCounter((n) => n + 1);
14319
14401
  }, []);
14320
14402
  const effectiveStart = useMemo18(
@@ -14356,7 +14438,7 @@ function useTimelineData({
14356
14438
  }
14357
14439
 
14358
14440
  // src/components/ScoreTimeline.tsx
14359
- import { Fragment as Fragment16, jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
14441
+ import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs53 } from "react/jsx-runtime";
14360
14442
  function buildSearchParams2(filters) {
14361
14443
  const params = [];
14362
14444
  if (filters.range !== DEFAULT_RANGE) params.push(["range", filters.range]);
@@ -14440,27 +14522,27 @@ function ScoreTimeline({
14440
14522
  [area, dataPoints, granularity]
14441
14523
  );
14442
14524
  const stats = useMemo19(() => computeStats(chartPoints, 5), [chartPoints]);
14443
- const handleSelectPoint = useCallback41(
14525
+ const handleSelectPoint = useCallback42(
14444
14526
  (point) => {
14445
14527
  const id = point.reportId ?? point._id;
14446
14528
  router.navigate({ reportId: id });
14447
14529
  },
14448
14530
  [router]
14449
14531
  );
14450
- const handleCopyUrl = useCallback41(() => {
14532
+ const handleCopyUrl = useCallback42(() => {
14451
14533
  if (typeof window === "undefined") return;
14452
14534
  void copyTextToClipboard(window.location.href);
14453
14535
  }, []);
14454
- const handleCopyCsv = useCallback41(() => {
14536
+ const handleCopyCsv = useCallback42(() => {
14455
14537
  void copyTextToClipboard(toCsv(dataPoints, area));
14456
14538
  }, [area, dataPoints]);
14457
- const handleExportCsv = useCallback41(() => {
14539
+ const handleExportCsv = useCallback42(() => {
14458
14540
  const csv = toCsv(dataPoints, area);
14459
14541
  const ts = (/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-").slice(0, 19);
14460
14542
  downloadCsv(csv, `score-timeline-${ts}.csv`);
14461
14543
  }, [area, dataPoints]);
14462
14544
  return /* @__PURE__ */ jsxs53(Stack41, { space: 4, children: [
14463
- /* @__PURE__ */ jsx70(
14545
+ /* @__PURE__ */ jsx71(
14464
14546
  TimelineFilters,
14465
14547
  {
14466
14548
  area,
@@ -14488,15 +14570,15 @@ function ScoreTimeline({
14488
14570
  sourceOptions
14489
14571
  }
14490
14572
  ),
14491
- error ? /* @__PURE__ */ jsx70(Card25, { padding: 4, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs53(Text52, { size: 2, children: [
14573
+ error ? /* @__PURE__ */ jsx71(Card25, { padding: 4, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs53(Text52, { size: 2, children: [
14492
14574
  "Failed to load timeline: ",
14493
14575
  error
14494
14576
  ] }) }) : 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" })
14577
+ loading ? /* @__PURE__ */ jsx71(Card25, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs53(Flex38, { align: "center", gap: 2, justify: "center", style: { height: 220 }, children: [
14578
+ /* @__PURE__ */ jsx71(Spinner, { muted: true }),
14579
+ /* @__PURE__ */ jsx71(Text52, { muted: true, size: 2, children: "Loading timeline\u2026" })
14498
14580
  ] }) }) : /* @__PURE__ */ jsxs53(Fragment16, { children: [
14499
- /* @__PURE__ */ jsx70(
14581
+ /* @__PURE__ */ jsx71(
14500
14582
  TimelineChart,
14501
14583
  {
14502
14584
  movingAverage: stats.movingAverage,
@@ -14505,20 +14587,20 @@ function ScoreTimeline({
14505
14587
  showMovingAverage
14506
14588
  }
14507
14589
  ),
14508
- /* @__PURE__ */ jsx70(TimelineSummary, { area, stats })
14590
+ /* @__PURE__ */ jsx71(TimelineSummary, { area, stats })
14509
14591
  ] })
14510
14592
  ] });
14511
14593
  }
14512
14594
  var ScoreTimeline_default = ScoreTimeline;
14513
14595
 
14514
14596
  // src/components/Dashboard.tsx
14515
- import { jsx as jsx71, jsxs as jsxs54 } from "react/jsx-runtime";
14597
+ import { jsx as jsx72, jsxs as jsxs54 } from "react/jsx-runtime";
14516
14598
  var VIEW_PARAM_MAP = {
14517
14599
  compare: "compare",
14518
14600
  timeline: "timeline"
14519
14601
  };
14520
14602
  function Dashboard() {
14521
- return /* @__PURE__ */ jsx71(HelpProvider, { children: /* @__PURE__ */ jsx71(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx71(DashboardShell, {}) }) });
14603
+ return /* @__PURE__ */ jsx72(HelpProvider, { children: /* @__PURE__ */ jsx72(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx72(DashboardShell, {}) }) });
14522
14604
  }
14523
14605
  function DashboardShell() {
14524
14606
  const router = useRouter5();
@@ -14528,7 +14610,7 @@ function DashboardShell() {
14528
14610
  useEffect18(() => {
14529
14611
  if (!reportId) closeDrawer();
14530
14612
  }, [reportId, closeDrawer]);
14531
- const handleJudgmentDrawerClose = useCallback42(() => {
14613
+ const handleJudgmentDrawerClose = useCallback43(() => {
14532
14614
  closeDrawer();
14533
14615
  const state = { ...router.state };
14534
14616
  if (state.focus) {
@@ -14537,9 +14619,9 @@ function DashboardShell() {
14537
14619
  }
14538
14620
  }, [closeDrawer, router]);
14539
14621
  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, {})
14622
+ /* @__PURE__ */ jsx72(Box37, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx72(DashboardContent, {}) }),
14623
+ /* @__PURE__ */ jsx72(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
14624
+ /* @__PURE__ */ jsx72(HelpDrawer, {})
14543
14625
  ] });
14544
14626
  }
14545
14627
  function DashboardContent() {
@@ -14550,7 +14632,7 @@ function DashboardContent() {
14550
14632
  const isDetail = reportId !== null;
14551
14633
  const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
14552
14634
  const defaultTopic = deriveHelpTopic(routerState);
14553
- const navigateToTab = useCallback42(
14635
+ const navigateToTab = useCallback43(
14554
14636
  (tab) => {
14555
14637
  if (tab === "latest") {
14556
14638
  router.navigate({});
@@ -14560,13 +14642,13 @@ function DashboardContent() {
14560
14642
  },
14561
14643
  [router]
14562
14644
  );
14563
- const handleSelectReport = useCallback42(
14645
+ const handleSelectReport = useCallback43(
14564
14646
  (id) => {
14565
14647
  router.navigate({ reportId: id });
14566
14648
  },
14567
14649
  [router]
14568
14650
  );
14569
- const handleTabChange = useCallback42(
14651
+ const handleTabChange = useCallback43(
14570
14652
  (tab, subTab, focus) => {
14571
14653
  if (!routerState.reportId) return;
14572
14654
  const state = {
@@ -14579,19 +14661,19 @@ function DashboardContent() {
14579
14661
  },
14580
14662
  [router, routerState.reportId]
14581
14663
  );
14582
- const handleBack = useCallback42(() => {
14664
+ const handleBack = useCallback43(() => {
14583
14665
  router.navigate({});
14584
14666
  }, [router]);
14585
- const handleOpenHelp = useCallback42(() => {
14667
+ const handleOpenHelp = useCallback43(() => {
14586
14668
  openHelp(defaultTopic);
14587
14669
  }, [openHelp, defaultTopic]);
14588
- return /* @__PURE__ */ jsx71(Container, { width: 4, children: /* @__PURE__ */ jsxs54(Stack42, { padding: 4, space: 4, children: [
14670
+ return /* @__PURE__ */ jsx72(Container, { width: 4, children: /* @__PURE__ */ jsxs54(Stack42, { padding: 4, space: 4, children: [
14589
14671
  /* @__PURE__ */ jsxs54(Flex39, { align: "center", gap: 3, children: [
14590
14672
  /* @__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" })
14673
+ /* @__PURE__ */ jsx72(Text53, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
14674
+ /* @__PURE__ */ jsx72(Text53, { muted: true, size: 2, children: "Evaluation reports and score trends" })
14593
14675
  ] }),
14594
- /* @__PURE__ */ jsx71(
14676
+ /* @__PURE__ */ jsx72(
14595
14677
  Button15,
14596
14678
  {
14597
14679
  icon: HelpCircleIcon8,
@@ -14603,7 +14685,7 @@ function DashboardContent() {
14603
14685
  )
14604
14686
  ] }),
14605
14687
  !isDetail && /* @__PURE__ */ jsxs54(TabList3, { space: 1, children: [
14606
- /* @__PURE__ */ jsx71(
14688
+ /* @__PURE__ */ jsx72(
14607
14689
  Tab3,
14608
14690
  {
14609
14691
  "aria-controls": "latest-panel",
@@ -14613,7 +14695,7 @@ function DashboardContent() {
14613
14695
  selected: activeTab === "latest"
14614
14696
  }
14615
14697
  ),
14616
- /* @__PURE__ */ jsx71(
14698
+ /* @__PURE__ */ jsx72(
14617
14699
  Tab3,
14618
14700
  {
14619
14701
  "aria-controls": "timeline-panel",
@@ -14623,7 +14705,7 @@ function DashboardContent() {
14623
14705
  selected: activeTab === "timeline"
14624
14706
  }
14625
14707
  ),
14626
- /* @__PURE__ */ jsx71(
14708
+ /* @__PURE__ */ jsx72(
14627
14709
  Tab3,
14628
14710
  {
14629
14711
  "aria-controls": "compare-panel",
@@ -14634,10 +14716,10 @@ function DashboardContent() {
14634
14716
  }
14635
14717
  )
14636
14718
  ] }),
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(
14719
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx72(LatestReports, { onSelectReport: handleSelectReport }) }),
14720
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx72(ScoreTimeline_default, {}) }),
14721
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx72(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx72(ComparisonView, {}) }),
14722
+ isDetail && reportId && /* @__PURE__ */ jsx72(
14641
14723
  ReportDetail,
14642
14724
  {
14643
14725
  activeTab: routerState.tab ?? null,
@@ -14705,7 +14787,7 @@ var ailfStructure = (S) => S.list().id("root").title("Content").items([
14705
14787
  // src/actions/RunEvaluationAction.tsx
14706
14788
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
14707
14789
  import { useToast as useToast10 } from "@sanity/ui";
14708
- import { useCallback as useCallback43, useEffect as useEffect19, useRef as useRef10, useState as useState33 } from "react";
14790
+ import { useCallback as useCallback44, useEffect as useEffect19, useRef as useRef10, useState as useState33 } from "react";
14709
14791
  import {
14710
14792
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
14711
14793
  useClient as useClient14,
@@ -14832,7 +14914,7 @@ function createRunEvaluationAction(options = {}) {
14832
14914
  }, 15e3);
14833
14915
  return () => clearTimeout(timer);
14834
14916
  }, [client, perspectiveId, state]);
14835
- const handleRequest = useCallback43(async () => {
14917
+ const handleRequest = useCallback44(async () => {
14836
14918
  const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
14837
14919
  const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
14838
14920
  const now = Date.now();