@sanity/ailf-studio 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18,9 +18,8 @@ var GraduateToNativeAction = (props) => {
18
18
  const [isConfirming, setIsConfirming] = useState(false);
19
19
  const doc = draft ?? published;
20
20
  const origin = doc?.origin;
21
- if (type !== "ailf.task" || !origin) return null;
22
- const repoDisplay = origin.repo ?? "an external repository";
23
- const repoUrl = origin.repo && origin.path && origin.branch ? `https://github.com/${origin.repo}/blob/${origin.branch}/${origin.path}` : null;
21
+ const repoDisplay = origin?.repo ?? "an external repository";
22
+ const repoUrl = origin?.repo && origin.path && origin.branch ? `https://github.com/${origin.repo}/blob/${origin.branch}/${origin.path}` : null;
24
23
  const handleGraduate = useCallback(async () => {
25
24
  try {
26
25
  const publishedId = id.replace(/^drafts\./, "");
@@ -34,6 +33,7 @@ var GraduateToNativeAction = (props) => {
34
33
  console.error("Failed to graduate task:", err);
35
34
  }
36
35
  }, [client, draft, id, onComplete]);
36
+ if (type !== "ailf.task" || !origin) return null;
37
37
  return {
38
38
  dialog: isConfirming ? {
39
39
  type: "confirm",
@@ -60,19 +60,26 @@ var GraduateToNativeAction = (props) => {
60
60
  onConfirm: handleGraduate
61
61
  } : void 0,
62
62
  icon: EditIcon,
63
- label: "Graduate to Native",
63
+ label: "Graduate to native task",
64
64
  onHandle: () => setIsConfirming(true),
65
+ title: "Disconnect this task from its source repo so it becomes fully editable in Studio. This cannot be undone.",
65
66
  tone: "caution"
66
67
  };
67
68
  };
68
69
  GraduateToNativeAction.displayName = "GraduateToNativeAction";
69
70
 
70
71
  // src/schema/eval-request.ts
71
- import { defineField, defineType } from "sanity";
72
+ import { ALL_FIELDS_GROUP, defineField, defineType } from "sanity";
72
73
  var evalRequestSchema = defineType({
74
+ groups: [
75
+ { name: "main", title: "Main", default: true },
76
+ { name: "optional", title: "Optional" },
77
+ ALL_FIELDS_GROUP
78
+ ],
73
79
  fields: [
74
80
  defineField({
75
81
  description: "Set when the pipeline completes",
82
+ group: ["optional", "all-fields"],
76
83
  name: "completedAt",
77
84
  readOnly: true,
78
85
  title: "Completed At",
@@ -80,6 +87,7 @@ var evalRequestSchema = defineType({
80
87
  }),
81
88
  defineField({
82
89
  description: "Sanity dataset name",
90
+ group: ["main", "all-fields"],
83
91
  name: "dataset",
84
92
  readOnly: true,
85
93
  title: "Dataset",
@@ -88,6 +96,7 @@ var evalRequestSchema = defineType({
88
96
  }),
89
97
  defineField({
90
98
  description: "Set by webhook handler when GitHub dispatch succeeds",
99
+ group: ["optional", "all-fields"],
91
100
  name: "dispatchedAt",
92
101
  readOnly: true,
93
102
  title: "Dispatched At",
@@ -95,6 +104,7 @@ var evalRequestSchema = defineType({
95
104
  }),
96
105
  defineField({
97
106
  description: "Error message if dispatch or pipeline failed",
107
+ group: ["optional", "all-fields"],
98
108
  name: "error",
99
109
  readOnly: true,
100
110
  title: "Error",
@@ -102,6 +112,7 @@ var evalRequestSchema = defineType({
102
112
  }),
103
113
  defineField({
104
114
  description: "Evaluation mode",
115
+ group: ["main", "all-fields"],
105
116
  initialValue: "baseline",
106
117
  name: "mode",
107
118
  options: {
@@ -118,6 +129,7 @@ var evalRequestSchema = defineType({
118
129
  }),
119
130
  defineField({
120
131
  description: "Content release perspective ID",
132
+ group: ["main", "all-fields"],
121
133
  name: "perspective",
122
134
  readOnly: true,
123
135
  title: "Perspective",
@@ -126,6 +138,7 @@ var evalRequestSchema = defineType({
126
138
  }),
127
139
  defineField({
128
140
  description: "Sanity project ID",
141
+ group: ["main", "all-fields"],
129
142
  name: "projectId",
130
143
  readOnly: true,
131
144
  title: "Project ID",
@@ -134,6 +147,7 @@ var evalRequestSchema = defineType({
134
147
  }),
135
148
  defineField({
136
149
  description: "Links to the resulting ailf.report document's reportId",
150
+ group: ["optional", "all-fields"],
137
151
  name: "reportId",
138
152
  readOnly: true,
139
153
  title: "Report ID",
@@ -141,6 +155,7 @@ var evalRequestSchema = defineType({
141
155
  }),
142
156
  defineField({
143
157
  description: "ISO timestamp of when the request was created",
158
+ group: ["main", "all-fields"],
144
159
  name: "requestedAt",
145
160
  readOnly: true,
146
161
  title: "Requested At",
@@ -149,6 +164,7 @@ var evalRequestSchema = defineType({
149
164
  }),
150
165
  defineField({
151
166
  description: "User ID of the person who clicked the button",
167
+ group: ["optional", "all-fields"],
152
168
  name: "requestedBy",
153
169
  readOnly: true,
154
170
  title: "Requested By",
@@ -156,6 +172,7 @@ var evalRequestSchema = defineType({
156
172
  }),
157
173
  defineField({
158
174
  description: "Request lifecycle: pending \u2192 dispatched \u2192 completed \u2192 failed. Only 'pending' is set by Studio; the webhook handler and pipeline callback update subsequent states.",
175
+ group: ["main", "all-fields"],
159
176
  initialValue: "pending",
160
177
  name: "status",
161
178
  options: {
@@ -173,6 +190,7 @@ var evalRequestSchema = defineType({
173
190
  }),
174
191
  defineField({
175
192
  description: 'Publish tag for the report (e.g. "release-my-release-2026-03-16")',
193
+ group: ["optional", "all-fields"],
176
194
  name: "tag",
177
195
  readOnly: true,
178
196
  title: "Tag",
@@ -197,11 +215,17 @@ var evalRequestSchema = defineType({
197
215
  });
198
216
 
199
217
  // src/schema/feature-area.ts
200
- import { defineField as defineField2, defineType as defineType2 } from "sanity";
218
+ import { ALL_FIELDS_GROUP as ALL_FIELDS_GROUP2, defineField as defineField2, defineType as defineType2 } from "sanity";
201
219
  var featureAreaSchema = defineType2({
220
+ groups: [
221
+ { name: "main", title: "Main", default: true },
222
+ { name: "optional", title: "Optional" },
223
+ ALL_FIELDS_GROUP2
224
+ ],
202
225
  fields: [
203
226
  defineField2({
204
227
  description: 'Unique stable identifier (e.g., "groq"). Must be lowercase alphanumeric with hyphens. Used for CLI filtering (--area groq) and score aggregation.',
228
+ group: ["main", "all-fields"],
205
229
  name: "areaId",
206
230
  title: "Area ID",
207
231
  type: "slug",
@@ -214,6 +238,7 @@ var featureAreaSchema = defineType2({
214
238
  }),
215
239
  defineField2({
216
240
  description: 'Human-readable label shown in Studio and reports (e.g., "GROQ Query Language")',
241
+ group: ["main", "all-fields"],
217
242
  name: "description",
218
243
  title: "Description",
219
244
  type: "string",
@@ -221,12 +246,14 @@ var featureAreaSchema = defineType2({
221
246
  }),
222
247
  defineField2({
223
248
  description: "Team or person responsible for this feature area (optional)",
249
+ group: ["optional", "all-fields"],
224
250
  name: "owner",
225
251
  title: "Owner",
226
252
  type: "string"
227
253
  }),
228
254
  defineField2({
229
255
  description: "Additional categorization labels for filtering",
256
+ group: ["optional", "all-fields"],
230
257
  name: "tags",
231
258
  of: [{ type: "string" }],
232
259
  title: "Tags",
@@ -252,31 +279,25 @@ var featureAreaSchema = defineType2({
252
279
  });
253
280
 
254
281
  // src/schema/reference-solution.ts
255
- import { defineField as defineField3, defineType as defineType3 } from "sanity";
282
+ import { ALL_FIELDS_GROUP as ALL_FIELDS_GROUP3, defineField as defineField3, defineType as defineType3 } from "sanity";
256
283
  var referenceSolutionSchema = defineType3({
284
+ groups: [
285
+ { name: "main", title: "Main", default: true },
286
+ { name: "optional", title: "Optional" },
287
+ ALL_FIELDS_GROUP3
288
+ ],
257
289
  fields: [
258
290
  defineField3({
259
291
  description: "Human-readable label for this reference solution",
292
+ group: ["main", "all-fields"],
260
293
  name: "title",
261
294
  title: "Title",
262
295
  type: "string",
263
296
  validation: (rule) => rule.required()
264
297
  }),
265
- defineField3({
266
- description: "Primary programming language of the solution",
267
- initialValue: "typescript",
268
- name: "language",
269
- options: {
270
- list: [
271
- { title: "TypeScript", value: "typescript" },
272
- { title: "JavaScript", value: "javascript" }
273
- ]
274
- },
275
- title: "Language",
276
- type: "string"
277
- }),
278
298
  defineField3({
279
299
  description: "Gold-standard implementation with code blocks and prose explanation. Use code blocks for the implementation and regular text to explain why this is the correct approach.",
300
+ group: ["main", "all-fields"],
280
301
  name: "content",
281
302
  of: [{ type: "block" }, { type: "code" }],
282
303
  title: "Content",
@@ -284,28 +305,23 @@ var referenceSolutionSchema = defineType3({
284
305
  }),
285
306
  defineField3({
286
307
  description: "CDN-uploaded files for multi-file solutions (e.g., a Next.js page + a schema + a config). Each file is uploaded as an asset with its filename preserved.",
308
+ group: ["optional", "all-fields"],
287
309
  name: "files",
288
310
  of: [{ type: "file" }],
289
311
  title: "Files",
290
312
  type: "array"
291
313
  }),
292
314
  defineField3({
293
- description: "Why this is the correct approach \u2014 rationale and design decisions",
315
+ description: "Describe why this is the correct approach, including any rationale and decisions.",
316
+ group: ["optional", "all-fields"],
294
317
  name: "notes",
295
- title: "Notes",
318
+ title: "Author Notes",
296
319
  type: "text"
297
320
  })
298
321
  ],
299
322
  name: "ailf.referenceSolution",
300
323
  preview: {
301
- prepare({ language, title }) {
302
- return {
303
- subtitle: typeof language === "string" ? language : "",
304
- title: typeof title === "string" ? title : "Reference Solution"
305
- };
306
- },
307
324
  select: {
308
- language: "language",
309
325
  title: "title"
310
326
  }
311
327
  },
@@ -314,7 +330,7 @@ var referenceSolutionSchema = defineType3({
314
330
  });
315
331
 
316
332
  // src/schema/report.ts
317
- import { defineField as defineField4, defineType as defineType4 } from "sanity";
333
+ import { ALL_FIELDS_GROUP as ALL_FIELDS_GROUP4, defineField as defineField4, defineType as defineType4 } from "sanity";
318
334
  function documentRefSchema() {
319
335
  return {
320
336
  fields: [
@@ -327,8 +343,14 @@ function documentRefSchema() {
327
343
  };
328
344
  }
329
345
  var reportSchema = defineType4({
346
+ groups: [
347
+ { name: "main", title: "Main", default: true },
348
+ { name: "optional", title: "Optional" },
349
+ ALL_FIELDS_GROUP4
350
+ ],
330
351
  fields: [
331
352
  defineField4({
353
+ group: ["main", "all-fields"],
332
354
  name: "reportId",
333
355
  readOnly: true,
334
356
  title: "Report ID",
@@ -336,6 +358,7 @@ var reportSchema = defineType4({
336
358
  validation: (rule) => rule.required()
337
359
  }),
338
360
  defineField4({
361
+ group: ["main", "all-fields"],
339
362
  name: "completedAt",
340
363
  readOnly: true,
341
364
  title: "Completed At",
@@ -343,12 +366,14 @@ var reportSchema = defineType4({
343
366
  validation: (rule) => rule.required()
344
367
  }),
345
368
  defineField4({
369
+ group: ["optional", "all-fields"],
346
370
  name: "durationMs",
347
371
  readOnly: true,
348
372
  title: "Duration (ms)",
349
373
  type: "number"
350
374
  }),
351
375
  defineField4({
376
+ group: ["optional", "all-fields"],
352
377
  name: "tag",
353
378
  readOnly: true,
354
379
  title: "Tag",
@@ -528,6 +553,7 @@ var reportSchema = defineType4({
528
553
  type: "object"
529
554
  })
530
555
  ],
556
+ group: ["main", "all-fields"],
531
557
  name: "provenance",
532
558
  readOnly: true,
533
559
  title: "Provenance",
@@ -976,6 +1002,7 @@ var reportSchema = defineType4({
976
1002
  type: "array"
977
1003
  })
978
1004
  ],
1005
+ group: ["main", "all-fields"],
979
1006
  name: "summary",
980
1007
  readOnly: true,
981
1008
  title: "Score Summary",
@@ -1047,6 +1074,7 @@ var reportSchema = defineType4({
1047
1074
  type: "string"
1048
1075
  })
1049
1076
  ],
1077
+ group: ["optional", "all-fields"],
1050
1078
  name: "comparison",
1051
1079
  readOnly: true,
1052
1080
  title: "Auto-Comparison",
@@ -1078,7 +1106,7 @@ var reportSchema = defineType4({
1078
1106
  });
1079
1107
 
1080
1108
  // src/schema/task.ts
1081
- import { defineField as defineField5, defineType as defineType5 } from "sanity";
1109
+ import { ALL_FIELDS_GROUP as ALL_FIELDS_GROUP5, defineField as defineField5, defineType as defineType5 } from "sanity";
1082
1110
 
1083
1111
  // src/components/AssertionInput.tsx
1084
1112
  import { HelpCircleIcon } from "@sanity/icons";
@@ -1269,58 +1297,18 @@ import { useCallback as useCallback3 } from "react";
1269
1297
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1270
1298
  var REF_TYPE_HELP = {
1271
1299
  slug: {
1272
- description: "Resolves a single article by its slug field. This is the most common type for referencing published documentation. Note: slugs may not be unique across sections \u2014 prefer path for unambiguous references.",
1273
- valueHint: "The article's slug (e.g. 'groq-introduction').",
1274
- example: "groq-introduction"
1275
- },
1276
- path: {
1277
- description: "Resolves a single article by its full URL path after /docs/. This is unique across sections and is the most reliable way to reference a specific article.",
1278
- valueHint: "Full path after /docs/ (e.g. 'groq/groq-introduction').",
1279
- example: "groq/groq-introduction"
1280
- },
1281
- id: {
1282
- description: "Resolves a single document by its Sanity _id. Use this for drafts, imports, or documents that don't have a stable slug or path yet.",
1283
- valueHint: "The Sanity document _id (e.g. 'article-3f8a2b1c').",
1284
- example: "article-3f8a2b1c"
1300
+ description: "References a single article document. Use the document picker below to select the article. The pipeline reads the slug, path, and ID directly from the referenced document.",
1301
+ valueHint: "Select an article document using the picker below."
1285
1302
  },
1286
1303
  perspective: {
1287
- description: "Includes all articles from a content release. Use this when evaluating new feature documentation that only exists in a release \u2014 the pipeline auto-discovers all articles in the release at evaluation time.",
1288
- valueHint: "The content release ID (bundle name).",
1289
- example: "bundle-chatbox-launch"
1304
+ description: "Includes all articles from a content release. Use the release picker below to select a release. The pipeline auto-discovers every article in the release at evaluation time.",
1305
+ valueHint: "Select a content release using the picker below."
1290
1306
  }
1291
1307
  };
1292
1308
  function RefTypeHelpCard({ help }) {
1293
- return /* @__PURE__ */ jsx3(Card2, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ jsxs3(Stack3, { space: 3, children: [
1294
- /* @__PURE__ */ jsxs3(Flex2, { align: "flex-start", gap: 2, children: [
1295
- /* @__PURE__ */ jsx3(Box3, { style: { flexShrink: 0, marginTop: 1 }, children: /* @__PURE__ */ jsx3(Text3, { size: 1, muted: true, children: /* @__PURE__ */ jsx3(HelpCircleIcon2, {}) }) }),
1296
- /* @__PURE__ */ jsx3(Text3, { size: 1, muted: true, children: help.description })
1297
- ] }),
1298
- /* @__PURE__ */ jsxs3(Stack3, { space: 2, paddingLeft: 4, children: [
1299
- /* @__PURE__ */ jsxs3(Text3, { size: 0, muted: true, children: [
1300
- /* @__PURE__ */ jsx3("strong", { children: "Value:" }),
1301
- " ",
1302
- help.valueHint
1303
- ] }),
1304
- help.example && /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, children: [
1305
- /* @__PURE__ */ jsx3(Text3, { size: 0, muted: true, children: /* @__PURE__ */ jsx3("strong", { children: "Example:" }) }),
1306
- /* @__PURE__ */ jsx3(
1307
- Box3,
1308
- {
1309
- marginTop: 1,
1310
- style: {
1311
- background: "var(--card-code-bg-color, #f5f5f5)",
1312
- borderRadius: 3,
1313
- padding: "6px 8px",
1314
- fontFamily: '"SF Mono", "Fira Code", Menlo, Consolas, monospace',
1315
- fontSize: 12,
1316
- lineHeight: 1.5,
1317
- whiteSpace: "pre-wrap"
1318
- },
1319
- children: help.example
1320
- }
1321
- )
1322
- ] })
1323
- ] })
1309
+ return /* @__PURE__ */ jsx3(Card2, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ jsxs3(Flex2, { align: "flex-start", gap: 2, children: [
1310
+ /* @__PURE__ */ jsx3(Box3, { style: { flexShrink: 0, marginTop: 1 }, children: /* @__PURE__ */ jsx3(Text3, { size: 1, muted: true, children: /* @__PURE__ */ jsx3(HelpCircleIcon2, {}) }) }),
1311
+ /* @__PURE__ */ jsx3(Text3, { size: 1, muted: true, children: help.description })
1324
1312
  ] }) });
1325
1313
  }
1326
1314
  function CanonicalDocInput(props) {
@@ -1344,16 +1332,80 @@ function CanonicalDocInput(props) {
1344
1332
  return /* @__PURE__ */ jsx3(Fragment2, { children: props.renderDefault({ ...props, renderField }) });
1345
1333
  }
1346
1334
 
1335
+ // src/components/CanonicalDocPreview.tsx
1336
+ import { Flex as Flex3, Text as Text4 } from "@sanity/ui";
1337
+ import { useMemo } from "react";
1338
+ import {
1339
+ getReleaseIdFromReleaseDocumentId,
1340
+ useActiveReleases,
1341
+ useArchivedReleases
1342
+ } from "sanity";
1343
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1344
+ function CanonicalDocPreview(props) {
1345
+ const { perspective, perspectiveTitle, reason, refType, slug, path } = props;
1346
+ const isPerspective = refType === "perspective";
1347
+ const { data: activeReleases } = useActiveReleases();
1348
+ const { data: archivedReleases } = useArchivedReleases();
1349
+ const resolvedTitle = useMemo(() => {
1350
+ if (!isPerspective) {
1351
+ return typeof props.title === "string" ? props.title : "Document";
1352
+ }
1353
+ if (typeof perspectiveTitle === "string" && perspectiveTitle.length > 0) {
1354
+ return perspectiveTitle;
1355
+ }
1356
+ if (typeof perspective === "string") {
1357
+ const allReleases = [
1358
+ ...activeReleases ?? [],
1359
+ ...archivedReleases ?? []
1360
+ ];
1361
+ const match = allReleases.find(
1362
+ (r) => getReleaseIdFromReleaseDocumentId(r._id) === perspective
1363
+ );
1364
+ if (match?.metadata?.title) {
1365
+ return match.metadata.title;
1366
+ }
1367
+ }
1368
+ return typeof perspective === "string" ? perspective : "Content Release";
1369
+ }, [
1370
+ isPerspective,
1371
+ perspectiveTitle,
1372
+ perspective,
1373
+ activeReleases,
1374
+ archivedReleases,
1375
+ props.title
1376
+ ]);
1377
+ const icon = isPerspective ? "\u{1F4E6}" : "\u{1F4C4}";
1378
+ let subtitle;
1379
+ if (typeof reason === "string" && reason.length > 0) {
1380
+ subtitle = reason;
1381
+ } else if (isPerspective && typeof perspective === "string") {
1382
+ subtitle = perspective;
1383
+ } else if (typeof slug === "string") {
1384
+ subtitle = slug;
1385
+ } else if (typeof path === "string") {
1386
+ subtitle = path;
1387
+ } else {
1388
+ subtitle = "";
1389
+ }
1390
+ return /* @__PURE__ */ jsxs4(Flex3, { align: "center", gap: 2, padding: 2, children: [
1391
+ /* @__PURE__ */ jsx4(Text4, { size: 1, children: icon }),
1392
+ /* @__PURE__ */ jsxs4(Flex3, { direction: "column", gap: 1, flex: 1, children: [
1393
+ /* @__PURE__ */ jsx4(Text4, { size: 1, weight: "semibold", children: resolvedTitle }),
1394
+ subtitle && /* @__PURE__ */ jsx4(Text4, { muted: true, size: 0, children: subtitle })
1395
+ ] })
1396
+ ] });
1397
+ }
1398
+
1347
1399
  // src/components/OriginInput.tsx
1348
1400
  import { Stack as Stack5 } from "@sanity/ui";
1349
1401
 
1350
1402
  // src/components/MirrorBanner.tsx
1351
1403
  import { LinkIcon } from "@sanity/icons";
1352
- import { Card as Card3, Flex as Flex3, Stack as Stack4, Text as Text5 } from "@sanity/ui";
1404
+ import { Card as Card3, Flex as Flex4, Stack as Stack4, Text as Text6 } from "@sanity/ui";
1353
1405
 
1354
1406
  // src/components/SyncStatusBadge.tsx
1355
- import { Badge, Box as Box4, Text as Text4, Tooltip } from "@sanity/ui";
1356
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1407
+ import { Badge, Box as Box4, Text as Text5, Tooltip } from "@sanity/ui";
1408
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1357
1409
  var MS_PER_DAY = 24 * 60 * 60 * 1e3;
1358
1410
  var FRESH_THRESHOLD_MS = 3 * MS_PER_DAY;
1359
1411
  var STALE_THRESHOLD_MS = 7 * MS_PER_DAY;
@@ -1377,33 +1429,33 @@ function SyncStatusBadge({
1377
1429
  const label = ageMs < FRESH_THRESHOLD_MS ? "Synced" : ageMs < STALE_THRESHOLD_MS ? "Stale" : "Outdated";
1378
1430
  const ageStr = formatAge(ageMs);
1379
1431
  const shaStr = commitSha ? ` \xB7 ${commitSha.slice(0, 7)}` : "";
1380
- return /* @__PURE__ */ jsx4(
1432
+ return /* @__PURE__ */ jsx5(
1381
1433
  Tooltip,
1382
1434
  {
1383
- content: /* @__PURE__ */ jsx4(Box4, { padding: 2, children: /* @__PURE__ */ jsxs4(Text4, { size: 1, children: [
1435
+ content: /* @__PURE__ */ jsx5(Box4, { padding: 2, children: /* @__PURE__ */ jsxs5(Text5, { size: 1, children: [
1384
1436
  "Last synced ",
1385
1437
  ageStr,
1386
1438
  shaStr
1387
1439
  ] }) }),
1388
1440
  portal: true,
1389
- children: /* @__PURE__ */ jsx4(Badge, { fontSize, tone, children: label })
1441
+ children: /* @__PURE__ */ jsx5(Badge, { fontSize, tone, children: label })
1390
1442
  }
1391
1443
  );
1392
1444
  }
1393
1445
 
1394
1446
  // src/components/MirrorBanner.tsx
1395
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1447
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1396
1448
  function MirrorBanner({ origin }) {
1397
1449
  const { repo, path, branch, commitSha, lastSyncedAt } = origin;
1398
1450
  const repoUrl = repo && path && branch ? `https://github.com/${repo}/blob/${branch}/${path}` : null;
1399
1451
  const repoDisplay = repo ?? "an external repository";
1400
- return /* @__PURE__ */ jsx5(Card3, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ jsxs5(Stack4, { space: 3, children: [
1401
- /* @__PURE__ */ jsxs5(Flex3, { align: "center", gap: 2, children: [
1402
- /* @__PURE__ */ jsx5(Text5, { size: 1, children: /* @__PURE__ */ jsx5(LinkIcon, {}) }),
1403
- /* @__PURE__ */ jsxs5(Text5, { size: 1, children: [
1452
+ return /* @__PURE__ */ jsx6(Card3, { padding: 3, radius: 2, tone: "transparent", border: true, children: /* @__PURE__ */ jsxs6(Stack4, { space: 3, children: [
1453
+ /* @__PURE__ */ jsxs6(Flex4, { align: "center", gap: 2, children: [
1454
+ /* @__PURE__ */ jsx6(Text6, { size: 1, children: /* @__PURE__ */ jsx6(LinkIcon, {}) }),
1455
+ /* @__PURE__ */ jsxs6(Text6, { size: 1, children: [
1404
1456
  "This task is managed in",
1405
1457
  " ",
1406
- repoUrl ? /* @__PURE__ */ jsx5(
1458
+ repoUrl ? /* @__PURE__ */ jsx6(
1407
1459
  "a",
1408
1460
  {
1409
1461
  href: repoUrl,
@@ -1412,12 +1464,12 @@ function MirrorBanner({ origin }) {
1412
1464
  style: { fontWeight: 600 },
1413
1465
  children: repoDisplay
1414
1466
  }
1415
- ) : /* @__PURE__ */ jsx5("strong", { children: repoDisplay }),
1467
+ ) : /* @__PURE__ */ jsx6("strong", { children: repoDisplay }),
1416
1468
  ". Edit it there to make changes."
1417
1469
  ] })
1418
1470
  ] }),
1419
- /* @__PURE__ */ jsxs5(Flex3, { align: "center", gap: 2, wrap: "wrap", children: [
1420
- lastSyncedAt && /* @__PURE__ */ jsx5(
1471
+ /* @__PURE__ */ jsxs6(Flex4, { align: "center", gap: 2, wrap: "wrap", children: [
1472
+ lastSyncedAt && /* @__PURE__ */ jsx6(
1421
1473
  SyncStatusBadge,
1422
1474
  {
1423
1475
  lastSyncedAt,
@@ -1425,17 +1477,17 @@ function MirrorBanner({ origin }) {
1425
1477
  fontSize: 0
1426
1478
  }
1427
1479
  ),
1428
- branch && /* @__PURE__ */ jsxs5(Text5, { size: 0, muted: true, children: [
1480
+ branch && /* @__PURE__ */ jsxs6(Text6, { size: 0, muted: true, children: [
1429
1481
  branch,
1430
1482
  commitSha ? ` @ ${commitSha.slice(0, 7)}` : ""
1431
1483
  ] }),
1432
- path && /* @__PURE__ */ jsx5(Text5, { size: 0, muted: true, children: path })
1484
+ path && /* @__PURE__ */ jsx6(Text6, { size: 0, muted: true, children: path })
1433
1485
  ] })
1434
1486
  ] }) });
1435
1487
  }
1436
1488
 
1437
1489
  // src/components/OriginInput.tsx
1438
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1490
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1439
1491
  function OriginInput(props) {
1440
1492
  const value = props.value;
1441
1493
  if (!value) return props.renderDefault(props);
@@ -1448,12 +1500,123 @@ function OriginInput(props) {
1448
1500
  commitSha: typeof value.commitSha === "string" ? value.commitSha : void 0,
1449
1501
  lastSyncedAt: typeof value.lastSyncedAt === "string" ? value.lastSyncedAt : void 0
1450
1502
  };
1451
- return /* @__PURE__ */ jsxs6(Stack5, { space: 3, children: [
1452
- /* @__PURE__ */ jsx6(MirrorBanner, { origin }),
1503
+ return /* @__PURE__ */ jsxs7(Stack5, { space: 3, children: [
1504
+ /* @__PURE__ */ jsx7(MirrorBanner, { origin }),
1453
1505
  props.renderDefault(props)
1454
1506
  ] });
1455
1507
  }
1456
1508
 
1509
+ // src/components/ReleasePicker.tsx
1510
+ import { SearchIcon } from "@sanity/icons";
1511
+ import { Autocomplete, Badge as Badge2, Card as Card4, Flex as Flex5, Stack as Stack6, Text as Text7 } from "@sanity/ui";
1512
+ import { useCallback as useCallback4, useEffect, useMemo as useMemo2, useRef } from "react";
1513
+ import {
1514
+ getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId2,
1515
+ PatchEvent,
1516
+ set,
1517
+ unset,
1518
+ useActiveReleases as useActiveReleases2,
1519
+ useArchivedReleases as useArchivedReleases2,
1520
+ useFormCallbacks
1521
+ } from "sanity";
1522
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1523
+ function StateBadge({ state }) {
1524
+ const tone = state === "active" ? "positive" : state === "published" ? "primary" : "default";
1525
+ return /* @__PURE__ */ jsx8(Badge2, { fontSize: 0, tone, children: state });
1526
+ }
1527
+ function ReleasePicker(props) {
1528
+ const { onChange, path, value = "" } = props;
1529
+ const { data: activeReleases } = useActiveReleases2();
1530
+ const { data: archivedReleases } = useArchivedReleases2();
1531
+ const { onChange: formOnChange } = useFormCallbacks();
1532
+ const titlePath = useMemo2(
1533
+ () => [...path.slice(0, -1), "perspectiveTitle"],
1534
+ [path]
1535
+ );
1536
+ const options = useMemo2(() => {
1537
+ const releases = [
1538
+ ...(activeReleases ?? []).map((r) => ({ ...r, _state: "active" })),
1539
+ ...(archivedReleases ?? []).map((r) => ({ ...r, _state: "archived" }))
1540
+ ];
1541
+ const result = releases.map((release) => {
1542
+ const releaseId = getReleaseIdFromReleaseDocumentId2(release._id);
1543
+ const title = release.metadata?.title ?? releaseId;
1544
+ const state = release.state ?? release._state ?? "unknown";
1545
+ return {
1546
+ payload: { state: String(state), title },
1547
+ value: releaseId
1548
+ };
1549
+ }).sort((a, b) => {
1550
+ if (a.payload.state === "active" && b.payload.state !== "active")
1551
+ return -1;
1552
+ if (a.payload.state !== "active" && b.payload.state === "active")
1553
+ return 1;
1554
+ return a.payload.title.localeCompare(b.payload.title);
1555
+ });
1556
+ return result;
1557
+ }, [activeReleases, archivedReleases]);
1558
+ const hasSynced = useRef(false);
1559
+ useEffect(() => {
1560
+ if (hasSynced.current || !value || options.length === 0) return;
1561
+ const match = options.find((o) => o.value === value);
1562
+ if (match && match.payload.title !== value) {
1563
+ hasSynced.current = true;
1564
+ formOnChange(PatchEvent.from(set(match.payload.title, titlePath)));
1565
+ }
1566
+ }, [value, options, formOnChange, titlePath]);
1567
+ const handleChange = useCallback4(
1568
+ (newValue) => {
1569
+ if (newValue) {
1570
+ onChange(set(newValue));
1571
+ const option = options.find((o) => o.value === newValue);
1572
+ const title = option?.payload.title ?? newValue;
1573
+ formOnChange(PatchEvent.from(set(title, titlePath)));
1574
+ } else {
1575
+ onChange(unset());
1576
+ formOnChange(PatchEvent.from(unset(titlePath)));
1577
+ }
1578
+ },
1579
+ [onChange, formOnChange, titlePath, options]
1580
+ );
1581
+ return /* @__PURE__ */ jsxs8(Stack6, { space: 2, children: [
1582
+ /* @__PURE__ */ jsx8(
1583
+ Autocomplete,
1584
+ {
1585
+ filterOption: (query, option) => {
1586
+ const q = query.toLowerCase();
1587
+ const opt = option;
1588
+ return opt.value.toLowerCase().includes(q) || (opt.payload?.title ?? "").toLowerCase().includes(q);
1589
+ },
1590
+ icon: SearchIcon,
1591
+ id: "canonical-doc-release-picker",
1592
+ onChange: handleChange,
1593
+ openButton: true,
1594
+ options,
1595
+ placeholder: "Search releases by title or ID\u2026",
1596
+ renderOption: (option) => {
1597
+ const opt = option;
1598
+ return /* @__PURE__ */ jsx8(Card4, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs8(Flex5, { align: "center", gap: 2, children: [
1599
+ /* @__PURE__ */ jsxs8(Stack6, { flex: 1, space: 1, children: [
1600
+ /* @__PURE__ */ jsx8(Text7, { size: 1, weight: "semibold", children: opt.payload.title }),
1601
+ opt.payload.title !== opt.value && /* @__PURE__ */ jsx8(Text7, { muted: true, size: 1, children: opt.value })
1602
+ ] }),
1603
+ /* @__PURE__ */ jsx8(StateBadge, { state: opt.payload.state })
1604
+ ] }) });
1605
+ },
1606
+ renderValue: (_v, option) => {
1607
+ const opt = option;
1608
+ return opt?.payload?.title ?? _v;
1609
+ },
1610
+ value
1611
+ }
1612
+ ),
1613
+ value && /* @__PURE__ */ jsxs8(Text7, { muted: true, size: 0, children: [
1614
+ "Release ID: ",
1615
+ /* @__PURE__ */ jsx8("code", { children: value })
1616
+ ] })
1617
+ ] });
1618
+ }
1619
+
1457
1620
  // src/schema/task.ts
1458
1621
  var ASSERTION_TYPES = [
1459
1622
  { title: "LLM Rubric", value: "llm-rubric" },
@@ -1470,9 +1633,7 @@ var ASSERTION_TYPES = [
1470
1633
  { title: "Latency Constraint", value: "latency" }
1471
1634
  ];
1472
1635
  var DOC_REF_TYPES = [
1473
- { title: "Document (Slug)", value: "slug" },
1474
- { title: "Document (Path)", value: "path" },
1475
- { title: "Document (ID)", value: "id" },
1636
+ { title: "Document", value: "id" },
1476
1637
  { title: "Content Release", value: "perspective" }
1477
1638
  ];
1478
1639
  var RUBRIC_TEMPLATES = [
@@ -1481,12 +1642,18 @@ var RUBRIC_TEMPLATES = [
1481
1642
  { title: "Doc Coverage", value: "doc-coverage" }
1482
1643
  ];
1483
1644
  var taskSchema = defineType5({
1645
+ groups: [
1646
+ { name: "main", title: "Main", default: true },
1647
+ { name: "optional", title: "Optional" },
1648
+ ALL_FIELDS_GROUP5
1649
+ ],
1484
1650
  fields: [
1485
1651
  // -----------------------------------------------------------------------
1486
1652
  // Identity
1487
1653
  // -----------------------------------------------------------------------
1488
1654
  defineField5({
1489
1655
  description: "Unique task identifier (e.g., 'groq-blog-queries'). Used for CLI filtering (--task groq-blog-queries), score aggregation, and report linkage.",
1656
+ group: ["main", "all-fields"],
1490
1657
  name: "id",
1491
1658
  title: "Task ID",
1492
1659
  type: "slug",
@@ -1499,16 +1666,30 @@ var taskSchema = defineType5({
1499
1666
  }),
1500
1667
  defineField5({
1501
1668
  description: "Human-readable label shown in reports and Studio",
1669
+ group: ["main", "all-fields"],
1502
1670
  name: "description",
1503
1671
  title: "Description",
1504
1672
  type: "string",
1505
1673
  validation: (rule) => rule.required()
1506
1674
  }),
1507
1675
  // -----------------------------------------------------------------------
1676
+ // Task prompt
1677
+ // -----------------------------------------------------------------------
1678
+ defineField5({
1679
+ description: "The implementation prompt sent to the evaluated LLM. This is the user-facing request (e.g., 'Write GROQ queries for a blog app...'). Plain text or Markdown.",
1680
+ group: ["main", "all-fields"],
1681
+ name: "taskPrompt",
1682
+ rows: 10,
1683
+ title: "Task Prompt",
1684
+ type: "text",
1685
+ validation: (rule) => rule.required()
1686
+ }),
1687
+ // -----------------------------------------------------------------------
1508
1688
  // Classification
1509
1689
  // -----------------------------------------------------------------------
1510
1690
  defineField5({
1511
1691
  description: "Feature area this task belongs to. Used for score aggregation and --area CLI filtering.",
1692
+ group: ["main", "all-fields"],
1512
1693
  name: "featureArea",
1513
1694
  title: "Feature Area",
1514
1695
  to: [{ type: "ailf.featureArea" }],
@@ -1517,6 +1698,7 @@ var taskSchema = defineType5({
1517
1698
  }),
1518
1699
  defineField5({
1519
1700
  description: "Freeform labels for filtering and organization",
1701
+ group: ["optional", "all-fields"],
1520
1702
  name: "tags",
1521
1703
  of: [{ type: "string" }],
1522
1704
  title: "Tags",
@@ -1526,20 +1708,22 @@ var taskSchema = defineType5({
1526
1708
  // Documentation references
1527
1709
  // -----------------------------------------------------------------------
1528
1710
  defineField5({
1529
- description: "Documentation that the LLM should use to complete this task. These become the gold-standard doc context injected in baseline mode. Each entry resolves docs through one of four strategies: slug, path, document ID, or content release (perspective).",
1711
+ description: "Documentation that the LLM should use to complete this task. These become the gold-standard doc context injected in baseline mode. Each entry is either a single article document or a content release (whose articles are all included automatically).",
1712
+ group: ["main", "all-fields"],
1530
1713
  name: "canonicalDocs",
1531
1714
  of: [
1532
1715
  {
1533
1716
  components: {
1534
- input: CanonicalDocInput
1717
+ input: CanonicalDocInput,
1718
+ preview: CanonicalDocPreview
1535
1719
  },
1536
1720
  fields: [
1537
- // Resolution type selector — drives conditional field visibility.
1538
- // This IS stored in the document (unlike the assertion type which
1539
- // is always stored). The Content Lake adapter uses it to determine
1540
- // which value field to read.
1721
+ // Resolution type — drives conditional field visibility.
1722
+ // Stored as "slug" (Document) or "perspective" (Content Release).
1723
+ // Mirrored YAML tasks may carry "path" or "id" but those are
1724
+ // read-only in Studio and handled by the adapter.
1541
1725
  defineField5({
1542
- description: "How to find this documentation",
1726
+ description: "Document references a single article. Content Release includes all articles from a release.",
1543
1727
  name: "refType",
1544
1728
  options: {
1545
1729
  layout: "radio",
@@ -1548,51 +1732,40 @@ var taskSchema = defineType5({
1548
1732
  },
1549
1733
  title: "Resolution Type",
1550
1734
  type: "string",
1551
- initialValue: "slug",
1735
+ initialValue: "id",
1552
1736
  validation: (rule) => rule.required()
1553
1737
  }),
1554
- // --- Slug resolution (default) ---
1738
+ // --- Article reference (Document mode) ---
1555
1739
  defineField5({
1556
- description: "Article slug (e.g. 'groq-introduction')",
1557
- hidden: ({ parent }) => parent?.refType !== "slug",
1740
+ description: "The article this canonical doc entry points to. The pipeline resolves the slug, path, and _id from this reference.",
1741
+ hidden: ({ parent }) => parent?.refType === "perspective",
1558
1742
  name: "doc",
1559
1743
  title: "Document",
1560
1744
  to: [{ type: "article" }],
1561
1745
  type: "reference"
1562
1746
  }),
1563
- // --- Path resolution ---
1747
+ // --- Path (hidden — only populated by mirrored YAML tasks) ---
1564
1748
  defineField5({
1565
- description: "Full path after /docs/ (e.g. 'groq/groq-introduction')",
1566
- hidden: ({ parent }) => parent?.refType !== "path",
1749
+ description: "Full path after /docs/ (e.g. 'groq/groq-introduction'). Populated automatically for mirrored YAML/repo tasks with refType 'path'. Not shown in Studio \u2014 the pipeline derives the path from the doc reference when needed.",
1750
+ hidden: true,
1567
1751
  name: "path",
1568
1752
  title: "Document Path",
1569
- type: "string",
1570
- validation: (rule) => rule.custom((value, context) => {
1571
- const parent = context.parent;
1572
- if (parent?.refType === "path" && !value) {
1573
- return "Path is required for path resolution";
1574
- }
1575
- return true;
1576
- })
1753
+ type: "string"
1577
1754
  }),
1578
- // --- ID resolution ---
1755
+ // --- Document ID (hidden — only populated by mirrored YAML tasks) ---
1579
1756
  defineField5({
1580
- description: "Sanity document _id",
1581
- hidden: ({ parent }) => parent?.refType !== "id",
1757
+ description: "Sanity document _id. Populated automatically for mirrored YAML/repo tasks with refType 'id'. Not shown in Studio \u2014 the pipeline reads the _id from the doc reference.",
1758
+ hidden: true,
1582
1759
  name: "docId",
1583
1760
  title: "Document ID",
1584
- type: "string",
1585
- validation: (rule) => rule.custom((value, context) => {
1586
- const parent = context.parent;
1587
- if (parent?.refType === "id" && !value) {
1588
- return "Document ID is required for ID resolution";
1589
- }
1590
- return true;
1591
- })
1761
+ type: "string"
1592
1762
  }),
1593
1763
  // --- Perspective resolution ---
1594
1764
  defineField5({
1595
- description: "Content release ID (bundle name)",
1765
+ components: {
1766
+ input: ReleasePicker
1767
+ },
1768
+ description: "Content release name (e.g. 'bundle-chatbox-launch'). All articles in this release are included as canonical docs. The pipeline auto-discovers articles at evaluation time.",
1596
1769
  hidden: ({ parent }) => parent?.refType !== "perspective",
1597
1770
  name: "perspective",
1598
1771
  title: "Content Release",
@@ -1605,6 +1778,14 @@ var taskSchema = defineType5({
1605
1778
  return true;
1606
1779
  })
1607
1780
  }),
1781
+ // --- Perspective title (hidden — populated by ReleasePicker) ---
1782
+ defineField5({
1783
+ description: "Human-readable title of the selected content release. Populated automatically by the release picker \u2014 used for list preview only, not by the pipeline.",
1784
+ hidden: true,
1785
+ name: "perspectiveTitle",
1786
+ title: "Release Title",
1787
+ type: "string"
1788
+ }),
1608
1789
  // --- Reason (always visible) ---
1609
1790
  defineField5({
1610
1791
  description: "Why this documentation helps with the task",
@@ -1615,47 +1796,14 @@ var taskSchema = defineType5({
1615
1796
  ],
1616
1797
  name: "canonicalDocRef",
1617
1798
  preview: {
1618
- prepare({
1619
- docTitle,
1620
- path,
1621
- docId,
1622
- perspective,
1623
- reason,
1624
- refType
1625
- }) {
1626
- const typeStr = typeof refType === "string" ? refType : "slug";
1627
- let title = "Document";
1628
- let icon = "\u{1F4C4}";
1629
- switch (typeStr) {
1630
- case "slug":
1631
- title = typeof docTitle === "string" ? docTitle : "Document";
1632
- icon = "\u{1F4C4}";
1633
- break;
1634
- case "path":
1635
- title = typeof path === "string" ? path : "Path";
1636
- icon = "\u{1F517}";
1637
- break;
1638
- case "id":
1639
- title = typeof docId === "string" ? docId : "Document ID";
1640
- icon = "\u{1F194}";
1641
- break;
1642
- case "perspective":
1643
- title = typeof perspective === "string" ? perspective : "Content Release";
1644
- icon = "\u{1F4E6}";
1645
- break;
1646
- }
1647
- return {
1648
- subtitle: typeof reason === "string" ? reason : "",
1649
- title: `${icon} ${title}`
1650
- };
1651
- },
1652
1799
  select: {
1653
- docId: "docId",
1654
- docTitle: "doc.title",
1655
1800
  path: "path",
1656
1801
  perspective: "perspective",
1802
+ perspectiveTitle: "perspectiveTitle",
1657
1803
  reason: "reason",
1658
- refType: "refType"
1804
+ refType: "refType",
1805
+ slug: "doc.slug.current",
1806
+ title: "doc.title"
1659
1807
  }
1660
1808
  },
1661
1809
  title: "Canonical Doc Reference",
@@ -1667,34 +1815,26 @@ var taskSchema = defineType5({
1667
1815
  }),
1668
1816
  defineField5({
1669
1817
  description: "Gold-standard implementation that demonstrates the correct approach",
1818
+ group: ["optional", "all-fields"],
1670
1819
  name: "referenceSolution",
1671
1820
  title: "Reference Solution",
1672
1821
  to: [{ type: "ailf.referenceSolution" }],
1673
1822
  type: "reference"
1674
1823
  }),
1675
- // -----------------------------------------------------------------------
1676
- // Task prompt
1677
- // -----------------------------------------------------------------------
1678
1824
  defineField5({
1679
1825
  description: "Auto-generate a doc-coverage rubric assertion. When true, the pipeline adds a doc-coverage assertion that checks whether the LLM's output reflects the content of the canonical documents.",
1826
+ group: ["optional", "all-fields"],
1680
1827
  initialValue: false,
1681
1828
  name: "docCoverage",
1682
1829
  title: "Doc Coverage",
1683
1830
  type: "boolean"
1684
1831
  }),
1685
- defineField5({
1686
- description: "The implementation prompt sent to the evaluated LLM. This is the user-facing request (e.g., 'Write GROQ queries for a blog app...'). Plain text or Markdown \u2014 consumed as a raw string by the evaluation harness, not rendered by Studio.",
1687
- name: "taskPrompt",
1688
- rows: 10,
1689
- title: "Task Prompt",
1690
- type: "text",
1691
- validation: (rule) => rule.required()
1692
- }),
1693
1832
  // -----------------------------------------------------------------------
1694
1833
  // Assertions (grading criteria)
1695
1834
  // -----------------------------------------------------------------------
1696
1835
  defineField5({
1697
1836
  description: "Grading criteria for evaluating the LLM's output. At least one assertion is required. Use llm-rubric with a template for scored evaluation, or value-based assertions for exact checks.",
1837
+ group: ["main", "all-fields"],
1698
1838
  name: "assert",
1699
1839
  of: [
1700
1840
  {
@@ -1795,6 +1935,7 @@ var taskSchema = defineType5({
1795
1935
  // -----------------------------------------------------------------------
1796
1936
  defineField5({
1797
1937
  description: "Advanced: Raw Promptfoo assertion objects that bypass AILF's curated type validation and template resolution. These are appended directly to the expanded Promptfoo test case. Use for edge cases where the curated assertion types are insufficient.",
1938
+ group: ["optional", "all-fields"],
1798
1939
  name: "rawAssert",
1799
1940
  of: [
1800
1941
  {
@@ -1832,6 +1973,7 @@ var taskSchema = defineType5({
1832
1973
  // -----------------------------------------------------------------------
1833
1974
  defineField5({
1834
1975
  description: "Controls baseline variant generation. The baseline measures the LLM's performance without documentation (training data only).",
1976
+ group: ["optional", "all-fields"],
1835
1977
  fields: [
1836
1978
  defineField5({
1837
1979
  description: "Generate a baseline variant (default: true)",
@@ -1868,6 +2010,7 @@ var taskSchema = defineType5({
1868
2010
  // -----------------------------------------------------------------------
1869
2011
  defineField5({
1870
2012
  description: "Controls when and how this task runs in the pipeline. Tasks without execution controls use defaults: enabled, blocking, no filters, no threshold.",
2013
+ group: ["optional", "all-fields"],
1871
2014
  fields: [
1872
2015
  defineField5({
1873
2016
  description: "Skip this task when false (default: true)",
@@ -1981,6 +2124,7 @@ var taskSchema = defineType5({
1981
2124
  // -----------------------------------------------------------------------
1982
2125
  defineField5({
1983
2126
  description: "Source repo provenance for mirrored tasks. This field is populated automatically when the pipeline mirrors repo-based tasks into the Content Lake. Read-only \u2014 the source of truth is the repo.",
2127
+ group: ["optional", "all-fields"],
1984
2128
  fields: [
1985
2129
  defineField5({
1986
2130
  name: "type",
@@ -2100,11 +2244,17 @@ var taskSchema = defineType5({
2100
2244
  });
2101
2245
 
2102
2246
  // src/schema/webhook-config.ts
2103
- import { defineField as defineField6, defineType as defineType6 } from "sanity";
2247
+ import { ALL_FIELDS_GROUP as ALL_FIELDS_GROUP6, defineField as defineField6, defineType as defineType6 } from "sanity";
2104
2248
  var webhookConfigSchema = defineType6({
2249
+ groups: [
2250
+ { name: "main", title: "Main", default: true },
2251
+ { name: "optional", title: "Optional" },
2252
+ ALL_FIELDS_GROUP6
2253
+ ],
2105
2254
  fields: [
2106
2255
  defineField6({
2107
2256
  description: "When enabled, publishing articles will automatically trigger AI Literacy evaluations for affected feature areas.",
2257
+ group: ["main", "all-fields"],
2108
2258
  initialValue: false,
2109
2259
  name: "enabled",
2110
2260
  title: "Evaluate on Publish",
@@ -2112,6 +2262,7 @@ var webhookConfigSchema = defineType6({
2112
2262
  }),
2113
2263
  defineField6({
2114
2264
  description: "Which evaluation mode to use for webhook-triggered evaluations.",
2265
+ group: ["main", "all-fields"],
2115
2266
  initialValue: "baseline",
2116
2267
  name: "mode",
2117
2268
  options: {
@@ -2127,6 +2278,7 @@ var webhookConfigSchema = defineType6({
2127
2278
  }),
2128
2279
  defineField6({
2129
2280
  description: "Maximum evaluations per day. Prevents runaway costs from rapid editing.",
2281
+ group: ["main", "all-fields"],
2130
2282
  initialValue: 20,
2131
2283
  name: "dailyBudget",
2132
2284
  title: "Daily Budget",
@@ -2135,6 +2287,7 @@ var webhookConfigSchema = defineType6({
2135
2287
  }),
2136
2288
  defineField6({
2137
2289
  description: "Seconds to wait after the last edit before dispatching. Coalesces rapid edits into a single evaluation.",
2290
+ group: ["optional", "all-fields"],
2138
2291
  initialValue: 300,
2139
2292
  name: "debounceSeconds",
2140
2293
  title: "Debounce Window (seconds)",
@@ -2143,6 +2296,7 @@ var webhookConfigSchema = defineType6({
2143
2296
  }),
2144
2297
  defineField6({
2145
2298
  description: "Specific feature areas to evaluate. Leave empty to evaluate all affected areas automatically.",
2299
+ group: ["optional", "all-fields"],
2146
2300
  name: "areas",
2147
2301
  of: [{ type: "string" }],
2148
2302
  title: "Area Filter",
@@ -2150,6 +2304,7 @@ var webhookConfigSchema = defineType6({
2150
2304
  }),
2151
2305
  defineField6({
2152
2306
  description: "Slack webhook URL for notifications about webhook-triggered evaluations.",
2307
+ group: ["optional", "all-fields"],
2153
2308
  name: "notifySlack",
2154
2309
  title: "Slack Notification URL",
2155
2310
  type: "url"
@@ -2178,15 +2333,15 @@ import { route } from "sanity/router";
2178
2333
  // src/components/Dashboard.tsx
2179
2334
  import {
2180
2335
  Container,
2181
- Flex as Flex22,
2336
+ Flex as Flex24,
2182
2337
  Select as Select3,
2183
- Stack as Stack23,
2338
+ Stack as Stack24,
2184
2339
  Tab,
2185
2340
  TabList,
2186
2341
  TabPanel,
2187
- Text as Text30
2342
+ Text as Text32
2188
2343
  } from "@sanity/ui";
2189
- import { useCallback as useCallback13, useEffect as useEffect8, useState as useState10 } from "react";
2344
+ import { useCallback as useCallback14, useEffect as useEffect9, useState as useState10 } from "react";
2190
2345
  import { useClient as useClient8 } from "sanity";
2191
2346
  import { useRouter } from "sanity/router";
2192
2347
 
@@ -2431,8 +2586,8 @@ function filterSourceClause(param) {
2431
2586
  }
2432
2587
 
2433
2588
  // src/components/ComparisonView.tsx
2434
- import { Badge as Badge2, Box as Box7, Card as Card5, Flex as Flex5, Grid, Select, Stack as Stack7, Text as Text9 } from "@sanity/ui";
2435
- import { useCallback as useCallback4, useEffect, useMemo, useState as useState2 } from "react";
2589
+ import { Badge as Badge3, Box as Box7, Card as Card6, Flex as Flex7, Grid, Select, Stack as Stack8, Text as Text11 } from "@sanity/ui";
2590
+ import { useCallback as useCallback5, useEffect as useEffect2, useMemo as useMemo3, useState as useState2 } from "react";
2436
2591
  import { useClient as useClient2 } from "sanity";
2437
2592
 
2438
2593
  // src/glossary.ts
@@ -2512,11 +2667,11 @@ function scoreMap(summary) {
2512
2667
  return new Map(summary.scores.map((s) => [s.feature, s]));
2513
2668
  }
2514
2669
  function allAreas(baseline, experiment) {
2515
- const set = /* @__PURE__ */ new Set([
2670
+ const set2 = /* @__PURE__ */ new Set([
2516
2671
  ...baseline.scores.map((s) => s.feature),
2517
2672
  ...experiment.scores.map((s) => s.feature)
2518
2673
  ]);
2519
- return [...set].sort();
2674
+ return [...set2].sort();
2520
2675
  }
2521
2676
  function classify(delta) {
2522
2677
  if (delta >= NOISE_THRESHOLD) return "improved";
@@ -2626,16 +2781,16 @@ function formatDuration(ms) {
2626
2781
  }
2627
2782
 
2628
2783
  // src/components/PageBlurb.tsx
2629
- import { Card as Card4, Stack as Stack6, Text as Text6 } from "@sanity/ui";
2630
- import { jsx as jsx7 } from "react/jsx-runtime";
2784
+ import { Card as Card5, Stack as Stack7, Text as Text8 } from "@sanity/ui";
2785
+ import { jsx as jsx9 } from "react/jsx-runtime";
2631
2786
  function PageBlurb({ text }) {
2632
- return /* @__PURE__ */ jsx7(Card4, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx7(Stack6, { space: 2, children: /* @__PURE__ */ jsx7(Text6, { size: 1, children: text }) }) });
2787
+ return /* @__PURE__ */ jsx9(Card5, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx9(Stack7, { space: 2, children: /* @__PURE__ */ jsx9(Text8, { size: 1, children: text }) }) });
2633
2788
  }
2634
2789
 
2635
2790
  // src/components/primitives/ColumnHeader.tsx
2636
2791
  import { HelpCircleIcon as HelpCircleIcon3 } from "@sanity/icons";
2637
- import { Box as Box5, Flex as Flex4, Text as Text7, Tooltip as Tooltip2 } from "@sanity/ui";
2638
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
2792
+ import { Box as Box5, Flex as Flex6, Text as Text9, Tooltip as Tooltip2 } from "@sanity/ui";
2793
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2639
2794
  function ColumnHeader({
2640
2795
  label,
2641
2796
  tooltip,
@@ -2645,9 +2800,9 @@ function ColumnHeader({
2645
2800
  borderBottom: "1px solid var(--card-border-color)",
2646
2801
  paddingBottom: 6
2647
2802
  } : void 0;
2648
- return /* @__PURE__ */ jsxs7(Flex4, { align: "center", gap: 1, style, children: [
2649
- /* @__PURE__ */ jsx8(
2650
- Text7,
2803
+ return /* @__PURE__ */ jsxs9(Flex6, { align: "center", gap: 1, style, children: [
2804
+ /* @__PURE__ */ jsx10(
2805
+ Text9,
2651
2806
  {
2652
2807
  muted: true,
2653
2808
  size: 1,
@@ -2656,26 +2811,26 @@ function ColumnHeader({
2656
2811
  children: label
2657
2812
  }
2658
2813
  ),
2659
- tooltip && /* @__PURE__ */ jsx8(
2814
+ tooltip && /* @__PURE__ */ jsx10(
2660
2815
  Tooltip2,
2661
2816
  {
2662
- content: /* @__PURE__ */ jsx8(Box5, { padding: 2, children: /* @__PURE__ */ jsx8(Text7, { size: 1, children: tooltip }) }),
2817
+ content: /* @__PURE__ */ jsx10(Box5, { padding: 2, children: /* @__PURE__ */ jsx10(Text9, { size: 1, children: tooltip }) }),
2663
2818
  portal: true,
2664
- children: /* @__PURE__ */ jsx8(Text7, { muted: true, size: 0, children: /* @__PURE__ */ jsx8(HelpCircleIcon3, {}) })
2819
+ children: /* @__PURE__ */ jsx10(Text9, { muted: true, size: 0, children: /* @__PURE__ */ jsx10(HelpCircleIcon3, {}) })
2665
2820
  }
2666
2821
  )
2667
2822
  ] });
2668
2823
  }
2669
2824
 
2670
2825
  // src/components/primitives/LoadingState.tsx
2671
- import { Box as Box6, Text as Text8 } from "@sanity/ui";
2672
- import { jsx as jsx9 } from "react/jsx-runtime";
2826
+ import { Box as Box6, Text as Text10 } from "@sanity/ui";
2827
+ import { jsx as jsx11 } from "react/jsx-runtime";
2673
2828
  function LoadingState({ message = "Loading\u2026" }) {
2674
- return /* @__PURE__ */ jsx9(Box6, { padding: 4, children: /* @__PURE__ */ jsx9(Text8, { muted: true, children: message }) });
2829
+ return /* @__PURE__ */ jsx11(Box6, { padding: 4, children: /* @__PURE__ */ jsx11(Text10, { muted: true, children: message }) });
2675
2830
  }
2676
2831
 
2677
2832
  // src/components/ComparisonView.tsx
2678
- import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
2833
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
2679
2834
  function ComparisonView() {
2680
2835
  const client = useClient2({ apiVersion: API_VERSION });
2681
2836
  const [baselineId, setBaselineId] = useState2(null);
@@ -2686,14 +2841,14 @@ function ComparisonView() {
2686
2841
  const [experimentSummary, setExperimentSummary] = useState2(null);
2687
2842
  const [loading, setLoading] = useState2(false);
2688
2843
  const [reports, setReports] = useState2([]);
2689
- useEffect(() => {
2844
+ useEffect2(() => {
2690
2845
  client.fetch(latestReportsQuery, {
2691
2846
  limit: 50,
2692
2847
  mode: null,
2693
2848
  source: null
2694
2849
  }).then((data) => setReports(data ?? [])).catch(() => setReports([]));
2695
2850
  }, [client]);
2696
- useEffect(() => {
2851
+ useEffect2(() => {
2697
2852
  if (!baselineId || !experimentId) {
2698
2853
  setBaselineSummary(null);
2699
2854
  setExperimentSummary(null);
@@ -2714,75 +2869,75 @@ function ComparisonView() {
2714
2869
  setLoading(false);
2715
2870
  });
2716
2871
  }, [baselineId, client, experimentId]);
2717
- const baselineOptions = useMemo(
2872
+ const baselineOptions = useMemo3(
2718
2873
  () => reports.filter((r) => r.reportId !== experimentId),
2719
2874
  [experimentId, reports]
2720
2875
  );
2721
- const experimentOptions = useMemo(
2876
+ const experimentOptions = useMemo3(
2722
2877
  () => reports.filter((r) => r.reportId !== baselineId),
2723
2878
  [baselineId, reports]
2724
2879
  );
2725
- const areaDeltas = useMemo(
2880
+ const areaDeltas = useMemo3(
2726
2881
  () => baselineSummary && experimentSummary ? computeAreaDeltas(baselineSummary, experimentSummary) : [],
2727
2882
  [baselineSummary, experimentSummary]
2728
2883
  );
2729
- const dimDeltas = useMemo(
2884
+ const dimDeltas = useMemo3(
2730
2885
  () => baselineSummary && experimentSummary ? computeDimensionDeltas(baselineSummary, experimentSummary) : [],
2731
2886
  [baselineSummary, experimentSummary]
2732
2887
  );
2733
- const threeLayerDeltas = useMemo(
2888
+ const threeLayerDeltas = useMemo3(
2734
2889
  () => baselineSummary && experimentSummary ? computeThreeLayerDeltas(baselineSummary, experimentSummary) : [],
2735
2890
  [baselineSummary, experimentSummary]
2736
2891
  );
2737
2892
  const hasThreeLayerData = threeLayerDeltas.some(
2738
2893
  (d) => d.baseActual !== null || d.baseRetGap !== null
2739
2894
  );
2740
- const overallDelta = useMemo(() => {
2895
+ const overallDelta = useMemo3(() => {
2741
2896
  if (!baselineSummary || !experimentSummary) return null;
2742
2897
  const b = baselineSummary.overall.avgScore;
2743
2898
  const e = experimentSummary.overall.avgScore;
2744
2899
  return { baseline: b, delta: e - b, experiment: e };
2745
2900
  }, [baselineSummary, experimentSummary]);
2746
- const onBaseline = useCallback4(
2901
+ const onBaseline = useCallback5(
2747
2902
  (e) => setBaselineId(e.currentTarget.value || null),
2748
2903
  []
2749
2904
  );
2750
- const onExperiment = useCallback4(
2905
+ const onExperiment = useCallback5(
2751
2906
  (e) => setExperimentId(e.currentTarget.value || null),
2752
2907
  []
2753
2908
  );
2754
2909
  const hasBoth = baselineId && experimentId;
2755
2910
  const hasData = baselineSummary && experimentSummary;
2756
- return /* @__PURE__ */ jsxs8(Stack7, { space: 4, children: [
2757
- /* @__PURE__ */ jsx10(PageBlurb, { text: "Select two reports to compare." }),
2758
- /* @__PURE__ */ jsxs8(Flex5, { gap: 3, children: [
2759
- /* @__PURE__ */ jsx10(Box7, { flex: 1, children: /* @__PURE__ */ jsxs8(Stack7, { space: 2, children: [
2760
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Baseline (before)" }),
2761
- /* @__PURE__ */ jsxs8(Select, { onChange: onBaseline, value: baselineId ?? "", children: [
2762
- /* @__PURE__ */ jsx10("option", { value: "", children: "Select baseline\u2026" }),
2763
- baselineOptions.map((r) => /* @__PURE__ */ jsx10("option", { value: r.reportId, children: formatOption(r) }, r.reportId))
2911
+ return /* @__PURE__ */ jsxs10(Stack8, { space: 4, children: [
2912
+ /* @__PURE__ */ jsx12(PageBlurb, { text: "Select two reports to compare." }),
2913
+ /* @__PURE__ */ jsxs10(Flex7, { gap: 3, children: [
2914
+ /* @__PURE__ */ jsx12(Box7, { flex: 1, children: /* @__PURE__ */ jsxs10(Stack8, { space: 2, children: [
2915
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Baseline (before)" }),
2916
+ /* @__PURE__ */ jsxs10(Select, { onChange: onBaseline, value: baselineId ?? "", children: [
2917
+ /* @__PURE__ */ jsx12("option", { value: "", children: "Select baseline\u2026" }),
2918
+ baselineOptions.map((r) => /* @__PURE__ */ jsx12("option", { value: r.reportId, children: formatOption(r) }, r.reportId))
2764
2919
  ] })
2765
2920
  ] }) }),
2766
- /* @__PURE__ */ jsx10(Box7, { flex: 1, children: /* @__PURE__ */ jsxs8(Stack7, { space: 2, children: [
2767
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Experiment (after)" }),
2768
- /* @__PURE__ */ jsxs8(Select, { onChange: onExperiment, value: experimentId ?? "", children: [
2769
- /* @__PURE__ */ jsx10("option", { value: "", children: "Select experiment\u2026" }),
2770
- experimentOptions.map((r) => /* @__PURE__ */ jsx10("option", { value: r.reportId, children: formatOption(r) }, r.reportId))
2921
+ /* @__PURE__ */ jsx12(Box7, { flex: 1, children: /* @__PURE__ */ jsxs10(Stack8, { space: 2, children: [
2922
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Experiment (after)" }),
2923
+ /* @__PURE__ */ jsxs10(Select, { onChange: onExperiment, value: experimentId ?? "", children: [
2924
+ /* @__PURE__ */ jsx12("option", { value: "", children: "Select experiment\u2026" }),
2925
+ experimentOptions.map((r) => /* @__PURE__ */ jsx12("option", { value: r.reportId, children: formatOption(r) }, r.reportId))
2771
2926
  ] })
2772
2927
  ] }) })
2773
2928
  ] }),
2774
- hasBoth && loading && /* @__PURE__ */ jsx10(LoadingState, { message: "Loading comparison\u2026" }),
2775
- hasBoth && !loading && !hasData && /* @__PURE__ */ jsx10(Card5, { padding: 4, tone: "caution", children: /* @__PURE__ */ jsx10(Text9, { size: 1, children: "Report not found." }) }),
2776
- hasBoth && !loading && hasData && /* @__PURE__ */ jsxs8(Fragment3, { children: [
2777
- /* @__PURE__ */ jsx10(
2929
+ hasBoth && loading && /* @__PURE__ */ jsx12(LoadingState, { message: "Loading comparison\u2026" }),
2930
+ hasBoth && !loading && !hasData && /* @__PURE__ */ jsx12(Card6, { padding: 4, tone: "caution", children: /* @__PURE__ */ jsx12(Text11, { size: 1, children: "Report not found." }) }),
2931
+ hasBoth && !loading && hasData && /* @__PURE__ */ jsxs10(Fragment3, { children: [
2932
+ /* @__PURE__ */ jsx12(
2778
2933
  AreaComparisonTable,
2779
2934
  {
2780
2935
  areaDeltas,
2781
2936
  overallDelta
2782
2937
  }
2783
2938
  ),
2784
- /* @__PURE__ */ jsx10(DimensionDeltasTable, { dimDeltas }),
2785
- hasThreeLayerData && /* @__PURE__ */ jsx10(ThreeLayerDeltasTable, { threeLayerDeltas })
2939
+ /* @__PURE__ */ jsx12(DimensionDeltasTable, { dimDeltas }),
2940
+ hasThreeLayerData && /* @__PURE__ */ jsx12(ThreeLayerDeltasTable, { threeLayerDeltas })
2786
2941
  ] })
2787
2942
  ] });
2788
2943
  }
@@ -2790,23 +2945,23 @@ function AreaComparisonTable({
2790
2945
  areaDeltas,
2791
2946
  overallDelta
2792
2947
  }) {
2793
- return /* @__PURE__ */ jsx10(Card5, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs8(Stack7, { space: 3, children: [
2794
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Per-area comparison" }),
2795
- /* @__PURE__ */ jsxs8(Grid, { columns: 5, gap: 2, children: [
2796
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Area" }),
2797
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Baseline", tooltip: GLOSSARY.baseline }),
2798
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Experiment", tooltip: GLOSSARY.experiment }),
2799
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Delta", tooltip: GLOSSARY.delta }),
2800
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Change", tooltip: GLOSSARY.change })
2948
+ return /* @__PURE__ */ jsx12(Card6, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs10(Stack8, { space: 3, children: [
2949
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Per-area comparison" }),
2950
+ /* @__PURE__ */ jsxs10(Grid, { columns: 5, gap: 2, children: [
2951
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Area" }),
2952
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Baseline", tooltip: GLOSSARY.baseline }),
2953
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Experiment", tooltip: GLOSSARY.experiment }),
2954
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Delta", tooltip: GLOSSARY.delta }),
2955
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Change", tooltip: GLOSSARY.change })
2801
2956
  ] }),
2802
- areaDeltas.map((row) => /* @__PURE__ */ jsxs8(Grid, { columns: 5, gap: 2, children: [
2803
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.area }),
2804
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.baseline.toFixed(1) }),
2805
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.experiment.toFixed(1) }),
2806
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatDelta(row.delta) }),
2807
- /* @__PURE__ */ jsx10(Box7, { children: /* @__PURE__ */ jsx10(Badge2, { tone: changeTone(row.change), children: row.change }) })
2957
+ areaDeltas.map((row) => /* @__PURE__ */ jsxs10(Grid, { columns: 5, gap: 2, children: [
2958
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.area }),
2959
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.baseline.toFixed(1) }),
2960
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.experiment.toFixed(1) }),
2961
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatDelta(row.delta) }),
2962
+ /* @__PURE__ */ jsx12(Box7, { children: /* @__PURE__ */ jsx12(Badge3, { tone: changeTone(row.change), children: row.change }) })
2808
2963
  ] }, row.area)),
2809
- overallDelta && /* @__PURE__ */ jsxs8(
2964
+ overallDelta && /* @__PURE__ */ jsxs10(
2810
2965
  Grid,
2811
2966
  {
2812
2967
  columns: 5,
@@ -2816,36 +2971,36 @@ function AreaComparisonTable({
2816
2971
  paddingTop: 8
2817
2972
  },
2818
2973
  children: [
2819
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Overall" }),
2820
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: overallDelta.baseline.toFixed(1) }),
2821
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: overallDelta.experiment.toFixed(1) }),
2822
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: formatDelta(overallDelta.delta) }),
2823
- /* @__PURE__ */ jsx10(Box7, { children: /* @__PURE__ */ jsx10(Badge2, { tone: changeTone(classify(overallDelta.delta)), children: classify(overallDelta.delta) }) })
2974
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Overall" }),
2975
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: overallDelta.baseline.toFixed(1) }),
2976
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: overallDelta.experiment.toFixed(1) }),
2977
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: formatDelta(overallDelta.delta) }),
2978
+ /* @__PURE__ */ jsx12(Box7, { children: /* @__PURE__ */ jsx12(Badge3, { tone: changeTone(classify(overallDelta.delta)), children: classify(overallDelta.delta) }) })
2824
2979
  ]
2825
2980
  }
2826
2981
  )
2827
2982
  ] }) });
2828
2983
  }
2829
2984
  function DimensionDeltasTable({ dimDeltas }) {
2830
- return /* @__PURE__ */ jsx10(Card5, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs8(Stack7, { space: 3, children: [
2831
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Dimension deltas" }),
2832
- /* @__PURE__ */ jsxs8(Grid, { columns: 4, gap: 2, children: [
2833
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Area" }),
2834
- /* @__PURE__ */ jsx10(
2985
+ return /* @__PURE__ */ jsx12(Card6, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs10(Stack8, { space: 3, children: [
2986
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Dimension deltas" }),
2987
+ /* @__PURE__ */ jsxs10(Grid, { columns: 4, gap: 2, children: [
2988
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Area" }),
2989
+ /* @__PURE__ */ jsx12(
2835
2990
  ColumnHeader,
2836
2991
  {
2837
2992
  label: "Task completion",
2838
2993
  tooltip: GLOSSARY.dimTaskCompletion
2839
2994
  }
2840
2995
  ),
2841
- /* @__PURE__ */ jsx10(
2996
+ /* @__PURE__ */ jsx12(
2842
2997
  ColumnHeader,
2843
2998
  {
2844
2999
  label: "Code correctness",
2845
3000
  tooltip: GLOSSARY.dimCodeCorrectness
2846
3001
  }
2847
3002
  ),
2848
- /* @__PURE__ */ jsx10(
3003
+ /* @__PURE__ */ jsx12(
2849
3004
  ColumnHeader,
2850
3005
  {
2851
3006
  label: "Doc coverage",
@@ -2853,11 +3008,11 @@ function DimensionDeltasTable({ dimDeltas }) {
2853
3008
  }
2854
3009
  )
2855
3010
  ] }),
2856
- dimDeltas.map((row) => /* @__PURE__ */ jsxs8(Grid, { columns: 4, gap: 2, children: [
2857
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.area }),
2858
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatDelta(row.taskDelta) }),
2859
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatDelta(row.codeDelta) }),
2860
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatDelta(row.docDelta) })
3011
+ dimDeltas.map((row) => /* @__PURE__ */ jsxs10(Grid, { columns: 4, gap: 2, children: [
3012
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.area }),
3013
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatDelta(row.taskDelta) }),
3014
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatDelta(row.codeDelta) }),
3015
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatDelta(row.docDelta) })
2861
3016
  ] }, row.area))
2862
3017
  ] }) });
2863
3018
  }
@@ -2867,27 +3022,27 @@ function ThreeLayerDeltasTable({
2867
3022
  const filtered = threeLayerDeltas.filter(
2868
3023
  (d) => d.baseActual !== null || d.baseRetGap !== null
2869
3024
  );
2870
- return /* @__PURE__ */ jsx10(Card5, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs8(Stack7, { space: 3, children: [
2871
- /* @__PURE__ */ jsxs8(Flex5, { align: "center", gap: 2, children: [
2872
- /* @__PURE__ */ jsx10(Text9, { size: 1, weight: "semibold", children: "Three-layer decomposition deltas" }),
2873
- /* @__PURE__ */ jsx10(Badge2, { fontSize: 0, tone: "primary", children: "full mode" })
3025
+ return /* @__PURE__ */ jsx12(Card6, { overflow: "auto", padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs10(Stack8, { space: 3, children: [
3026
+ /* @__PURE__ */ jsxs10(Flex7, { align: "center", gap: 2, children: [
3027
+ /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: "Three-layer decomposition deltas" }),
3028
+ /* @__PURE__ */ jsx12(Badge3, { fontSize: 0, tone: "primary", children: "full mode" })
2874
3029
  ] }),
2875
- /* @__PURE__ */ jsxs8(Grid, { columns: 7, gap: 2, children: [
2876
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Area" }),
2877
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Actual (B)", tooltip: GLOSSARY.actual }),
2878
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Actual (E)", tooltip: GLOSSARY.actual }),
2879
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Actual \u0394", tooltip: GLOSSARY.actualDelta }),
2880
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Ret. Gap \u0394", tooltip: GLOSSARY.retGapDelta }),
2881
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Eff. (B)", tooltip: GLOSSARY.efficiency }),
2882
- /* @__PURE__ */ jsx10(ColumnHeader, { label: "Eff. (E)", tooltip: GLOSSARY.efficiency })
3030
+ /* @__PURE__ */ jsxs10(Grid, { columns: 7, gap: 2, children: [
3031
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Area" }),
3032
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Actual (B)", tooltip: GLOSSARY.actual }),
3033
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Actual (E)", tooltip: GLOSSARY.actual }),
3034
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Actual \u0394", tooltip: GLOSSARY.actualDelta }),
3035
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Ret. Gap \u0394", tooltip: GLOSSARY.retGapDelta }),
3036
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Eff. (B)", tooltip: GLOSSARY.efficiency }),
3037
+ /* @__PURE__ */ jsx12(ColumnHeader, { label: "Eff. (E)", tooltip: GLOSSARY.efficiency })
2883
3038
  ] }),
2884
- filtered.map((row) => /* @__PURE__ */ jsxs8(Grid, { columns: 7, gap: 2, children: [
2885
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.area }),
2886
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.baseActual != null ? row.baseActual.toFixed(1) : "\u2014" }),
2887
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.expActual != null ? row.expActual.toFixed(1) : "\u2014" }),
2888
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: row.actualDelta != null ? formatDelta(row.actualDelta) : "\u2014" }),
2889
- /* @__PURE__ */ jsx10(
2890
- Text9,
3039
+ filtered.map((row) => /* @__PURE__ */ jsxs10(Grid, { columns: 7, gap: 2, children: [
3040
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.area }),
3041
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.baseActual != null ? row.baseActual.toFixed(1) : "\u2014" }),
3042
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.expActual != null ? row.expActual.toFixed(1) : "\u2014" }),
3043
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: row.actualDelta != null ? formatDelta(row.actualDelta) : "\u2014" }),
3044
+ /* @__PURE__ */ jsx12(
3045
+ Text11,
2891
3046
  {
2892
3047
  size: 1,
2893
3048
  style: {
@@ -2896,8 +3051,8 @@ function ThreeLayerDeltasTable({
2896
3051
  children: row.retGapDelta != null ? formatDelta(row.retGapDelta) : "\u2014"
2897
3052
  }
2898
3053
  ),
2899
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatPercent(row.baseEfficiency) }),
2900
- /* @__PURE__ */ jsx10(Text9, { size: 1, children: formatPercent(row.expEfficiency) })
3054
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatPercent(row.baseEfficiency) }),
3055
+ /* @__PURE__ */ jsx12(Text11, { size: 1, children: formatPercent(row.expEfficiency) })
2901
3056
  ] }, `tl-${row.area}`))
2902
3057
  ] }) });
2903
3058
  }
@@ -2909,26 +3064,26 @@ function formatOption(r) {
2909
3064
  // src/components/LatestReports.tsx
2910
3065
  import { SortIcon } from "@sanity/icons";
2911
3066
  import {
2912
- Badge as Badge11,
3067
+ Badge as Badge12,
2913
3068
  Box as Box8,
2914
3069
  Button,
2915
- Card as Card11,
2916
- Flex as Flex14,
3070
+ Card as Card12,
3071
+ Flex as Flex16,
2917
3072
  Menu,
2918
3073
  MenuButton,
2919
3074
  MenuItem,
2920
- Stack as Stack12,
2921
- Text as Text18
3075
+ Stack as Stack13,
3076
+ Text as Text20
2922
3077
  } from "@sanity/ui";
2923
- import { useCallback as useCallback10, useEffect as useEffect5, useMemo as useMemo3, useState as useState6 } from "react";
3078
+ import { useCallback as useCallback11, useEffect as useEffect6, useMemo as useMemo5, useState as useState6 } from "react";
2924
3079
  import { useClient as useClient5 } from "sanity";
2925
3080
 
2926
3081
  // src/components/content-filters/DocumentFilter.tsx
2927
- import { SearchIcon } from "@sanity/icons";
2928
- import { Autocomplete, Badge as Badge3, Card as Card6, Flex as Flex6, Stack as Stack8, Text as Text10 } from "@sanity/ui";
2929
- import { useCallback as useCallback5, useEffect as useEffect2, useRef, useState as useState3 } from "react";
3082
+ import { SearchIcon as SearchIcon2 } from "@sanity/icons";
3083
+ import { Autocomplete as Autocomplete2, Badge as Badge4, Card as Card7, Flex as Flex8, Stack as Stack9, Text as Text12 } from "@sanity/ui";
3084
+ import { useCallback as useCallback6, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
2930
3085
  import { useClient as useClient3 } from "sanity";
2931
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
3086
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
2932
3087
  var SEARCH_DEBOUNCE_MS = 300;
2933
3088
  function DocumentFilter({
2934
3089
  value,
@@ -2938,13 +3093,13 @@ function DocumentFilter({
2938
3093
  const client = useClient3({ apiVersion: API_VERSION });
2939
3094
  const [options, setOptions] = useState3([]);
2940
3095
  const [loading, setLoading] = useState3(false);
2941
- const timer = useRef(null);
2942
- useEffect2(() => {
3096
+ const timer = useRef2(null);
3097
+ useEffect3(() => {
2943
3098
  return () => {
2944
3099
  if (timer.current) clearTimeout(timer.current);
2945
3100
  };
2946
3101
  }, []);
2947
- const handleQueryChange = useCallback5(
3102
+ const handleQueryChange = useCallback6(
2948
3103
  (query) => {
2949
3104
  if (timer.current) clearTimeout(timer.current);
2950
3105
  const trimmed = (query ?? "").trim();
@@ -2988,7 +3143,7 @@ function DocumentFilter({
2988
3143
  },
2989
3144
  [client]
2990
3145
  );
2991
- const handleSelect = useCallback5(
3146
+ const handleSelect = useCallback6(
2992
3147
  (selected) => {
2993
3148
  const option = options.find((o) => o.value === selected);
2994
3149
  const slug = option?.payload.slug ?? selected;
@@ -2999,29 +3154,29 @@ function DocumentFilter({
2999
3154
  },
3000
3155
  [options, onChange, onPerspectiveHint]
3001
3156
  );
3002
- const renderOption = useCallback5((option) => {
3157
+ const renderOption = useCallback6((option) => {
3003
3158
  const { provenance, releaseId } = option.payload;
3004
3159
  const badgeTone = provenance === "published" ? "positive" : provenance === "release" ? "primary" : "caution";
3005
3160
  const badgeLabel = provenance === "published" ? "Published" : provenance === "release" ? releaseId ?? "Release" : "Draft";
3006
- return /* @__PURE__ */ jsx11(Card6, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs9(Flex6, { align: "center", gap: 2, children: [
3007
- /* @__PURE__ */ jsxs9(Stack8, { flex: 1, space: 1, children: [
3008
- /* @__PURE__ */ jsx11(Text10, { size: 1, weight: "semibold", children: option.payload.title }),
3009
- /* @__PURE__ */ jsx11(Text10, { muted: true, size: 1, children: option.payload.path })
3161
+ return /* @__PURE__ */ jsx13(Card7, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs11(Flex8, { align: "center", gap: 2, children: [
3162
+ /* @__PURE__ */ jsxs11(Stack9, { flex: 1, space: 1, children: [
3163
+ /* @__PURE__ */ jsx13(Text12, { size: 1, weight: "semibold", children: option.payload.title }),
3164
+ /* @__PURE__ */ jsx13(Text12, { muted: true, size: 1, children: option.payload.path })
3010
3165
  ] }),
3011
- /* @__PURE__ */ jsx11(Badge3, { fontSize: 0, tone: badgeTone, children: badgeLabel })
3166
+ /* @__PURE__ */ jsx13(Badge4, { fontSize: 0, tone: badgeTone, children: badgeLabel })
3012
3167
  ] }) });
3013
3168
  }, []);
3014
- const renderValue = useCallback5((_value, option) => {
3169
+ const renderValue = useCallback6((_value, option) => {
3015
3170
  if (option?.payload.title) {
3016
3171
  return `${option.payload.title} (${option.payload.slug})`;
3017
3172
  }
3018
3173
  return _value;
3019
3174
  }, []);
3020
- return /* @__PURE__ */ jsx11(
3021
- Autocomplete,
3175
+ return /* @__PURE__ */ jsx13(
3176
+ Autocomplete2,
3022
3177
  {
3023
3178
  filterOption: () => true,
3024
- icon: SearchIcon,
3179
+ icon: SearchIcon2,
3025
3180
  id: "document-filter-input",
3026
3181
  loading,
3027
3182
  onChange: handleSelect,
@@ -3047,33 +3202,33 @@ function classifyDocId(id) {
3047
3202
  }
3048
3203
 
3049
3204
  // src/components/content-filters/PerspectiveFilter.tsx
3050
- import { SearchIcon as SearchIcon2 } from "@sanity/icons";
3051
- import { Autocomplete as Autocomplete2, Badge as Badge4, Card as Card7, Flex as Flex7, Stack as Stack9, Text as Text11 } from "@sanity/ui";
3052
- import { useEffect as useEffect3, useMemo as useMemo2, useState as useState4 } from "react";
3205
+ import { SearchIcon as SearchIcon3 } from "@sanity/icons";
3206
+ import { Autocomplete as Autocomplete3, Badge as Badge5, Card as Card8, Flex as Flex9, Stack as Stack10, Text as Text13 } from "@sanity/ui";
3207
+ import { useEffect as useEffect4, useMemo as useMemo4, useState as useState4 } from "react";
3053
3208
  import {
3054
- getReleaseIdFromReleaseDocumentId,
3055
- useActiveReleases,
3056
- useArchivedReleases,
3209
+ getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
3210
+ useActiveReleases as useActiveReleases3,
3211
+ useArchivedReleases as useArchivedReleases3,
3057
3212
  useClient as useClient4
3058
3213
  } from "sanity";
3059
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
3214
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
3060
3215
  function PerspectiveFilter({ value, onChange }) {
3061
3216
  const client = useClient4({ apiVersion: API_VERSION });
3062
3217
  const [reportPerspectives, setReportPerspectives] = useState4([]);
3063
- const { data: activeReleases } = useActiveReleases();
3064
- const { data: archivedReleases } = useArchivedReleases();
3065
- useEffect3(() => {
3218
+ const { data: activeReleases } = useActiveReleases3();
3219
+ const { data: archivedReleases } = useArchivedReleases3();
3220
+ useEffect4(() => {
3066
3221
  client.fetch(distinctPerspectivesQuery).then(
3067
3222
  (data) => setReportPerspectives((data ?? []).filter(Boolean).sort())
3068
3223
  ).catch(() => setReportPerspectives([]));
3069
3224
  }, [client]);
3070
- const options = useMemo2(() => {
3225
+ const options = useMemo4(() => {
3071
3226
  const releaseMap = /* @__PURE__ */ new Map();
3072
3227
  for (const release of [
3073
3228
  ...activeReleases ?? [],
3074
3229
  ...archivedReleases ?? []
3075
3230
  ]) {
3076
- const releaseId = getReleaseIdFromReleaseDocumentId(release._id);
3231
+ const releaseId = getReleaseIdFromReleaseDocumentId3(release._id);
3077
3232
  const title = release.metadata?.title ?? releaseId;
3078
3233
  releaseMap.set(releaseId, title);
3079
3234
  }
@@ -3093,27 +3248,27 @@ function PerspectiveFilter({ value, onChange }) {
3093
3248
  }));
3094
3249
  return result;
3095
3250
  }, [activeReleases, archivedReleases, reportPerspectives]);
3096
- return /* @__PURE__ */ jsx12(
3097
- Autocomplete2,
3251
+ return /* @__PURE__ */ jsx14(
3252
+ Autocomplete3,
3098
3253
  {
3099
3254
  filterOption: (query, option) => {
3100
3255
  const q = query.toLowerCase();
3101
3256
  const opt = option;
3102
3257
  return opt.value.toLowerCase().includes(q) || (opt.payload?.title ?? "").toLowerCase().includes(q);
3103
3258
  },
3104
- icon: SearchIcon2,
3259
+ icon: SearchIcon3,
3105
3260
  id: "perspective-filter-input",
3106
3261
  onChange,
3107
3262
  options,
3108
3263
  placeholder: "Search by title or ID\u2026",
3109
3264
  renderOption: (option) => {
3110
3265
  const opt = option;
3111
- return /* @__PURE__ */ jsx12(Card7, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs10(Flex7, { align: "center", gap: 2, children: [
3112
- /* @__PURE__ */ jsxs10(Stack9, { flex: 1, space: 1, children: [
3113
- /* @__PURE__ */ jsx12(Text11, { size: 1, weight: "semibold", children: opt.payload.title }),
3114
- opt.payload.title !== opt.value && /* @__PURE__ */ jsx12(Text11, { muted: true, size: 1, children: opt.value })
3266
+ return /* @__PURE__ */ jsx14(Card8, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs12(Flex9, { align: "center", gap: 2, children: [
3267
+ /* @__PURE__ */ jsxs12(Stack10, { flex: 1, space: 1, children: [
3268
+ /* @__PURE__ */ jsx14(Text13, { size: 1, weight: "semibold", children: opt.payload.title }),
3269
+ opt.payload.title !== opt.value && /* @__PURE__ */ jsx14(Text13, { muted: true, size: 1, children: opt.value })
3115
3270
  ] }),
3116
- opt.payload.hasReport && /* @__PURE__ */ jsx12(Badge4, { fontSize: 0, tone: "positive", children: "Has reports" })
3271
+ opt.payload.hasReport && /* @__PURE__ */ jsx14(Badge5, { fontSize: 0, tone: "positive", children: "Has reports" })
3117
3272
  ] }) });
3118
3273
  },
3119
3274
  renderValue: (v, option) => {
@@ -3129,15 +3284,15 @@ function PerspectiveFilter({ value, onChange }) {
3129
3284
  }
3130
3285
 
3131
3286
  // src/components/report-card/ReportCard.tsx
3132
- import { Badge as Badge8, Card as Card8, Flex as Flex10, Text as Text14 } from "@sanity/ui";
3133
- import { useCallback as useCallback6 } from "react";
3287
+ import { Badge as Badge9, Card as Card9, Flex as Flex12, Text as Text16 } from "@sanity/ui";
3288
+ import { useCallback as useCallback7 } from "react";
3134
3289
 
3135
3290
  // src/components/primitives/DeltaIndicator.tsx
3136
- import { Text as Text12 } from "@sanity/ui";
3137
- import { jsx as jsx13 } from "react/jsx-runtime";
3291
+ import { Text as Text14 } from "@sanity/ui";
3292
+ import { jsx as jsx15 } from "react/jsx-runtime";
3138
3293
  function DeltaIndicator({ delta, size = 1 }) {
3139
- return /* @__PURE__ */ jsx13(
3140
- Text12,
3294
+ return /* @__PURE__ */ jsx15(
3295
+ Text14,
3141
3296
  {
3142
3297
  size,
3143
3298
  style: {
@@ -3149,18 +3304,18 @@ function DeltaIndicator({ delta, size = 1 }) {
3149
3304
  }
3150
3305
 
3151
3306
  // src/components/report-card/ReportMeta.tsx
3152
- import { Stack as Stack10, Text as Text13 } from "@sanity/ui";
3307
+ import { Stack as Stack11, Text as Text15 } from "@sanity/ui";
3153
3308
 
3154
3309
  // src/components/report-card/AreaTags.tsx
3155
- import { Badge as Badge5, Flex as Flex8 } from "@sanity/ui";
3156
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
3310
+ import { Badge as Badge6, Flex as Flex10 } from "@sanity/ui";
3311
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
3157
3312
  function AreaTags({ areas, targetDocuments }) {
3158
3313
  const hasAreas = areas && areas.length > 0;
3159
3314
  const hasDocs = targetDocuments && targetDocuments.length > 0;
3160
3315
  if (!hasAreas && !hasDocs) return null;
3161
- return /* @__PURE__ */ jsxs11(Flex8, { gap: 1, paddingTop: 1, wrap: "wrap", children: [
3162
- hasAreas && areas.map((area) => /* @__PURE__ */ jsx14(
3163
- Badge5,
3316
+ return /* @__PURE__ */ jsxs13(Flex10, { gap: 1, paddingTop: 1, wrap: "wrap", children: [
3317
+ hasAreas && areas.map((area) => /* @__PURE__ */ jsx16(
3318
+ Badge6,
3164
3319
  {
3165
3320
  fontSize: 0,
3166
3321
  mode: "outline",
@@ -3169,7 +3324,7 @@ function AreaTags({ areas, targetDocuments }) {
3169
3324
  },
3170
3325
  `area-${area}`
3171
3326
  )),
3172
- hasDocs && targetDocuments.map((doc) => /* @__PURE__ */ jsx14(Badge5, { fontSize: 0, mode: "outline", tone: "primary", children: doc }, `doc-${doc}`))
3327
+ hasDocs && targetDocuments.map((doc) => /* @__PURE__ */ jsx16(Badge6, { fontSize: 0, mode: "outline", tone: "primary", children: doc }, `doc-${doc}`))
3173
3328
  ] });
3174
3329
  }
3175
3330
 
@@ -3213,7 +3368,7 @@ function formatCardDate(iso) {
3213
3368
  }
3214
3369
 
3215
3370
  // src/components/report-card/ReportMeta.tsx
3216
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
3371
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
3217
3372
  function ReportMeta({ data }) {
3218
3373
  const segments = [data.mode, data.source];
3219
3374
  if (data.models && data.models.length > 0) {
@@ -3225,15 +3380,15 @@ function ReportMeta({ data }) {
3225
3380
  if (data.durationMs && data.durationMs > 0) {
3226
3381
  segments.push(formatDuration(data.durationMs));
3227
3382
  }
3228
- return /* @__PURE__ */ jsxs12(Stack10, { flex: 1, space: 1, children: [
3229
- /* @__PURE__ */ jsx15(Text13, { weight: "semibold", children: data.tag ?? formatCardDate(data.completedAt) }),
3230
- /* @__PURE__ */ jsx15(Text13, { muted: true, size: 1, children: segments.join(" \xB7 ") }),
3231
- /* @__PURE__ */ jsx15(AreaTags, { areas: data.areas, targetDocuments: data.targetDocuments })
3383
+ return /* @__PURE__ */ jsxs14(Stack11, { flex: 1, space: 1, children: [
3384
+ /* @__PURE__ */ jsx17(Text15, { weight: "semibold", children: data.tag ?? formatCardDate(data.completedAt) }),
3385
+ /* @__PURE__ */ jsx17(Text15, { muted: true, size: 1, children: segments.join(" \xB7 ") }),
3386
+ /* @__PURE__ */ jsx17(AreaTags, { areas: data.areas, targetDocuments: data.targetDocuments })
3232
3387
  ] });
3233
3388
  }
3234
3389
 
3235
3390
  // src/components/primitives/ScoreBadge.tsx
3236
- import { Badge as Badge6 } from "@sanity/ui";
3391
+ import { Badge as Badge7 } from "@sanity/ui";
3237
3392
 
3238
3393
  // src/lib/scoring.ts
3239
3394
  var TONE_MAP = {
@@ -3265,11 +3420,11 @@ function rowBackground(index) {
3265
3420
  }
3266
3421
 
3267
3422
  // src/components/primitives/ScoreBadge.tsx
3268
- import { jsx as jsx16 } from "react/jsx-runtime";
3423
+ import { jsx as jsx18 } from "react/jsx-runtime";
3269
3424
  function ScoreBadge({ score, fontSize = 1 }) {
3270
3425
  const rounded = Math.round(score);
3271
- return /* @__PURE__ */ jsx16(
3272
- Badge6,
3426
+ return /* @__PURE__ */ jsx18(
3427
+ Badge7,
3273
3428
  {
3274
3429
  fontSize,
3275
3430
  style: { minWidth: 48, textAlign: "center" },
@@ -3280,18 +3435,18 @@ function ScoreBadge({ score, fontSize = 1 }) {
3280
3435
  }
3281
3436
 
3282
3437
  // src/components/primitives/StatusBadges.tsx
3283
- import { Badge as Badge7, Flex as Flex9 } from "@sanity/ui";
3284
- import { jsxs as jsxs13 } from "react/jsx-runtime";
3438
+ import { Badge as Badge8, Flex as Flex11 } from "@sanity/ui";
3439
+ import { jsxs as jsxs15 } from "react/jsx-runtime";
3285
3440
  function StatusBadges({ regressed, improved }) {
3286
3441
  const hasRegressed = regressed && regressed.length > 0;
3287
3442
  const hasImproved = improved && improved.length > 0;
3288
3443
  if (!hasRegressed && !hasImproved) return null;
3289
- return /* @__PURE__ */ jsxs13(Flex9, { gap: 1, children: [
3290
- hasRegressed && /* @__PURE__ */ jsxs13(Badge7, { fontSize: 0, tone: "critical", children: [
3444
+ return /* @__PURE__ */ jsxs15(Flex11, { gap: 1, children: [
3445
+ hasRegressed && /* @__PURE__ */ jsxs15(Badge8, { fontSize: 0, tone: "critical", children: [
3291
3446
  regressed.length,
3292
3447
  " regressed"
3293
3448
  ] }),
3294
- hasImproved && /* @__PURE__ */ jsxs13(Badge7, { fontSize: 0, tone: "positive", children: [
3449
+ hasImproved && /* @__PURE__ */ jsxs15(Badge8, { fontSize: 0, tone: "positive", children: [
3295
3450
  improved.length,
3296
3451
  " improved"
3297
3452
  ] })
@@ -3299,38 +3454,38 @@ function StatusBadges({ regressed, improved }) {
3299
3454
  }
3300
3455
 
3301
3456
  // src/components/report-card/ReportCard.tsx
3302
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
3457
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
3303
3458
  function ReportCard({ data, onSelectReport }) {
3304
- const handleClick = useCallback6(() => {
3459
+ const handleClick = useCallback7(() => {
3305
3460
  onSelectReport(data.reportId);
3306
3461
  }, [data.reportId, onSelectReport]);
3307
- return /* @__PURE__ */ jsx17(
3308
- Card8,
3462
+ return /* @__PURE__ */ jsx19(
3463
+ Card9,
3309
3464
  {
3310
3465
  onClick: handleClick,
3311
3466
  padding: 3,
3312
3467
  radius: 2,
3313
3468
  shadow: 1,
3314
3469
  style: { cursor: "pointer" },
3315
- children: /* @__PURE__ */ jsxs14(Flex10, { align: "center", gap: 3, children: [
3316
- /* @__PURE__ */ jsx17(ScoreBadge, { score: data.overall }),
3317
- /* @__PURE__ */ jsx17(ReportMeta, { data }),
3318
- data.comparisonDelta != null && /* @__PURE__ */ jsx17(DeltaIndicator, { delta: data.comparisonDelta }),
3319
- /* @__PURE__ */ jsx17(StatusBadges, { improved: data.improved, regressed: data.regressed }),
3320
- /* @__PURE__ */ jsx17(Text14, { muted: true, size: 0, title: new Date(data.completedAt).toISOString(), children: formatRelativeTime(data.completedAt) }),
3321
- data.trigger && /* @__PURE__ */ jsx17(Badge8, { fontSize: 0, tone: "default", children: data.trigger })
3470
+ children: /* @__PURE__ */ jsxs16(Flex12, { align: "center", gap: 3, children: [
3471
+ /* @__PURE__ */ jsx19(ScoreBadge, { score: data.overall }),
3472
+ /* @__PURE__ */ jsx19(ReportMeta, { data }),
3473
+ data.comparisonDelta != null && /* @__PURE__ */ jsx19(DeltaIndicator, { delta: data.comparisonDelta }),
3474
+ /* @__PURE__ */ jsx19(StatusBadges, { improved: data.improved, regressed: data.regressed }),
3475
+ /* @__PURE__ */ jsx19(Text16, { muted: true, size: 0, title: new Date(data.completedAt).toISOString(), children: formatRelativeTime(data.completedAt) }),
3476
+ data.trigger && /* @__PURE__ */ jsx19(Badge9, { fontSize: 0, tone: "default", children: data.trigger })
3322
3477
  ] })
3323
3478
  }
3324
3479
  );
3325
3480
  }
3326
3481
 
3327
3482
  // src/components/search-bar/SearchBar.tsx
3328
- import { SearchIcon as SearchIcon3 } from "@sanity/icons";
3329
- import { Card as Card10, Flex as Flex13, Text as Text17 } from "@sanity/ui";
3483
+ import { SearchIcon as SearchIcon4 } from "@sanity/icons";
3484
+ import { Card as Card11, Flex as Flex15, Text as Text19 } from "@sanity/ui";
3330
3485
  import {
3331
- useCallback as useCallback9,
3332
- useEffect as useEffect4,
3333
- useRef as useRef2,
3486
+ useCallback as useCallback10,
3487
+ useEffect as useEffect5,
3488
+ useRef as useRef3,
3334
3489
  useState as useState5
3335
3490
  } from "react";
3336
3491
 
@@ -3471,21 +3626,21 @@ function filterAndExclude(values, query, dim, activeTokens) {
3471
3626
 
3472
3627
  // src/components/search-bar/FilterBadge.tsx
3473
3628
  import { CloseIcon } from "@sanity/icons";
3474
- import { Badge as Badge9, Flex as Flex11, Text as Text15 } from "@sanity/ui";
3475
- import { useCallback as useCallback7 } from "react";
3476
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
3629
+ import { Badge as Badge10, Flex as Flex13, Text as Text17 } from "@sanity/ui";
3630
+ import { useCallback as useCallback8 } from "react";
3631
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
3477
3632
  function FilterBadge({ token, onRemove }) {
3478
3633
  const dim = DIMENSIONS.find((d) => d.key === token.dimension);
3479
3634
  const tone = dim?.tone ?? "default";
3480
- const handleRemove = useCallback7(
3635
+ const handleRemove = useCallback8(
3481
3636
  (e) => {
3482
3637
  e.stopPropagation();
3483
3638
  onRemove(token.id);
3484
3639
  },
3485
3640
  [onRemove, token.id]
3486
3641
  );
3487
- return /* @__PURE__ */ jsx18(
3488
- Badge9,
3642
+ return /* @__PURE__ */ jsx20(
3643
+ Badge10,
3489
3644
  {
3490
3645
  fontSize: 0,
3491
3646
  style: {
@@ -3494,20 +3649,20 @@ function FilterBadge({ token, onRemove }) {
3494
3649
  userSelect: "none"
3495
3650
  },
3496
3651
  tone,
3497
- children: /* @__PURE__ */ jsxs15(Flex11, { align: "center", gap: 1, children: [
3498
- /* @__PURE__ */ jsxs15(Text15, { size: 0, children: [
3652
+ children: /* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 1, children: [
3653
+ /* @__PURE__ */ jsxs17(Text17, { size: 0, children: [
3499
3654
  token.dimension,
3500
3655
  ":",
3501
3656
  token.label
3502
3657
  ] }),
3503
- /* @__PURE__ */ jsx18(
3504
- Text15,
3658
+ /* @__PURE__ */ jsx20(
3659
+ Text17,
3505
3660
  {
3506
3661
  muted: true,
3507
3662
  onClick: handleRemove,
3508
3663
  size: 0,
3509
3664
  style: { cursor: "pointer", lineHeight: 1 },
3510
- children: /* @__PURE__ */ jsx18(CloseIcon, {})
3665
+ children: /* @__PURE__ */ jsx20(CloseIcon, {})
3511
3666
  }
3512
3667
  )
3513
3668
  ] })
@@ -3516,9 +3671,9 @@ function FilterBadge({ token, onRemove }) {
3516
3671
  }
3517
3672
 
3518
3673
  // src/components/search-bar/SuggestionList.tsx
3519
- import { Badge as Badge10, Card as Card9, Flex as Flex12, Stack as Stack11, Text as Text16 } from "@sanity/ui";
3520
- import { useCallback as useCallback8 } from "react";
3521
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
3674
+ import { Badge as Badge11, Card as Card10, Flex as Flex14, Stack as Stack12, Text as Text18 } from "@sanity/ui";
3675
+ import { useCallback as useCallback9 } from "react";
3676
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
3522
3677
  function SuggestionList({
3523
3678
  suggestions,
3524
3679
  activeIndex,
@@ -3527,8 +3682,8 @@ function SuggestionList({
3527
3682
  if (suggestions.length === 0) return null;
3528
3683
  const groups = groupByCategory(suggestions);
3529
3684
  let globalIndex = -1;
3530
- return /* @__PURE__ */ jsx19(
3531
- Card9,
3685
+ return /* @__PURE__ */ jsx21(
3686
+ Card10,
3532
3687
  {
3533
3688
  overflow: "auto",
3534
3689
  radius: 2,
@@ -3541,9 +3696,9 @@ function SuggestionList({
3541
3696
  top: "100%",
3542
3697
  zIndex: 100
3543
3698
  },
3544
- children: /* @__PURE__ */ jsx19(Stack11, { padding: 1, space: 1, children: groups.map(([category, items]) => /* @__PURE__ */ jsxs16(Stack11, { space: 0, children: [
3545
- /* @__PURE__ */ jsx19(
3546
- Text16,
3699
+ children: /* @__PURE__ */ jsx21(Stack12, { padding: 1, space: 1, children: groups.map(([category, items]) => /* @__PURE__ */ jsxs18(Stack12, { space: 0, children: [
3700
+ /* @__PURE__ */ jsx21(
3701
+ Text18,
3547
3702
  {
3548
3703
  muted: true,
3549
3704
  size: 0,
@@ -3559,7 +3714,7 @@ function SuggestionList({
3559
3714
  items.map((suggestion) => {
3560
3715
  globalIndex++;
3561
3716
  const isActive = globalIndex === activeIndex;
3562
- return /* @__PURE__ */ jsx19(
3717
+ return /* @__PURE__ */ jsx21(
3563
3718
  SuggestionItem,
3564
3719
  {
3565
3720
  active: isActive,
@@ -3581,20 +3736,20 @@ function SuggestionItem({
3581
3736
  const dim = DIMENSIONS.find((d) => d.key === suggestion.dimension);
3582
3737
  const tone = dim?.tone ?? "default";
3583
3738
  const isHint = suggestion.category === "Filters";
3584
- const handleClick = useCallback8(() => {
3739
+ const handleClick = useCallback9(() => {
3585
3740
  onSelect(suggestion);
3586
3741
  }, [onSelect, suggestion]);
3587
- return /* @__PURE__ */ jsx19(
3588
- Card9,
3742
+ return /* @__PURE__ */ jsx21(
3743
+ Card10,
3589
3744
  {
3590
3745
  onClick: handleClick,
3591
3746
  padding: 2,
3592
3747
  radius: 2,
3593
3748
  style: { cursor: "pointer" },
3594
3749
  tone: active ? "primary" : "default",
3595
- children: /* @__PURE__ */ jsxs16(Flex12, { align: "center", gap: 2, children: [
3596
- !isHint && /* @__PURE__ */ jsx19(Badge10, { fontSize: 0, tone, children: suggestion.dimension }),
3597
- /* @__PURE__ */ jsx19(Text16, { size: 1, children: suggestion.label })
3750
+ children: /* @__PURE__ */ jsxs18(Flex14, { align: "center", gap: 2, children: [
3751
+ !isHint && /* @__PURE__ */ jsx21(Badge11, { fontSize: 0, tone, children: suggestion.dimension }),
3752
+ /* @__PURE__ */ jsx21(Text18, { size: 1, children: suggestion.label })
3598
3753
  ] })
3599
3754
  }
3600
3755
  );
@@ -3609,7 +3764,7 @@ function groupByCategory(suggestions) {
3609
3764
  }
3610
3765
 
3611
3766
  // src/components/search-bar/SearchBar.tsx
3612
- import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
3767
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
3613
3768
  function SearchBar({
3614
3769
  tokens,
3615
3770
  query,
@@ -3621,9 +3776,9 @@ function SearchBar({
3621
3776
  }) {
3622
3777
  const [focused, setFocused] = useState5(false);
3623
3778
  const [activeIndex, setActiveIndex] = useState5(-1);
3624
- const inputRef = useRef2(null);
3625
- const blurTimerRef = useRef2(null);
3626
- useEffect4(() => {
3779
+ const inputRef = useRef3(null);
3780
+ const blurTimerRef = useRef3(null);
3781
+ useEffect5(() => {
3627
3782
  return () => {
3628
3783
  if (blurTimerRef.current) {
3629
3784
  clearTimeout(blurTimerRef.current);
@@ -3631,10 +3786,10 @@ function SearchBar({
3631
3786
  };
3632
3787
  }, []);
3633
3788
  const suggestions = focused ? computeSuggestions({ query, activeTokens: tokens, models, areas }) : [];
3634
- useEffect4(() => {
3789
+ useEffect5(() => {
3635
3790
  setActiveIndex(-1);
3636
3791
  }, [query, tokens.length]);
3637
- const handleTokenRemove = useCallback9(
3792
+ const handleTokenRemove = useCallback10(
3638
3793
  (id) => {
3639
3794
  onTokenRemove(id);
3640
3795
  requestAnimationFrame(() => {
@@ -3643,7 +3798,7 @@ function SearchBar({
3643
3798
  },
3644
3799
  [onTokenRemove]
3645
3800
  );
3646
- const handleSuggestionSelect = useCallback9(
3801
+ const handleSuggestionSelect = useCallback10(
3647
3802
  (suggestion) => {
3648
3803
  if (suggestion.category === "Filters") {
3649
3804
  onQueryChange(suggestion.value);
@@ -3662,7 +3817,7 @@ function SearchBar({
3662
3817
  },
3663
3818
  [onTokenAdd, onQueryChange]
3664
3819
  );
3665
- const handleKeyDown = useCallback9(
3820
+ const handleKeyDown = useCallback10(
3666
3821
  (e) => {
3667
3822
  if (e.key === "ArrowDown") {
3668
3823
  e.preventDefault();
@@ -3690,41 +3845,41 @@ function SearchBar({
3690
3845
  handleSuggestionSelect
3691
3846
  ]
3692
3847
  );
3693
- const handleInputChange = useCallback9(
3848
+ const handleInputChange = useCallback10(
3694
3849
  (e) => {
3695
3850
  const value = e.target.value;
3696
3851
  onQueryChange(value);
3697
3852
  },
3698
3853
  [onQueryChange]
3699
3854
  );
3700
- const handleBlur = useCallback9(() => {
3855
+ const handleBlur = useCallback10(() => {
3701
3856
  blurTimerRef.current = setTimeout(() => {
3702
3857
  blurTimerRef.current = null;
3703
3858
  setFocused(false);
3704
3859
  }, 200);
3705
3860
  }, []);
3706
- const handleFocus = useCallback9(() => {
3861
+ const handleFocus = useCallback10(() => {
3707
3862
  if (blurTimerRef.current) {
3708
3863
  clearTimeout(blurTimerRef.current);
3709
3864
  blurTimerRef.current = null;
3710
3865
  }
3711
3866
  setFocused(true);
3712
3867
  }, []);
3713
- const handleBarClick = useCallback9(() => {
3868
+ const handleBarClick = useCallback10(() => {
3714
3869
  inputRef.current?.focus();
3715
3870
  }, []);
3716
- return /* @__PURE__ */ jsxs17("div", { style: { position: "relative" }, children: [
3717
- /* @__PURE__ */ jsx20(
3718
- Card10,
3871
+ return /* @__PURE__ */ jsxs19("div", { style: { position: "relative" }, children: [
3872
+ /* @__PURE__ */ jsx22(
3873
+ Card11,
3719
3874
  {
3720
3875
  border: true,
3721
3876
  onClick: handleBarClick,
3722
3877
  padding: 2,
3723
3878
  radius: 2,
3724
3879
  style: { cursor: "text" },
3725
- children: /* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 1, wrap: "wrap", children: [
3726
- /* @__PURE__ */ jsx20(Text17, { muted: true, size: 1, style: { flexShrink: 0, padding: "0 4px" }, children: /* @__PURE__ */ jsx20(SearchIcon3, {}) }),
3727
- tokens.map((token) => /* @__PURE__ */ jsx20(
3880
+ children: /* @__PURE__ */ jsxs19(Flex15, { align: "center", gap: 1, wrap: "wrap", children: [
3881
+ /* @__PURE__ */ jsx22(Text19, { muted: true, size: 1, style: { flexShrink: 0, padding: "0 4px" }, children: /* @__PURE__ */ jsx22(SearchIcon4, {}) }),
3882
+ tokens.map((token) => /* @__PURE__ */ jsx22(
3728
3883
  FilterBadge,
3729
3884
  {
3730
3885
  onRemove: handleTokenRemove,
@@ -3732,7 +3887,7 @@ function SearchBar({
3732
3887
  },
3733
3888
  token.id
3734
3889
  )),
3735
- /* @__PURE__ */ jsx20(
3890
+ /* @__PURE__ */ jsx22(
3736
3891
  "input",
3737
3892
  {
3738
3893
  onBlur: handleBlur,
@@ -3759,7 +3914,7 @@ function SearchBar({
3759
3914
  ] })
3760
3915
  }
3761
3916
  ),
3762
- focused && suggestions.length > 0 && /* @__PURE__ */ jsx20(
3917
+ focused && suggestions.length > 0 && /* @__PURE__ */ jsx22(
3763
3918
  SuggestionList,
3764
3919
  {
3765
3920
  activeIndex,
@@ -3771,7 +3926,7 @@ function SearchBar({
3771
3926
  }
3772
3927
 
3773
3928
  // src/components/LatestReports.tsx
3774
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
3929
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
3775
3930
  var SORT_LABELS = {
3776
3931
  date: "Date",
3777
3932
  name: "Name",
@@ -3798,7 +3953,7 @@ function LatestReports({
3798
3953
  });
3799
3954
  const [availableModels, setAvailableModels] = useState6([]);
3800
3955
  const [availableAreas, setAvailableAreas] = useState6([]);
3801
- useEffect5(() => {
3956
+ useEffect6(() => {
3802
3957
  setInitialLoading(true);
3803
3958
  setHasMore(true);
3804
3959
  client.fetch(latestReportsQuery, {
@@ -3816,7 +3971,7 @@ function LatestReports({
3816
3971
  setInitialLoading(false);
3817
3972
  });
3818
3973
  }, [client, pageSize, mode, source]);
3819
- const handleLoadMore = useCallback10(() => {
3974
+ const handleLoadMore = useCallback11(() => {
3820
3975
  if (loadingMore || !hasMore) return;
3821
3976
  setLoadingMore(true);
3822
3977
  const nextLimit = reports.length + pageSize;
@@ -3833,11 +3988,11 @@ function LatestReports({
3833
3988
  setLoadingMore(false);
3834
3989
  });
3835
3990
  }, [client, hasMore, loadingMore, mode, pageSize, reports.length, source]);
3836
- useEffect5(() => {
3991
+ useEffect6(() => {
3837
3992
  client.fetch(distinctModelsQuery).then((data) => setAvailableModels((data ?? []).sort())).catch(() => setAvailableModels([]));
3838
3993
  client.fetch(distinctAreasQuery).then((data) => setAvailableAreas((data ?? []).sort())).catch(() => setAvailableAreas([]));
3839
3994
  }, [client]);
3840
- const activeFilters = useMemo3(() => {
3995
+ const activeFilters = useMemo5(() => {
3841
3996
  const result = { models: [], areas: [], datePreset: null };
3842
3997
  for (const token of filterTokens) {
3843
3998
  switch (token.dimension) {
@@ -3854,7 +4009,7 @@ function LatestReports({
3854
4009
  }
3855
4010
  return result;
3856
4011
  }, [filterTokens]);
3857
- const filteredReports = useMemo3(() => {
4012
+ const filteredReports = useMemo5(() => {
3858
4013
  let result = reports;
3859
4014
  if (searchQuery.trim()) {
3860
4015
  const query = searchQuery.toLowerCase().trim();
@@ -3917,7 +4072,7 @@ function LatestReports({
3917
4072
  });
3918
4073
  return result;
3919
4074
  }, [reports, searchQuery, activeFilters, documentSlug, perspective, sort]);
3920
- const handleTokenAdd = useCallback10((token) => {
4075
+ const handleTokenAdd = useCallback11((token) => {
3921
4076
  setFilterTokens((prev) => {
3922
4077
  const dim = token.dimension;
3923
4078
  const isMulti = dim === "area";
@@ -3927,38 +4082,38 @@ function LatestReports({
3927
4082
  return [...prev, token];
3928
4083
  });
3929
4084
  }, []);
3930
- const handleTokenRemove = useCallback10((id) => {
4085
+ const handleTokenRemove = useCallback11((id) => {
3931
4086
  setFilterTokens((prev) => prev.filter((t) => t.id !== id));
3932
4087
  }, []);
3933
- const toggleSortDirection = useCallback10(() => {
4088
+ const toggleSortDirection = useCallback11(() => {
3934
4089
  setSort((prev) => ({
3935
4090
  ...prev,
3936
4091
  direction: prev.direction === "asc" ? "desc" : "asc"
3937
4092
  }));
3938
4093
  }, []);
3939
- const handleSortFieldChange = useCallback10((field) => {
4094
+ const handleSortFieldChange = useCallback11((field) => {
3940
4095
  setSort(
3941
4096
  (prev) => prev.field === field ? { ...prev, direction: prev.direction === "asc" ? "desc" : "asc" } : { direction: "desc", field }
3942
4097
  );
3943
4098
  }, []);
3944
4099
  const hasActiveFilters = searchQuery.trim() !== "" || filterTokens.length > 0 || documentSlug.trim() !== "" || perspective.trim() !== "";
3945
- const handleClearFilters = useCallback10(() => {
4100
+ const handleClearFilters = useCallback11(() => {
3946
4101
  setSearchQuery("");
3947
4102
  setFilterTokens([]);
3948
4103
  setDocumentSlug("");
3949
4104
  setPerspective("");
3950
4105
  }, []);
3951
4106
  if (initialLoading) {
3952
- return /* @__PURE__ */ jsx21(Card11, { padding: 4, children: /* @__PURE__ */ jsx21(Text18, { muted: true, children: "Loading reports\u2026" }) });
4107
+ return /* @__PURE__ */ jsx23(Card12, { padding: 4, children: /* @__PURE__ */ jsx23(Text20, { muted: true, children: "Loading reports\u2026" }) });
3953
4108
  }
3954
4109
  if (reports.length === 0) {
3955
- return /* @__PURE__ */ jsx21(Card11, { padding: 4, children: /* @__PURE__ */ jsx21(Text18, { muted: true, children: "No reports found. Run the pipeline with --publish to create reports." }) });
4110
+ return /* @__PURE__ */ jsx23(Card12, { padding: 4, children: /* @__PURE__ */ jsx23(Text20, { muted: true, children: "No reports found. Run the pipeline with --publish to create reports." }) });
3956
4111
  }
3957
- return /* @__PURE__ */ jsxs18(Stack12, { space: 3, children: [
3958
- /* @__PURE__ */ jsx21(Card11, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs18(Stack12, { space: 3, children: [
3959
- /* @__PURE__ */ jsxs18(Stack12, { space: 1, children: [
3960
- /* @__PURE__ */ jsx21(Text18, { muted: true, size: 0, children: "Search & filter" }),
3961
- /* @__PURE__ */ jsx21(
4112
+ return /* @__PURE__ */ jsxs20(Stack13, { space: 3, children: [
4113
+ /* @__PURE__ */ jsx23(Card12, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs20(Stack13, { space: 3, children: [
4114
+ /* @__PURE__ */ jsxs20(Stack13, { space: 1, children: [
4115
+ /* @__PURE__ */ jsx23(Text20, { muted: true, size: 0, children: "Search & filter" }),
4116
+ /* @__PURE__ */ jsx23(
3962
4117
  SearchBar,
3963
4118
  {
3964
4119
  areas: availableAreas,
@@ -3971,10 +4126,10 @@ function LatestReports({
3971
4126
  }
3972
4127
  )
3973
4128
  ] }),
3974
- /* @__PURE__ */ jsxs18(Flex14, { gap: 2, children: [
3975
- /* @__PURE__ */ jsx21(Box8, { flex: 1, children: /* @__PURE__ */ jsxs18(Stack12, { space: 1, children: [
3976
- /* @__PURE__ */ jsx21(Text18, { muted: true, size: 0, children: "Document" }),
3977
- /* @__PURE__ */ jsx21(
4129
+ /* @__PURE__ */ jsxs20(Flex16, { gap: 2, children: [
4130
+ /* @__PURE__ */ jsx23(Box8, { flex: 1, children: /* @__PURE__ */ jsxs20(Stack13, { space: 1, children: [
4131
+ /* @__PURE__ */ jsx23(Text20, { muted: true, size: 0, children: "Document" }),
4132
+ /* @__PURE__ */ jsx23(
3978
4133
  DocumentFilter,
3979
4134
  {
3980
4135
  onChange: setDocumentSlug,
@@ -3983,9 +4138,9 @@ function LatestReports({
3983
4138
  }
3984
4139
  )
3985
4140
  ] }) }),
3986
- /* @__PURE__ */ jsx21(Box8, { flex: 1, children: /* @__PURE__ */ jsxs18(Stack12, { space: 1, children: [
3987
- /* @__PURE__ */ jsx21(Text18, { muted: true, size: 0, children: "Content release" }),
3988
- /* @__PURE__ */ jsx21(
4141
+ /* @__PURE__ */ jsx23(Box8, { flex: 1, children: /* @__PURE__ */ jsxs20(Stack13, { space: 1, children: [
4142
+ /* @__PURE__ */ jsx23(Text20, { muted: true, size: 0, children: "Content release" }),
4143
+ /* @__PURE__ */ jsx23(
3989
4144
  PerspectiveFilter,
3990
4145
  {
3991
4146
  onChange: setPerspective,
@@ -3994,20 +4149,20 @@ function LatestReports({
3994
4149
  )
3995
4150
  ] }) })
3996
4151
  ] }),
3997
- (documentSlug.trim() || perspective.trim()) && /* @__PURE__ */ jsxs18(Flex14, { align: "center", gap: 1, children: [
3998
- documentSlug.trim() && /* @__PURE__ */ jsxs18(Badge11, { fontSize: 0, tone: "primary", children: [
4152
+ (documentSlug.trim() || perspective.trim()) && /* @__PURE__ */ jsxs20(Flex16, { align: "center", gap: 1, children: [
4153
+ documentSlug.trim() && /* @__PURE__ */ jsxs20(Badge12, { fontSize: 0, tone: "primary", children: [
3999
4154
  "Document: ",
4000
4155
  documentSlug.trim()
4001
4156
  ] }),
4002
- perspective.trim() && /* @__PURE__ */ jsxs18(Badge11, { fontSize: 0, tone: "primary", children: [
4157
+ perspective.trim() && /* @__PURE__ */ jsxs20(Badge12, { fontSize: 0, tone: "primary", children: [
4003
4158
  "Perspective: ",
4004
4159
  perspective.trim()
4005
4160
  ] })
4006
4161
  ] })
4007
4162
  ] }) }),
4008
- /* @__PURE__ */ jsxs18(Flex14, { align: "center", gap: 2, paddingX: 1, wrap: "wrap", children: [
4009
- /* @__PURE__ */ jsx21(Text18, { muted: true, size: 1, children: filteredReports.length === reports.length ? `${reports.length} reports` : `${filteredReports.length} of ${reports.length} reports` }),
4010
- hasActiveFilters && /* @__PURE__ */ jsx21(
4163
+ /* @__PURE__ */ jsxs20(Flex16, { align: "center", gap: 2, paddingX: 1, wrap: "wrap", children: [
4164
+ /* @__PURE__ */ jsx23(Text20, { muted: true, size: 1, children: filteredReports.length === reports.length ? `${reports.length} reports` : `${filteredReports.length} of ${reports.length} reports` }),
4165
+ hasActiveFilters && /* @__PURE__ */ jsx23(
4011
4166
  Button,
4012
4167
  {
4013
4168
  fontSize: 0,
@@ -4017,11 +4172,11 @@ function LatestReports({
4017
4172
  tone: "critical"
4018
4173
  }
4019
4174
  ),
4020
- /* @__PURE__ */ jsxs18(Flex14, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: [
4021
- /* @__PURE__ */ jsx21(
4175
+ /* @__PURE__ */ jsxs20(Flex16, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: [
4176
+ /* @__PURE__ */ jsx23(
4022
4177
  MenuButton,
4023
4178
  {
4024
- button: /* @__PURE__ */ jsx21(
4179
+ button: /* @__PURE__ */ jsx23(
4025
4180
  Button,
4026
4181
  {
4027
4182
  fontSize: 1,
@@ -4031,8 +4186,8 @@ function LatestReports({
4031
4186
  }
4032
4187
  ),
4033
4188
  id: "sort-menu",
4034
- menu: /* @__PURE__ */ jsxs18(Menu, { children: [
4035
- /* @__PURE__ */ jsx21(
4189
+ menu: /* @__PURE__ */ jsxs20(Menu, { children: [
4190
+ /* @__PURE__ */ jsx23(
4036
4191
  MenuItem,
4037
4192
  {
4038
4193
  onClick: () => handleSortFieldChange("date"),
@@ -4040,7 +4195,7 @@ function LatestReports({
4040
4195
  text: "Date"
4041
4196
  }
4042
4197
  ),
4043
- /* @__PURE__ */ jsx21(
4198
+ /* @__PURE__ */ jsx23(
4044
4199
  MenuItem,
4045
4200
  {
4046
4201
  onClick: () => handleSortFieldChange("score"),
@@ -4048,7 +4203,7 @@ function LatestReports({
4048
4203
  text: "Score"
4049
4204
  }
4050
4205
  ),
4051
- /* @__PURE__ */ jsx21(
4206
+ /* @__PURE__ */ jsx23(
4052
4207
  MenuItem,
4053
4208
  {
4054
4209
  onClick: () => handleSortFieldChange("name"),
@@ -4060,7 +4215,7 @@ function LatestReports({
4060
4215
  popover: { portal: true }
4061
4216
  }
4062
4217
  ),
4063
- /* @__PURE__ */ jsx21(
4218
+ /* @__PURE__ */ jsx23(
4064
4219
  Button,
4065
4220
  {
4066
4221
  fontSize: 1,
@@ -4072,9 +4227,9 @@ function LatestReports({
4072
4227
  )
4073
4228
  ] })
4074
4229
  ] }),
4075
- filteredReports.length === 0 ? /* @__PURE__ */ jsx21(Card11, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs18(Stack12, { space: 3, children: [
4076
- /* @__PURE__ */ jsx21(Text18, { align: "center", muted: true, size: 2, children: "No reports match the current filters." }),
4077
- /* @__PURE__ */ jsx21(Flex14, { justify: "center", children: /* @__PURE__ */ jsx21(
4230
+ filteredReports.length === 0 ? /* @__PURE__ */ jsx23(Card12, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs20(Stack13, { space: 3, children: [
4231
+ /* @__PURE__ */ jsx23(Text20, { align: "center", muted: true, size: 2, children: "No reports match the current filters." }),
4232
+ /* @__PURE__ */ jsx23(Flex16, { justify: "center", children: /* @__PURE__ */ jsx23(
4078
4233
  Button,
4079
4234
  {
4080
4235
  fontSize: 1,
@@ -4083,7 +4238,7 @@ function LatestReports({
4083
4238
  text: "Clear all filters"
4084
4239
  }
4085
4240
  ) })
4086
- ] }) }) : /* @__PURE__ */ jsx21(Stack12, { space: 2, children: filteredReports.map((report) => /* @__PURE__ */ jsx21(
4241
+ ] }) }) : /* @__PURE__ */ jsx23(Stack13, { space: 2, children: filteredReports.map((report) => /* @__PURE__ */ jsx23(
4087
4242
  ReportCard,
4088
4243
  {
4089
4244
  data: fromReportListItem(report),
@@ -4091,7 +4246,7 @@ function LatestReports({
4091
4246
  },
4092
4247
  report._id
4093
4248
  )) }),
4094
- hasMore && /* @__PURE__ */ jsx21(Flex14, { justify: "center", paddingY: 3, children: /* @__PURE__ */ jsx21(
4249
+ hasMore && /* @__PURE__ */ jsx23(Flex16, { justify: "center", paddingY: 3, children: /* @__PURE__ */ jsx23(
4095
4250
  Button,
4096
4251
  {
4097
4252
  disabled: loadingMore,
@@ -4139,28 +4294,28 @@ function getDateThreshold(preset) {
4139
4294
 
4140
4295
  // src/components/report-detail/ReportDetail.tsx
4141
4296
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
4142
- import { Box as Box14, Button as Button3, Stack as Stack21, Text as Text28, useToast } from "@sanity/ui";
4143
- import { useCallback as useCallback11, useEffect as useEffect6, useState as useState8 } from "react";
4297
+ import { Box as Box14, Button as Button3, Stack as Stack22, Text as Text30, useToast } from "@sanity/ui";
4298
+ import { useCallback as useCallback12, useEffect as useEffect7, useState as useState8 } from "react";
4144
4299
  import { useClient as useClient6 } from "sanity";
4145
4300
 
4146
4301
  // src/components/report-detail/AreaScoreTable.tsx
4147
4302
  import React from "react";
4148
- import { Card as Card13, Stack as Stack13, Text as Text20 } from "@sanity/ui";
4303
+ import { Card as Card14, Stack as Stack14, Text as Text22 } from "@sanity/ui";
4149
4304
 
4150
4305
  // src/components/primitives/ScoreCell.tsx
4151
- import { Card as Card12, Text as Text19 } from "@sanity/ui";
4152
- import { jsx as jsx22 } from "react/jsx-runtime";
4306
+ import { Card as Card13, Text as Text21 } from "@sanity/ui";
4307
+ import { jsx as jsx24 } from "react/jsx-runtime";
4153
4308
  function ScoreCell({ score, size = 1 }) {
4154
4309
  const rounded = Math.round(score);
4155
- return /* @__PURE__ */ jsx22(Card12, { padding: 1, radius: 2, tone: scoreTone(rounded), children: /* @__PURE__ */ jsx22(Text19, { align: "center", size, weight: "medium", children: rounded }) });
4310
+ return /* @__PURE__ */ jsx24(Card13, { padding: 1, radius: 2, tone: scoreTone(rounded), children: /* @__PURE__ */ jsx24(Text21, { align: "center", size, weight: "medium", children: rounded }) });
4156
4311
  }
4157
4312
 
4158
4313
  // src/components/report-detail/AreaScoreTable.tsx
4159
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
4314
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
4160
4315
  function AreaScoreTable({ scores }) {
4161
- return /* @__PURE__ */ jsx23(Card13, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs19(Stack13, { space: 4, children: [
4162
- /* @__PURE__ */ jsx23(Text20, { size: 2, weight: "semibold", children: "Per-Area Scores" }),
4163
- /* @__PURE__ */ jsxs19(
4316
+ return /* @__PURE__ */ jsx25(Card14, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack14, { space: 4, children: [
4317
+ /* @__PURE__ */ jsx25(Text22, { size: 2, weight: "semibold", children: "Per-Area Scores" }),
4318
+ /* @__PURE__ */ jsxs21(
4164
4319
  "div",
4165
4320
  {
4166
4321
  style: {
@@ -4169,9 +4324,9 @@ function AreaScoreTable({ scores }) {
4169
4324
  gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr 1fr"
4170
4325
  },
4171
4326
  children: [
4172
- /* @__PURE__ */ jsx23(ColumnHeader, { borderBottom: true, label: "Area" }),
4173
- /* @__PURE__ */ jsx23(ColumnHeader, { borderBottom: true, label: "Score", tooltip: GLOSSARY.score }),
4174
- /* @__PURE__ */ jsx23(
4327
+ /* @__PURE__ */ jsx25(ColumnHeader, { borderBottom: true, label: "Area" }),
4328
+ /* @__PURE__ */ jsx25(ColumnHeader, { borderBottom: true, label: "Score", tooltip: GLOSSARY.score }),
4329
+ /* @__PURE__ */ jsx25(
4175
4330
  ColumnHeader,
4176
4331
  {
4177
4332
  borderBottom: true,
@@ -4179,7 +4334,7 @@ function AreaScoreTable({ scores }) {
4179
4334
  tooltip: GLOSSARY.taskCompletion
4180
4335
  }
4181
4336
  ),
4182
- /* @__PURE__ */ jsx23(
4337
+ /* @__PURE__ */ jsx25(
4183
4338
  ColumnHeader,
4184
4339
  {
4185
4340
  borderBottom: true,
@@ -4187,7 +4342,7 @@ function AreaScoreTable({ scores }) {
4187
4342
  tooltip: GLOSSARY.codeCorrectness
4188
4343
  }
4189
4344
  ),
4190
- /* @__PURE__ */ jsx23(
4345
+ /* @__PURE__ */ jsx25(
4191
4346
  ColumnHeader,
4192
4347
  {
4193
4348
  borderBottom: true,
@@ -4195,10 +4350,10 @@ function AreaScoreTable({ scores }) {
4195
4350
  tooltip: GLOSSARY.docCoverage
4196
4351
  }
4197
4352
  ),
4198
- /* @__PURE__ */ jsx23(ColumnHeader, { borderBottom: true, label: "Lift", tooltip: GLOSSARY.docLift }),
4199
- /* @__PURE__ */ jsx23(ColumnHeader, { borderBottom: true, label: "Tests", tooltip: GLOSSARY.tests }),
4200
- scores.map((score, i) => /* @__PURE__ */ jsxs19(React.Fragment, { children: [
4201
- /* @__PURE__ */ jsx23(
4353
+ /* @__PURE__ */ jsx25(ColumnHeader, { borderBottom: true, label: "Lift", tooltip: GLOSSARY.docLift }),
4354
+ /* @__PURE__ */ jsx25(ColumnHeader, { borderBottom: true, label: "Tests", tooltip: GLOSSARY.tests }),
4355
+ scores.map((score, i) => /* @__PURE__ */ jsxs21(React.Fragment, { children: [
4356
+ /* @__PURE__ */ jsx25(
4202
4357
  "div",
4203
4358
  {
4204
4359
  style: {
@@ -4206,14 +4361,14 @@ function AreaScoreTable({ scores }) {
4206
4361
  borderRadius: 4,
4207
4362
  padding: "8px 0 8px 4px"
4208
4363
  },
4209
- children: /* @__PURE__ */ jsx23(Text20, { size: 1, weight: "medium", children: score.feature })
4364
+ children: /* @__PURE__ */ jsx25(Text22, { size: 1, weight: "medium", children: score.feature })
4210
4365
  }
4211
4366
  ),
4212
- /* @__PURE__ */ jsx23("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx23(ScoreCell, { score: score.totalScore }) }),
4213
- /* @__PURE__ */ jsx23("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx23(ScoreCell, { score: score.taskCompletion }) }),
4214
- /* @__PURE__ */ jsx23("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx23(ScoreCell, { score: score.codeCorrectness }) }),
4215
- /* @__PURE__ */ jsx23("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx23(ScoreCell, { score: score.docCoverage }) }),
4216
- /* @__PURE__ */ jsx23(
4367
+ /* @__PURE__ */ jsx25("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx25(ScoreCell, { score: score.totalScore }) }),
4368
+ /* @__PURE__ */ jsx25("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx25(ScoreCell, { score: score.taskCompletion }) }),
4369
+ /* @__PURE__ */ jsx25("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx25(ScoreCell, { score: score.codeCorrectness }) }),
4370
+ /* @__PURE__ */ jsx25("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx25(ScoreCell, { score: score.docCoverage }) }),
4371
+ /* @__PURE__ */ jsx25(
4217
4372
  "div",
4218
4373
  {
4219
4374
  style: {
@@ -4221,10 +4376,10 @@ function AreaScoreTable({ scores }) {
4221
4376
  background: rowBackground(i),
4222
4377
  display: "flex"
4223
4378
  },
4224
- children: /* @__PURE__ */ jsx23(Text20, { size: 1, children: formatDelta(score.docLift) })
4379
+ children: /* @__PURE__ */ jsx25(Text22, { size: 1, children: formatDelta(score.docLift) })
4225
4380
  }
4226
4381
  ),
4227
- /* @__PURE__ */ jsx23(
4382
+ /* @__PURE__ */ jsx25(
4228
4383
  "div",
4229
4384
  {
4230
4385
  style: {
@@ -4232,7 +4387,7 @@ function AreaScoreTable({ scores }) {
4232
4387
  background: rowBackground(i),
4233
4388
  display: "flex"
4234
4389
  },
4235
- children: /* @__PURE__ */ jsx23(Text20, { muted: true, size: 1, children: score.testCount })
4390
+ children: /* @__PURE__ */ jsx25(Text22, { muted: true, size: 1, children: score.testCount })
4236
4391
  }
4237
4392
  )
4238
4393
  ] }, score.feature))
@@ -4243,13 +4398,13 @@ function AreaScoreTable({ scores }) {
4243
4398
  }
4244
4399
 
4245
4400
  // src/components/report-detail/ComparisonSummary.tsx
4246
- import { Badge as Badge12, Box as Box9, Card as Card14, Flex as Flex15, Grid as Grid2, Stack as Stack14, Text as Text21, Tooltip as Tooltip3 } from "@sanity/ui";
4247
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
4401
+ import { Badge as Badge13, Box as Box9, Card as Card15, Flex as Flex17, Grid as Grid2, Stack as Stack15, Text as Text23, Tooltip as Tooltip3 } from "@sanity/ui";
4402
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
4248
4403
  function ComparisonSummary({ comparison }) {
4249
- return /* @__PURE__ */ jsx24(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs20(Stack14, { space: 4, children: [
4250
- /* @__PURE__ */ jsxs20(Flex15, { align: "center", gap: 3, wrap: "wrap", children: [
4251
- /* @__PURE__ */ jsx24(Text21, { size: 2, weight: "semibold", children: "Comparison" }),
4252
- /* @__PURE__ */ jsx24(
4404
+ return /* @__PURE__ */ jsx26(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs22(Stack15, { space: 4, children: [
4405
+ /* @__PURE__ */ jsxs22(Flex17, { align: "center", gap: 3, wrap: "wrap", children: [
4406
+ /* @__PURE__ */ jsx26(Text23, { size: 2, weight: "semibold", children: "Comparison" }),
4407
+ /* @__PURE__ */ jsx26(
4253
4408
  DeltaCard,
4254
4409
  {
4255
4410
  delta: comparison.deltas.overall,
@@ -4257,7 +4412,7 @@ function ComparisonSummary({ comparison }) {
4257
4412
  tooltip: GLOSSARY.overallDelta
4258
4413
  }
4259
4414
  ),
4260
- comparison.deltas.actualDelta != null && /* @__PURE__ */ jsx24(
4415
+ comparison.deltas.actualDelta != null && /* @__PURE__ */ jsx26(
4261
4416
  DeltaCard,
4262
4417
  {
4263
4418
  delta: comparison.deltas.actualDelta,
@@ -4265,7 +4420,7 @@ function ComparisonSummary({ comparison }) {
4265
4420
  tooltip: GLOSSARY.actualDelta
4266
4421
  }
4267
4422
  ),
4268
- comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */ jsx24(
4423
+ comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */ jsx26(
4269
4424
  DeltaCard,
4270
4425
  {
4271
4426
  delta: comparison.deltas.retrievalGapDelta,
@@ -4275,8 +4430,8 @@ function ComparisonSummary({ comparison }) {
4275
4430
  }
4276
4431
  )
4277
4432
  ] }),
4278
- /* @__PURE__ */ jsxs20(Grid2, { columns: [1, 1, 3], gap: 3, children: [
4279
- comparison.improved.length > 0 && /* @__PURE__ */ jsx24(
4433
+ /* @__PURE__ */ jsxs22(Grid2, { columns: [1, 1, 3], gap: 3, children: [
4434
+ comparison.improved.length > 0 && /* @__PURE__ */ jsx26(
4280
4435
  AreaBadgeGroup,
4281
4436
  {
4282
4437
  areas: comparison.improved,
@@ -4284,7 +4439,7 @@ function ComparisonSummary({ comparison }) {
4284
4439
  tone: "positive"
4285
4440
  }
4286
4441
  ),
4287
- comparison.regressed.length > 0 && /* @__PURE__ */ jsx24(
4442
+ comparison.regressed.length > 0 && /* @__PURE__ */ jsx26(
4288
4443
  AreaBadgeGroup,
4289
4444
  {
4290
4445
  areas: comparison.regressed,
@@ -4292,7 +4447,7 @@ function ComparisonSummary({ comparison }) {
4292
4447
  tone: "critical"
4293
4448
  }
4294
4449
  ),
4295
- comparison.unchanged.length > 0 && /* @__PURE__ */ jsx24(
4450
+ comparison.unchanged.length > 0 && /* @__PURE__ */ jsx26(
4296
4451
  AreaBadgeGroup,
4297
4452
  {
4298
4453
  areas: comparison.unchanged,
@@ -4311,19 +4466,19 @@ function DeltaCard({
4311
4466
  }) {
4312
4467
  const isPositive = invertedPolarity ? delta < 0 : delta > 0;
4313
4468
  const isNegative = invertedPolarity ? delta > 0 : delta < 0;
4314
- return /* @__PURE__ */ jsx24(
4469
+ return /* @__PURE__ */ jsx26(
4315
4470
  Tooltip3,
4316
4471
  {
4317
- content: /* @__PURE__ */ jsx24(Box9, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx24(Text21, { size: 1, children: tooltip }) }),
4472
+ content: /* @__PURE__ */ jsx26(Box9, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx26(Text23, { size: 1, children: tooltip }) }),
4318
4473
  placement: "bottom",
4319
4474
  portal: true,
4320
- children: /* @__PURE__ */ jsx24(
4321
- Card14,
4475
+ children: /* @__PURE__ */ jsx26(
4476
+ Card15,
4322
4477
  {
4323
4478
  padding: 2,
4324
4479
  radius: 2,
4325
4480
  tone: isPositive ? "positive" : isNegative ? "critical" : "default",
4326
- children: /* @__PURE__ */ jsxs20(Text21, { size: 1, weight: "bold", children: [
4481
+ children: /* @__PURE__ */ jsxs22(Text23, { size: 1, weight: "bold", children: [
4327
4482
  formatDelta(delta),
4328
4483
  " ",
4329
4484
  label
@@ -4338,9 +4493,9 @@ function AreaBadgeGroup({
4338
4493
  label,
4339
4494
  tone
4340
4495
  }) {
4341
- return /* @__PURE__ */ jsxs20(Stack14, { space: 2, children: [
4342
- /* @__PURE__ */ jsx24(
4343
- Text21,
4496
+ return /* @__PURE__ */ jsxs22(Stack15, { space: 2, children: [
4497
+ /* @__PURE__ */ jsx26(
4498
+ Text23,
4344
4499
  {
4345
4500
  muted: true,
4346
4501
  size: 0,
@@ -4349,21 +4504,21 @@ function AreaBadgeGroup({
4349
4504
  children: label
4350
4505
  }
4351
4506
  ),
4352
- /* @__PURE__ */ jsx24(Flex15, { gap: 1, wrap: "wrap", children: areas.map((a) => /* @__PURE__ */ jsx24(Badge12, { tone, children: a }, a)) })
4507
+ /* @__PURE__ */ jsx26(Flex17, { gap: 1, wrap: "wrap", children: areas.map((a) => /* @__PURE__ */ jsx26(Badge13, { tone, children: a }, a)) })
4353
4508
  ] });
4354
4509
  }
4355
4510
 
4356
4511
  // src/components/report-detail/JudgmentList.tsx
4357
4512
  import { useState as useState7 } from "react";
4358
4513
  import { HelpCircleIcon as HelpCircleIcon4 } from "@sanity/icons";
4359
- import { Badge as Badge13, Box as Box10, Card as Card15, Flex as Flex16, Stack as Stack15, Text as Text22, Tooltip as Tooltip4 } from "@sanity/ui";
4514
+ import { Badge as Badge14, Box as Box10, Card as Card16, Flex as Flex18, Stack as Stack16, Text as Text24, Tooltip as Tooltip4 } from "@sanity/ui";
4360
4515
 
4361
4516
  // src/components/primitives/InlineCode.tsx
4362
- import { Fragment as Fragment4, jsx as jsx25 } from "react/jsx-runtime";
4517
+ import { Fragment as Fragment4, jsx as jsx27 } from "react/jsx-runtime";
4363
4518
  function InlineCode({ text }) {
4364
4519
  const parts = text.split(/`([^`]+)`/);
4365
- return /* @__PURE__ */ jsx25(Fragment4, { children: parts.map(
4366
- (part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx25(
4520
+ return /* @__PURE__ */ jsx27(Fragment4, { children: parts.map(
4521
+ (part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx27(
4367
4522
  "code",
4368
4523
  {
4369
4524
  style: {
@@ -4375,12 +4530,12 @@ function InlineCode({ text }) {
4375
4530
  children: part
4376
4531
  },
4377
4532
  i
4378
- ) : /* @__PURE__ */ jsx25("span", { children: part }, i)
4533
+ ) : /* @__PURE__ */ jsx27("span", { children: part }, i)
4379
4534
  ) });
4380
4535
  }
4381
4536
 
4382
4537
  // src/components/report-detail/JudgmentList.tsx
4383
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
4538
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
4384
4539
  function groupByArea(judgments) {
4385
4540
  const byArea = /* @__PURE__ */ new Map();
4386
4541
  for (const j of judgments) {
@@ -4395,36 +4550,36 @@ var DIMENSION_LABELS = DIMENSION_LABELS_KEBAB;
4395
4550
  function JudgmentList({ judgments }) {
4396
4551
  if (judgments.length === 0) return null;
4397
4552
  const grouped = groupByArea(judgments);
4398
- return /* @__PURE__ */ jsx26(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack15, { space: 4, children: [
4399
- /* @__PURE__ */ jsxs21(Flex16, { align: "center", gap: 3, wrap: "wrap", children: [
4400
- /* @__PURE__ */ jsx26(Text22, { size: 2, weight: "semibold", children: "Low-Scoring Judgments" }),
4401
- /* @__PURE__ */ jsx26(
4553
+ return /* @__PURE__ */ jsx28(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack16, { space: 4, children: [
4554
+ /* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
4555
+ /* @__PURE__ */ jsx28(Text24, { size: 2, weight: "semibold", children: "Low-Scoring Judgments" }),
4556
+ /* @__PURE__ */ jsx28(
4402
4557
  Tooltip4,
4403
4558
  {
4404
- content: /* @__PURE__ */ jsx26(Box10, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx26(Text22, { size: 1, children: GLOSSARY.lowScoringJudgments }) }),
4559
+ content: /* @__PURE__ */ jsx28(Box10, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx28(Text24, { size: 1, children: GLOSSARY.lowScoringJudgments }) }),
4405
4560
  placement: "bottom",
4406
4561
  portal: true,
4407
- children: /* @__PURE__ */ jsx26(Text22, { muted: true, size: 0, children: /* @__PURE__ */ jsx26(HelpCircleIcon4, {}) })
4562
+ children: /* @__PURE__ */ jsx28(Text24, { muted: true, size: 0, children: /* @__PURE__ */ jsx28(HelpCircleIcon4, {}) })
4408
4563
  }
4409
4564
  ),
4410
- /* @__PURE__ */ jsx26(Card15, { padding: 2, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs21(Text22, { size: 1, weight: "bold", children: [
4565
+ /* @__PURE__ */ jsx28(Card16, { padding: 2, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs23(Text24, { size: 1, weight: "bold", children: [
4411
4566
  judgments.length,
4412
4567
  " judgment",
4413
4568
  judgments.length === 1 ? "" : "s",
4414
4569
  " below 70"
4415
4570
  ] }) })
4416
4571
  ] }),
4417
- grouped.map(([area, areaJudgments]) => /* @__PURE__ */ jsx26(Card15, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs21(Stack15, { space: 3, children: [
4418
- /* @__PURE__ */ jsxs21(Text22, { size: 1, weight: "semibold", children: [
4572
+ grouped.map(([area, areaJudgments]) => /* @__PURE__ */ jsx28(Card16, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs23(Stack16, { space: 3, children: [
4573
+ /* @__PURE__ */ jsxs23(Text24, { size: 1, weight: "semibold", children: [
4419
4574
  area,
4420
4575
  " ",
4421
- /* @__PURE__ */ jsxs21(Text22, { muted: true, size: 1, weight: "regular", as: "span", children: [
4576
+ /* @__PURE__ */ jsxs23(Text24, { muted: true, size: 1, weight: "regular", as: "span", children: [
4422
4577
  "(",
4423
4578
  areaJudgments.length,
4424
4579
  ")"
4425
4580
  ] })
4426
4581
  ] }),
4427
- areaJudgments.map((j, i) => /* @__PURE__ */ jsx26(JudgmentCard, { judgment: j }, `${area}-${i}`))
4582
+ areaJudgments.map((j, i) => /* @__PURE__ */ jsx28(JudgmentCard, { judgment: j }, `${area}-${i}`))
4428
4583
  ] }) }, area))
4429
4584
  ] }) });
4430
4585
  }
@@ -4433,18 +4588,18 @@ function JudgmentCard({ judgment }) {
4433
4588
  const dimLabel = DIMENSION_LABELS[judgment.dimension] ?? judgment.dimension;
4434
4589
  const sep = judgment.taskId.indexOf(" - ");
4435
4590
  const taskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
4436
- return /* @__PURE__ */ jsx26(
4437
- Card15,
4591
+ return /* @__PURE__ */ jsx28(
4592
+ Card16,
4438
4593
  {
4439
4594
  padding: 3,
4440
4595
  radius: 2,
4441
4596
  shadow: 1,
4442
4597
  style: { cursor: "pointer" },
4443
4598
  onClick: () => setExpanded(!expanded),
4444
- children: /* @__PURE__ */ jsxs21(Stack15, { space: 3, children: [
4445
- /* @__PURE__ */ jsxs21(Flex16, { align: "center", gap: 2, wrap: "wrap", children: [
4446
- /* @__PURE__ */ jsx26(Card15, { padding: 2, radius: 2, tone: scoreTone(judgment.score), children: /* @__PURE__ */ jsx26(
4447
- Text22,
4599
+ children: /* @__PURE__ */ jsxs23(Stack16, { space: 3, children: [
4600
+ /* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
4601
+ /* @__PURE__ */ jsx28(Card16, { padding: 2, radius: 2, tone: scoreTone(judgment.score), children: /* @__PURE__ */ jsx28(
4602
+ Text24,
4448
4603
  {
4449
4604
  align: "center",
4450
4605
  size: 1,
@@ -4453,32 +4608,32 @@ function JudgmentCard({ judgment }) {
4453
4608
  children: judgment.score
4454
4609
  }
4455
4610
  ) }),
4456
- /* @__PURE__ */ jsx26(Badge13, { tone: "default", children: dimLabel }),
4457
- /* @__PURE__ */ jsx26(Text22, { size: 1, weight: "medium", children: taskName }),
4458
- /* @__PURE__ */ jsx26(Text22, { muted: true, size: 0, children: judgment.modelId }),
4459
- /* @__PURE__ */ jsx26(Text22, { muted: true, size: 0, style: { marginLeft: "auto" }, children: expanded ? "\u25B2" : "\u25BC" })
4611
+ /* @__PURE__ */ jsx28(Badge14, { tone: "default", children: dimLabel }),
4612
+ /* @__PURE__ */ jsx28(Text24, { size: 1, weight: "medium", children: taskName }),
4613
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 0, children: judgment.modelId }),
4614
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 0, style: { marginLeft: "auto" }, children: expanded ? "\u25B2" : "\u25BC" })
4460
4615
  ] }),
4461
- expanded && /* @__PURE__ */ jsxs21(Stack15, { space: 3, children: [
4462
- /* @__PURE__ */ jsx26(Card15, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx26(
4463
- Text22,
4616
+ expanded && /* @__PURE__ */ jsxs23(Stack16, { space: 3, children: [
4617
+ /* @__PURE__ */ jsx28(Card16, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx28(
4618
+ Text24,
4464
4619
  {
4465
4620
  muted: true,
4466
4621
  size: 1,
4467
4622
  style: { lineHeight: 1.6, whiteSpace: "pre-wrap" },
4468
- children: /* @__PURE__ */ jsx26(InlineCode, { text: judgment.reason })
4623
+ children: /* @__PURE__ */ jsx28(InlineCode, { text: judgment.reason })
4469
4624
  }
4470
4625
  ) }),
4471
- judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs21(Flex16, { align: "center", gap: 2, wrap: "wrap", children: [
4472
- /* @__PURE__ */ jsx26(Text22, { muted: true, size: 0, children: "Docs:" }),
4626
+ judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 2, wrap: "wrap", children: [
4627
+ /* @__PURE__ */ jsx28(Text24, { muted: true, size: 0, children: "Docs:" }),
4473
4628
  judgment.canonicalDocs.map((doc) => {
4474
- const badge = /* @__PURE__ */ jsx26(Badge13, { mode: "outline", tone: "primary", children: doc.slug });
4475
- return /* @__PURE__ */ jsx26(
4629
+ const badge = /* @__PURE__ */ jsx28(Badge14, { mode: "outline", tone: "primary", children: doc.slug });
4630
+ return /* @__PURE__ */ jsx28(
4476
4631
  Tooltip4,
4477
4632
  {
4478
- content: /* @__PURE__ */ jsx26(Box10, { padding: 2, children: /* @__PURE__ */ jsx26(Text22, { size: 1, children: doc.title || doc.slug }) }),
4633
+ content: /* @__PURE__ */ jsx28(Box10, { padding: 2, children: /* @__PURE__ */ jsx28(Text24, { size: 1, children: doc.title || doc.slug }) }),
4479
4634
  placement: "bottom",
4480
4635
  portal: true,
4481
- children: doc.documentId ? /* @__PURE__ */ jsx26(
4636
+ children: doc.documentId ? /* @__PURE__ */ jsx28(
4482
4637
  "a",
4483
4638
  {
4484
4639
  href: `/intent/edit/id=${doc.documentId}`,
@@ -4503,8 +4658,8 @@ import { Grid as Grid3 } from "@sanity/ui";
4503
4658
 
4504
4659
  // src/components/primitives/StatCard.tsx
4505
4660
  import { HelpCircleIcon as HelpCircleIcon5 } from "@sanity/icons";
4506
- import { Box as Box11, Card as Card16, Stack as Stack16, Text as Text23, Tooltip as Tooltip5 } from "@sanity/ui";
4507
- import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
4661
+ import { Box as Box11, Card as Card17, Stack as Stack17, Text as Text25, Tooltip as Tooltip5 } from "@sanity/ui";
4662
+ import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
4508
4663
  function StatCard({
4509
4664
  label,
4510
4665
  value,
@@ -4512,24 +4667,24 @@ function StatCard({
4512
4667
  suffix,
4513
4668
  tone = "default"
4514
4669
  }) {
4515
- return /* @__PURE__ */ jsx27(Card16, { padding: 3, radius: 2, shadow: 1, tone, children: /* @__PURE__ */ jsxs22(Stack16, { space: 2, children: [
4516
- /* @__PURE__ */ jsxs22(Text23, { muted: true, size: 1, children: [
4670
+ return /* @__PURE__ */ jsx29(Card17, { padding: 3, radius: 2, shadow: 1, tone, children: /* @__PURE__ */ jsxs24(Stack17, { space: 2, children: [
4671
+ /* @__PURE__ */ jsxs24(Text25, { muted: true, size: 1, children: [
4517
4672
  label,
4518
- tooltip && /* @__PURE__ */ jsxs22(Fragment5, { children: [
4673
+ tooltip && /* @__PURE__ */ jsxs24(Fragment5, { children: [
4519
4674
  " ",
4520
- /* @__PURE__ */ jsx27(
4675
+ /* @__PURE__ */ jsx29(
4521
4676
  Tooltip5,
4522
4677
  {
4523
- content: /* @__PURE__ */ jsx27(Box11, { padding: 2, children: /* @__PURE__ */ jsx27(Text23, { size: 1, children: tooltip }) }),
4678
+ content: /* @__PURE__ */ jsx29(Box11, { padding: 2, children: /* @__PURE__ */ jsx29(Text25, { size: 1, children: tooltip }) }),
4524
4679
  portal: true,
4525
- children: /* @__PURE__ */ jsx27("span", { style: { cursor: "help" }, children: /* @__PURE__ */ jsx27(HelpCircleIcon5, {}) })
4680
+ children: /* @__PURE__ */ jsx29("span", { style: { cursor: "help" }, children: /* @__PURE__ */ jsx29(HelpCircleIcon5, {}) })
4526
4681
  }
4527
4682
  )
4528
4683
  ] })
4529
4684
  ] }),
4530
- /* @__PURE__ */ jsxs22(Text23, { size: 3, weight: "bold", children: [
4685
+ /* @__PURE__ */ jsxs24(Text25, { size: 3, weight: "bold", children: [
4531
4686
  value,
4532
- suffix && /* @__PURE__ */ jsxs22("span", { style: { fontSize: "0.6em", fontWeight: 400 }, children: [
4687
+ suffix && /* @__PURE__ */ jsxs24("span", { style: { fontSize: "0.6em", fontWeight: 400 }, children: [
4533
4688
  " ",
4534
4689
  suffix
4535
4690
  ] })
@@ -4538,7 +4693,7 @@ function StatCard({
4538
4693
  }
4539
4694
 
4540
4695
  // src/components/report-detail/OverviewStats.tsx
4541
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
4696
+ import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
4542
4697
  function OverviewStats({
4543
4698
  overall,
4544
4699
  durationMs,
@@ -4546,8 +4701,8 @@ function OverviewStats({
4546
4701
  isFullMode
4547
4702
  }) {
4548
4703
  const overallTone = scoreTone(overall.avgScore);
4549
- return /* @__PURE__ */ jsxs23(Grid3, { columns: [1, 1, 2, isFullMode ? 4 : 4], gap: 3, children: [
4550
- /* @__PURE__ */ jsx28(
4704
+ return /* @__PURE__ */ jsxs25(Grid3, { columns: [1, 1, 2, isFullMode ? 4 : 4], gap: 3, children: [
4705
+ /* @__PURE__ */ jsx30(
4551
4706
  StatCard,
4552
4707
  {
4553
4708
  label: "Overall Score",
@@ -4556,7 +4711,7 @@ function OverviewStats({
4556
4711
  value: overall.avgScore.toFixed(1)
4557
4712
  }
4558
4713
  ),
4559
- /* @__PURE__ */ jsx28(
4714
+ /* @__PURE__ */ jsx30(
4560
4715
  StatCard,
4561
4716
  {
4562
4717
  label: "Doc Lift",
@@ -4565,7 +4720,7 @@ function OverviewStats({
4565
4720
  value: overall.avgDocLift.toFixed(1)
4566
4721
  }
4567
4722
  ),
4568
- isFullMode && overall.avgActualScore != null && /* @__PURE__ */ jsx28(
4723
+ isFullMode && overall.avgActualScore != null && /* @__PURE__ */ jsx30(
4569
4724
  StatCard,
4570
4725
  {
4571
4726
  label: "Actual Score",
@@ -4574,7 +4729,7 @@ function OverviewStats({
4574
4729
  value: overall.avgActualScore.toFixed(1)
4575
4730
  }
4576
4731
  ),
4577
- isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */ jsx28(
4732
+ isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */ jsx30(
4578
4733
  StatCard,
4579
4734
  {
4580
4735
  label: "Retrieval Gap",
@@ -4584,7 +4739,7 @@ function OverviewStats({
4584
4739
  value: overall.avgRetrievalGap.toFixed(1)
4585
4740
  }
4586
4741
  ),
4587
- isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */ jsx28(
4742
+ isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */ jsx30(
4588
4743
  StatCard,
4589
4744
  {
4590
4745
  label: "Infra Efficiency",
@@ -4592,8 +4747,8 @@ function OverviewStats({
4592
4747
  value: formatPercent(overall.avgInfrastructureEfficiency)
4593
4748
  }
4594
4749
  ),
4595
- /* @__PURE__ */ jsx28(StatCard, { label: "Duration", value: formatDuration(durationMs) }),
4596
- /* @__PURE__ */ jsx28(
4750
+ /* @__PURE__ */ jsx30(StatCard, { label: "Duration", value: formatDuration(durationMs) }),
4751
+ /* @__PURE__ */ jsx30(
4597
4752
  StatCard,
4598
4753
  {
4599
4754
  label: "Tests",
@@ -4605,31 +4760,31 @@ function OverviewStats({
4605
4760
  }
4606
4761
 
4607
4762
  // src/components/report-detail/ProvenanceCard.tsx
4608
- import { Card as Card17, Flex as Flex17, Grid as Grid4, Stack as Stack17, Text as Text24 } from "@sanity/ui";
4609
- import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
4763
+ import { Card as Card18, Flex as Flex19, Grid as Grid4, Stack as Stack18, Text as Text26 } from "@sanity/ui";
4764
+ import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
4610
4765
  var VIEWABLE_PROMPTFOO_MODES = /* @__PURE__ */ new Set(["agentic", "observed"]);
4611
4766
  function ProvenanceCard({ provenance }) {
4612
- return /* @__PURE__ */ jsx29(Card17, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack17, { space: 4, children: [
4613
- /* @__PURE__ */ jsx29(Text24, { size: 2, weight: "semibold", children: "Provenance" }),
4614
- /* @__PURE__ */ jsxs24(Grid4, { columns: [1, 2, 3], gap: 4, children: [
4615
- /* @__PURE__ */ jsx29(Field, { label: "Mode", value: provenance.mode }),
4616
- /* @__PURE__ */ jsx29(Field, { label: "Source", value: provenance.source.name }),
4617
- /* @__PURE__ */ jsx29(
4767
+ return /* @__PURE__ */ jsx31(Card18, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs26(Stack18, { space: 4, children: [
4768
+ /* @__PURE__ */ jsx31(Text26, { size: 2, weight: "semibold", children: "Provenance" }),
4769
+ /* @__PURE__ */ jsxs26(Grid4, { columns: [1, 2, 3], gap: 4, children: [
4770
+ /* @__PURE__ */ jsx31(Field, { label: "Mode", value: provenance.mode }),
4771
+ /* @__PURE__ */ jsx31(Field, { label: "Source", value: provenance.source.name }),
4772
+ /* @__PURE__ */ jsx31(
4618
4773
  Field,
4619
4774
  {
4620
4775
  label: "Trigger",
4621
4776
  value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
4622
4777
  }
4623
4778
  ),
4624
- /* @__PURE__ */ jsx29(
4779
+ /* @__PURE__ */ jsx31(
4625
4780
  Field,
4626
4781
  {
4627
4782
  label: "Models",
4628
4783
  value: provenance.models.map((m) => m.label).join(", ")
4629
4784
  }
4630
4785
  ),
4631
- /* @__PURE__ */ jsx29(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
4632
- provenance.contextHash && /* @__PURE__ */ jsx29(
4786
+ /* @__PURE__ */ jsx31(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
4787
+ provenance.contextHash && /* @__PURE__ */ jsx31(
4633
4788
  Field,
4634
4789
  {
4635
4790
  label: "Context Hash",
@@ -4638,8 +4793,8 @@ function ProvenanceCard({ provenance }) {
4638
4793
  }
4639
4794
  )
4640
4795
  ] }),
4641
- provenance.git && /* @__PURE__ */ jsx29(GitInfo, { git: provenance.git }),
4642
- /* @__PURE__ */ jsx29(PromptfooLinks, { provenance })
4796
+ provenance.git && /* @__PURE__ */ jsx31(GitInfo, { git: provenance.git }),
4797
+ /* @__PURE__ */ jsx31(PromptfooLinks, { provenance })
4643
4798
  ] }) });
4644
4799
  }
4645
4800
  function Field({
@@ -4647,9 +4802,9 @@ function Field({
4647
4802
  mono,
4648
4803
  value
4649
4804
  }) {
4650
- return /* @__PURE__ */ jsxs24(Stack17, { space: 1, children: [
4651
- /* @__PURE__ */ jsx29(
4652
- Text24,
4805
+ return /* @__PURE__ */ jsxs26(Stack18, { space: 1, children: [
4806
+ /* @__PURE__ */ jsx31(
4807
+ Text26,
4653
4808
  {
4654
4809
  muted: true,
4655
4810
  size: 0,
@@ -4658,19 +4813,19 @@ function Field({
4658
4813
  children: label
4659
4814
  }
4660
4815
  ),
4661
- /* @__PURE__ */ jsx29(Text24, { size: 1, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
4816
+ /* @__PURE__ */ jsx31(Text26, { size: 1, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
4662
4817
  ] });
4663
4818
  }
4664
4819
  function GitInfo({ git }) {
4665
- return /* @__PURE__ */ jsx29(Card17, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs24(Flex17, { align: "center", gap: 3, wrap: "wrap", children: [
4666
- /* @__PURE__ */ jsx29(Text24, { muted: true, size: 1, weight: "semibold", children: "Git" }),
4667
- /* @__PURE__ */ jsxs24(Text24, { size: 1, children: [
4820
+ return /* @__PURE__ */ jsx31(Card18, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 3, wrap: "wrap", children: [
4821
+ /* @__PURE__ */ jsx31(Text26, { muted: true, size: 1, weight: "semibold", children: "Git" }),
4822
+ /* @__PURE__ */ jsxs26(Text26, { size: 1, children: [
4668
4823
  git.repo,
4669
4824
  " / ",
4670
4825
  git.branch
4671
4826
  ] }),
4672
- /* @__PURE__ */ jsx29(Text24, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: git.sha.slice(0, 12) }),
4673
- git.prNumber && /* @__PURE__ */ jsx29(Text24, { size: 1, children: /* @__PURE__ */ jsxs24(
4827
+ /* @__PURE__ */ jsx31(Text26, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: git.sha.slice(0, 12) }),
4828
+ git.prNumber && /* @__PURE__ */ jsx31(Text26, { size: 1, children: /* @__PURE__ */ jsxs26(
4674
4829
  "a",
4675
4830
  {
4676
4831
  href: `https://github.com/${git.repo}/pull/${git.prNumber}`,
@@ -4693,14 +4848,14 @@ function PromptfooLinks({
4693
4848
  (e) => VIEWABLE_PROMPTFOO_MODES.has(e.mode)
4694
4849
  );
4695
4850
  if (viewable.length === 0) return null;
4696
- return /* @__PURE__ */ jsx29(Flex17, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx29(Text24, { size: 1, children: /* @__PURE__ */ jsxs24("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
4851
+ return /* @__PURE__ */ jsx31(Flex19, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx31(Text26, { size: 1, children: /* @__PURE__ */ jsxs26("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
4697
4852
  "View in Promptfoo (",
4698
4853
  entry.mode,
4699
4854
  ") \u2192"
4700
4855
  ] }) }, entry.mode)) });
4701
4856
  }
4702
4857
  if (provenance.promptfooUrl && VIEWABLE_PROMPTFOO_MODES.has(provenance.mode)) {
4703
- return /* @__PURE__ */ jsx29(Text24, { size: 1, children: /* @__PURE__ */ jsx29(
4858
+ return /* @__PURE__ */ jsx31(Text26, { size: 1, children: /* @__PURE__ */ jsx31(
4704
4859
  "a",
4705
4860
  {
4706
4861
  href: provenance.promptfooUrl,
@@ -4715,32 +4870,32 @@ function PromptfooLinks({
4715
4870
 
4716
4871
  // src/components/report-detail/RecommendationsSection.tsx
4717
4872
  import React3 from "react";
4718
- import { Badge as Badge14, Box as Box12, Card as Card18, Flex as Flex18, Stack as Stack18, Text as Text25, Tooltip as Tooltip6 } from "@sanity/ui";
4873
+ import { Badge as Badge15, Box as Box12, Card as Card19, Flex as Flex20, Stack as Stack19, Text as Text27, Tooltip as Tooltip6 } from "@sanity/ui";
4719
4874
  import { HelpCircleIcon as HelpCircleIcon6 } from "@sanity/icons";
4720
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
4875
+ import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
4721
4876
  function RecommendationsSection({
4722
4877
  recommendations
4723
4878
  }) {
4724
4879
  if (recommendations.gaps.length === 0) return null;
4725
- return /* @__PURE__ */ jsx30(Card18, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs25(Stack18, { space: 4, children: [
4726
- /* @__PURE__ */ jsxs25(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
4727
- /* @__PURE__ */ jsx30(Text25, { size: 2, weight: "semibold", children: "Recommendations" }),
4728
- /* @__PURE__ */ jsx30(
4880
+ return /* @__PURE__ */ jsx32(Card19, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs27(Stack19, { space: 4, children: [
4881
+ /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
4882
+ /* @__PURE__ */ jsx32(Text27, { size: 2, weight: "semibold", children: "Recommendations" }),
4883
+ /* @__PURE__ */ jsx32(
4729
4884
  Tooltip6,
4730
4885
  {
4731
- content: /* @__PURE__ */ jsx30(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx30(Text25, { size: 1, children: GLOSSARY.recommendations }) }),
4886
+ content: /* @__PURE__ */ jsx32(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx32(Text27, { size: 1, children: GLOSSARY.recommendations }) }),
4732
4887
  placement: "bottom",
4733
4888
  portal: true,
4734
- children: /* @__PURE__ */ jsx30(Text25, { muted: true, size: 0, children: /* @__PURE__ */ jsx30(HelpCircleIcon6, {}) })
4889
+ children: /* @__PURE__ */ jsx32(Text27, { muted: true, size: 0, children: /* @__PURE__ */ jsx32(HelpCircleIcon6, {}) })
4735
4890
  }
4736
4891
  ),
4737
- /* @__PURE__ */ jsx30(
4892
+ /* @__PURE__ */ jsx32(
4738
4893
  Tooltip6,
4739
4894
  {
4740
- content: /* @__PURE__ */ jsx30(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx30(Text25, { size: 1, children: GLOSSARY.totalPotentialLift }) }),
4895
+ content: /* @__PURE__ */ jsx32(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx32(Text27, { size: 1, children: GLOSSARY.totalPotentialLift }) }),
4741
4896
  placement: "bottom",
4742
4897
  portal: true,
4743
- children: /* @__PURE__ */ jsx30(Card18, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs25(Text25, { size: 1, weight: "bold", children: [
4898
+ children: /* @__PURE__ */ jsx32(Card19, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs27(Text27, { size: 1, weight: "bold", children: [
4744
4899
  "+",
4745
4900
  recommendations.totalPotentialLift.toFixed(1),
4746
4901
  " pts potential lift"
@@ -4748,7 +4903,7 @@ function RecommendationsSection({
4748
4903
  }
4749
4904
  )
4750
4905
  ] }),
4751
- /* @__PURE__ */ jsxs25(
4906
+ /* @__PURE__ */ jsxs27(
4752
4907
  "div",
4753
4908
  {
4754
4909
  style: {
@@ -4757,9 +4912,9 @@ function RecommendationsSection({
4757
4912
  gridTemplateColumns: "auto 2fr 2fr 1fr 1fr 1fr"
4758
4913
  },
4759
4914
  children: [
4760
- /* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "#" }),
4761
- /* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Area" }),
4762
- /* @__PURE__ */ jsx30(
4915
+ /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "#" }),
4916
+ /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "Area" }),
4917
+ /* @__PURE__ */ jsx32(
4763
4918
  ColumnHeader,
4764
4919
  {
4765
4920
  borderBottom: true,
@@ -4767,8 +4922,8 @@ function RecommendationsSection({
4767
4922
  tooltip: GLOSSARY.failureMode
4768
4923
  }
4769
4924
  ),
4770
- /* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Action" }),
4771
- /* @__PURE__ */ jsx30(
4925
+ /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "Action" }),
4926
+ /* @__PURE__ */ jsx32(
4772
4927
  ColumnHeader,
4773
4928
  {
4774
4929
  borderBottom: true,
@@ -4776,7 +4931,7 @@ function RecommendationsSection({
4776
4931
  tooltip: GLOSSARY.estimatedLift
4777
4932
  }
4778
4933
  ),
4779
- /* @__PURE__ */ jsx30(
4934
+ /* @__PURE__ */ jsx32(
4780
4935
  ColumnHeader,
4781
4936
  {
4782
4937
  borderBottom: true,
@@ -4784,7 +4939,7 @@ function RecommendationsSection({
4784
4939
  tooltip: GLOSSARY.confidence
4785
4940
  }
4786
4941
  ),
4787
- recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx30(RecommendationRow, { gap, index: i }, `gap-${i}`))
4942
+ recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx32(RecommendationRow, { gap, index: i }, `gap-${i}`))
4788
4943
  ]
4789
4944
  }
4790
4945
  )
@@ -4796,8 +4951,8 @@ function RecommendationRow({
4796
4951
  }) {
4797
4952
  const confIcon = gap.confidence === "high" ? "\u{1F7E2}" : gap.confidence === "medium" ? "\u{1F7E1}" : "\u{1F534}";
4798
4953
  const bg = rowBackground(index);
4799
- return /* @__PURE__ */ jsxs25(React3.Fragment, { children: [
4800
- /* @__PURE__ */ jsx30(
4954
+ return /* @__PURE__ */ jsxs27(React3.Fragment, { children: [
4955
+ /* @__PURE__ */ jsx32(
4801
4956
  "div",
4802
4957
  {
4803
4958
  style: {
@@ -4807,10 +4962,10 @@ function RecommendationRow({
4807
4962
  display: "flex",
4808
4963
  padding: "8px 4px"
4809
4964
  },
4810
- children: /* @__PURE__ */ jsx30(Text25, { muted: true, size: 1, children: index + 1 })
4965
+ children: /* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, children: index + 1 })
4811
4966
  }
4812
4967
  ),
4813
- /* @__PURE__ */ jsx30(
4968
+ /* @__PURE__ */ jsx32(
4814
4969
  "div",
4815
4970
  {
4816
4971
  style: {
@@ -4819,10 +4974,10 @@ function RecommendationRow({
4819
4974
  display: "flex",
4820
4975
  padding: "8px 0"
4821
4976
  },
4822
- children: /* @__PURE__ */ jsx30(Text25, { size: 1, weight: "medium", children: gap.area })
4977
+ children: /* @__PURE__ */ jsx32(Text27, { size: 1, weight: "medium", children: gap.area })
4823
4978
  }
4824
4979
  ),
4825
- /* @__PURE__ */ jsx30(
4980
+ /* @__PURE__ */ jsx32(
4826
4981
  "div",
4827
4982
  {
4828
4983
  style: {
@@ -4831,8 +4986,8 @@ function RecommendationRow({
4831
4986
  display: "flex",
4832
4987
  padding: "8px 0"
4833
4988
  },
4834
- children: /* @__PURE__ */ jsx30(
4835
- Badge14,
4989
+ children: /* @__PURE__ */ jsx32(
4990
+ Badge15,
4836
4991
  {
4837
4992
  tone: gap.failureMode === "missing-docs" ? "critical" : gap.failureMode === "incorrect-docs" ? "critical" : gap.failureMode === "outdated-docs" ? "caution" : "default",
4838
4993
  children: gap.failureMode
@@ -4840,7 +4995,7 @@ function RecommendationRow({
4840
4995
  )
4841
4996
  }
4842
4997
  ),
4843
- /* @__PURE__ */ jsx30(
4998
+ /* @__PURE__ */ jsx32(
4844
4999
  "div",
4845
5000
  {
4846
5001
  style: {
@@ -4849,10 +5004,10 @@ function RecommendationRow({
4849
5004
  display: "flex",
4850
5005
  padding: "8px 0"
4851
5006
  },
4852
- children: /* @__PURE__ */ jsx30(Text25, { muted: true, size: 1, children: gap.remediation })
5007
+ children: /* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, children: gap.remediation })
4853
5008
  }
4854
5009
  ),
4855
- /* @__PURE__ */ jsx30(
5010
+ /* @__PURE__ */ jsx32(
4856
5011
  "div",
4857
5012
  {
4858
5013
  style: {
@@ -4861,13 +5016,13 @@ function RecommendationRow({
4861
5016
  display: "flex",
4862
5017
  padding: "8px 0"
4863
5018
  },
4864
- children: /* @__PURE__ */ jsx30(Card18, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs25(Text25, { align: "center", size: 1, weight: "medium", children: [
5019
+ children: /* @__PURE__ */ jsx32(Card19, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs27(Text27, { align: "center", size: 1, weight: "medium", children: [
4865
5020
  "+",
4866
5021
  gap.estimatedLift.toFixed(1)
4867
5022
  ] }) })
4868
5023
  }
4869
5024
  ),
4870
- /* @__PURE__ */ jsx30(
5025
+ /* @__PURE__ */ jsx32(
4871
5026
  "div",
4872
5027
  {
4873
5028
  style: {
@@ -4876,7 +5031,7 @@ function RecommendationRow({
4876
5031
  display: "flex",
4877
5032
  padding: "8px 0"
4878
5033
  },
4879
- children: /* @__PURE__ */ jsxs25(Text25, { size: 1, children: [
5034
+ children: /* @__PURE__ */ jsxs27(Text27, { size: 1, children: [
4880
5035
  confIcon,
4881
5036
  " ",
4882
5037
  gap.confidence
@@ -4889,16 +5044,16 @@ function RecommendationRow({
4889
5044
  // src/components/report-detail/ReportHeader.tsx
4890
5045
  import { ArrowLeftIcon, ClipboardIcon } from "@sanity/icons";
4891
5046
  import {
4892
- Badge as Badge15,
5047
+ Badge as Badge16,
4893
5048
  Box as Box13,
4894
5049
  Button as Button2,
4895
- Card as Card19,
4896
- Flex as Flex19,
4897
- Stack as Stack19,
4898
- Text as Text26,
5050
+ Card as Card20,
5051
+ Flex as Flex21,
5052
+ Stack as Stack20,
5053
+ Text as Text28,
4899
5054
  Tooltip as Tooltip7
4900
5055
  } from "@sanity/ui";
4901
- import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
5056
+ import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
4902
5057
  function ReportHeader({
4903
5058
  completedAt,
4904
5059
  mode,
@@ -4911,9 +5066,9 @@ function ReportHeader({
4911
5066
  const dateLabel = formatCardDate(completedAt);
4912
5067
  const title = tag ?? dateLabel;
4913
5068
  const hasTag = Boolean(tag);
4914
- return /* @__PURE__ */ jsxs26(Fragment6, { children: [
4915
- /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 3, children: [
4916
- /* @__PURE__ */ jsx31(
5069
+ return /* @__PURE__ */ jsxs28(Fragment6, { children: [
5070
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, children: [
5071
+ /* @__PURE__ */ jsx33(
4917
5072
  Button2,
4918
5073
  {
4919
5074
  icon: ArrowLeftIcon,
@@ -4922,23 +5077,23 @@ function ReportHeader({
4922
5077
  text: "Back"
4923
5078
  }
4924
5079
  ),
4925
- /* @__PURE__ */ jsxs26(Stack19, { flex: 1, space: 1, children: [
4926
- /* @__PURE__ */ jsx31(Text26, { size: 3, weight: "bold", children: title }),
4927
- hasTag && /* @__PURE__ */ jsx31(Text26, { muted: true, size: 1, children: dateLabel })
5080
+ /* @__PURE__ */ jsxs28(Stack20, { flex: 1, space: 1, children: [
5081
+ /* @__PURE__ */ jsx33(Text28, { size: 3, weight: "bold", children: title }),
5082
+ hasTag && /* @__PURE__ */ jsx33(Text28, { muted: true, size: 1, children: dateLabel })
4928
5083
  ] }),
4929
- /* @__PURE__ */ jsxs26(Flex19, { gap: 2, children: [
4930
- /* @__PURE__ */ jsx31(Badge15, { mode: "outline", tone: "default", children: sourceName }),
4931
- /* @__PURE__ */ jsx31(Badge15, { tone: "primary", children: mode })
5084
+ /* @__PURE__ */ jsxs28(Flex21, { gap: 2, children: [
5085
+ /* @__PURE__ */ jsx33(Badge16, { mode: "outline", tone: "default", children: sourceName }),
5086
+ /* @__PURE__ */ jsx33(Badge16, { tone: "primary", children: mode })
4932
5087
  ] })
4933
5088
  ] }),
4934
- /* @__PURE__ */ jsx31(
5089
+ /* @__PURE__ */ jsx33(
4935
5090
  Tooltip7,
4936
5091
  {
4937
- content: /* @__PURE__ */ jsx31(Box13, { padding: 2, children: /* @__PURE__ */ jsx31(Text26, { size: 1, children: "Click to copy report ID" }) }),
5092
+ content: /* @__PURE__ */ jsx33(Box13, { padding: 2, children: /* @__PURE__ */ jsx33(Text28, { size: 1, children: "Click to copy report ID" }) }),
4938
5093
  placement: "bottom",
4939
5094
  portal: true,
4940
- children: /* @__PURE__ */ jsx31(
4941
- Card19,
5095
+ children: /* @__PURE__ */ jsx33(
5096
+ Card20,
4942
5097
  {
4943
5098
  border: true,
4944
5099
  onClick: onCopyId,
@@ -4946,9 +5101,9 @@ function ReportHeader({
4946
5101
  radius: 2,
4947
5102
  style: { cursor: "pointer" },
4948
5103
  tone: "transparent",
4949
- children: /* @__PURE__ */ jsxs26(Flex19, { align: "center", gap: 3, children: [
4950
- /* @__PURE__ */ jsx31(
4951
- Text26,
5104
+ children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, children: [
5105
+ /* @__PURE__ */ jsx33(
5106
+ Text28,
4952
5107
  {
4953
5108
  muted: true,
4954
5109
  size: 0,
@@ -4960,8 +5115,8 @@ function ReportHeader({
4960
5115
  children: "Report ID"
4961
5116
  }
4962
5117
  ),
4963
- /* @__PURE__ */ jsx31(
4964
- Text26,
5118
+ /* @__PURE__ */ jsx33(
5119
+ Text28,
4965
5120
  {
4966
5121
  size: 1,
4967
5122
  style: {
@@ -4971,7 +5126,7 @@ function ReportHeader({
4971
5126
  children: reportId
4972
5127
  }
4973
5128
  ),
4974
- /* @__PURE__ */ jsx31(Box13, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx31(Text26, { muted: true, size: 1, children: /* @__PURE__ */ jsx31(ClipboardIcon, {}) }) })
5129
+ /* @__PURE__ */ jsx33(Box13, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx33(Text28, { muted: true, size: 1, children: /* @__PURE__ */ jsx33(ClipboardIcon, {}) }) })
4975
5130
  ] })
4976
5131
  }
4977
5132
  )
@@ -4982,18 +5137,18 @@ function ReportHeader({
4982
5137
 
4983
5138
  // src/components/report-detail/ThreeLayerTable.tsx
4984
5139
  import React4 from "react";
4985
- import { Badge as Badge16, Card as Card20, Flex as Flex20, Stack as Stack20, Text as Text27 } from "@sanity/ui";
4986
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
5140
+ import { Badge as Badge17, Card as Card21, Flex as Flex22, Stack as Stack21, Text as Text29 } from "@sanity/ui";
5141
+ import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
4987
5142
  function ThreeLayerTable({ scores }) {
4988
5143
  const filtered = scores.filter((s) => s.actualScore != null);
4989
5144
  if (filtered.length === 0) return null;
4990
5145
  const hasInverted = filtered.some((s) => s.invertedRetrievalGap);
4991
- return /* @__PURE__ */ jsx32(Card20, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs27(Stack20, { space: 4, children: [
4992
- /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, children: [
4993
- /* @__PURE__ */ jsx32(Text27, { size: 2, weight: "semibold", children: "Three-Layer Decomposition" }),
4994
- /* @__PURE__ */ jsx32(Badge16, { tone: "primary", children: "full mode" })
5146
+ return /* @__PURE__ */ jsx34(Card21, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs29(Stack21, { space: 4, children: [
5147
+ /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, children: [
5148
+ /* @__PURE__ */ jsx34(Text29, { size: 2, weight: "semibold", children: "Three-Layer Decomposition" }),
5149
+ /* @__PURE__ */ jsx34(Badge17, { tone: "primary", children: "full mode" })
4995
5150
  ] }),
4996
- /* @__PURE__ */ jsxs27(
5151
+ /* @__PURE__ */ jsxs29(
4997
5152
  "div",
4998
5153
  {
4999
5154
  style: {
@@ -5002,9 +5157,9 @@ function ThreeLayerTable({ scores }) {
5002
5157
  gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr"
5003
5158
  },
5004
5159
  children: [
5005
- /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "Area" }),
5006
- /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "Floor", tooltip: GLOSSARY.floor }),
5007
- /* @__PURE__ */ jsx32(
5160
+ /* @__PURE__ */ jsx34(ColumnHeader, { borderBottom: true, label: "Area" }),
5161
+ /* @__PURE__ */ jsx34(ColumnHeader, { borderBottom: true, label: "Floor", tooltip: GLOSSARY.floor }),
5162
+ /* @__PURE__ */ jsx34(
5008
5163
  ColumnHeader,
5009
5164
  {
5010
5165
  borderBottom: true,
@@ -5012,8 +5167,8 @@ function ThreeLayerTable({ scores }) {
5012
5167
  tooltip: GLOSSARY.ceiling
5013
5168
  }
5014
5169
  ),
5015
- /* @__PURE__ */ jsx32(ColumnHeader, { borderBottom: true, label: "Actual", tooltip: GLOSSARY.actual }),
5016
- /* @__PURE__ */ jsx32(
5170
+ /* @__PURE__ */ jsx34(ColumnHeader, { borderBottom: true, label: "Actual", tooltip: GLOSSARY.actual }),
5171
+ /* @__PURE__ */ jsx34(
5017
5172
  ColumnHeader,
5018
5173
  {
5019
5174
  borderBottom: true,
@@ -5021,7 +5176,7 @@ function ThreeLayerTable({ scores }) {
5021
5176
  tooltip: GLOSSARY.retGap
5022
5177
  }
5023
5178
  ),
5024
- /* @__PURE__ */ jsx32(
5179
+ /* @__PURE__ */ jsx34(
5025
5180
  ColumnHeader,
5026
5181
  {
5027
5182
  borderBottom: true,
@@ -5029,8 +5184,8 @@ function ThreeLayerTable({ scores }) {
5029
5184
  tooltip: GLOSSARY.efficiency
5030
5185
  }
5031
5186
  ),
5032
- filtered.map((score, i) => /* @__PURE__ */ jsxs27(React4.Fragment, { children: [
5033
- /* @__PURE__ */ jsx32(
5187
+ filtered.map((score, i) => /* @__PURE__ */ jsxs29(React4.Fragment, { children: [
5188
+ /* @__PURE__ */ jsx34(
5034
5189
  "div",
5035
5190
  {
5036
5191
  style: {
@@ -5038,13 +5193,13 @@ function ThreeLayerTable({ scores }) {
5038
5193
  borderRadius: 4,
5039
5194
  padding: "8px 0 8px 4px"
5040
5195
  },
5041
- children: /* @__PURE__ */ jsx32(Text27, { size: 1, weight: "medium", children: score.feature })
5196
+ children: /* @__PURE__ */ jsx34(Text29, { size: 1, weight: "medium", children: score.feature })
5042
5197
  }
5043
5198
  ),
5044
- /* @__PURE__ */ jsx32("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx32(ScoreCell, { score: score.floorScore ?? 0 }) }),
5045
- /* @__PURE__ */ jsx32("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx32(ScoreCell, { score: score.ceilingScore ?? score.totalScore }) }),
5046
- /* @__PURE__ */ jsx32("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx32(ScoreCell, { score: score.actualScore ?? 0 }) }),
5047
- /* @__PURE__ */ jsx32(
5199
+ /* @__PURE__ */ jsx34("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx34(ScoreCell, { score: score.floorScore ?? 0 }) }),
5200
+ /* @__PURE__ */ jsx34("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx34(ScoreCell, { score: score.ceilingScore ?? score.totalScore }) }),
5201
+ /* @__PURE__ */ jsx34("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx34(ScoreCell, { score: score.actualScore ?? 0 }) }),
5202
+ /* @__PURE__ */ jsx34(
5048
5203
  "div",
5049
5204
  {
5050
5205
  style: {
@@ -5053,10 +5208,10 @@ function ThreeLayerTable({ scores }) {
5053
5208
  display: "flex",
5054
5209
  padding: "6px 0"
5055
5210
  },
5056
- children: /* @__PURE__ */ jsx32(Text27, { size: 1, children: score.retrievalGap != null ? score.retrievalGap.toFixed(1) : "\u2014" })
5211
+ children: /* @__PURE__ */ jsx34(Text29, { size: 1, children: score.retrievalGap != null ? score.retrievalGap.toFixed(1) : "\u2014" })
5057
5212
  }
5058
5213
  ),
5059
- /* @__PURE__ */ jsx32(
5214
+ /* @__PURE__ */ jsx34(
5060
5215
  "div",
5061
5216
  {
5062
5217
  style: {
@@ -5065,7 +5220,7 @@ function ThreeLayerTable({ scores }) {
5065
5220
  display: "flex",
5066
5221
  padding: "6px 0"
5067
5222
  },
5068
- children: /* @__PURE__ */ jsxs27(Text27, { size: 1, children: [
5223
+ children: /* @__PURE__ */ jsxs29(Text29, { size: 1, children: [
5069
5224
  formatPercent(score.infrastructureEfficiency),
5070
5225
  score.invertedRetrievalGap && " \u26A0\uFE0F"
5071
5226
  ] })
@@ -5075,18 +5230,18 @@ function ThreeLayerTable({ scores }) {
5075
5230
  ]
5076
5231
  }
5077
5232
  ),
5078
- hasInverted && /* @__PURE__ */ jsx32(Text27, { muted: true, size: 0, children: GLOSSARY.invertedRetGap })
5233
+ hasInverted && /* @__PURE__ */ jsx34(Text29, { muted: true, size: 0, children: GLOSSARY.invertedRetGap })
5079
5234
  ] }) });
5080
5235
  }
5081
5236
 
5082
5237
  // src/components/report-detail/ReportDetail.tsx
5083
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
5238
+ import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
5084
5239
  function ReportDetail({ onBack, reportId }) {
5085
5240
  const client = useClient6({ apiVersion: API_VERSION });
5086
5241
  const toast = useToast();
5087
5242
  const [loading, setLoading] = useState8(true);
5088
5243
  const [report, setReport] = useState8(null);
5089
- useEffect6(() => {
5244
+ useEffect7(() => {
5090
5245
  let cancelled = false;
5091
5246
  setLoading(true);
5092
5247
  client.fetch(reportDetailQuery, { reportId }).then((data) => {
@@ -5101,7 +5256,7 @@ function ReportDetail({ onBack, reportId }) {
5101
5256
  cancelled = true;
5102
5257
  };
5103
5258
  }, [client, reportId]);
5104
- const handleCopyReportId = useCallback11(() => {
5259
+ const handleCopyReportId = useCallback12(() => {
5105
5260
  if (!report) return;
5106
5261
  navigator.clipboard.writeText(report.reportId).then(() => {
5107
5262
  toast.push({
@@ -5118,11 +5273,11 @@ function ReportDetail({ onBack, reportId }) {
5118
5273
  });
5119
5274
  }, [report, toast]);
5120
5275
  if (loading) {
5121
- return /* @__PURE__ */ jsx33(LoadingState, { message: "Loading report\u2026" });
5276
+ return /* @__PURE__ */ jsx35(LoadingState, { message: "Loading report\u2026" });
5122
5277
  }
5123
5278
  if (!report) {
5124
- return /* @__PURE__ */ jsx33(Box14, { padding: 5, children: /* @__PURE__ */ jsxs28(Stack21, { space: 4, children: [
5125
- /* @__PURE__ */ jsx33(
5279
+ return /* @__PURE__ */ jsx35(Box14, { padding: 5, children: /* @__PURE__ */ jsxs30(Stack22, { space: 4, children: [
5280
+ /* @__PURE__ */ jsx35(
5126
5281
  Button3,
5127
5282
  {
5128
5283
  icon: ArrowLeftIcon2,
@@ -5131,14 +5286,14 @@ function ReportDetail({ onBack, reportId }) {
5131
5286
  text: "Back"
5132
5287
  }
5133
5288
  ),
5134
- /* @__PURE__ */ jsx33(Text28, { align: "center", muted: true, size: 2, children: "Report not found" })
5289
+ /* @__PURE__ */ jsx35(Text30, { align: "center", muted: true, size: 2, children: "Report not found" })
5135
5290
  ] }) });
5136
5291
  }
5137
5292
  const { comparison, provenance, summary } = report;
5138
5293
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
5139
5294
  const isFullMode = summary.evaluationMode === "full" || summary.scores.some((s) => s.actualScore != null);
5140
- return /* @__PURE__ */ jsx33(Box14, { padding: 4, children: /* @__PURE__ */ jsxs28(Stack21, { space: 5, children: [
5141
- /* @__PURE__ */ jsx33(
5295
+ return /* @__PURE__ */ jsx35(Box14, { padding: 4, children: /* @__PURE__ */ jsxs30(Stack22, { space: 5, children: [
5296
+ /* @__PURE__ */ jsx35(
5142
5297
  ReportHeader,
5143
5298
  {
5144
5299
  completedAt: report.completedAt,
@@ -5150,7 +5305,7 @@ function ReportDetail({ onBack, reportId }) {
5150
5305
  tag: report.tag
5151
5306
  }
5152
5307
  ),
5153
- /* @__PURE__ */ jsx33(
5308
+ /* @__PURE__ */ jsx35(
5154
5309
  OverviewStats,
5155
5310
  {
5156
5311
  durationMs: report.durationMs,
@@ -5159,20 +5314,20 @@ function ReportDetail({ onBack, reportId }) {
5159
5314
  totalTests
5160
5315
  }
5161
5316
  ),
5162
- isFullMode && /* @__PURE__ */ jsx33(ThreeLayerTable, { scores: summary.scores }),
5163
- /* @__PURE__ */ jsx33(AreaScoreTable, { scores: summary.scores }),
5164
- summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */ jsx33(RecommendationsSection, { recommendations: summary.recommendations }),
5165
- summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */ jsx33(JudgmentList, { judgments: summary.lowScoringJudgments }),
5166
- comparison && /* @__PURE__ */ jsx33(ComparisonSummary, { comparison }),
5167
- /* @__PURE__ */ jsx33(ProvenanceCard, { provenance })
5317
+ isFullMode && /* @__PURE__ */ jsx35(ThreeLayerTable, { scores: summary.scores }),
5318
+ /* @__PURE__ */ jsx35(AreaScoreTable, { scores: summary.scores }),
5319
+ summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */ jsx35(RecommendationsSection, { recommendations: summary.recommendations }),
5320
+ summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */ jsx35(JudgmentList, { judgments: summary.lowScoringJudgments }),
5321
+ comparison && /* @__PURE__ */ jsx35(ComparisonSummary, { comparison }),
5322
+ /* @__PURE__ */ jsx35(ProvenanceCard, { provenance })
5168
5323
  ] }) });
5169
5324
  }
5170
5325
 
5171
5326
  // src/components/ScoreTimeline.tsx
5172
- import { Card as Card21, Flex as Flex21, Select as Select2, Stack as Stack22, Text as Text29 } from "@sanity/ui";
5173
- import { useCallback as useCallback12, useEffect as useEffect7, useMemo as useMemo4, useState as useState9 } from "react";
5327
+ import { Card as Card22, Flex as Flex23, Select as Select2, Stack as Stack23, Text as Text31 } from "@sanity/ui";
5328
+ import { useCallback as useCallback13, useEffect as useEffect8, useMemo as useMemo6, useState as useState9 } from "react";
5174
5329
  import { useClient as useClient7 } from "sanity";
5175
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
5330
+ import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
5176
5331
  var CHART_HEIGHT = 220;
5177
5332
  var CHART_WIDTH = 800;
5178
5333
  var PAD_BOTTOM = 30;
@@ -5211,7 +5366,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5211
5366
  const [loading, setLoading] = useState9(true);
5212
5367
  const [rangeDays, setRangeDays] = useState9(30);
5213
5368
  const [selectedArea, setSelectedArea] = useState9(null);
5214
- const areaNames = useMemo4(() => {
5369
+ const areaNames = useMemo6(() => {
5215
5370
  const names = /* @__PURE__ */ new Set();
5216
5371
  for (const dp of dataPoints) {
5217
5372
  for (const s of dp.scores) {
@@ -5220,7 +5375,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5220
5375
  }
5221
5376
  return Array.from(names).sort();
5222
5377
  }, [dataPoints]);
5223
- const fetchData = useCallback12(async () => {
5378
+ const fetchData = useCallback13(async () => {
5224
5379
  setLoading(true);
5225
5380
  try {
5226
5381
  const startDate = rangeDays ? daysAgo(rangeDays) : "1970-01-01T00:00:00Z";
@@ -5235,10 +5390,10 @@ function ScoreTimeline({ mode = null, source = null }) {
5235
5390
  setLoading(false);
5236
5391
  }
5237
5392
  }, [client, mode, rangeDays, source]);
5238
- useEffect7(() => {
5393
+ useEffect8(() => {
5239
5394
  void fetchData();
5240
5395
  }, [fetchData]);
5241
- const chartPoints = useMemo4(() => {
5396
+ const chartPoints = useMemo6(() => {
5242
5397
  const pts = [];
5243
5398
  const scored = dataPoints.map((dp) => ({
5244
5399
  date: dp.completedAt,
@@ -5252,18 +5407,18 @@ function ScoreTimeline({ mode = null, source = null }) {
5252
5407
  });
5253
5408
  return pts;
5254
5409
  }, [dataPoints, selectedArea]);
5255
- const avgScore = useMemo4(() => {
5410
+ const avgScore = useMemo6(() => {
5256
5411
  if (chartPoints.length === 0) return 0;
5257
5412
  return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
5258
5413
  }, [chartPoints]);
5259
- const handleRangeChange = useCallback12(
5414
+ const handleRangeChange = useCallback13(
5260
5415
  (e) => {
5261
5416
  const val = e.currentTarget.value;
5262
5417
  setRangeDays(val === "all" ? null : Number(val));
5263
5418
  },
5264
5419
  []
5265
5420
  );
5266
- const handleAreaChange = useCallback12(
5421
+ const handleAreaChange = useCallback13(
5267
5422
  (e) => {
5268
5423
  const val = e.currentTarget.value;
5269
5424
  setSelectedArea(val || null);
@@ -5271,22 +5426,22 @@ function ScoreTimeline({ mode = null, source = null }) {
5271
5426
  []
5272
5427
  );
5273
5428
  const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
5274
- return /* @__PURE__ */ jsxs29(Stack22, { space: 4, children: [
5275
- /* @__PURE__ */ jsxs29(Flex21, { gap: 3, children: [
5276
- /* @__PURE__ */ jsx34(
5429
+ return /* @__PURE__ */ jsxs31(Stack23, { space: 4, children: [
5430
+ /* @__PURE__ */ jsxs31(Flex23, { gap: 3, children: [
5431
+ /* @__PURE__ */ jsx36(
5277
5432
  Select2,
5278
5433
  {
5279
5434
  onChange: handleRangeChange,
5280
5435
  value: rangeDays?.toString() ?? "all",
5281
- children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx34("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
5436
+ children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx36("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
5282
5437
  }
5283
5438
  ),
5284
- /* @__PURE__ */ jsxs29(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
5285
- /* @__PURE__ */ jsx34("option", { value: "", children: "Overall" }),
5286
- areaNames.map((name) => /* @__PURE__ */ jsx34("option", { value: name, children: name }, name))
5439
+ /* @__PURE__ */ jsxs31(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
5440
+ /* @__PURE__ */ jsx36("option", { value: "", children: "Overall" }),
5441
+ areaNames.map((name) => /* @__PURE__ */ jsx36("option", { value: name, children: name }, name))
5287
5442
  ] })
5288
5443
  ] }),
5289
- /* @__PURE__ */ jsx34(Card21, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx34(Flex21, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx34(Text29, { muted: true, size: 1, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx34(Flex21, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx34(Text29, { muted: true, size: 1, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs29(
5444
+ /* @__PURE__ */ jsx36(Card22, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx36(Flex23, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx36(Text31, { muted: true, size: 1, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx36(Flex23, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx36(Text31, { muted: true, size: 1, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs31(
5290
5445
  "svg",
5291
5446
  {
5292
5447
  style: { display: "block", width: "100%" },
@@ -5294,8 +5449,8 @@ function ScoreTimeline({ mode = null, source = null }) {
5294
5449
  children: [
5295
5450
  Y_TICKS.map((tick) => {
5296
5451
  const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
5297
- return /* @__PURE__ */ jsxs29("g", { children: [
5298
- /* @__PURE__ */ jsx34(
5452
+ return /* @__PURE__ */ jsxs31("g", { children: [
5453
+ /* @__PURE__ */ jsx36(
5299
5454
  "line",
5300
5455
  {
5301
5456
  stroke: "#ccc",
@@ -5306,7 +5461,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5306
5461
  y2: y
5307
5462
  }
5308
5463
  ),
5309
- /* @__PURE__ */ jsx34(
5464
+ /* @__PURE__ */ jsx36(
5310
5465
  "text",
5311
5466
  {
5312
5467
  dominantBaseline: "middle",
@@ -5326,7 +5481,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5326
5481
  chartPoints.length - 1
5327
5482
  ].map((idx) => {
5328
5483
  const p = chartPoints[idx];
5329
- return /* @__PURE__ */ jsx34(
5484
+ return /* @__PURE__ */ jsx36(
5330
5485
  "text",
5331
5486
  {
5332
5487
  fill: "#999",
@@ -5338,7 +5493,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5338
5493
  },
5339
5494
  idx
5340
5495
  );
5341
- }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx34(
5496
+ }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx36(
5342
5497
  "text",
5343
5498
  {
5344
5499
  fill: "#999",
@@ -5350,7 +5505,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5350
5505
  },
5351
5506
  idx
5352
5507
  )),
5353
- /* @__PURE__ */ jsx34(
5508
+ /* @__PURE__ */ jsx36(
5354
5509
  "polyline",
5355
5510
  {
5356
5511
  fill: "none",
@@ -5360,7 +5515,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5360
5515
  strokeWidth: 2.5
5361
5516
  }
5362
5517
  ),
5363
- chartPoints.map((p, idx) => /* @__PURE__ */ jsx34(
5518
+ chartPoints.map((p, idx) => /* @__PURE__ */ jsx36(
5364
5519
  "circle",
5365
5520
  {
5366
5521
  cx: p.x,
@@ -5369,7 +5524,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5369
5524
  r: 4,
5370
5525
  stroke: "#fff",
5371
5526
  strokeWidth: 1.5,
5372
- children: /* @__PURE__ */ jsxs29("title", { children: [
5527
+ children: /* @__PURE__ */ jsxs31("title", { children: [
5373
5528
  formatDate2(p.date),
5374
5529
  ": ",
5375
5530
  Math.round(p.score)
@@ -5380,7 +5535,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5380
5535
  ]
5381
5536
  }
5382
5537
  ) }),
5383
- /* @__PURE__ */ jsxs29(Text29, { muted: true, size: 1, children: [
5538
+ /* @__PURE__ */ jsxs31(Text31, { muted: true, size: 1, children: [
5384
5539
  chartPoints.length,
5385
5540
  " data point",
5386
5541
  chartPoints.length !== 1 ? "s" : ""
@@ -5390,7 +5545,7 @@ function ScoreTimeline({ mode = null, source = null }) {
5390
5545
  var ScoreTimeline_default = ScoreTimeline;
5391
5546
 
5392
5547
  // src/components/Dashboard.tsx
5393
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
5548
+ import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
5394
5549
  var VIEW_PARAM_MAP = {
5395
5550
  compare: "compare",
5396
5551
  timeline: "timeline"
@@ -5402,7 +5557,7 @@ function Dashboard() {
5402
5557
  const reportId = routerState.reportId ?? null;
5403
5558
  const isDetail = reportId !== null;
5404
5559
  const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
5405
- const navigateToTab = useCallback13(
5560
+ const navigateToTab = useCallback14(
5406
5561
  (tab) => {
5407
5562
  if (tab === "latest") {
5408
5563
  router.navigate({});
@@ -5412,58 +5567,58 @@ function Dashboard() {
5412
5567
  },
5413
5568
  [router]
5414
5569
  );
5415
- const handleSelectReport = useCallback13(
5570
+ const handleSelectReport = useCallback14(
5416
5571
  (id) => {
5417
5572
  router.navigate({ reportId: id });
5418
5573
  },
5419
5574
  [router]
5420
5575
  );
5421
- const handleBack = useCallback13(() => {
5576
+ const handleBack = useCallback14(() => {
5422
5577
  router.navigate({});
5423
5578
  }, [router]);
5424
5579
  const [source, setSource] = useState10(null);
5425
5580
  const [mode, setMode] = useState10(null);
5426
5581
  const [sources, setSources] = useState10([]);
5427
5582
  const [modes, setModes] = useState10([]);
5428
- useEffect8(() => {
5583
+ useEffect9(() => {
5429
5584
  client.fetch(distinctSourcesQuery).then((data) => setSources(data ?? [])).catch(() => setSources([]));
5430
5585
  client.fetch(distinctModesQuery).then((data) => setModes(data ?? [])).catch(() => setModes([]));
5431
5586
  }, [client]);
5432
- return /* @__PURE__ */ jsx35(Container, { width: 2, children: /* @__PURE__ */ jsxs30(Stack23, { padding: 4, space: 4, children: [
5433
- /* @__PURE__ */ jsxs30(Flex22, { align: "center", gap: 3, children: [
5434
- /* @__PURE__ */ jsxs30(Stack23, { flex: 1, space: 1, children: [
5435
- /* @__PURE__ */ jsx35(Text30, { size: 3, weight: "bold", children: "AI Literacy" }),
5436
- /* @__PURE__ */ jsx35(Text30, { muted: true, size: 1, children: "Evaluation reports and score trends" })
5587
+ return /* @__PURE__ */ jsx37(Container, { width: 2, children: /* @__PURE__ */ jsxs32(Stack24, { padding: 4, space: 4, children: [
5588
+ /* @__PURE__ */ jsxs32(Flex24, { align: "center", gap: 3, children: [
5589
+ /* @__PURE__ */ jsxs32(Stack24, { flex: 1, space: 1, children: [
5590
+ /* @__PURE__ */ jsx37(Text32, { size: 3, weight: "bold", children: "AI Literacy" }),
5591
+ /* @__PURE__ */ jsx37(Text32, { muted: true, size: 1, children: "Evaluation reports and score trends" })
5437
5592
  ] }),
5438
- !isDetail && /* @__PURE__ */ jsxs30(Flex22, { gap: 2, children: [
5439
- /* @__PURE__ */ jsxs30(
5593
+ !isDetail && /* @__PURE__ */ jsxs32(Flex24, { gap: 2, children: [
5594
+ /* @__PURE__ */ jsxs32(
5440
5595
  Select3,
5441
5596
  {
5442
5597
  fontSize: 1,
5443
5598
  onChange: (e) => setSource(e.currentTarget.value || null),
5444
5599
  value: source ?? "",
5445
5600
  children: [
5446
- /* @__PURE__ */ jsx35("option", { value: "", children: "All sources" }),
5447
- sources.map((s) => /* @__PURE__ */ jsx35("option", { value: s, children: s }, s))
5601
+ /* @__PURE__ */ jsx37("option", { value: "", children: "All sources" }),
5602
+ sources.map((s) => /* @__PURE__ */ jsx37("option", { value: s, children: s }, s))
5448
5603
  ]
5449
5604
  }
5450
5605
  ),
5451
- /* @__PURE__ */ jsxs30(
5606
+ /* @__PURE__ */ jsxs32(
5452
5607
  Select3,
5453
5608
  {
5454
5609
  fontSize: 1,
5455
5610
  onChange: (e) => setMode(e.currentTarget.value || null),
5456
5611
  value: mode ?? "",
5457
5612
  children: [
5458
- /* @__PURE__ */ jsx35("option", { value: "", children: "All modes" }),
5459
- modes.map((m) => /* @__PURE__ */ jsx35("option", { value: m, children: m }, m))
5613
+ /* @__PURE__ */ jsx37("option", { value: "", children: "All modes" }),
5614
+ modes.map((m) => /* @__PURE__ */ jsx37("option", { value: m, children: m }, m))
5460
5615
  ]
5461
5616
  }
5462
5617
  )
5463
5618
  ] })
5464
5619
  ] }),
5465
- !isDetail && /* @__PURE__ */ jsxs30(TabList, { space: 1, children: [
5466
- /* @__PURE__ */ jsx35(
5620
+ !isDetail && /* @__PURE__ */ jsxs32(TabList, { space: 1, children: [
5621
+ /* @__PURE__ */ jsx37(
5467
5622
  Tab,
5468
5623
  {
5469
5624
  "aria-controls": "latest-panel",
@@ -5473,7 +5628,7 @@ function Dashboard() {
5473
5628
  selected: activeTab === "latest"
5474
5629
  }
5475
5630
  ),
5476
- /* @__PURE__ */ jsx35(
5631
+ /* @__PURE__ */ jsx37(
5477
5632
  Tab,
5478
5633
  {
5479
5634
  "aria-controls": "timeline-panel",
@@ -5483,7 +5638,7 @@ function Dashboard() {
5483
5638
  selected: activeTab === "timeline"
5484
5639
  }
5485
5640
  ),
5486
- /* @__PURE__ */ jsx35(
5641
+ /* @__PURE__ */ jsx37(
5487
5642
  Tab,
5488
5643
  {
5489
5644
  "aria-controls": "compare-panel",
@@ -5494,7 +5649,7 @@ function Dashboard() {
5494
5649
  }
5495
5650
  )
5496
5651
  ] }),
5497
- !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx35(TabPanel, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx35(
5652
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx37(TabPanel, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx37(
5498
5653
  LatestReports,
5499
5654
  {
5500
5655
  mode,
@@ -5502,9 +5657,9 @@ function Dashboard() {
5502
5657
  source
5503
5658
  }
5504
5659
  ) }),
5505
- !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx35(TabPanel, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx35(ScoreTimeline_default, { mode, source }) }),
5506
- !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx35(TabPanel, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx35(ComparisonView, {}) }),
5507
- isDetail && reportId && /* @__PURE__ */ jsx35(ReportDetail, { onBack: handleBack, reportId })
5660
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx37(TabPanel, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx37(ScoreTimeline_default, { mode, source }) }),
5661
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx37(TabPanel, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx37(ComparisonView, {}) }),
5662
+ isDetail && reportId && /* @__PURE__ */ jsx37(ReportDetail, { onBack: handleBack, reportId })
5508
5663
  ] }) });
5509
5664
  }
5510
5665
 
@@ -5525,9 +5680,9 @@ function ailfTool(options = {}) {
5525
5680
 
5526
5681
  // src/actions/RunEvaluationAction.tsx
5527
5682
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
5528
- import { useCallback as useCallback14, useEffect as useEffect9, useRef as useRef3, useState as useState11 } from "react";
5683
+ import { useCallback as useCallback15, useEffect as useEffect10, useRef as useRef4, useState as useState11 } from "react";
5529
5684
  import {
5530
- getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId2,
5685
+ getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId4,
5531
5686
  useClient as useClient9,
5532
5687
  useCurrentUser,
5533
5688
  useDataset,
@@ -5556,9 +5711,9 @@ function createRunEvaluationAction(options = {}) {
5556
5711
  const projectId = useProjectId();
5557
5712
  const currentUser = useCurrentUser();
5558
5713
  const [state, setState] = useState11({ status: "loading" });
5559
- const requestedAtRef = useRef3(null);
5560
- const perspectiveId = getReleaseIdFromReleaseDocumentId2(release._id);
5561
- useEffect9(() => {
5714
+ const requestedAtRef = useRef4(null);
5715
+ const perspectiveId = getReleaseIdFromReleaseDocumentId4(release._id);
5716
+ useEffect10(() => {
5562
5717
  let cancelled = false;
5563
5718
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
5564
5719
  if (cancelled) return;
@@ -5581,7 +5736,7 @@ function createRunEvaluationAction(options = {}) {
5581
5736
  cancelled = true;
5582
5737
  };
5583
5738
  }, [client, perspectiveId]);
5584
- useEffect9(() => {
5739
+ useEffect10(() => {
5585
5740
  if (state.status !== "requested" && state.status !== "polling") return;
5586
5741
  const { requestId, startedAt } = state;
5587
5742
  if (state.status === "requested") {
@@ -5631,7 +5786,7 @@ function createRunEvaluationAction(options = {}) {
5631
5786
  }, POLL_INTERVAL_MS);
5632
5787
  return () => clearInterval(interval);
5633
5788
  }, [client, perspectiveId, state]);
5634
- useEffect9(() => {
5789
+ useEffect10(() => {
5635
5790
  if (state.status !== "error") return;
5636
5791
  const timer = setTimeout(() => {
5637
5792
  client.fetch(contentImpactQuery, buildReportQueryParams(perspectiveId)).then((results) => {
@@ -5651,7 +5806,7 @@ function createRunEvaluationAction(options = {}) {
5651
5806
  }, 15e3);
5652
5807
  return () => clearTimeout(timer);
5653
5808
  }, [client, perspectiveId, state]);
5654
- const handleRequest = useCallback14(async () => {
5809
+ const handleRequest = useCallback15(async () => {
5655
5810
  const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
5656
5811
  const tag = `release-${slugify(releaseTitle)}-${dateStamp()}`;
5657
5812
  const now = Date.now();
@@ -5778,6 +5933,7 @@ export {
5778
5933
  GLOSSARY,
5779
5934
  GraduateToNativeAction,
5780
5935
  MirrorBanner,
5936
+ ReleasePicker,
5781
5937
  SyncStatusBadge,
5782
5938
  ailfPlugin,
5783
5939
  ailfTool,