@sanity/ailf-studio 1.8.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +48 -0
  2. package/dist/index.js +1391 -577
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -156,6 +156,30 @@ var RAW_EVAL_MODES = [
156
156
  ...LEGACY_EVAL_MODE_ALIASES
157
157
  ];
158
158
 
159
+ // ../shared/dist/owner-teams.js
160
+ var KNOWN_OWNER_TEAMS = [
161
+ "content-lake",
162
+ "core-docs",
163
+ "growth",
164
+ "media",
165
+ "platform",
166
+ "studio"
167
+ ];
168
+
169
+ // ../shared/dist/run-classification.js
170
+ var RUN_CLASSIFICATIONS = [
171
+ "official",
172
+ "ad-hoc",
173
+ "experimental",
174
+ "test",
175
+ "external"
176
+ ];
177
+ var RUN_EXECUTOR_SURFACES = [
178
+ "cli",
179
+ "studio",
180
+ "api"
181
+ ];
182
+
159
183
  // src/types.ts
160
184
  function formatPercent(n) {
161
185
  if (n == null) return "\u2014";
@@ -1012,11 +1036,142 @@ var reportSchema = defineType4({
1012
1036
  name: "comparedAgainst",
1013
1037
  title: "Compared Against",
1014
1038
  type: "string"
1039
+ }),
1040
+ defineField4({
1041
+ description: "API-gateway job ID that dispatched this run",
1042
+ name: "parentJobId",
1043
+ title: "Parent Job ID",
1044
+ type: "string"
1015
1045
  })
1016
1046
  ],
1017
1047
  name: "lineage",
1018
1048
  title: "Lineage",
1019
1049
  type: "object"
1050
+ }),
1051
+ defineField4({
1052
+ description: "How this run should be treated for reporting and trend tracking (D0037). Orthogonal to trigger.type \u2014 intent vs mechanism.",
1053
+ name: "classification",
1054
+ options: { list: [...RUN_CLASSIFICATIONS] },
1055
+ title: "Classification",
1056
+ type: "string"
1057
+ }),
1058
+ defineField4({
1059
+ description: "Team and (optionally) individual this run is attributable to.",
1060
+ fields: [
1061
+ defineField4({
1062
+ description: "Free-form team slug. Known values suggested but external teams may add their own.",
1063
+ name: "team",
1064
+ options: { list: [...KNOWN_OWNER_TEAMS, "unknown"] },
1065
+ title: "Team",
1066
+ type: "string"
1067
+ }),
1068
+ defineField4({
1069
+ description: "GH actor, Sanity user ID, or similar.",
1070
+ name: "individual",
1071
+ title: "Individual",
1072
+ type: "string"
1073
+ })
1074
+ ],
1075
+ name: "owner",
1076
+ title: "Owner",
1077
+ type: "object"
1078
+ }),
1079
+ defineField4({
1080
+ description: "Who or what actually invoked the run. May or may not match owner.",
1081
+ fields: [
1082
+ defineField4({
1083
+ name: "type",
1084
+ options: { list: ["user", "system"] },
1085
+ title: "Type",
1086
+ type: "string"
1087
+ }),
1088
+ defineField4({
1089
+ description: 'For system executors (e.g. "github-actions"), the system name. For user executors, the resolved name.',
1090
+ name: "name",
1091
+ title: "Name",
1092
+ type: "string"
1093
+ }),
1094
+ defineField4({
1095
+ description: "For user executors \u2014 captured from git config; omitted when AILF_CAPTURE_EMAIL=0.",
1096
+ name: "email",
1097
+ title: "Email",
1098
+ type: "string"
1099
+ }),
1100
+ defineField4({
1101
+ description: "For user executors \u2014 where the invocation originated.",
1102
+ name: "surface",
1103
+ options: { list: [...RUN_EXECUTOR_SURFACES] },
1104
+ title: "Surface",
1105
+ type: "string"
1106
+ }),
1107
+ defineField4({
1108
+ description: "For user executors \u2014 GH actor when available.",
1109
+ name: "githubActor",
1110
+ title: "GitHub Actor",
1111
+ type: "string"
1112
+ }),
1113
+ defineField4({
1114
+ description: "For system executors \u2014 workflow name.",
1115
+ name: "workflow",
1116
+ title: "Workflow",
1117
+ type: "string"
1118
+ }),
1119
+ defineField4({
1120
+ description: "For system executors \u2014 external run ID.",
1121
+ name: "runId",
1122
+ title: "Run ID",
1123
+ type: "string"
1124
+ })
1125
+ ],
1126
+ name: "executor",
1127
+ title: "Executor",
1128
+ type: "object"
1129
+ }),
1130
+ defineField4({
1131
+ description: "Human-authored reason for running. Set via AILF_PURPOSE or --purpose flag.",
1132
+ name: "purpose",
1133
+ title: "Purpose",
1134
+ type: "text"
1135
+ }),
1136
+ defineField4({
1137
+ description: "Free-form searchable tags (release IDs, regression hunts, experiments).",
1138
+ name: "labels",
1139
+ of: [{ type: "string" }],
1140
+ title: "Labels",
1141
+ type: "array"
1142
+ }),
1143
+ defineField4({
1144
+ description: "Reproducibility metadata: AILF and Node version.",
1145
+ fields: [
1146
+ defineField4({
1147
+ name: "ailfVersion",
1148
+ title: "AILF Version",
1149
+ type: "string"
1150
+ }),
1151
+ defineField4({
1152
+ name: "nodeVersion",
1153
+ title: "Node Version",
1154
+ type: "string"
1155
+ })
1156
+ ],
1157
+ name: "tool",
1158
+ title: "Tool",
1159
+ type: "object"
1160
+ }),
1161
+ defineField4({
1162
+ description: "Platform and CI-provider metadata. Hostname intentionally excluded.",
1163
+ fields: [
1164
+ defineField4({
1165
+ name: "platform",
1166
+ title: "Platform",
1167
+ type: "string"
1168
+ }),
1169
+ defineField4({ name: "arch", title: "Arch", type: "string" }),
1170
+ defineField4({ name: "ci", title: "CI Provider", type: "string" })
1171
+ ],
1172
+ name: "host",
1173
+ title: "Host",
1174
+ type: "object"
1020
1175
  })
1021
1176
  ],
1022
1177
  group: ["main", "all-fields"],
@@ -3283,17 +3438,17 @@ import { route } from "sanity/router";
3283
3438
  // src/components/Dashboard.tsx
3284
3439
  import { HelpCircleIcon as HelpCircleIcon8 } from "@sanity/icons";
3285
3440
  import {
3286
- Box as Box31,
3287
- Button as Button10,
3441
+ Box as Box32,
3442
+ Button as Button12,
3288
3443
  Container,
3289
- Flex as Flex36,
3290
- Stack as Stack38,
3444
+ Flex as Flex37,
3445
+ Stack as Stack39,
3291
3446
  Tab as Tab3,
3292
3447
  TabList as TabList3,
3293
3448
  TabPanel as TabPanel3,
3294
- Text as Text48
3449
+ Text as Text49
3295
3450
  } from "@sanity/ui";
3296
- import { useCallback as useCallback36, useEffect as useEffect16 } from "react";
3451
+ import { useCallback as useCallback37, useEffect as useEffect16 } from "react";
3297
3452
  import { useRouter as useRouter3 } from "sanity/router";
3298
3453
 
3299
3454
  // src/lib/help-context.ts
@@ -3909,6 +4064,10 @@ var latestReportsQuery = (
3909
4064
  *[_type == "${REPORT_TYPE}"
3910
4065
  ${filterSourceClause("$source")}
3911
4066
  ${filterModeClause("$mode")}
4067
+ ${filterClassificationClause("$classification")}
4068
+ ${filterOwnerTeamClause("$ownerTeam")}
4069
+ ${filterExecutorSurfaceClause("$executorSurface")}
4070
+ ${filterLabelsClause("$labels")}
3912
4071
  ] | order(completedAt desc) [0...$limit] {
3913
4072
  _id,
3914
4073
  reportId,
@@ -3921,6 +4080,13 @@ var latestReportsQuery = (
3921
4080
  "areas": provenance.areas,
3922
4081
  "models": provenance.models[].label,
3923
4082
  "trigger": provenance.trigger.type,
4083
+ "classification": provenance.classification,
4084
+ "ownerTeam": provenance.owner.team,
4085
+ "ownerIndividual": provenance.owner.individual,
4086
+ "executorType": provenance.executor.type,
4087
+ "executorName": provenance.executor.name,
4088
+ "executorSurface": provenance.executor.surface,
4089
+ "labels": provenance.labels,
3924
4090
  "perspective": provenance.source.perspective,
3925
4091
  "targetDocuments": provenance.targetDocuments,
3926
4092
  "git": provenance.git,
@@ -4160,12 +4326,48 @@ var distinctTriggersQuery = (
4160
4326
  array::unique(*[_type == "${REPORT_TYPE}"].provenance.trigger.type)
4161
4327
  `
4162
4328
  );
4329
+ var distinctClassificationsQuery = (
4330
+ /* groq */
4331
+ `
4332
+ array::unique(*[_type == "${REPORT_TYPE}" && defined(provenance.classification)].provenance.classification)
4333
+ `
4334
+ );
4335
+ var distinctOwnerTeamsQuery = (
4336
+ /* groq */
4337
+ `
4338
+ array::unique(*[_type == "${REPORT_TYPE}" && defined(provenance.owner.team)].provenance.owner.team)
4339
+ `
4340
+ );
4341
+ var distinctExecutorSurfacesQuery = (
4342
+ /* groq */
4343
+ `
4344
+ array::unique(*[_type == "${REPORT_TYPE}" && defined(provenance.executor.surface)].provenance.executor.surface)
4345
+ `
4346
+ );
4347
+ var distinctLabelsQuery = (
4348
+ /* groq */
4349
+ `
4350
+ array::unique(*[_type == "${REPORT_TYPE}" && defined(provenance.labels)].provenance.labels[])
4351
+ `
4352
+ );
4163
4353
  function filterModeClause(param) {
4164
4354
  return `&& (${param} == null || provenance.mode == ${param})`;
4165
4355
  }
4166
4356
  function filterSourceClause(param) {
4167
4357
  return `&& (${param} == null || provenance.source.name == ${param})`;
4168
4358
  }
4359
+ function filterClassificationClause(param) {
4360
+ return `&& (${param} == null || provenance.classification == ${param})`;
4361
+ }
4362
+ function filterOwnerTeamClause(param) {
4363
+ return `&& (${param} == null || provenance.owner.team == ${param})`;
4364
+ }
4365
+ function filterExecutorSurfaceClause(param) {
4366
+ return `&& (${param} == null || provenance.executor.surface == ${param})`;
4367
+ }
4368
+ function filterLabelsClause(param) {
4369
+ return `&& (${param} == null || count(${param}) == 0 || count((provenance.labels[])[@ in ${param}]) > 0)`;
4370
+ }
4169
4371
 
4170
4372
  // src/components/PageBlurb.tsx
4171
4373
  import { Card as Card5, Stack as Stack7, Text as Text8 } from "@sanity/ui";
@@ -5058,78 +5260,146 @@ function FilterBar({
5058
5260
  trigger,
5059
5261
  triggers,
5060
5262
  onTriggerChange,
5263
+ classification,
5264
+ classifications,
5265
+ onClassificationChange,
5266
+ ownerTeam,
5267
+ ownerTeams,
5268
+ onOwnerTeamChange,
5269
+ executorSurface,
5270
+ executorSurfaces,
5271
+ onExecutorSurfaceChange,
5272
+ presets,
5273
+ activePreset,
5274
+ onPresetSelect,
5061
5275
  onReset,
5062
5276
  filteredCount,
5063
5277
  totalCount
5064
5278
  }) {
5065
- const hasActiveFilters = query.trim() !== "" || mode !== null || source !== null || trigger !== null;
5279
+ const hasActiveFilters = query.trim() !== "" || mode !== null || source !== null || trigger !== null || classification !== null || ownerTeam !== null || executorSurface !== null;
5066
5280
  const handleQueryChange = useCallback11(
5067
5281
  (e) => {
5068
5282
  onQueryChange(e.currentTarget.value);
5069
5283
  },
5070
5284
  [onQueryChange]
5071
5285
  );
5072
- return /* @__PURE__ */ jsxs13("div", { style: BAR_STYLE, children: [
5073
- /* @__PURE__ */ jsx17("div", { style: { maxWidth: 320, minWidth: 140, flex: "1 1 200px" }, children: /* @__PURE__ */ jsx17(
5074
- TextInput2,
5075
- {
5076
- fontSize: 2,
5077
- icon: SearchIcon3,
5078
- onChange: handleQueryChange,
5079
- placeholder: "Search reports...",
5080
- value: query
5081
- }
5082
- ) }),
5083
- modes.length > 0 && /* @__PURE__ */ jsx17(
5084
- PillGroup,
5085
- {
5086
- label: "Mode",
5087
- onChange: onModeChange,
5088
- options: modes,
5089
- value: mode
5090
- }
5091
- ),
5092
- sources.length > 0 && /* @__PURE__ */ jsx17(
5093
- PillGroup,
5094
- {
5095
- label: "Source",
5096
- onChange: onSourceChange,
5097
- options: sources,
5098
- value: source
5099
- }
5100
- ),
5101
- triggers.length > 0 && /* @__PURE__ */ jsx17(
5102
- PillGroup,
5103
- {
5104
- label: "Trigger",
5105
- onChange: onTriggerChange,
5106
- options: triggers,
5107
- value: trigger
5108
- }
5109
- ),
5110
- /* @__PURE__ */ jsx17("div", { style: { flex: "1 0 0px" } }),
5111
- hasActiveFilters && /* @__PURE__ */ jsxs13(
5112
- "button",
5113
- {
5114
- onClick: onReset,
5115
- style: {
5116
- ...PILL_BASE,
5117
- alignItems: "center",
5118
- background: "transparent",
5119
- color: "var(--card-muted-fg-color)",
5120
- display: "inline-flex",
5121
- gap: 4
5286
+ return /* @__PURE__ */ jsxs13(Flex9, { direction: "column", children: [
5287
+ presets.length > 0 && /* @__PURE__ */ jsxs13("div", { style: { ...BAR_STYLE, paddingBottom: 4 }, children: [
5288
+ /* @__PURE__ */ jsx17(
5289
+ Text15,
5290
+ {
5291
+ muted: true,
5292
+ size: 1,
5293
+ style: {
5294
+ letterSpacing: "0.05em",
5295
+ textTransform: "uppercase",
5296
+ whiteSpace: "nowrap"
5297
+ },
5298
+ weight: "semibold",
5299
+ children: "Presets"
5300
+ }
5301
+ ),
5302
+ /* @__PURE__ */ jsx17("div", { style: PILL_GROUP_STYLE, children: presets.map((preset) => /* @__PURE__ */ jsx17(
5303
+ "button",
5304
+ {
5305
+ onClick: () => onPresetSelect(preset.id === activePreset ? null : preset.id),
5306
+ style: activePreset === preset.id ? PILL_ACTIVE : PILL_INACTIVE,
5307
+ title: preset.description,
5308
+ type: "button",
5309
+ children: preset.label
5122
5310
  },
5123
- type: "button",
5124
- children: [
5125
- /* @__PURE__ */ jsx17(ResetIcon, { style: { fontSize: 14 } }),
5126
- "Reset"
5127
- ]
5128
- }
5129
- ),
5130
- /* @__PURE__ */ jsxs13(Flex9, { align: "center", gap: 2, shrink: 0, children: [
5131
- /* @__PURE__ */ jsx17(ThListIcon, { style: { opacity: 0.5 } }),
5132
- /* @__PURE__ */ jsx17(Text15, { muted: true, size: 2, children: filteredCount === totalCount ? `${totalCount} of ${totalCount}` : `${filteredCount} of ${totalCount}` })
5311
+ preset.id
5312
+ )) })
5313
+ ] }),
5314
+ /* @__PURE__ */ jsxs13("div", { style: BAR_STYLE, children: [
5315
+ /* @__PURE__ */ jsx17("div", { style: { maxWidth: 320, minWidth: 140, flex: "1 1 200px" }, children: /* @__PURE__ */ jsx17(
5316
+ TextInput2,
5317
+ {
5318
+ fontSize: 2,
5319
+ icon: SearchIcon3,
5320
+ onChange: handleQueryChange,
5321
+ placeholder: "Search reports...",
5322
+ value: query
5323
+ }
5324
+ ) }),
5325
+ classifications.length > 0 && /* @__PURE__ */ jsx17(
5326
+ PillGroup,
5327
+ {
5328
+ label: "Class",
5329
+ onChange: onClassificationChange,
5330
+ options: classifications,
5331
+ value: classification
5332
+ }
5333
+ ),
5334
+ ownerTeams.length > 0 && /* @__PURE__ */ jsx17(
5335
+ PillGroup,
5336
+ {
5337
+ label: "Team",
5338
+ onChange: onOwnerTeamChange,
5339
+ options: ownerTeams,
5340
+ value: ownerTeam
5341
+ }
5342
+ ),
5343
+ modes.length > 0 && /* @__PURE__ */ jsx17(
5344
+ PillGroup,
5345
+ {
5346
+ label: "Mode",
5347
+ onChange: onModeChange,
5348
+ options: modes,
5349
+ value: mode
5350
+ }
5351
+ ),
5352
+ sources.length > 0 && /* @__PURE__ */ jsx17(
5353
+ PillGroup,
5354
+ {
5355
+ label: "Source",
5356
+ onChange: onSourceChange,
5357
+ options: sources,
5358
+ value: source
5359
+ }
5360
+ ),
5361
+ triggers.length > 0 && /* @__PURE__ */ jsx17(
5362
+ PillGroup,
5363
+ {
5364
+ label: "Trigger",
5365
+ onChange: onTriggerChange,
5366
+ options: triggers,
5367
+ value: trigger
5368
+ }
5369
+ ),
5370
+ executorSurfaces.length > 0 && /* @__PURE__ */ jsx17(
5371
+ PillGroup,
5372
+ {
5373
+ label: "Surface",
5374
+ onChange: onExecutorSurfaceChange,
5375
+ options: executorSurfaces,
5376
+ value: executorSurface
5377
+ }
5378
+ ),
5379
+ /* @__PURE__ */ jsx17("div", { style: { flex: "1 0 0px" } }),
5380
+ hasActiveFilters && /* @__PURE__ */ jsxs13(
5381
+ "button",
5382
+ {
5383
+ onClick: onReset,
5384
+ style: {
5385
+ ...PILL_BASE,
5386
+ alignItems: "center",
5387
+ background: "transparent",
5388
+ color: "var(--card-muted-fg-color)",
5389
+ display: "inline-flex",
5390
+ gap: 4
5391
+ },
5392
+ type: "button",
5393
+ children: [
5394
+ /* @__PURE__ */ jsx17(ResetIcon, { style: { fontSize: 14 } }),
5395
+ "Reset"
5396
+ ]
5397
+ }
5398
+ ),
5399
+ /* @__PURE__ */ jsxs13(Flex9, { align: "center", gap: 2, shrink: 0, children: [
5400
+ /* @__PURE__ */ jsx17(ThListIcon, { style: { opacity: 0.5 } }),
5401
+ /* @__PURE__ */ jsx17(Text15, { muted: true, size: 2, children: filteredCount === totalCount ? `${totalCount} of ${totalCount}` : `${filteredCount} of ${totalCount}` })
5402
+ ] })
5133
5403
  ] })
5134
5404
  ] });
5135
5405
  }
@@ -5861,6 +6131,32 @@ function ColHeader({
5861
6131
 
5862
6132
  // src/components/LatestReports.tsx
5863
6133
  import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
6134
+ var MY_TEAM_STORAGE_KEY = "ailf:studio:myTeam";
6135
+ var PRESETS = [
6136
+ {
6137
+ description: "classification=official & trigger=scheduled & owner.team=core-docs",
6138
+ id: "core-docs-scheduled",
6139
+ label: "Core docs scheduled series"
6140
+ },
6141
+ {
6142
+ description: "owner.team equals your remembered team (first use will prompt for the slug)",
6143
+ id: "my-team",
6144
+ label: "My team's runs"
6145
+ }
6146
+ ];
6147
+ function presetFilters(preset, myTeam) {
6148
+ if (preset === "core-docs-scheduled") {
6149
+ return {
6150
+ classification: "official",
6151
+ ownerTeam: "core-docs",
6152
+ trigger: "scheduled"
6153
+ };
6154
+ }
6155
+ if (preset === "my-team" && myTeam) {
6156
+ return { classification: null, ownerTeam: myTeam, trigger: null };
6157
+ }
6158
+ return null;
6159
+ }
5864
6160
  function readParam(params, key) {
5865
6161
  if (!params) return null;
5866
6162
  const pair = params.find(([k]) => k === key);
@@ -5872,8 +6168,29 @@ function buildSearchParams(filters) {
5872
6168
  if (filters.mode) params.push(["mode", filters.mode]);
5873
6169
  if (filters.source) params.push(["source", filters.source]);
5874
6170
  if (filters.trigger) params.push(["trigger", filters.trigger]);
6171
+ if (filters.classification)
6172
+ params.push(["classification", filters.classification]);
6173
+ if (filters.ownerTeam) params.push(["ownerTeam", filters.ownerTeam]);
6174
+ if (filters.executorSurface)
6175
+ params.push(["executorSurface", filters.executorSurface]);
6176
+ if (filters.preset) params.push(["preset", filters.preset]);
5875
6177
  return params;
5876
6178
  }
6179
+ function readStoredTeam() {
6180
+ if (typeof window === "undefined") return null;
6181
+ try {
6182
+ return window.localStorage.getItem(MY_TEAM_STORAGE_KEY);
6183
+ } catch {
6184
+ return null;
6185
+ }
6186
+ }
6187
+ function writeStoredTeam(team) {
6188
+ if (typeof window === "undefined") return;
6189
+ try {
6190
+ window.localStorage.setItem(MY_TEAM_STORAGE_KEY, team);
6191
+ } catch {
6192
+ }
6193
+ }
5877
6194
  function LatestReports({
5878
6195
  onSelectReport,
5879
6196
  pageSize = 20
@@ -5894,15 +6211,40 @@ function LatestReports({
5894
6211
  const [trigger, setTrigger] = useState10(
5895
6212
  () => readParam(urlParams, "trigger")
5896
6213
  );
6214
+ const [classification, setClassification] = useState10(
6215
+ () => readParam(urlParams, "classification")
6216
+ );
6217
+ const [ownerTeam, setOwnerTeam] = useState10(
6218
+ () => readParam(urlParams, "ownerTeam")
6219
+ );
6220
+ const [executorSurface, setExecutorSurface] = useState10(
6221
+ () => readParam(urlParams, "executorSurface")
6222
+ );
6223
+ const [activePreset, setActivePreset] = useState10(
6224
+ () => readParam(urlParams, "preset")
6225
+ );
5897
6226
  useEffect6(() => {
5898
6227
  const params = buildSearchParams({
5899
- q: searchQuery,
6228
+ classification,
6229
+ executorSurface,
5900
6230
  mode,
6231
+ ownerTeam,
6232
+ preset: activePreset,
6233
+ q: searchQuery,
5901
6234
  source,
5902
6235
  trigger
5903
6236
  });
5904
6237
  router.navigate({ ...router.state, _searchParams: params });
5905
- }, [searchQuery, mode, source, trigger]);
6238
+ }, [
6239
+ searchQuery,
6240
+ mode,
6241
+ source,
6242
+ trigger,
6243
+ classification,
6244
+ ownerTeam,
6245
+ executorSurface,
6246
+ activePreset
6247
+ ]);
5906
6248
  const [initialLoading, setInitialLoading] = useState10(true);
5907
6249
  const [loadingMore, setLoadingMore] = useState10(false);
5908
6250
  const [reports, setReports] = useState10([]);
@@ -5910,6 +6252,9 @@ function LatestReports({
5910
6252
  const [modes, setModes] = useState10([]);
5911
6253
  const [sources, setSources] = useState10([]);
5912
6254
  const [triggers, setTriggers] = useState10([]);
6255
+ const [classifications, setClassifications] = useState10([]);
6256
+ const [ownerTeams, setOwnerTeams] = useState10([]);
6257
+ const [executorSurfaces, setExecutorSurfaces] = useState10([]);
5913
6258
  const [sort, setSort] = useState10({
5914
6259
  direction: "desc",
5915
6260
  field: "date"
@@ -5917,8 +6262,12 @@ function LatestReports({
5917
6262
  useEffect6(() => {
5918
6263
  setHasMore(true);
5919
6264
  client.fetch(latestReportsQuery, {
6265
+ classification,
6266
+ executorSurface,
6267
+ labels: null,
5920
6268
  limit: pageSize,
5921
6269
  mode,
6270
+ ownerTeam,
5922
6271
  source
5923
6272
  }).then((data) => {
5924
6273
  const items = data ?? [];
@@ -5930,14 +6279,26 @@ function LatestReports({
5930
6279
  setHasMore(false);
5931
6280
  setInitialLoading(false);
5932
6281
  });
5933
- }, [client, pageSize, mode, source]);
6282
+ }, [
6283
+ client,
6284
+ pageSize,
6285
+ mode,
6286
+ source,
6287
+ classification,
6288
+ ownerTeam,
6289
+ executorSurface
6290
+ ]);
5934
6291
  const handleLoadMore = useCallback14(() => {
5935
6292
  if (loadingMore || !hasMore) return;
5936
6293
  setLoadingMore(true);
5937
6294
  const nextLimit = reports.length + pageSize;
5938
6295
  client.fetch(latestReportsQuery, {
6296
+ classification,
6297
+ executorSurface,
6298
+ labels: null,
5939
6299
  limit: nextLimit,
5940
6300
  mode,
6301
+ ownerTeam,
5941
6302
  source
5942
6303
  }).then((data) => {
5943
6304
  const items = data ?? [];
@@ -5947,11 +6308,25 @@ function LatestReports({
5947
6308
  }).catch(() => {
5948
6309
  setLoadingMore(false);
5949
6310
  });
5950
- }, [client, hasMore, loadingMore, mode, pageSize, reports.length, source]);
6311
+ }, [
6312
+ client,
6313
+ hasMore,
6314
+ loadingMore,
6315
+ mode,
6316
+ pageSize,
6317
+ reports.length,
6318
+ source,
6319
+ classification,
6320
+ ownerTeam,
6321
+ executorSurface
6322
+ ]);
5951
6323
  useEffect6(() => {
5952
6324
  client.fetch(distinctModesQuery).then((data) => setModes((data ?? []).sort())).catch(() => setModes([]));
5953
6325
  client.fetch(distinctSourcesQuery).then((data) => setSources((data ?? []).sort())).catch(() => setSources([]));
5954
6326
  client.fetch(distinctTriggersQuery).then((data) => setTriggers((data ?? []).sort())).catch(() => setTriggers([]));
6327
+ client.fetch(distinctClassificationsQuery).then((data) => setClassifications((data ?? []).sort())).catch(() => setClassifications([]));
6328
+ client.fetch(distinctOwnerTeamsQuery).then((data) => setOwnerTeams((data ?? []).sort())).catch(() => setOwnerTeams([]));
6329
+ client.fetch(distinctExecutorSurfacesQuery).then((data) => setExecutorSurfaces((data ?? []).sort())).catch(() => setExecutorSurfaces([]));
5955
6330
  }, [client]);
5956
6331
  const filteredReports = useMemo5(() => {
5957
6332
  let result = reports;
@@ -6000,25 +6375,65 @@ function LatestReports({
6000
6375
  setMode(null);
6001
6376
  setSource(null);
6002
6377
  setTrigger(null);
6378
+ setClassification(null);
6379
+ setOwnerTeam(null);
6380
+ setExecutorSurface(null);
6381
+ setActivePreset(null);
6382
+ }, []);
6383
+ const handlePresetSelect = useCallback14((presetId) => {
6384
+ if (!presetId) {
6385
+ setActivePreset(null);
6386
+ return;
6387
+ }
6388
+ let team = readStoredTeam();
6389
+ if (presetId === "my-team" && !team) {
6390
+ if (typeof window === "undefined") return;
6391
+ const prompted = window.prompt(
6392
+ 'Which team slug do you want to filter by? (e.g. "core-docs", "studio") \u2014 saved to this browser only.',
6393
+ ""
6394
+ );
6395
+ const trimmed = prompted?.trim();
6396
+ if (!trimmed) return;
6397
+ team = trimmed;
6398
+ writeStoredTeam(team);
6399
+ }
6400
+ const filters = presetFilters(presetId, team);
6401
+ if (!filters) return;
6402
+ setActivePreset(presetId);
6403
+ setClassification(filters.classification);
6404
+ setOwnerTeam(filters.ownerTeam);
6405
+ setTrigger(filters.trigger);
6003
6406
  }, []);
6004
6407
  if (initialLoading) {
6005
6408
  return /* @__PURE__ */ jsx23(Card10, { padding: 4, children: /* @__PURE__ */ jsx23(Text20, { muted: true, children: "Loading reports\u2026" }) });
6006
6409
  }
6007
- if (reports.length === 0 && !mode && !source) {
6410
+ if (reports.length === 0 && !mode && !source && !classification && !ownerTeam && !executorSurface) {
6008
6411
  return /* @__PURE__ */ jsx23(Card10, { padding: 4, children: /* @__PURE__ */ jsx23(Text20, { muted: true, children: "No reports found. Run the pipeline with --publish to create reports." }) });
6009
6412
  }
6010
6413
  return /* @__PURE__ */ jsxs18(Stack15, { space: 0, children: [
6011
6414
  /* @__PURE__ */ jsx23(
6012
6415
  FilterBar,
6013
6416
  {
6417
+ activePreset,
6418
+ classification,
6419
+ classifications,
6420
+ executorSurface,
6421
+ executorSurfaces,
6014
6422
  filteredCount: filteredReports.length,
6015
6423
  mode,
6016
6424
  modes,
6425
+ onClassificationChange: setClassification,
6426
+ onExecutorSurfaceChange: setExecutorSurface,
6017
6427
  onModeChange: setMode,
6428
+ onOwnerTeamChange: setOwnerTeam,
6429
+ onPresetSelect: handlePresetSelect,
6018
6430
  onQueryChange: setSearchQuery,
6019
6431
  onReset: handleReset,
6020
6432
  onSourceChange: setSource,
6021
6433
  onTriggerChange: setTrigger,
6434
+ ownerTeam,
6435
+ ownerTeams,
6436
+ presets: PRESETS,
6022
6437
  query: searchQuery,
6023
6438
  source,
6024
6439
  sources,
@@ -6063,22 +6478,22 @@ function LatestReports({
6063
6478
  // src/components/report-detail/ReportDetail.tsx
6064
6479
  import { ArrowLeftIcon as ArrowLeftIcon3 } from "@sanity/icons";
6065
6480
  import {
6066
- Badge as Badge8,
6067
- Box as Box26,
6068
- Button as Button8,
6069
- Flex as Flex29,
6070
- Stack as Stack30,
6481
+ Badge as Badge10,
6482
+ Box as Box27,
6483
+ Button as Button10,
6484
+ Flex as Flex30,
6485
+ Stack as Stack31,
6071
6486
  Tab,
6072
6487
  TabList,
6073
6488
  TabPanel,
6074
- Text as Text39,
6489
+ Text as Text40,
6075
6490
  Tooltip as Tooltip10
6076
6491
  } from "@sanity/ui";
6077
6492
  import {
6078
- useCallback as useCallback33,
6493
+ useCallback as useCallback34,
6079
6494
  useEffect as useEffect12,
6080
6495
  useMemo as useMemo15,
6081
- useState as useState23
6496
+ useState as useState25
6082
6497
  } from "react";
6083
6498
  import { useClient as useClient10 } from "sanity";
6084
6499
 
@@ -7600,20 +8015,22 @@ var NDJSON_TYPES = /* @__PURE__ */ new Set([
7600
8015
  function useArtifactDetail(type, key) {
7601
8016
  const { runId } = useReportArtifactContext();
7602
8017
  const ref = useArtifactRef(type);
8018
+ const cacheKey2 = key ?? "";
7603
8019
  const [status, setStatus] = useState13(
7604
- () => runId && getCached({ runId, type, key }) !== null ? "ready" : "idle"
8020
+ () => runId && getCached({ runId, type, key: cacheKey2 }) !== null ? "ready" : "idle"
7605
8021
  );
7606
8022
  const [, setTick] = useState13(0);
7607
8023
  useEffect7(() => {
7608
8024
  if (!runId) return void 0;
7609
- return subscribe({ runId, type, key }, () => {
8025
+ return subscribe({ runId, type, key: cacheKey2 }, () => {
7610
8026
  setStatus("ready");
7611
8027
  setTick((n) => n + 1);
7612
8028
  });
7613
- }, [runId, type, key]);
8029
+ }, [runId, type, cacheKey2]);
7614
8030
  const request = useCallback16(async () => {
7615
- if (!runId || !ref || !key) return;
7616
- const cacheId = { runId, type, key };
8031
+ if (!runId || !ref) return;
8032
+ if (ref.layout === "per-entry" && !key) return;
8033
+ const cacheId = { runId, type, key: cacheKey2 };
7617
8034
  if (isKnownNotFound(cacheId)) {
7618
8035
  setStatus("error");
7619
8036
  return;
@@ -7626,7 +8043,7 @@ function useArtifactDetail(type, key) {
7626
8043
  setStatus("loading");
7627
8044
  try {
7628
8045
  await recordInFlight(cacheId, async () => {
7629
- const url = buildSigningUrl(runId, type, key);
8046
+ const url = key ? buildSigningUrl(runId, type, key) : buildSigningUrl(runId, type);
7630
8047
  const body = NDJSON_TYPES.has(type) ? await signAndFetchNdjson(url) : await signAndFetchJson(url);
7631
8048
  setCached(cacheId, body);
7632
8049
  return body;
@@ -7638,8 +8055,8 @@ function useArtifactDetail(type, key) {
7638
8055
  }
7639
8056
  setStatus("error");
7640
8057
  }
7641
- }, [runId, ref, type, key]);
7642
- const full = runId ? getCached({ runId, type, key }) : null;
8058
+ }, [runId, ref, type, key, cacheKey2]);
8059
+ const full = runId ? getCached({ runId, type, key: cacheKey2 }) : null;
7643
8060
  return [full, status, request];
7644
8061
  }
7645
8062
 
@@ -9405,51 +9822,408 @@ function AreaJumpRail({ areas }) {
9405
9822
  ] });
9406
9823
  }
9407
9824
 
9408
- // src/components/report-detail/ProvenanceCard.tsx
9409
- import { Card as Card15, Flex as Flex21, Grid as Grid4, Stack as Stack24, Text as Text32 } from "@sanity/ui";
9410
- import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
9411
- function ProvenanceCard({ provenance }) {
9825
+ // src/components/report-detail/PipelineExecutionPanel.tsx
9826
+ import { ChevronDownIcon as ChevronDownIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@sanity/icons";
9827
+ import { Badge as Badge8, Box as Box22, Button as Button4, Card as Card15, Flex as Flex21, Stack as Stack24, Text as Text32 } from "@sanity/ui";
9828
+ import { useCallback as useCallback23, useState as useState17 } from "react";
9829
+ import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
9830
+ var PRE_W0060_HELP_URL = "https://github.com/sanity-labs/ai-literacy-framework/blob/main/docs/design-docs/artifact-data-surfacing.md";
9831
+ function PipelineExecutionPanel() {
9832
+ const ref = useArtifactRef("pipelineContext");
9833
+ const preview = ref?.preview;
9834
+ if (!ref || !preview) {
9835
+ return /* @__PURE__ */ jsx36(EmptyState, {});
9836
+ }
9837
+ return /* @__PURE__ */ jsx36(LoadedPanel, { preview });
9838
+ }
9839
+ function EmptyState() {
9840
+ return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 3, children: [
9841
+ /* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
9842
+ /* @__PURE__ */ jsxs28(Text32, { muted: true, size: 2, children: [
9843
+ "Pipeline context was not captured for this run.",
9844
+ " ",
9845
+ /* @__PURE__ */ jsx36(
9846
+ "a",
9847
+ {
9848
+ href: PRE_W0060_HELP_URL,
9849
+ rel: "noopener noreferrer",
9850
+ target: "_blank",
9851
+ children: "Why?"
9852
+ }
9853
+ )
9854
+ ] })
9855
+ ] }) });
9856
+ }
9857
+ function LoadedPanel({ preview }) {
9858
+ const [expanded, setExpanded] = useState17(false);
9859
+ const [full, status, request] = useArtifactDetail("pipelineContext");
9860
+ const handleToggle = useCallback23(() => {
9861
+ setExpanded((prev) => {
9862
+ const next = !prev;
9863
+ if (next) {
9864
+ void request();
9865
+ }
9866
+ return next;
9867
+ });
9868
+ }, [request]);
9412
9869
  return /* @__PURE__ */ jsx36(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
9413
- /* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Provenance" }),
9414
- /* @__PURE__ */ jsxs28(Grid4, { columns: [1, 2, 3], gap: 4, children: [
9415
- /* @__PURE__ */ jsx36(Field, { label: "Mode", value: provenance.mode }),
9416
- /* @__PURE__ */ jsx36(Field, { label: "Source", value: provenance.source.name }),
9870
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, justify: "space-between", wrap: "wrap", children: [
9871
+ /* @__PURE__ */ jsx36(Text32, { size: 3, weight: "semibold", children: "Pipeline Execution" }),
9872
+ preview.belowCritical === true && /* @__PURE__ */ jsx36(Badge8, { tone: "critical", children: "Below critical" })
9873
+ ] }),
9874
+ /* @__PURE__ */ jsx36(HeaderRow, { preview }),
9875
+ /* @__PURE__ */ jsx36(Box22, { children: /* @__PURE__ */ jsx36(
9876
+ Button4,
9877
+ {
9878
+ icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
9879
+ mode: "bleed",
9880
+ onClick: handleToggle,
9881
+ padding: 2,
9882
+ text: expanded ? "Hide details" : "Show details"
9883
+ }
9884
+ ) }),
9885
+ expanded && /* @__PURE__ */ jsx36(Details, { full, preview, status })
9886
+ ] }) });
9887
+ }
9888
+ function HeaderRow({ preview }) {
9889
+ const failedCount = preview.failedSteps.length;
9890
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
9891
+ /* @__PURE__ */ jsx36(Stat2, { label: "Steps", value: String(preview.stepCount) }),
9892
+ /* @__PURE__ */ jsx36(Dot, {}),
9893
+ /* @__PURE__ */ jsx36(Stat2, { label: "Duration", value: formatDuration(preview.totalDurationMs) }),
9894
+ /* @__PURE__ */ jsx36(Dot, {}),
9895
+ /* @__PURE__ */ jsxs28(Flex21, { align: "baseline", gap: 2, children: [
9896
+ /* @__PURE__ */ jsx36(SectionTitle, { children: "Failed" }),
9897
+ failedCount > 0 ? /* @__PURE__ */ jsx36(Badge8, { tone: "critical", children: failedCount }) : /* @__PURE__ */ jsx36(Text32, { size: 2, children: "0" })
9898
+ ] }),
9899
+ typeof preview.cacheHits === "number" && /* @__PURE__ */ jsxs28(Fragment10, { children: [
9900
+ /* @__PURE__ */ jsx36(Dot, {}),
9901
+ /* @__PURE__ */ jsx36(Stat2, { label: "Cache hits", value: String(preview.cacheHits) })
9902
+ ] })
9903
+ ] });
9904
+ }
9905
+ function Stat2({ label, value }) {
9906
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "baseline", gap: 2, children: [
9907
+ /* @__PURE__ */ jsx36(SectionTitle, { children: label }),
9908
+ /* @__PURE__ */ jsx36(Text32, { size: 2, children: value })
9909
+ ] });
9910
+ }
9911
+ function Dot() {
9912
+ return /* @__PURE__ */ jsx36(Text32, { "aria-hidden": true, muted: true, size: 1, children: "\xB7" });
9913
+ }
9914
+ function Details({
9915
+ full,
9916
+ preview,
9917
+ status
9918
+ }) {
9919
+ if (status === "loading") {
9920
+ return /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Loading pipeline context\u2026" });
9921
+ }
9922
+ if (status === "error") {
9923
+ return /* @__PURE__ */ jsx36(Card15, { padding: 3, radius: 2, tone: "critical", children: /* @__PURE__ */ jsx36(Text32, { size: 2, children: "Failed to load pipeline context." }) });
9924
+ }
9925
+ if (!full) {
9926
+ return null;
9927
+ }
9928
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 4, children: [
9929
+ /* @__PURE__ */ jsx36(StepTimeline, { steps: full.steps ?? [] }),
9930
+ /* @__PURE__ */ jsx36(ConfigPane, { config: full.config ?? {} }),
9931
+ /* @__PURE__ */ jsx36(
9932
+ CacheTelemetry,
9933
+ {
9934
+ cacheKeys: full.state?.remoteCacheHits ?? [],
9935
+ preview
9936
+ }
9937
+ )
9938
+ ] });
9939
+ }
9940
+ function StepTimeline({ steps }) {
9941
+ if (steps.length === 0) {
9942
+ return /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "No pipeline steps recorded." });
9943
+ }
9944
+ const maxDuration = Math.max(
9945
+ 1,
9946
+ ...steps.map((s) => typeof s.durationMs === "number" ? s.durationMs : 0)
9947
+ );
9948
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 3, children: [
9949
+ /* @__PURE__ */ jsx36(SectionTitle, { children: "Steps" }),
9950
+ /* @__PURE__ */ jsx36(Stack24, { space: 2, children: steps.map((step) => /* @__PURE__ */ jsx36(StepRow, { maxDurationMs: maxDuration, step }, step.name)) })
9951
+ ] });
9952
+ }
9953
+ function StepRow({
9954
+ maxDurationMs,
9955
+ step
9956
+ }) {
9957
+ const widthPct = typeof step.durationMs === "number" && maxDurationMs > 0 ? Math.max(2, Math.round(step.durationMs / maxDurationMs * 100)) : 0;
9958
+ const tone = step.status === "success" ? "positive" : step.status === "failed" ? "critical" : "default";
9959
+ const barColor = tone === "critical" ? "var(--card-bg-critical-color, #c4314b)" : tone === "positive" ? "var(--card-bg-positive-color, #43d675)" : "var(--card-muted-fg-color, #999)";
9960
+ return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "nowrap", children: [
9961
+ /* @__PURE__ */ jsx36(Box22, { style: { minWidth: 180, maxWidth: 220 }, children: /* @__PURE__ */ jsx36(
9962
+ Text32,
9963
+ {
9964
+ size: 2,
9965
+ style: { fontFamily: "monospace" },
9966
+ textOverflow: "ellipsis",
9967
+ children: step.name
9968
+ }
9969
+ ) }),
9970
+ /* @__PURE__ */ jsx36(Box22, { style: { minWidth: 72 }, children: /* @__PURE__ */ jsx36(Badge8, { tone, children: step.status }) }),
9971
+ /* @__PURE__ */ jsxs28(Box22, { flex: 1, style: { position: "relative", minWidth: 80 }, children: [
9417
9972
  /* @__PURE__ */ jsx36(
9973
+ Box22,
9974
+ {
9975
+ style: {
9976
+ backgroundColor: "var(--card-border-color, #e5e5e5)",
9977
+ borderRadius: 3,
9978
+ height: 6,
9979
+ width: "100%"
9980
+ }
9981
+ }
9982
+ ),
9983
+ widthPct > 0 && /* @__PURE__ */ jsx36(
9984
+ Box22,
9985
+ {
9986
+ style: {
9987
+ backgroundColor: barColor,
9988
+ borderRadius: 3,
9989
+ height: 6,
9990
+ left: 0,
9991
+ position: "absolute",
9992
+ top: 0,
9993
+ width: `${widthPct}%`
9994
+ }
9995
+ }
9996
+ )
9997
+ ] }),
9998
+ /* @__PURE__ */ jsx36(Box22, { style: { minWidth: 80, textAlign: "right" }, children: /* @__PURE__ */ jsx36(Text32, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: typeof step.durationMs === "number" ? formatDuration(step.durationMs) : "\u2014" }) })
9999
+ ] });
10000
+ }
10001
+ function ConfigPane({ config }) {
10002
+ const [expanded, setExpanded] = useState17(false);
10003
+ const json = JSON.stringify(config, null, 2);
10004
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 2, children: [
10005
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
10006
+ /* @__PURE__ */ jsx36(SectionTitle, { children: "Effective config" }),
10007
+ /* @__PURE__ */ jsx36(
10008
+ Button4,
10009
+ {
10010
+ fontSize: 1,
10011
+ icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
10012
+ mode: "bleed",
10013
+ onClick: () => setExpanded((prev) => !prev),
10014
+ padding: 1,
10015
+ text: expanded ? "Collapse" : "Expand"
10016
+ }
10017
+ )
10018
+ ] }),
10019
+ expanded && /* @__PURE__ */ jsxs28(Box22, { style: { position: "relative" }, children: [
10020
+ /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx36(
10021
+ "pre",
10022
+ {
10023
+ style: {
10024
+ fontFamily: "monospace",
10025
+ fontSize: 12,
10026
+ lineHeight: "1.5",
10027
+ margin: 0,
10028
+ maxHeight: 400,
10029
+ overflow: "auto",
10030
+ whiteSpace: "pre-wrap",
10031
+ wordBreak: "break-word"
10032
+ },
10033
+ children: json
10034
+ }
10035
+ ) }),
10036
+ /* @__PURE__ */ jsx36(
10037
+ CopyButton,
10038
+ {
10039
+ label: "Copy config",
10040
+ style: { position: "absolute", right: 8, top: 8 },
10041
+ text: json
10042
+ }
10043
+ )
10044
+ ] })
10045
+ ] });
10046
+ }
10047
+ function CacheTelemetry({
10048
+ cacheKeys,
10049
+ preview
10050
+ }) {
10051
+ const [expanded, setExpanded] = useState17(false);
10052
+ const count = cacheKeys.length || preview.cacheHits || 0;
10053
+ if (count === 0) return null;
10054
+ return /* @__PURE__ */ jsxs28(Stack24, { space: 2, children: [
10055
+ /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
10056
+ /* @__PURE__ */ jsx36(SectionTitle, { children: "Remote cache hits" }),
10057
+ /* @__PURE__ */ jsx36(Text32, { size: 2, children: count }),
10058
+ cacheKeys.length > 0 && /* @__PURE__ */ jsx36(
10059
+ Button4,
10060
+ {
10061
+ fontSize: 1,
10062
+ icon: expanded ? ChevronDownIcon2 : ChevronRightIcon2,
10063
+ mode: "bleed",
10064
+ onClick: () => setExpanded((prev) => !prev),
10065
+ padding: 1,
10066
+ text: expanded ? "Hide keys" : "Show keys"
10067
+ }
10068
+ )
10069
+ ] }),
10070
+ expanded && cacheKeys.length > 0 && /* @__PURE__ */ jsx36(Stack24, { space: 1, children: cacheKeys.map((k) => /* @__PURE__ */ jsx36(Text32, { size: 1, style: { fontFamily: "monospace" }, children: k }, k)) })
10071
+ ] });
10072
+ }
10073
+ function SectionTitle({ children }) {
10074
+ return /* @__PURE__ */ jsx36(
10075
+ Text32,
10076
+ {
10077
+ muted: true,
10078
+ size: 1,
10079
+ style: { letterSpacing: "0.05em", textTransform: "uppercase" },
10080
+ weight: "semibold",
10081
+ children
10082
+ }
10083
+ );
10084
+ }
10085
+
10086
+ // src/components/report-detail/ProvenanceCard.tsx
10087
+ import {
10088
+ Badge as Badge9,
10089
+ Button as Button5,
10090
+ Card as Card16,
10091
+ Flex as Flex22,
10092
+ Grid as Grid4,
10093
+ Inline as Inline2,
10094
+ Stack as Stack25,
10095
+ Text as Text33
10096
+ } from "@sanity/ui";
10097
+ import { useState as useState18 } from "react";
10098
+ import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
10099
+ var TASK_IDS_INLINE_THRESHOLD = 3;
10100
+ function ProvenanceCard({ provenance }) {
10101
+ return /* @__PURE__ */ jsx37(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs29(Stack25, { space: 4, children: [
10102
+ /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
10103
+ /* @__PURE__ */ jsx37(Text33, { size: 3, weight: "semibold", children: "Provenance" }),
10104
+ provenance.classification && /* @__PURE__ */ jsx37(ClassificationBadge, { value: provenance.classification }),
10105
+ provenance.owner?.team && provenance.owner.team !== "unknown" && /* @__PURE__ */ jsxs29(Badge9, { fontSize: 1, mode: "outline", tone: "primary", children: [
10106
+ "Team: ",
10107
+ provenance.owner.team
10108
+ ] }),
10109
+ provenance.executor && /* @__PURE__ */ jsx37(ExecutorBadge, { executor: provenance.executor })
10110
+ ] }),
10111
+ provenance.purpose && /* @__PURE__ */ jsx37(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs29(Stack25, { space: 2, children: [
10112
+ /* @__PURE__ */ jsx37(
10113
+ Text33,
10114
+ {
10115
+ muted: true,
10116
+ size: 1,
10117
+ style: {
10118
+ letterSpacing: "0.05em",
10119
+ textTransform: "uppercase"
10120
+ },
10121
+ weight: "semibold",
10122
+ children: "Purpose"
10123
+ }
10124
+ ),
10125
+ /* @__PURE__ */ jsx37(Text33, { size: 2, children: provenance.purpose })
10126
+ ] }) }),
10127
+ provenance.labels && provenance.labels.length > 0 && /* @__PURE__ */ jsx37(Inline2, { space: 2, children: provenance.labels.map((label) => /* @__PURE__ */ jsx37(Badge9, { fontSize: 1, mode: "outline", tone: "default", children: label }, label)) }),
10128
+ /* @__PURE__ */ jsxs29(Grid4, { columns: [1, 2, 3], gap: 4, children: [
10129
+ /* @__PURE__ */ jsx37(Field, { label: "Mode", value: provenance.mode }),
10130
+ /* @__PURE__ */ jsx37(Field, { label: "Source", value: provenance.source.name }),
10131
+ /* @__PURE__ */ jsx37(
9418
10132
  Field,
9419
10133
  {
9420
10134
  label: "Trigger",
9421
10135
  value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
9422
10136
  }
9423
10137
  ),
9424
- /* @__PURE__ */ jsx36(
10138
+ /* @__PURE__ */ jsx37(
9425
10139
  Field,
9426
10140
  {
9427
10141
  label: "Models",
9428
10142
  value: provenance.models.map((m) => m.label).join(", ")
9429
10143
  }
9430
10144
  ),
9431
- /* @__PURE__ */ jsx36(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
9432
- provenance.contextHash && /* @__PURE__ */ jsx36(
10145
+ /* @__PURE__ */ jsx37(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
10146
+ provenance.contextHash && /* @__PURE__ */ jsx37(
9433
10147
  Field,
9434
10148
  {
9435
10149
  label: "Context Hash",
9436
10150
  mono: true,
9437
10151
  value: provenance.contextHash.slice(0, 16) + "\u2026"
9438
10152
  }
9439
- )
10153
+ ),
10154
+ provenance.owner?.individual && /* @__PURE__ */ jsx37(
10155
+ Field,
10156
+ {
10157
+ label: "Owner (individual)",
10158
+ value: provenance.owner.individual
10159
+ }
10160
+ ),
10161
+ provenance.areas.length > 0 && /* @__PURE__ */ jsx37(Field, { label: "Areas", value: provenance.areas.join(", ") }),
10162
+ provenance.taskIds && provenance.taskIds.length > 0 && /* @__PURE__ */ jsx37(TaskIdsField, { taskIds: provenance.taskIds })
9440
10163
  ] }),
9441
- provenance.git && /* @__PURE__ */ jsx36(GitInfo, { git: provenance.git }),
9442
- /* @__PURE__ */ jsx36(PromptfooLinks, { provenance })
10164
+ provenance.git && /* @__PURE__ */ jsx37(GitInfo, { git: provenance.git }),
10165
+ /* @__PURE__ */ jsx37(ToolHostFooter, { tool: provenance.tool, host: provenance.host }),
10166
+ /* @__PURE__ */ jsx37(PromptfooLinks, { provenance })
9443
10167
  ] }) });
9444
10168
  }
10169
+ function ClassificationBadge({ value }) {
10170
+ const tone = classificationTone(value);
10171
+ return /* @__PURE__ */ jsx37(Badge9, { fontSize: 1, tone, children: value });
10172
+ }
10173
+ function classificationTone(value) {
10174
+ switch (value) {
10175
+ case "official":
10176
+ return "positive";
10177
+ case "external":
10178
+ return "primary";
10179
+ case "experimental":
10180
+ return "caution";
10181
+ case "test":
10182
+ return "critical";
10183
+ case "ad-hoc":
10184
+ default:
10185
+ return "default";
10186
+ }
10187
+ }
10188
+ function ExecutorBadge({
10189
+ executor
10190
+ }) {
10191
+ if (executor.type === "system") {
10192
+ const workflowSuffix = executor.workflow ? ` \xB7 ${executor.workflow}` : "";
10193
+ return /* @__PURE__ */ jsxs29(Badge9, { fontSize: 1, mode: "outline", children: [
10194
+ executor.name ?? "system",
10195
+ workflowSuffix
10196
+ ] });
10197
+ }
10198
+ const name = executor.name ?? executor.githubActor ?? "anonymous";
10199
+ const surface = executor.surface ? ` \xB7 ${executor.surface}` : "";
10200
+ return /* @__PURE__ */ jsxs29(Badge9, { fontSize: 1, mode: "outline", children: [
10201
+ name,
10202
+ surface
10203
+ ] });
10204
+ }
10205
+ function ToolHostFooter({
10206
+ tool,
10207
+ host
10208
+ }) {
10209
+ const parts = [];
10210
+ if (tool?.ailfVersion) parts.push(`ailf ${tool.ailfVersion}`);
10211
+ if (tool?.nodeVersion) parts.push(`node ${tool.nodeVersion}`);
10212
+ if (host?.platform) {
10213
+ parts.push(host.arch ? `${host.platform}/${host.arch}` : host.platform);
10214
+ }
10215
+ if (host?.ci) parts.push(`ci:${host.ci}`);
10216
+ if (parts.length === 0) return null;
10217
+ return /* @__PURE__ */ jsx37(Text33, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: parts.join(" \xB7 ") });
10218
+ }
9445
10219
  function Field({
9446
10220
  label,
9447
10221
  mono,
9448
10222
  value
9449
10223
  }) {
9450
- return /* @__PURE__ */ jsxs28(Stack24, { space: 1, children: [
9451
- /* @__PURE__ */ jsx36(
9452
- Text32,
10224
+ return /* @__PURE__ */ jsxs29(Stack25, { space: 1, children: [
10225
+ /* @__PURE__ */ jsx37(
10226
+ Text33,
9453
10227
  {
9454
10228
  muted: true,
9455
10229
  size: 1,
@@ -9458,7 +10232,46 @@ function Field({
9458
10232
  children: label
9459
10233
  }
9460
10234
  ),
9461
- /* @__PURE__ */ jsx36(Text32, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
10235
+ /* @__PURE__ */ jsx37(Text33, { size: 2, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
10236
+ ] });
10237
+ }
10238
+ function TaskIdsField({ taskIds }) {
10239
+ const [expanded, setExpanded] = useState18(false);
10240
+ const count = taskIds.length;
10241
+ const needsToggle = count > TASK_IDS_INLINE_THRESHOLD;
10242
+ const showList = !needsToggle || expanded;
10243
+ return /* @__PURE__ */ jsxs29(Stack25, { space: 1, children: [
10244
+ /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 2, children: [
10245
+ /* @__PURE__ */ jsx37(
10246
+ Text33,
10247
+ {
10248
+ muted: true,
10249
+ size: 1,
10250
+ style: {
10251
+ letterSpacing: "0.05em",
10252
+ textTransform: "uppercase"
10253
+ },
10254
+ weight: "semibold",
10255
+ children: "Tasks"
10256
+ }
10257
+ ),
10258
+ /* @__PURE__ */ jsxs29(Text33, { muted: true, size: 1, children: [
10259
+ "(",
10260
+ count,
10261
+ ")"
10262
+ ] })
10263
+ ] }),
10264
+ showList && /* @__PURE__ */ jsx37(Stack25, { space: 1, children: taskIds.map((id) => /* @__PURE__ */ jsx37(Text33, { size: 2, style: { fontFamily: "monospace" }, children: id }, id)) }),
10265
+ needsToggle && /* @__PURE__ */ jsx37(
10266
+ Button5,
10267
+ {
10268
+ fontSize: 1,
10269
+ mode: "bleed",
10270
+ onClick: () => setExpanded((prev) => !prev),
10271
+ padding: 1,
10272
+ text: expanded ? "Hide" : `Show all ${count}`
10273
+ }
10274
+ )
9462
10275
  ] });
9463
10276
  }
9464
10277
  function GitInfo({ git }) {
@@ -9466,15 +10279,15 @@ function GitInfo({ git }) {
9466
10279
  const branchUrl = `${repoUrl}/tree/${git.branch}`;
9467
10280
  const commitUrl = `${repoUrl}/commit/${git.sha}`;
9468
10281
  const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
9469
- return /* @__PURE__ */ jsx36(Card15, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
9470
- /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, weight: "semibold", children: "Git" }),
9471
- /* @__PURE__ */ jsxs28(Text32, { size: 2, children: [
9472
- /* @__PURE__ */ jsx36("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
10282
+ return /* @__PURE__ */ jsx37(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
10283
+ /* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, weight: "semibold", children: "Git" }),
10284
+ /* @__PURE__ */ jsxs29(Text33, { size: 2, children: [
10285
+ /* @__PURE__ */ jsx37("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
9473
10286
  " / ",
9474
- /* @__PURE__ */ jsx36("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
10287
+ /* @__PURE__ */ jsx37("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
9475
10288
  ] }),
9476
- /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx36("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
9477
- prUrl && /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
10289
+ /* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx37("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
10290
+ prUrl && /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
9478
10291
  "PR #",
9479
10292
  git.prNumber,
9480
10293
  " \u2192"
@@ -9485,14 +10298,14 @@ function PromptfooLinks({
9485
10298
  provenance
9486
10299
  }) {
9487
10300
  if (provenance.promptfooUrls && provenance.promptfooUrls.length > 0) {
9488
- return /* @__PURE__ */ jsx36(Flex21, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsxs28("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
10301
+ return /* @__PURE__ */ jsx37(Flex22, { align: "center", gap: 3, wrap: "wrap", children: provenance.promptfooUrls.map((entry) => /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsxs29("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
9489
10302
  "View in Promptfoo (",
9490
10303
  entry.mode,
9491
10304
  ") \u2192"
9492
10305
  ] }) }, entry.mode)) });
9493
10306
  }
9494
10307
  if (provenance.promptfooUrl) {
9495
- return /* @__PURE__ */ jsx36(Text32, { size: 2, children: /* @__PURE__ */ jsx36(
10308
+ return /* @__PURE__ */ jsx37(Text33, { size: 2, children: /* @__PURE__ */ jsx37(
9496
10309
  "a",
9497
10310
  {
9498
10311
  href: provenance.promptfooUrl,
@@ -9502,40 +10315,40 @@ function PromptfooLinks({
9502
10315
  }
9503
10316
  ) });
9504
10317
  }
9505
- return /* @__PURE__ */ jsx36(PromptfooUnavailable, { reason: "not-shared" });
10318
+ return /* @__PURE__ */ jsx37(PromptfooUnavailable, { reason: "not-shared" });
9506
10319
  }
9507
10320
  var UNAVAILABLE_TOOLTIPS = {
9508
10321
  "not-shared": "No Promptfoo share link was generated for this report. This usually means the evaluation was run locally without the --share flag."
9509
10322
  };
9510
10323
  function PromptfooUnavailable({ reason }) {
9511
- return /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 2, children: [
9512
- /* @__PURE__ */ jsx36(Text32, { muted: true, size: 2, children: "Promptfoo report not available" }),
9513
- /* @__PURE__ */ jsx36(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
10324
+ return /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 2, children: [
10325
+ /* @__PURE__ */ jsx37(Text33, { muted: true, size: 2, children: "Promptfoo report not available" }),
10326
+ /* @__PURE__ */ jsx37(InfoTip, { text: UNAVAILABLE_TOOLTIPS[reason] ?? "" })
9514
10327
  ] });
9515
10328
  }
9516
10329
 
9517
10330
  // src/components/report-detail/report-actions/ActionButton.tsx
9518
- import { Button as Button4, useToast as useToast2 } from "@sanity/ui";
9519
- import { jsx as jsx37 } from "react/jsx-runtime";
10331
+ import { Button as Button6, useToast as useToast2 } from "@sanity/ui";
10332
+ import { jsx as jsx38 } from "react/jsx-runtime";
9520
10333
 
9521
10334
  // src/components/report-detail/report-actions/JudgmentActions.tsx
9522
10335
  import { DocumentTextIcon, LinkIcon as LinkIcon3 } from "@sanity/icons";
9523
10336
  import { MenuDivider, MenuItem, useToast as useToast3 } from "@sanity/ui";
9524
- import { useCallback as useCallback23 } from "react";
10337
+ import { useCallback as useCallback24 } from "react";
9525
10338
 
9526
10339
  // src/components/report-detail/report-actions/SplitActionButton.tsx
9527
- import { ChevronDownIcon as ChevronDownIcon2 } from "@sanity/icons";
9528
- import { Button as Button5, Flex as Flex22, Menu, MenuButton } from "@sanity/ui";
9529
- import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
10340
+ import { ChevronDownIcon as ChevronDownIcon3 } from "@sanity/icons";
10341
+ import { Button as Button7, Flex as Flex23, Menu, MenuButton } from "@sanity/ui";
10342
+ import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
9530
10343
  function SplitActionButton({
9531
10344
  menu,
9532
10345
  menuId,
9533
10346
  placement = "bottom-end",
9534
10347
  primary
9535
10348
  }) {
9536
- return /* @__PURE__ */ jsxs29(Flex22, { children: [
9537
- /* @__PURE__ */ jsx38(
9538
- Button5,
10349
+ return /* @__PURE__ */ jsxs30(Flex23, { children: [
10350
+ /* @__PURE__ */ jsx39(
10351
+ Button7,
9539
10352
  {
9540
10353
  fontSize: primary.fontSize,
9541
10354
  icon: primary.icon,
@@ -9551,13 +10364,13 @@ function SplitActionButton({
9551
10364
  text: primary.text
9552
10365
  }
9553
10366
  ),
9554
- /* @__PURE__ */ jsx38(
10367
+ /* @__PURE__ */ jsx39(
9555
10368
  MenuButton,
9556
10369
  {
9557
- button: /* @__PURE__ */ jsx38(
9558
- Button5,
10370
+ button: /* @__PURE__ */ jsx39(
10371
+ Button7,
9559
10372
  {
9560
- icon: ChevronDownIcon2,
10373
+ icon: ChevronDownIcon3,
9561
10374
  mode: "ghost",
9562
10375
  padding: 2,
9563
10376
  style: {
@@ -9568,7 +10381,7 @@ function SplitActionButton({
9568
10381
  }
9569
10382
  ),
9570
10383
  id: menuId,
9571
- menu: /* @__PURE__ */ jsx38(Menu, { children: menu }),
10384
+ menu: /* @__PURE__ */ jsx39(Menu, { children: menu }),
9572
10385
  popover: { placement, portal: true }
9573
10386
  }
9574
10387
  )
@@ -9576,10 +10389,10 @@ function SplitActionButton({
9576
10389
  }
9577
10390
 
9578
10391
  // src/components/report-detail/report-actions/JudgmentActions.tsx
9579
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
10392
+ import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
9580
10393
  function JudgmentActions({ onShowPrompts } = {}) {
9581
10394
  const toast = useToast3();
9582
- const handleCopyLink = useCallback23(() => {
10395
+ const handleCopyLink = useCallback24(() => {
9583
10396
  navigator.clipboard.writeText(window.location.href).then(
9584
10397
  () => {
9585
10398
  toast.push({
@@ -9597,12 +10410,12 @@ function JudgmentActions({ onShowPrompts } = {}) {
9597
10410
  }
9598
10411
  );
9599
10412
  }, [toast]);
9600
- return /* @__PURE__ */ jsx39(
10413
+ return /* @__PURE__ */ jsx40(
9601
10414
  SplitActionButton,
9602
10415
  {
9603
- menu: /* @__PURE__ */ jsxs30(Fragment10, { children: [
9604
- onShowPrompts && /* @__PURE__ */ jsxs30(Fragment10, { children: [
9605
- /* @__PURE__ */ jsx39(
10416
+ menu: /* @__PURE__ */ jsxs31(Fragment11, { children: [
10417
+ onShowPrompts && /* @__PURE__ */ jsxs31(Fragment11, { children: [
10418
+ /* @__PURE__ */ jsx40(
9606
10419
  MenuItem,
9607
10420
  {
9608
10421
  icon: DocumentTextIcon,
@@ -9610,9 +10423,9 @@ function JudgmentActions({ onShowPrompts } = {}) {
9610
10423
  text: "Show prompts"
9611
10424
  }
9612
10425
  ),
9613
- /* @__PURE__ */ jsx39(MenuDivider, {})
10426
+ /* @__PURE__ */ jsx40(MenuDivider, {})
9614
10427
  ] }),
9615
- /* @__PURE__ */ jsx39(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
10428
+ /* @__PURE__ */ jsx40(MenuItem, { icon: LinkIcon3, onClick: handleCopyLink, text: "Copy link" })
9616
10429
  ] }),
9617
10430
  menuId: "judgment-actions-menu",
9618
10431
  primary: {
@@ -9629,20 +10442,20 @@ function JudgmentActions({ onShowPrompts } = {}) {
9629
10442
  // src/components/report-detail/report-actions/ReportActions.tsx
9630
10443
  import { CopyIcon as CopyIcon3 } from "@sanity/icons";
9631
10444
  import { MenuDivider as MenuDivider2, useToast as useToast9 } from "@sanity/ui";
9632
- import { useCallback as useCallback29, useState as useState20 } from "react";
10445
+ import { useCallback as useCallback30, useState as useState22 } from "react";
9633
10446
  import { useClient as useClient9 } from "sanity";
9634
10447
 
9635
10448
  // src/components/report-detail/report-actions/CopyReportAction.tsx
9636
10449
  import { ClipboardIcon } from "@sanity/icons";
9637
10450
  import { MenuItem as MenuItem2, useToast as useToast4 } from "@sanity/ui";
9638
- import { useCallback as useCallback24, useState as useState17 } from "react";
10451
+ import { useCallback as useCallback25, useState as useState19 } from "react";
9639
10452
  import { useClient as useClient6 } from "sanity";
9640
- import { jsx as jsx40 } from "react/jsx-runtime";
10453
+ import { jsx as jsx41 } from "react/jsx-runtime";
9641
10454
  function CopyReportAction({ documentId }) {
9642
10455
  const client = useClient6({ apiVersion: API_VERSION });
9643
10456
  const toast = useToast4();
9644
- const [copying, setCopying] = useState17(false);
9645
- const handleClick = useCallback24(async () => {
10457
+ const [copying, setCopying] = useState19(false);
10458
+ const handleClick = useCallback25(async () => {
9646
10459
  setCopying(true);
9647
10460
  try {
9648
10461
  const doc = await client.fetch(
@@ -9674,7 +10487,7 @@ function CopyReportAction({ documentId }) {
9674
10487
  setCopying(false);
9675
10488
  }
9676
10489
  }, [client, documentId, toast]);
9677
- return /* @__PURE__ */ jsx40(
10490
+ return /* @__PURE__ */ jsx41(
9678
10491
  MenuItem2,
9679
10492
  {
9680
10493
  disabled: copying,
@@ -9688,11 +10501,11 @@ function CopyReportAction({ documentId }) {
9688
10501
  // src/components/report-detail/report-actions/CopyReportIdAction.tsx
9689
10502
  import { CopyIcon as CopyIcon2 } from "@sanity/icons";
9690
10503
  import { MenuItem as MenuItem3, useToast as useToast5 } from "@sanity/ui";
9691
- import { useCallback as useCallback25 } from "react";
9692
- import { jsx as jsx41 } from "react/jsx-runtime";
10504
+ import { useCallback as useCallback26 } from "react";
10505
+ import { jsx as jsx42 } from "react/jsx-runtime";
9693
10506
  function CopyReportIdAction({ reportId }) {
9694
10507
  const toast = useToast5();
9695
- const handleClick = useCallback25(() => {
10508
+ const handleClick = useCallback26(() => {
9696
10509
  navigator.clipboard.writeText(reportId).then(
9697
10510
  () => {
9698
10511
  toast.push({
@@ -9710,19 +10523,19 @@ function CopyReportIdAction({ reportId }) {
9710
10523
  }
9711
10524
  );
9712
10525
  }, [reportId, toast]);
9713
- return /* @__PURE__ */ jsx41(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
10526
+ return /* @__PURE__ */ jsx42(MenuItem3, { icon: CopyIcon2, onClick: handleClick, text: "Copy report ID" });
9714
10527
  }
9715
10528
 
9716
10529
  // src/components/report-detail/report-actions/CopyVisionQueryAction.tsx
9717
10530
  import { SearchIcon as SearchIcon6 } from "@sanity/icons";
9718
10531
  import { MenuItem as MenuItem4, useToast as useToast6 } from "@sanity/ui";
9719
- import { useCallback as useCallback26 } from "react";
9720
- import { jsx as jsx42 } from "react/jsx-runtime";
10532
+ import { useCallback as useCallback27 } from "react";
10533
+ import { jsx as jsx43 } from "react/jsx-runtime";
9721
10534
  function CopyVisionQueryAction({
9722
10535
  reportId
9723
10536
  }) {
9724
10537
  const toast = useToast6();
9725
- const handleClick = useCallback26(() => {
10538
+ const handleClick = useCallback27(() => {
9726
10539
  const query = `*[_type == "ailf.report" && reportId == "${reportId}"][0]`;
9727
10540
  navigator.clipboard.writeText(query).then(
9728
10541
  () => {
@@ -9742,7 +10555,7 @@ function CopyVisionQueryAction({
9742
10555
  }
9743
10556
  );
9744
10557
  }, [reportId, toast]);
9745
- return /* @__PURE__ */ jsx42(
10558
+ return /* @__PURE__ */ jsx43(
9746
10559
  MenuItem4,
9747
10560
  {
9748
10561
  icon: SearchIcon6,
@@ -9753,25 +10566,25 @@ function CopyVisionQueryAction({
9753
10566
  }
9754
10567
 
9755
10568
  // src/components/report-detail/report-actions/DeleteConfirmDialog.tsx
9756
- import { Box as Box22, Button as Button6, Card as Card16, Dialog as Dialog2, Flex as Flex23, Stack as Stack25, Text as Text33 } from "@sanity/ui";
9757
- import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
10569
+ import { Box as Box23, Button as Button8, Card as Card17, Dialog as Dialog2, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10570
+ import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
9758
10571
  function DeleteConfirmDialog({
9759
10572
  isDeleting,
9760
10573
  onClose,
9761
10574
  onConfirm,
9762
10575
  reportId
9763
10576
  }) {
9764
- return /* @__PURE__ */ jsx43(
10577
+ return /* @__PURE__ */ jsx44(
9765
10578
  Dialog2,
9766
10579
  {
9767
10580
  header: "Delete Report",
9768
10581
  id: "delete-report-dialog",
9769
10582
  onClose,
9770
10583
  width: 1,
9771
- children: /* @__PURE__ */ jsx43(Box22, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack25, { space: 4, children: [
9772
- /* @__PURE__ */ jsx43(Text33, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
9773
- /* @__PURE__ */ jsx43(Card16, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx43(
9774
- Text33,
10584
+ children: /* @__PURE__ */ jsx44(Box23, { padding: 4, children: /* @__PURE__ */ jsxs32(Stack26, { space: 4, children: [
10585
+ /* @__PURE__ */ jsx44(Text34, { children: "Are you sure you want to delete this report? This action cannot be undone." }),
10586
+ /* @__PURE__ */ jsx44(Card17, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx44(
10587
+ Text34,
9775
10588
  {
9776
10589
  muted: true,
9777
10590
  size: 1,
@@ -9779,9 +10592,9 @@ function DeleteConfirmDialog({
9779
10592
  children: reportId
9780
10593
  }
9781
10594
  ) }),
9782
- /* @__PURE__ */ jsxs31(Flex23, { gap: 2, justify: "flex-end", children: [
9783
- /* @__PURE__ */ jsx43(
9784
- Button6,
10595
+ /* @__PURE__ */ jsxs32(Flex24, { gap: 2, justify: "flex-end", children: [
10596
+ /* @__PURE__ */ jsx44(
10597
+ Button8,
9785
10598
  {
9786
10599
  disabled: isDeleting,
9787
10600
  mode: "ghost",
@@ -9789,8 +10602,8 @@ function DeleteConfirmDialog({
9789
10602
  text: "Cancel"
9790
10603
  }
9791
10604
  ),
9792
- /* @__PURE__ */ jsx43(
9793
- Button6,
10605
+ /* @__PURE__ */ jsx44(
10606
+ Button8,
9794
10607
  {
9795
10608
  disabled: isDeleting,
9796
10609
  onClick: onConfirm,
@@ -9807,11 +10620,11 @@ function DeleteConfirmDialog({
9807
10620
  // src/components/report-detail/report-actions/DeleteReportAction.tsx
9808
10621
  import { TrashIcon } from "@sanity/icons";
9809
10622
  import { MenuItem as MenuItem5 } from "@sanity/ui";
9810
- import { jsx as jsx44 } from "react/jsx-runtime";
10623
+ import { jsx as jsx45 } from "react/jsx-runtime";
9811
10624
  function DeleteReportAction({
9812
10625
  onRequestDelete
9813
10626
  }) {
9814
- return /* @__PURE__ */ jsx44(
10627
+ return /* @__PURE__ */ jsx45(
9815
10628
  MenuItem5,
9816
10629
  {
9817
10630
  icon: TrashIcon,
@@ -9825,17 +10638,17 @@ function DeleteReportAction({
9825
10638
  // src/components/report-detail/report-actions/DownloadReportAction.tsx
9826
10639
  import { DownloadIcon } from "@sanity/icons";
9827
10640
  import { MenuItem as MenuItem6, useToast as useToast7 } from "@sanity/ui";
9828
- import { useCallback as useCallback27, useState as useState18 } from "react";
10641
+ import { useCallback as useCallback28, useState as useState20 } from "react";
9829
10642
  import { useClient as useClient7 } from "sanity";
9830
- import { jsx as jsx45 } from "react/jsx-runtime";
10643
+ import { jsx as jsx46 } from "react/jsx-runtime";
9831
10644
  function DownloadReportAction({
9832
10645
  documentId,
9833
10646
  reportId
9834
10647
  }) {
9835
10648
  const client = useClient7({ apiVersion: API_VERSION });
9836
10649
  const toast = useToast7();
9837
- const [downloading, setDownloading] = useState18(false);
9838
- const handleClick = useCallback27(async () => {
10650
+ const [downloading, setDownloading] = useState20(false);
10651
+ const handleClick = useCallback28(async () => {
9839
10652
  setDownloading(true);
9840
10653
  try {
9841
10654
  const doc = await client.fetch(
@@ -9875,7 +10688,7 @@ function DownloadReportAction({
9875
10688
  setDownloading(false);
9876
10689
  }
9877
10690
  }, [client, documentId, reportId, toast]);
9878
- return /* @__PURE__ */ jsx45(
10691
+ return /* @__PURE__ */ jsx46(
9879
10692
  MenuItem6,
9880
10693
  {
9881
10694
  disabled: downloading,
@@ -9889,7 +10702,7 @@ function DownloadReportAction({
9889
10702
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9890
10703
  import { PlayIcon as PlayIcon2 } from "@sanity/icons";
9891
10704
  import { MenuItem as MenuItem7, useToast as useToast8 } from "@sanity/ui";
9892
- import { useCallback as useCallback28, useState as useState19 } from "react";
10705
+ import { useCallback as useCallback29, useState as useState21 } from "react";
9893
10706
  import { useClient as useClient8, useCurrentUser as useCurrentUser3 } from "sanity";
9894
10707
 
9895
10708
  // src/lib/eval-scope.ts
@@ -9905,7 +10718,7 @@ function extractEvalScope(provenance) {
9905
10718
  }
9906
10719
 
9907
10720
  // src/components/report-detail/report-actions/RerunEvaluationAction.tsx
9908
- import { jsx as jsx46 } from "react/jsx-runtime";
10721
+ import { jsx as jsx47 } from "react/jsx-runtime";
9909
10722
  var EVAL_REQUEST_TYPE2 = "ailf.evalRequest";
9910
10723
  function slugify2(s) {
9911
10724
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
@@ -9944,8 +10757,8 @@ function RerunEvaluationAction({
9944
10757
  const client = useClient8({ apiVersion: API_VERSION });
9945
10758
  const currentUser = useCurrentUser3();
9946
10759
  const toast = useToast8();
9947
- const [requesting, setRequesting] = useState19(false);
9948
- const handleClick = useCallback28(async () => {
10760
+ const [requesting, setRequesting] = useState21(false);
10761
+ const handleClick = useCallback29(async () => {
9949
10762
  setRequesting(true);
9950
10763
  try {
9951
10764
  const scope = extractEvalScope(provenance);
@@ -9972,7 +10785,7 @@ function RerunEvaluationAction({
9972
10785
  setRequesting(false);
9973
10786
  }
9974
10787
  }, [client, currentUser?.id, provenance, reportId, toast]);
9975
- return /* @__PURE__ */ jsx46(
10788
+ return /* @__PURE__ */ jsx47(
9976
10789
  MenuItem7,
9977
10790
  {
9978
10791
  disabled: requesting,
@@ -9984,7 +10797,7 @@ function RerunEvaluationAction({
9984
10797
  }
9985
10798
 
9986
10799
  // src/components/report-detail/report-actions/ReportActions.tsx
9987
- import { Fragment as Fragment11, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
10800
+ import { Fragment as Fragment12, jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
9988
10801
  function ReportActions({
9989
10802
  documentId,
9990
10803
  onDeleted,
@@ -9993,7 +10806,7 @@ function ReportActions({
9993
10806
  }) {
9994
10807
  const client = useClient9({ apiVersion: API_VERSION });
9995
10808
  const toast = useToast9();
9996
- const handleCopyId = useCallback29(() => {
10809
+ const handleCopyId = useCallback30(() => {
9997
10810
  navigator.clipboard.writeText(reportId).then(
9998
10811
  () => {
9999
10812
  toast.push({
@@ -10011,15 +10824,15 @@ function ReportActions({
10011
10824
  }
10012
10825
  );
10013
10826
  }, [reportId, toast]);
10014
- const [deleteDialogOpen, setDeleteDialogOpen] = useState20(false);
10015
- const [deleting, setDeleting] = useState20(false);
10016
- const handleRequestDelete = useCallback29(() => {
10827
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState22(false);
10828
+ const [deleting, setDeleting] = useState22(false);
10829
+ const handleRequestDelete = useCallback30(() => {
10017
10830
  setDeleteDialogOpen(true);
10018
10831
  }, []);
10019
- const handleDeleteClose = useCallback29(() => {
10832
+ const handleDeleteClose = useCallback30(() => {
10020
10833
  if (!deleting) setDeleteDialogOpen(false);
10021
10834
  }, [deleting]);
10022
- const handleDeleteConfirm = useCallback29(async () => {
10835
+ const handleDeleteConfirm = useCallback30(async () => {
10023
10836
  setDeleting(true);
10024
10837
  try {
10025
10838
  await client.delete(documentId);
@@ -10040,25 +10853,25 @@ function ReportActions({
10040
10853
  setDeleting(false);
10041
10854
  }
10042
10855
  }, [client, documentId, onDeleted, toast]);
10043
- return /* @__PURE__ */ jsxs32(Fragment11, { children: [
10044
- /* @__PURE__ */ jsx47(
10856
+ return /* @__PURE__ */ jsxs33(Fragment12, { children: [
10857
+ /* @__PURE__ */ jsx48(
10045
10858
  SplitActionButton,
10046
10859
  {
10047
- menu: /* @__PURE__ */ jsxs32(Fragment11, { children: [
10048
- /* @__PURE__ */ jsx47(CopyReportIdAction, { reportId }),
10049
- /* @__PURE__ */ jsx47(
10860
+ menu: /* @__PURE__ */ jsxs33(Fragment12, { children: [
10861
+ /* @__PURE__ */ jsx48(CopyReportIdAction, { reportId }),
10862
+ /* @__PURE__ */ jsx48(
10050
10863
  RerunEvaluationAction,
10051
10864
  {
10052
10865
  provenance,
10053
10866
  reportId
10054
10867
  }
10055
10868
  ),
10056
- /* @__PURE__ */ jsx47(MenuDivider2, {}),
10057
- /* @__PURE__ */ jsx47(DownloadReportAction, { documentId, reportId }),
10058
- /* @__PURE__ */ jsx47(CopyReportAction, { documentId }),
10059
- /* @__PURE__ */ jsx47(CopyVisionQueryAction, { reportId }),
10060
- /* @__PURE__ */ jsx47(MenuDivider2, {}),
10061
- /* @__PURE__ */ jsx47(DeleteReportAction, { onRequestDelete: handleRequestDelete })
10869
+ /* @__PURE__ */ jsx48(MenuDivider2, {}),
10870
+ /* @__PURE__ */ jsx48(DownloadReportAction, { documentId, reportId }),
10871
+ /* @__PURE__ */ jsx48(CopyReportAction, { documentId }),
10872
+ /* @__PURE__ */ jsx48(CopyVisionQueryAction, { reportId }),
10873
+ /* @__PURE__ */ jsx48(MenuDivider2, {}),
10874
+ /* @__PURE__ */ jsx48(DeleteReportAction, { onRequestDelete: handleRequestDelete })
10062
10875
  ] }),
10063
10876
  menuId: "report-actions-menu",
10064
10877
  primary: {
@@ -10068,7 +10881,7 @@ function ReportActions({
10068
10881
  }
10069
10882
  }
10070
10883
  ),
10071
- deleteDialogOpen && /* @__PURE__ */ jsx47(
10884
+ deleteDialogOpen && /* @__PURE__ */ jsx48(
10072
10885
  DeleteConfirmDialog,
10073
10886
  {
10074
10887
  isDeleting: deleting,
@@ -10082,8 +10895,8 @@ function ReportActions({
10082
10895
 
10083
10896
  // src/components/report-detail/ReportHeader.tsx
10084
10897
  import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
10085
- import { Button as Button7, Flex as Flex24, Stack as Stack26, Text as Text34 } from "@sanity/ui";
10086
- import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
10898
+ import { Button as Button9, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10899
+ import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
10087
10900
  function ReportHeader({
10088
10901
  completedAt,
10089
10902
  onBack,
@@ -10093,11 +10906,11 @@ function ReportHeader({
10093
10906
  const dateLabel = formatCardDate(completedAt);
10094
10907
  const displayTitle = title ?? tag ?? dateLabel;
10095
10908
  const hasSubtitle = Boolean(title ?? tag);
10096
- return /* @__PURE__ */ jsxs33(Flex24, { align: "center", gap: 3, children: [
10097
- /* @__PURE__ */ jsx48(Button7, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
10098
- /* @__PURE__ */ jsxs33(Stack26, { flex: 1, space: 1, children: [
10099
- /* @__PURE__ */ jsx48(Text34, { size: 4, weight: "bold", children: displayTitle }),
10100
- hasSubtitle && /* @__PURE__ */ jsx48(Text34, { muted: true, size: 2, children: dateLabel })
10909
+ return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 3, children: [
10910
+ /* @__PURE__ */ jsx49(Button9, { icon: ArrowLeftIcon2, mode: "bleed", onClick: onBack, text: "Back" }),
10911
+ /* @__PURE__ */ jsxs34(Stack27, { flex: 1, space: 1, children: [
10912
+ /* @__PURE__ */ jsx49(Text35, { size: 4, weight: "bold", children: displayTitle }),
10913
+ hasSubtitle && /* @__PURE__ */ jsx49(Text35, { muted: true, size: 2, children: dateLabel })
10101
10914
  ] })
10102
10915
  ] });
10103
10916
  }
@@ -10105,17 +10918,17 @@ function ReportHeader({
10105
10918
  // src/components/report-detail/StrengthsList.tsx
10106
10919
  import { useMemo as useMemo14 } from "react";
10107
10920
  import { CheckmarkCircleIcon as CheckmarkCircleIcon2, SearchIcon as SearchIcon7 } from "@sanity/icons";
10108
- import { Box as Box24, Flex as Flex27, Stack as Stack28, Text as Text37 } from "@sanity/ui";
10921
+ import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
10109
10922
 
10110
10923
  // src/components/report-detail/AreaScoresGrid.tsx
10111
10924
  import React3, {
10112
- useCallback as useCallback30,
10925
+ useCallback as useCallback31,
10113
10926
  useMemo as useMemo12,
10114
- useState as useState21
10927
+ useState as useState23
10115
10928
  } from "react";
10116
10929
  import { WarningOutlineIcon as WarningOutlineIcon2 } from "@sanity/icons";
10117
- import { Box as Box23, Flex as Flex25, Stack as Stack27, Text as Text35 } from "@sanity/ui";
10118
- import { Fragment as Fragment12, jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
10930
+ import { Box as Box24, Flex as Flex26, Stack as Stack28, Text as Text36 } from "@sanity/ui";
10931
+ import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
10119
10932
  var DIMENSION_TOOLTIPS2 = {
10120
10933
  agentOutput: "Quality and completeness of the agent's output. Graded 0\u2013100.",
10121
10934
  assertionPassRate: "Fraction of structural assertions that passed. Graded 0\u2013100.",
@@ -10161,9 +10974,9 @@ function AreaScoresGrid({
10161
10974
  );
10162
10975
  const showLift = isLiteracyMode(mode);
10163
10976
  const dimKeys = useMemo12(() => collectDimensionKeys(scores), [scores]);
10164
- const [sortField, setSortField] = useState21("score");
10165
- const [sortDir, setSortDir] = useState21("desc");
10166
- const handleSort = useCallback30(
10977
+ const [sortField, setSortField] = useState23("score");
10978
+ const [sortDir, setSortDir] = useState23("desc");
10979
+ const handleSort = useCallback31(
10167
10980
  (field) => {
10168
10981
  if (field === sortField) {
10169
10982
  setSortDir((d) => d === "asc" ? "desc" : "asc");
@@ -10207,8 +11020,8 @@ function AreaScoresGrid({
10207
11020
  }
10208
11021
  return map;
10209
11022
  }, [perModel]);
10210
- return /* @__PURE__ */ jsxs34(Box23, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
10211
- /* @__PURE__ */ jsxs34(
11023
+ return /* @__PURE__ */ jsxs35(Box24, { ref: containerRef, style: { ...neutralCardStyle, overflow: "auto" }, children: [
11024
+ /* @__PURE__ */ jsxs35(
10212
11025
  "div",
10213
11026
  {
10214
11027
  style: {
@@ -10224,7 +11037,7 @@ function AreaScoresGrid({
10224
11037
  padding: "12px 16px 8px"
10225
11038
  },
10226
11039
  children: [
10227
- /* @__PURE__ */ jsx49(
11040
+ /* @__PURE__ */ jsx50(
10228
11041
  ColHeader2,
10229
11042
  {
10230
11043
  active: sortField === "score",
@@ -10234,7 +11047,7 @@ function AreaScoresGrid({
10234
11047
  tooltip: GLOSSARY.score
10235
11048
  }
10236
11049
  ),
10237
- /* @__PURE__ */ jsx49(
11050
+ /* @__PURE__ */ jsx50(
10238
11051
  ColHeader2,
10239
11052
  {
10240
11053
  active: sortField === "area",
@@ -10243,7 +11056,7 @@ function AreaScoresGrid({
10243
11056
  onClick: () => handleSort("area")
10244
11057
  }
10245
11058
  ),
10246
- dimKeys.map((key) => /* @__PURE__ */ jsx49(
11059
+ dimKeys.map((key) => /* @__PURE__ */ jsx50(
10247
11060
  ColHeader2,
10248
11061
  {
10249
11062
  active: sortField === key,
@@ -10254,7 +11067,7 @@ function AreaScoresGrid({
10254
11067
  },
10255
11068
  key
10256
11069
  )),
10257
- tier !== "narrow" && showLift && /* @__PURE__ */ jsx49(
11070
+ tier !== "narrow" && showLift && /* @__PURE__ */ jsx50(
10258
11071
  ColHeader2,
10259
11072
  {
10260
11073
  active: sortField === "lift",
@@ -10264,12 +11077,12 @@ function AreaScoresGrid({
10264
11077
  tooltip: GLOSSARY.docLift
10265
11078
  }
10266
11079
  ),
10267
- tier === "full" && hasActual && /* @__PURE__ */ jsx49(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
11080
+ tier === "full" && hasActual && /* @__PURE__ */ jsx50(ColHeader2, { label: "Actual", tooltip: GLOSSARY.actualScore })
10268
11081
  ]
10269
11082
  }
10270
11083
  ),
10271
- sorted.map((area) => /* @__PURE__ */ jsxs34(React3.Fragment, { children: [
10272
- /* @__PURE__ */ jsx49(
11084
+ sorted.map((area) => /* @__PURE__ */ jsxs35(React3.Fragment, { children: [
11085
+ /* @__PURE__ */ jsx50(
10273
11086
  AreaRow,
10274
11087
  {
10275
11088
  area,
@@ -10280,7 +11093,7 @@ function AreaScoresGrid({
10280
11093
  tier
10281
11094
  }
10282
11095
  ),
10283
- modelScoresByFeature && /* @__PURE__ */ jsx49(
11096
+ modelScoresByFeature && /* @__PURE__ */ jsx50(
10284
11097
  ModelSubRows,
10285
11098
  {
10286
11099
  dimKeys,
@@ -10301,7 +11114,7 @@ function ModelSubRows({
10301
11114
  tier
10302
11115
  }) {
10303
11116
  if (!models || models.length === 0) return null;
10304
- return /* @__PURE__ */ jsx49(Fragment12, { children: models.map((entry) => /* @__PURE__ */ jsx49(
11117
+ return /* @__PURE__ */ jsx50(Fragment13, { children: models.map((entry) => /* @__PURE__ */ jsx50(
10305
11118
  ModelRow2,
10306
11119
  {
10307
11120
  dimKeys,
@@ -10323,7 +11136,7 @@ function ModelRow2({
10323
11136
  tier
10324
11137
  }) {
10325
11138
  const isNarrow = tier === "narrow";
10326
- return /* @__PURE__ */ jsxs34(
11139
+ return /* @__PURE__ */ jsxs35(
10327
11140
  "div",
10328
11141
  {
10329
11142
  style: {
@@ -10341,8 +11154,8 @@ function ModelRow2({
10341
11154
  padding: isNarrow ? "6px 12px 6px 20px" : "6px 16px 6px 28px"
10342
11155
  },
10343
11156
  children: [
10344
- /* @__PURE__ */ jsx49(Flex25, { align: "center", children: /* @__PURE__ */ jsx49(
10345
- Text35,
11157
+ /* @__PURE__ */ jsx50(Flex26, { align: "center", children: /* @__PURE__ */ jsx50(
11158
+ Text36,
10346
11159
  {
10347
11160
  size: 1,
10348
11161
  style: {
@@ -10353,8 +11166,8 @@ function ModelRow2({
10353
11166
  children: Math.round(scores.totalScore)
10354
11167
  }
10355
11168
  ) }),
10356
- /* @__PURE__ */ jsx49(Flex25, { align: "center", gap: 2, children: /* @__PURE__ */ jsx49(Text35, { muted: true, size: 1, children: label }) }),
10357
- dimKeys.map((key) => /* @__PURE__ */ jsx49(
11169
+ /* @__PURE__ */ jsx50(Flex26, { align: "center", gap: 2, children: /* @__PURE__ */ jsx50(Text36, { muted: true, size: 1, children: label }) }),
11170
+ dimKeys.map((key) => /* @__PURE__ */ jsx50(
10358
11171
  DimCell,
10359
11172
  {
10360
11173
  area: label,
@@ -10364,8 +11177,8 @@ function ModelRow2({
10364
11177
  },
10365
11178
  key
10366
11179
  )),
10367
- !isNarrow && showLift && /* @__PURE__ */ jsxs34(
10368
- Text35,
11180
+ !isNarrow && showLift && /* @__PURE__ */ jsxs35(
11181
+ Text36,
10369
11182
  {
10370
11183
  size: 1,
10371
11184
  style: {
@@ -10379,8 +11192,8 @@ function ModelRow2({
10379
11192
  ]
10380
11193
  }
10381
11194
  ),
10382
- tier === "full" && hasActual && /* @__PURE__ */ jsx49(
10383
- Text35,
11195
+ tier === "full" && hasActual && /* @__PURE__ */ jsx50(
11196
+ Text36,
10384
11197
  {
10385
11198
  size: 1,
10386
11199
  style: {
@@ -10404,7 +11217,7 @@ function AreaRow({
10404
11217
  tier
10405
11218
  }) {
10406
11219
  const isNarrow = tier === "narrow";
10407
- return /* @__PURE__ */ jsxs34(
11220
+ return /* @__PURE__ */ jsxs35(
10408
11221
  "div",
10409
11222
  {
10410
11223
  style: {
@@ -10421,15 +11234,15 @@ function AreaRow({
10421
11234
  padding: isNarrow ? "8px 12px" : "10px 16px"
10422
11235
  },
10423
11236
  children: [
10424
- /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: isNarrow ? 0 : 2, children: [
10425
- /* @__PURE__ */ jsx49(
11237
+ /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: isNarrow ? 0 : 2, children: [
11238
+ /* @__PURE__ */ jsx50(
10426
11239
  HoverTip,
10427
11240
  {
10428
- text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10429
- /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
11241
+ text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
11242
+ /* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area.feature }),
10430
11243
  " score:",
10431
11244
  " ",
10432
- /* @__PURE__ */ jsx49(
11245
+ /* @__PURE__ */ jsx50(
10433
11246
  "span",
10434
11247
  {
10435
11248
  style: {
@@ -10440,12 +11253,12 @@ function AreaRow({
10440
11253
  children: Math.round(area.totalScore)
10441
11254
  }
10442
11255
  ),
10443
- /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11256
+ /* @__PURE__ */ jsx50("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10444
11257
  ".",
10445
11258
  " ",
10446
11259
  GLOSSARY.score
10447
11260
  ] }),
10448
- children: /* @__PURE__ */ jsx49(
11261
+ children: /* @__PURE__ */ jsx50(
10449
11262
  "div",
10450
11263
  {
10451
11264
  style: {
@@ -10466,11 +11279,11 @@ function AreaRow({
10466
11279
  )
10467
11280
  }
10468
11281
  ),
10469
- !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx49(DeltaIndicator, { delta, icon: true, size: 1 }) })
11282
+ !isNarrow && delta != null && delta !== 0 && /* @__PURE__ */ jsx50(HoverTip, { text: GLOSSARY.areaDelta, children: /* @__PURE__ */ jsx50(DeltaIndicator, { delta, icon: true, size: 1 }) })
10470
11283
  ] }),
10471
- /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 2, wrap: "wrap", children: [
10472
- /* @__PURE__ */ jsx49(Text35, { size: 2, weight: "medium", children: area.feature }),
10473
- area.negativeDocLift && showLift && /* @__PURE__ */ jsx49(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx49(
11284
+ /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 2, wrap: "wrap", children: [
11285
+ /* @__PURE__ */ jsx50(Text36, { size: 2, weight: "medium", children: area.feature }),
11286
+ area.negativeDocLift && showLift && /* @__PURE__ */ jsx50(HoverTip, { text: GLOSSARY.docsHurt, children: /* @__PURE__ */ jsx50(
10474
11287
  "span",
10475
11288
  {
10476
11289
  style: {
@@ -10483,11 +11296,11 @@ function AreaRow({
10483
11296
  gap: 3,
10484
11297
  padding: "1px 5px"
10485
11298
  },
10486
- children: /* @__PURE__ */ jsx49(WarningOutlineIcon2, {})
11299
+ children: /* @__PURE__ */ jsx50(WarningOutlineIcon2, {})
10487
11300
  }
10488
11301
  ) })
10489
11302
  ] }),
10490
- dimKeys.map((key) => /* @__PURE__ */ jsx49(
11303
+ dimKeys.map((key) => /* @__PURE__ */ jsx50(
10491
11304
  DimCell,
10492
11305
  {
10493
11306
  area: area.feature,
@@ -10496,14 +11309,14 @@ function AreaRow({
10496
11309
  },
10497
11310
  key
10498
11311
  )),
10499
- !isNarrow && showLift && /* @__PURE__ */ jsx49(
11312
+ !isNarrow && showLift && /* @__PURE__ */ jsx50(
10500
11313
  HoverTip,
10501
11314
  {
10502
- text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10503
- /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area.feature }),
11315
+ text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
11316
+ /* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area.feature }),
10504
11317
  " doc lift:",
10505
11318
  " ",
10506
- /* @__PURE__ */ jsxs34(
11319
+ /* @__PURE__ */ jsxs35(
10507
11320
  "span",
10508
11321
  {
10509
11322
  style: {
@@ -10521,8 +11334,8 @@ function AreaRow({
10521
11334
  "pts. ",
10522
11335
  GLOSSARY.docLift
10523
11336
  ] }),
10524
- children: /* @__PURE__ */ jsxs34(
10525
- Text35,
11337
+ children: /* @__PURE__ */ jsxs35(
11338
+ Text36,
10526
11339
  {
10527
11340
  size: 2,
10528
11341
  style: {
@@ -10538,12 +11351,12 @@ function AreaRow({
10538
11351
  )
10539
11352
  }
10540
11353
  ),
10541
- tier === "full" && hasActual && /* @__PURE__ */ jsx49(
11354
+ tier === "full" && hasActual && /* @__PURE__ */ jsx50(
10542
11355
  HoverTip,
10543
11356
  {
10544
11357
  text: area.actualScore != null ? `${area.feature} actual score: ${Math.round(area.actualScore)}/100. ${GLOSSARY.actualScore}` : `No agentic data for ${area.feature}.`,
10545
- children: /* @__PURE__ */ jsx49(
10546
- Text35,
11358
+ children: /* @__PURE__ */ jsx50(
11359
+ Text36,
10547
11360
  {
10548
11361
  size: 2,
10549
11362
  style: {
@@ -10572,17 +11385,17 @@ function DimCell({
10572
11385
  const tooltip = dimKey ? DIMENSION_TOOLTIPS2[dimKey] : "";
10573
11386
  const textSize = size === "small" ? 0 : 1;
10574
11387
  const barHeight = size === "small" ? 3 : 4;
10575
- return /* @__PURE__ */ jsx49(
11388
+ return /* @__PURE__ */ jsx50(
10576
11389
  HoverTip,
10577
11390
  {
10578
- text: /* @__PURE__ */ jsxs34(Text35, { size: 2, style: { lineHeight: 1.5 }, children: [
10579
- /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: area }),
11391
+ text: /* @__PURE__ */ jsxs35(Text36, { size: 2, style: { lineHeight: 1.5 }, children: [
11392
+ /* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: area }),
10580
11393
  " \u2192",
10581
11394
  " ",
10582
- /* @__PURE__ */ jsx49("span", { style: { fontWeight: 600 }, children: dim }),
11395
+ /* @__PURE__ */ jsx50("span", { style: { fontWeight: 600 }, children: dim }),
10583
11396
  ":",
10584
11397
  " ",
10585
- /* @__PURE__ */ jsx49(
11398
+ /* @__PURE__ */ jsx50(
10586
11399
  "span",
10587
11400
  {
10588
11401
  style: {
@@ -10593,14 +11406,14 @@ function DimCell({
10593
11406
  children: Math.round(value)
10594
11407
  }
10595
11408
  ),
10596
- /* @__PURE__ */ jsx49("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11409
+ /* @__PURE__ */ jsx50("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
10597
11410
  ".",
10598
11411
  " ",
10599
11412
  tooltip
10600
11413
  ] }),
10601
- children: /* @__PURE__ */ jsxs34(Stack27, { space: 1, style: { width: "100%" }, children: [
10602
- /* @__PURE__ */ jsx49(
10603
- Text35,
11414
+ children: /* @__PURE__ */ jsxs35(Stack28, { space: 1, style: { width: "100%" }, children: [
11415
+ /* @__PURE__ */ jsx50(
11416
+ Text36,
10604
11417
  {
10605
11418
  size: textSize,
10606
11419
  style: {
@@ -10611,7 +11424,7 @@ function DimCell({
10611
11424
  children: Math.round(value)
10612
11425
  }
10613
11426
  ),
10614
- /* @__PURE__ */ jsx49(
11427
+ /* @__PURE__ */ jsx50(
10615
11428
  "div",
10616
11429
  {
10617
11430
  style: {
@@ -10621,7 +11434,7 @@ function DimCell({
10621
11434
  overflow: "hidden",
10622
11435
  width: "100%"
10623
11436
  },
10624
- children: /* @__PURE__ */ jsx49(
11437
+ children: /* @__PURE__ */ jsx50(
10625
11438
  "div",
10626
11439
  {
10627
11440
  style: {
@@ -10646,7 +11459,7 @@ function ColHeader2({
10646
11459
  onClick,
10647
11460
  tooltip
10648
11461
  }) {
10649
- const handleKeyDown = useCallback30(
11462
+ const handleKeyDown = useCallback31(
10650
11463
  (e) => {
10651
11464
  if (onClick && (e.key === "Enter" || e.key === " ")) {
10652
11465
  e.preventDefault();
@@ -10656,8 +11469,8 @@ function ColHeader2({
10656
11469
  [onClick]
10657
11470
  );
10658
11471
  const arrow = active ? direction === "asc" ? " \u2191" : " \u2193" : "";
10659
- return /* @__PURE__ */ jsxs34(Flex25, { align: "center", gap: 1, children: [
10660
- /* @__PURE__ */ jsx49(
11472
+ return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, children: [
11473
+ /* @__PURE__ */ jsx50(
10661
11474
  "div",
10662
11475
  {
10663
11476
  onClick,
@@ -10668,8 +11481,8 @@ function ColHeader2({
10668
11481
  userSelect: "none"
10669
11482
  },
10670
11483
  tabIndex: onClick ? 0 : void 0,
10671
- children: /* @__PURE__ */ jsxs34(
10672
- Text35,
11484
+ children: /* @__PURE__ */ jsxs35(
11485
+ Text36,
10673
11486
  {
10674
11487
  muted: true,
10675
11488
  size: 1,
@@ -10686,14 +11499,14 @@ function ColHeader2({
10686
11499
  )
10687
11500
  }
10688
11501
  ),
10689
- tooltip && /* @__PURE__ */ jsx49(InfoTip, { text: tooltip })
11502
+ tooltip && /* @__PURE__ */ jsx50(InfoTip, { text: tooltip })
10690
11503
  ] });
10691
11504
  }
10692
11505
 
10693
11506
  // src/components/report-detail/ModelSelector.tsx
10694
- import { useCallback as useCallback31 } from "react";
10695
- import { Flex as Flex26, Text as Text36 } from "@sanity/ui";
10696
- import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
11507
+ import { useCallback as useCallback32 } from "react";
11508
+ import { Flex as Flex27, Text as Text37 } from "@sanity/ui";
11509
+ import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
10697
11510
  var pillBase = {
10698
11511
  borderColor: "var(--card-border-color)",
10699
11512
  borderRadius: 999,
@@ -10724,8 +11537,8 @@ function ModelSelector({
10724
11537
  selection,
10725
11538
  onChange
10726
11539
  }) {
10727
- return /* @__PURE__ */ jsxs35(Flex26, { align: "center", gap: 1, wrap: "wrap", children: [
10728
- /* @__PURE__ */ jsx50(
11540
+ return /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 1, wrap: "wrap", children: [
11541
+ /* @__PURE__ */ jsx51(
10729
11542
  Pill2,
10730
11543
  {
10731
11544
  isSelected: selection === null,
@@ -10733,7 +11546,7 @@ function ModelSelector({
10733
11546
  onClick: () => onChange(null)
10734
11547
  }
10735
11548
  ),
10736
- models.map((model) => /* @__PURE__ */ jsx50(
11549
+ models.map((model) => /* @__PURE__ */ jsx51(
10737
11550
  Pill2,
10738
11551
  {
10739
11552
  isSelected: selection === model.modelId,
@@ -10742,7 +11555,7 @@ function ModelSelector({
10742
11555
  },
10743
11556
  model.modelId
10744
11557
  )),
10745
- /* @__PURE__ */ jsx50(
11558
+ /* @__PURE__ */ jsx51(
10746
11559
  "div",
10747
11560
  {
10748
11561
  style: {
@@ -10753,7 +11566,7 @@ function ModelSelector({
10753
11566
  }
10754
11567
  }
10755
11568
  ),
10756
- /* @__PURE__ */ jsx50(
11569
+ /* @__PURE__ */ jsx51(
10757
11570
  Pill2,
10758
11571
  {
10759
11572
  isSelected: selection === "expanded",
@@ -10768,7 +11581,7 @@ function Pill2({
10768
11581
  label,
10769
11582
  onClick
10770
11583
  }) {
10771
- const handleKeyDown = useCallback31(
11584
+ const handleKeyDown = useCallback32(
10772
11585
  (e) => {
10773
11586
  if (e.key === "Enter" || e.key === " ") {
10774
11587
  e.preventDefault();
@@ -10777,7 +11590,7 @@ function Pill2({
10777
11590
  },
10778
11591
  [onClick]
10779
11592
  );
10780
- return /* @__PURE__ */ jsx50(
11593
+ return /* @__PURE__ */ jsx51(
10781
11594
  "span",
10782
11595
  {
10783
11596
  onClick,
@@ -10785,8 +11598,8 @@ function Pill2({
10785
11598
  role: "button",
10786
11599
  style: isSelected ? pillSelected : pillDefault,
10787
11600
  tabIndex: 0,
10788
- children: /* @__PURE__ */ jsx50(
10789
- Text36,
11601
+ children: /* @__PURE__ */ jsx51(
11602
+ Text37,
10790
11603
  {
10791
11604
  size: 1,
10792
11605
  style: {
@@ -10801,13 +11614,13 @@ function Pill2({
10801
11614
  }
10802
11615
 
10803
11616
  // src/components/report-detail/useModelSelection.ts
10804
- import { useCallback as useCallback32, useMemo as useMemo13, useState as useState22 } from "react";
11617
+ import { useCallback as useCallback33, useMemo as useMemo13, useState as useState24 } from "react";
10805
11618
  function useModelSelection({
10806
11619
  scores,
10807
11620
  perModel
10808
11621
  }) {
10809
- const [selection, setSelection] = useState22(null);
10810
- const onSelectionChange = useCallback32((next) => {
11622
+ const [selection, setSelection] = useState24(null);
11623
+ const onSelectionChange = useCallback33((next) => {
10811
11624
  setSelection(next);
10812
11625
  }, []);
10813
11626
  const isExpanded = selection === "expanded";
@@ -10829,7 +11642,7 @@ function useModelSelection({
10829
11642
  }
10830
11643
 
10831
11644
  // src/components/report-detail/StrengthsList.tsx
10832
- import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
11645
+ import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
10833
11646
  function StrengthsList({
10834
11647
  mode,
10835
11648
  scores,
@@ -10853,13 +11666,13 @@ function StrengthsList({
10853
11666
  (a, b) => (b.infrastructureEfficiency ?? 0) - (a.infrastructureEfficiency ?? 0)
10854
11667
  );
10855
11668
  if (displayedScores.length === 0) return null;
10856
- return /* @__PURE__ */ jsxs36(Stack28, { space: 5, children: [
10857
- /* @__PURE__ */ jsxs36(Stack28, { space: 3, children: [
10858
- /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, wrap: "wrap", children: [
10859
- /* @__PURE__ */ jsx51(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
10860
- /* @__PURE__ */ jsx51(Text37, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
10861
- /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.strengths }),
10862
- hasModels && /* @__PURE__ */ jsx51(Box24, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx51(
11669
+ return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
11670
+ /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11671
+ /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
11672
+ /* @__PURE__ */ jsx52(CheckmarkCircleIcon2, { style: { color: "#34d399" } }),
11673
+ /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Strong Areas (70+)" }),
11674
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.strengths }),
11675
+ hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
10863
11676
  ModelSelector,
10864
11677
  {
10865
11678
  models: perModel,
@@ -10868,7 +11681,7 @@ function StrengthsList({
10868
11681
  }
10869
11682
  ) })
10870
11683
  ] }),
10871
- /* @__PURE__ */ jsx51(
11684
+ /* @__PURE__ */ jsx52(
10872
11685
  AreaScoresGrid,
10873
11686
  {
10874
11687
  mode,
@@ -10878,33 +11691,33 @@ function StrengthsList({
10878
11691
  }
10879
11692
  )
10880
11693
  ] }),
10881
- retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs36(Box24, { style: neutralCardStyle, children: [
10882
- /* @__PURE__ */ jsx51(
10883
- Box24,
11694
+ retrievalSuccesses.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11695
+ /* @__PURE__ */ jsx52(
11696
+ Box25,
10884
11697
  {
10885
11698
  padding: 4,
10886
11699
  style: { borderBottom: "1px solid var(--card-border-color)" },
10887
- children: /* @__PURE__ */ jsxs36(Flex27, { align: "center", gap: 2, children: [
10888
- /* @__PURE__ */ jsx51(SearchIcon7, { style: { color: "#34d399" } }),
10889
- /* @__PURE__ */ jsxs36(Text37, { size: 2, weight: "medium", children: [
11700
+ children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11701
+ /* @__PURE__ */ jsx52(SearchIcon7, { style: { color: "#34d399" } }),
11702
+ /* @__PURE__ */ jsxs37(Text38, { size: 2, weight: "medium", children: [
10890
11703
  "Retrieval Successes (",
10891
11704
  Math.round(EFFICIENCY_POSITIVE * 100),
10892
11705
  "%+ efficiency)"
10893
11706
  ] }),
10894
- /* @__PURE__ */ jsx51(InfoTip, { text: GLOSSARY.retrievalExcellence })
11707
+ /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalExcellence })
10895
11708
  ] })
10896
11709
  }
10897
11710
  ),
10898
- /* @__PURE__ */ jsx51(Stack28, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs36(
10899
- Flex27,
11711
+ /* @__PURE__ */ jsx52(Stack29, { children: retrievalSuccesses.map((area, i) => /* @__PURE__ */ jsxs37(
11712
+ Flex28,
10900
11713
  {
10901
11714
  align: "center",
10902
11715
  justify: "space-between",
10903
11716
  padding: 4,
10904
11717
  style: i > 0 ? dividerStyle : void 0,
10905
11718
  children: [
10906
- /* @__PURE__ */ jsx51(Text37, { size: 2, children: area.feature }),
10907
- /* @__PURE__ */ jsx51(
11719
+ /* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
11720
+ /* @__PURE__ */ jsx52(
10908
11721
  "span",
10909
11722
  {
10910
11723
  style: {
@@ -10934,8 +11747,8 @@ import {
10934
11747
  BoltIcon,
10935
11748
  ArrowDownIcon as ArrowDownIcon2
10936
11749
  } from "@sanity/icons";
10937
- import { Box as Box25, Flex as Flex28, Stack as Stack29, Text as Text38 } from "@sanity/ui";
10938
- import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
11750
+ import { Box as Box26, Flex as Flex29, Stack as Stack30, Text as Text39 } from "@sanity/ui";
11751
+ import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
10939
11752
  function WeaknessesList({
10940
11753
  mode,
10941
11754
  scores,
@@ -10965,13 +11778,13 @@ function WeaknessesList({
10965
11778
  );
10966
11779
  const hasContent = weakAreas.length > 0 || docsHurt.length > 0 || retrievalIssues.length > 0 || dimWeaknesses.length > 0 || FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 || efficiencyAnomalies.length > 0;
10967
11780
  if (!hasContent) return null;
10968
- return /* @__PURE__ */ jsxs37(Stack29, { space: 5, children: [
10969
- weakAreas.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10970
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, wrap: "wrap", children: [
10971
- /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10972
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
10973
- /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.weakAreas }),
10974
- hasModels && /* @__PURE__ */ jsx52(Box25, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx52(
11781
+ return /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11782
+ weakAreas.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
11783
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
11784
+ /* @__PURE__ */ jsx53(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
11785
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Weak Areas (<70)" }),
11786
+ /* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.weakAreas }),
11787
+ hasModels && /* @__PURE__ */ jsx53(Box26, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx53(
10975
11788
  ModelSelector,
10976
11789
  {
10977
11790
  models: perModel,
@@ -10980,7 +11793,7 @@ function WeaknessesList({
10980
11793
  }
10981
11794
  ) })
10982
11795
  ] }),
10983
- /* @__PURE__ */ jsx52(
11796
+ /* @__PURE__ */ jsx53(
10984
11797
  AreaScoresGrid,
10985
11798
  {
10986
11799
  mode,
@@ -10990,22 +11803,22 @@ function WeaknessesList({
10990
11803
  }
10991
11804
  )
10992
11805
  ] }),
10993
- docsHurt.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
10994
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
10995
- /* @__PURE__ */ jsx52(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
10996
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
10997
- /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.docsHurt })
11806
+ docsHurt.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
11807
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11808
+ /* @__PURE__ */ jsx53(ErrorOutlineIcon3, { style: { color: "#f87171" } }),
11809
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Docs Hurt Performance (Negative Doc Lift)" }),
11810
+ /* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.docsHurt })
10998
11811
  ] }),
10999
- /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs37(
11000
- Box25,
11812
+ /* @__PURE__ */ jsx53(Box26, { style: sectionStyle("red"), children: docsHurt.map((area, i) => /* @__PURE__ */ jsxs38(
11813
+ Box26,
11001
11814
  {
11002
11815
  padding: 4,
11003
11816
  style: i > 0 ? { borderTop: "1px solid rgba(239,68,68,0.2)" } : void 0,
11004
11817
  children: [
11005
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
11006
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11007
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11008
- /* @__PURE__ */ jsx52(
11818
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
11819
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11820
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
11821
+ /* @__PURE__ */ jsx53(
11009
11822
  "span",
11010
11823
  {
11011
11824
  style: {
@@ -11020,7 +11833,7 @@ function WeaknessesList({
11020
11833
  }
11021
11834
  )
11022
11835
  ] }),
11023
- /* @__PURE__ */ jsx52(
11836
+ /* @__PURE__ */ jsx53(
11024
11837
  "span",
11025
11838
  {
11026
11839
  style: {
@@ -11033,8 +11846,8 @@ function WeaknessesList({
11033
11846
  }
11034
11847
  )
11035
11848
  ] }),
11036
- /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
11037
- area.invertedRetrievalGap && /* @__PURE__ */ jsxs37("span", { style: { color: "#fbbf24" }, children: [
11849
+ /* @__PURE__ */ jsx53(Box26, { paddingTop: 2, children: /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
11850
+ area.invertedRetrievalGap && /* @__PURE__ */ jsxs38("span", { style: { color: "#fbbf24" }, children: [
11038
11851
  "Agent does better by NOT finding these docs.",
11039
11852
  " "
11040
11853
  ] }),
@@ -11049,22 +11862,22 @@ function WeaknessesList({
11049
11862
  area.feature
11050
11863
  )) })
11051
11864
  ] }),
11052
- retrievalIssues.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11053
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11054
- /* @__PURE__ */ jsx52(SearchIcon8, { style: { color: "#fbbf24" } }),
11055
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
11056
- /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.retrievalIssues })
11865
+ retrievalIssues.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
11866
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11867
+ /* @__PURE__ */ jsx53(SearchIcon8, { style: { color: "#fbbf24" } }),
11868
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Retrieval Issues (<70% efficiency)" }),
11869
+ /* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.retrievalIssues })
11057
11870
  ] }),
11058
- /* @__PURE__ */ jsx52(Box25, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs37(
11059
- Box25,
11871
+ /* @__PURE__ */ jsx53(Box26, { style: sectionStyle("amber"), children: retrievalIssues.map((area, i) => /* @__PURE__ */ jsxs38(
11872
+ Box26,
11060
11873
  {
11061
11874
  padding: 4,
11062
11875
  style: i > 0 ? { borderTop: "1px solid rgba(245,158,11,0.2)" } : void 0,
11063
11876
  children: [
11064
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", justify: "space-between", wrap: "wrap", children: [
11065
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11066
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11067
- /* @__PURE__ */ jsx52(
11877
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", justify: "space-between", wrap: "wrap", children: [
11878
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11879
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
11880
+ /* @__PURE__ */ jsx53(
11068
11881
  "span",
11069
11882
  {
11070
11883
  style: {
@@ -11079,7 +11892,7 @@ function WeaknessesList({
11079
11892
  }
11080
11893
  )
11081
11894
  ] }),
11082
- /* @__PURE__ */ jsx52(
11895
+ /* @__PURE__ */ jsx53(
11083
11896
  "span",
11084
11897
  {
11085
11898
  style: {
@@ -11092,7 +11905,7 @@ function WeaknessesList({
11092
11905
  }
11093
11906
  )
11094
11907
  ] }),
11095
- /* @__PURE__ */ jsx52(Box25, { paddingTop: 2, children: /* @__PURE__ */ jsxs37(Text38, { muted: true, size: 2, children: [
11908
+ /* @__PURE__ */ jsx53(Box26, { paddingTop: 2, children: /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
11096
11909
  "Actual score (",
11097
11910
  Math.round(area.actualScore ?? 0),
11098
11911
  ") is much lower than ceiling (",
@@ -11107,21 +11920,21 @@ function WeaknessesList({
11107
11920
  area.feature
11108
11921
  )) })
11109
11922
  ] }),
11110
- dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs37(Stack29, { space: 3, children: [
11111
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11112
- /* @__PURE__ */ jsx52(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
11113
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
11114
- /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.dimWeaknesses })
11923
+ dimWeaknesses.length > 0 && /* @__PURE__ */ jsxs38(Stack30, { space: 3, children: [
11924
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11925
+ /* @__PURE__ */ jsx53(WarningOutlineIcon3, { style: { color: "#fbbf24" } }),
11926
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Dimension Weaknesses (<50)" }),
11927
+ /* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.dimWeaknesses })
11115
11928
  ] }),
11116
- /* @__PURE__ */ jsx52(Box25, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs37(
11117
- Box25,
11929
+ /* @__PURE__ */ jsx53(Box26, { style: neutralCardStyle, children: dimWeaknesses.map(({ area, dims }, i) => /* @__PURE__ */ jsxs38(
11930
+ Box26,
11118
11931
  {
11119
11932
  padding: 4,
11120
11933
  style: i > 0 ? dividerStyle : void 0,
11121
11934
  children: [
11122
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, paddingBottom: 2, children: [
11123
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: area.feature }),
11124
- /* @__PURE__ */ jsx52(
11935
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, paddingBottom: 2, children: [
11936
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: area.feature }),
11937
+ /* @__PURE__ */ jsx53(
11125
11938
  "span",
11126
11939
  {
11127
11940
  style: {
@@ -11136,7 +11949,7 @@ function WeaknessesList({
11136
11949
  }
11137
11950
  )
11138
11951
  ] }),
11139
- /* @__PURE__ */ jsx52(Flex28, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx52(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs37(
11952
+ /* @__PURE__ */ jsx53(Flex29, { gap: 2, wrap: "wrap", children: dims.map((w) => /* @__PURE__ */ jsx53(HoverTip, { text: w.tip, children: /* @__PURE__ */ jsxs38(
11140
11953
  "span",
11141
11954
  {
11142
11955
  style: {
@@ -11158,33 +11971,33 @@ function WeaknessesList({
11158
11971
  area.feature
11159
11972
  )) })
11160
11973
  ] }),
11161
- FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11162
- /* @__PURE__ */ jsx52(
11163
- Box25,
11974
+ FEATURE_FLAGS.showRegressedSinceLastRun.enabled && regressed.length > 0 && /* @__PURE__ */ jsxs38(Box26, { style: neutralCardStyle, children: [
11975
+ /* @__PURE__ */ jsx53(
11976
+ Box26,
11164
11977
  {
11165
11978
  padding: 4,
11166
11979
  style: { borderBottom: "1px solid var(--card-border-color)" },
11167
- children: /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11168
- /* @__PURE__ */ jsx52(ArrowDownIcon2, { style: { color: "#f87171" } }),
11169
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
11980
+ children: /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
11981
+ /* @__PURE__ */ jsx53(ArrowDownIcon2, { style: { color: "#f87171" } }),
11982
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Regressed Since Last Run" })
11170
11983
  ] })
11171
11984
  }
11172
11985
  ),
11173
- /* @__PURE__ */ jsx52(Stack29, { children: regressed.map((featureName, i) => {
11986
+ /* @__PURE__ */ jsx53(Stack30, { children: regressed.map((featureName, i) => {
11174
11987
  const area = scores.find((s) => s.feature === featureName);
11175
11988
  const areaDelta = perArea?.[featureName];
11176
- return /* @__PURE__ */ jsxs37(
11177
- Flex28,
11989
+ return /* @__PURE__ */ jsxs38(
11990
+ Flex29,
11178
11991
  {
11179
11992
  align: "center",
11180
11993
  justify: "space-between",
11181
11994
  padding: 4,
11182
11995
  style: i > 0 ? dividerStyle : void 0,
11183
11996
  children: [
11184
- /* @__PURE__ */ jsx52(Text38, { size: 2, children: featureName }),
11185
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 3, children: [
11186
- areaDelta != null && /* @__PURE__ */ jsx52(DeltaIndicator, { delta: areaDelta, icon: true }),
11187
- area && /* @__PURE__ */ jsx52(
11997
+ /* @__PURE__ */ jsx53(Text39, { size: 2, children: featureName }),
11998
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 3, children: [
11999
+ areaDelta != null && /* @__PURE__ */ jsx53(DeltaIndicator, { delta: areaDelta, icon: true }),
12000
+ area && /* @__PURE__ */ jsx53(
11188
12001
  "span",
11189
12002
  {
11190
12003
  style: {
@@ -11206,32 +12019,32 @@ function WeaknessesList({
11206
12019
  );
11207
12020
  }) })
11208
12021
  ] }),
11209
- efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs37(Box25, { style: neutralCardStyle, children: [
11210
- /* @__PURE__ */ jsx52(
11211
- Box25,
12022
+ efficiencyAnomalies.length > 0 && /* @__PURE__ */ jsxs38(Box26, { style: neutralCardStyle, children: [
12023
+ /* @__PURE__ */ jsx53(
12024
+ Box26,
11212
12025
  {
11213
12026
  padding: 4,
11214
12027
  style: { borderBottom: "1px solid var(--card-border-color)" },
11215
- children: /* @__PURE__ */ jsxs37(Stack29, { space: 2, children: [
11216
- /* @__PURE__ */ jsxs37(Flex28, { align: "center", gap: 2, children: [
11217
- /* @__PURE__ */ jsx52(BoltIcon, { style: { color: "#fbbf24" } }),
11218
- /* @__PURE__ */ jsx52(Text38, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
11219
- /* @__PURE__ */ jsx52(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
12028
+ children: /* @__PURE__ */ jsxs38(Stack30, { space: 2, children: [
12029
+ /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, children: [
12030
+ /* @__PURE__ */ jsx53(BoltIcon, { style: { color: "#fbbf24" } }),
12031
+ /* @__PURE__ */ jsx53(Text39, { size: 2, weight: "medium", children: "Efficiency Anomalies (>100%)" }),
12032
+ /* @__PURE__ */ jsx53(InfoTip, { text: GLOSSARY.efficiencyAnomalies })
11220
12033
  ] }),
11221
- /* @__PURE__ */ jsx52(Text38, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
12034
+ /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "Agent outperforms injected docs \u2014 may indicate doc quality issues or agent memorization." })
11222
12035
  ] })
11223
12036
  }
11224
12037
  ),
11225
- /* @__PURE__ */ jsx52(Stack29, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs37(
11226
- Flex28,
12038
+ /* @__PURE__ */ jsx53(Stack30, { children: efficiencyAnomalies.map((area, i) => /* @__PURE__ */ jsxs38(
12039
+ Flex29,
11227
12040
  {
11228
12041
  align: "center",
11229
12042
  justify: "space-between",
11230
12043
  padding: 4,
11231
12044
  style: i > 0 ? dividerStyle : void 0,
11232
12045
  children: [
11233
- /* @__PURE__ */ jsx52(Text38, { size: 2, children: area.feature }),
11234
- /* @__PURE__ */ jsx52(
12046
+ /* @__PURE__ */ jsx53(Text39, { size: 2, children: area.feature }),
12047
+ /* @__PURE__ */ jsx53(
11235
12048
  "span",
11236
12049
  {
11237
12050
  style: {
@@ -11259,12 +12072,12 @@ var tipArea = {
11259
12072
  fontWeight: 600
11260
12073
  };
11261
12074
  function dimTip(area, dim, score, description) {
11262
- return /* @__PURE__ */ jsxs37(Text38, { size: 2, style: { lineHeight: 1.5 }, children: [
11263
- /* @__PURE__ */ jsx52("span", { style: tipArea, children: area }),
12075
+ return /* @__PURE__ */ jsxs38(Text39, { size: 2, style: { lineHeight: 1.5 }, children: [
12076
+ /* @__PURE__ */ jsx53("span", { style: tipArea, children: area }),
11264
12077
  " scores",
11265
12078
  " ",
11266
- /* @__PURE__ */ jsx52("span", { style: tipValue, children: score }),
11267
- /* @__PURE__ */ jsx52("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
12079
+ /* @__PURE__ */ jsx53("span", { style: tipValue, children: score }),
12080
+ /* @__PURE__ */ jsx53("span", { style: { color: "var(--card-muted-fg-color)" }, children: "/100" }),
11268
12081
  " on",
11269
12082
  " ",
11270
12083
  dim.toLowerCase(),
@@ -11293,7 +12106,7 @@ function getDimensionWeaknesses(area) {
11293
12106
  }
11294
12107
 
11295
12108
  // src/components/report-detail/ReportDetail.tsx
11296
- import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
12109
+ import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
11297
12110
  var OVERVIEW_TAB = { id: "overview", label: "Overview" };
11298
12111
  var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
11299
12112
  var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
@@ -11310,8 +12123,8 @@ function ReportDetail({
11310
12123
  subTab
11311
12124
  }) {
11312
12125
  const client = useClient10({ apiVersion: API_VERSION });
11313
- const [loading, setLoading] = useState23(true);
11314
- const [report, setReport] = useState23(null);
12126
+ const [loading, setLoading] = useState25(true);
12127
+ const [report, setReport] = useState25(null);
11315
12128
  useEffect12(() => {
11316
12129
  let cancelled = false;
11317
12130
  setLoading(true);
@@ -11356,19 +12169,19 @@ function ReportDetail({
11356
12169
  if (disabledTabs.has(parsed)) return "overview";
11357
12170
  return tabs.some((t) => t.id === parsed) ? parsed : "overview";
11358
12171
  }, [activeTab, disabledTabs, tabs]);
11359
- const handleTabClick = useCallback33(
12172
+ const handleTabClick = useCallback34(
11360
12173
  (tabId) => {
11361
12174
  onTabChange(tabId === "overview" ? null : tabId, null, null);
11362
12175
  },
11363
12176
  [onTabChange]
11364
12177
  );
11365
12178
  if (loading) {
11366
- return /* @__PURE__ */ jsx53(LoadingState, { message: "Loading report\u2026" });
12179
+ return /* @__PURE__ */ jsx54(LoadingState, { message: "Loading report\u2026" });
11367
12180
  }
11368
12181
  if (!report || !summary) {
11369
- return /* @__PURE__ */ jsx53(Box26, { padding: 5, children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11370
- /* @__PURE__ */ jsx53(
11371
- Button8,
12182
+ return /* @__PURE__ */ jsx54(Box27, { padding: 5, children: /* @__PURE__ */ jsxs39(Stack31, { space: 4, children: [
12183
+ /* @__PURE__ */ jsx54(
12184
+ Button10,
11372
12185
  {
11373
12186
  icon: ArrowLeftIcon3,
11374
12187
  mode: "bleed",
@@ -11376,18 +12189,18 @@ function ReportDetail({
11376
12189
  text: "Back"
11377
12190
  }
11378
12191
  ),
11379
- /* @__PURE__ */ jsx53(Text39, { align: "center", muted: true, size: 3, children: "Report not found" })
12192
+ /* @__PURE__ */ jsx54(Text40, { align: "center", muted: true, size: 3, children: "Report not found" })
11380
12193
  ] }) });
11381
12194
  }
11382
12195
  const { comparison, provenance } = report;
11383
12196
  const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
11384
- return /* @__PURE__ */ jsx53(
12197
+ return /* @__PURE__ */ jsx54(
11385
12198
  ReportArtifactProvider,
11386
12199
  {
11387
12200
  runId: report.provenance?.runId,
11388
12201
  manifest: summary?.artifactManifest,
11389
- children: /* @__PURE__ */ jsx53(Box26, { padding: 4, children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11390
- /* @__PURE__ */ jsx53(
12202
+ children: /* @__PURE__ */ jsx54(Box27, { padding: 4, children: /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
12203
+ /* @__PURE__ */ jsx54(
11391
12204
  ReportHeader,
11392
12205
  {
11393
12206
  completedAt: report.completedAt,
@@ -11396,11 +12209,11 @@ function ReportDetail({
11396
12209
  title: report.title
11397
12210
  }
11398
12211
  ),
11399
- /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, wrap: "wrap", children: [
11400
- /* @__PURE__ */ jsx53(TabList, { space: 1, children: tabs.map((tab) => {
12212
+ /* @__PURE__ */ jsxs39(Flex30, { align: "center", gap: 2, wrap: "wrap", children: [
12213
+ /* @__PURE__ */ jsx54(TabList, { space: 1, children: tabs.map((tab) => {
11401
12214
  const isDisabled = disabledTabs.has(tab.id);
11402
12215
  const tooltip = getDisabledTabTooltip(tab.id, summary);
11403
- const tabElement = /* @__PURE__ */ jsx53(
12216
+ const tabElement = /* @__PURE__ */ jsx54(
11404
12217
  Tab,
11405
12218
  {
11406
12219
  "aria-controls": `panel-${tab.id}`,
@@ -11411,27 +12224,27 @@ function ReportDetail({
11411
12224
  selected: currentTab === tab.id
11412
12225
  }
11413
12226
  );
11414
- return isDisabled && tooltip ? /* @__PURE__ */ jsx53(
12227
+ return isDisabled && tooltip ? /* @__PURE__ */ jsx54(
11415
12228
  Tooltip10,
11416
12229
  {
11417
- content: /* @__PURE__ */ jsx53(Box26, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
12230
+ content: /* @__PURE__ */ jsx54(Box27, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
11418
12231
  placement: "bottom",
11419
12232
  portal: true,
11420
- children: /* @__PURE__ */ jsx53("span", { style: { display: "inline-block" }, children: tabElement })
12233
+ children: /* @__PURE__ */ jsx54("span", { style: { display: "inline-block" }, children: tabElement })
11421
12234
  },
11422
12235
  tab.id
11423
- ) : /* @__PURE__ */ jsx53("span", { children: tabElement }, tab.id);
12236
+ ) : /* @__PURE__ */ jsx54("span", { children: tabElement }, tab.id);
11424
12237
  }) }),
11425
- /* @__PURE__ */ jsxs38(Flex29, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
11426
- /* @__PURE__ */ jsx53(
12238
+ /* @__PURE__ */ jsxs39(Flex30, { align: "center", gap: 2, style: { marginLeft: "auto" }, children: [
12239
+ /* @__PURE__ */ jsx54(
11427
12240
  HoverTip,
11428
12241
  {
11429
12242
  text: SOURCE_TIP[provenance.source.name] ?? GLOSSARY.reportMode,
11430
- children: /* @__PURE__ */ jsx53(Badge8, { mode: "outline", tone: "default", children: provenance.source.name })
12243
+ children: /* @__PURE__ */ jsx54(Badge10, { mode: "outline", tone: "default", children: provenance.source.name })
11431
12244
  }
11432
12245
  ),
11433
- /* @__PURE__ */ jsx53(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx53(Badge8, { tone: "primary", children: provenance.mode }) }),
11434
- /* @__PURE__ */ jsx53(
12246
+ /* @__PURE__ */ jsx54(HoverTip, { text: MODE_TIP2[provenance.mode] ?? GLOSSARY.reportMode, children: /* @__PURE__ */ jsx54(Badge10, { tone: "primary", children: provenance.mode }) }),
12247
+ /* @__PURE__ */ jsx54(
11435
12248
  ReportActions,
11436
12249
  {
11437
12250
  documentId: report._id,
@@ -11442,14 +12255,14 @@ function ReportDetail({
11442
12255
  )
11443
12256
  ] })
11444
12257
  ] }),
11445
- currentTab === "overview" && /* @__PURE__ */ jsx53(
12258
+ currentTab === "overview" && /* @__PURE__ */ jsx54(
11446
12259
  TabPanel,
11447
12260
  {
11448
12261
  "aria-labelledby": "tab-overview",
11449
12262
  hidden: currentTab !== "overview",
11450
12263
  id: "panel-overview",
11451
- children: /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11452
- /* @__PURE__ */ jsx53(
12264
+ children: /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
12265
+ /* @__PURE__ */ jsx54(
11453
12266
  DiagnosticsOverview,
11454
12267
  {
11455
12268
  comparison,
@@ -11460,19 +12273,20 @@ function ReportDetail({
11460
12273
  totalTests
11461
12274
  }
11462
12275
  ),
11463
- /* @__PURE__ */ jsx53(CostLatencyPanel, { testResults: summary.testResults }),
11464
- /* @__PURE__ */ jsx53(
12276
+ /* @__PURE__ */ jsx54(CostLatencyPanel, { testResults: summary.testResults }),
12277
+ /* @__PURE__ */ jsx54(
11465
12278
  LineageCard,
11466
12279
  {
11467
12280
  provenance,
11468
12281
  reportId: report.reportId
11469
12282
  }
11470
12283
  ),
11471
- /* @__PURE__ */ jsx53(ProvenanceCard, { provenance })
12284
+ /* @__PURE__ */ jsx54(ProvenanceCard, { provenance }),
12285
+ /* @__PURE__ */ jsx54(PipelineExecutionPanel, {})
11472
12286
  ] })
11473
12287
  }
11474
12288
  ),
11475
- currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx53(
12289
+ currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx54(
11476
12290
  DiagnosticsPanel,
11477
12291
  {
11478
12292
  artifactCache,
@@ -11488,13 +12302,13 @@ function ReportDetail({
11488
12302
  testResults: summary.testResults
11489
12303
  }
11490
12304
  ),
11491
- currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx53(
12305
+ currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx54(
11492
12306
  TabPanel,
11493
12307
  {
11494
12308
  "aria-labelledby": "tab-activity",
11495
12309
  hidden: currentTab !== "activity",
11496
12310
  id: "panel-activity",
11497
- children: /* @__PURE__ */ jsx53(
12311
+ children: /* @__PURE__ */ jsx54(
11498
12312
  AgentBehaviorCard,
11499
12313
  {
11500
12314
  agentBehavior: summary.agentBehavior,
@@ -11532,9 +12346,9 @@ function DiagnosticsPanel({
11532
12346
  const issueCount = scores.filter((s) => s.totalScore < SCORE_CAUTION).length + scores.filter((s) => s.negativeDocLift).length + scores.filter(
11533
12347
  (s) => s.infrastructureEfficiency != null && s.infrastructureEfficiency < EFFICIENCY_CAUTION && !s.invertedRetrievalGap
11534
12348
  ).length;
11535
- return /* @__PURE__ */ jsx53(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs38(Stack30, { space: 4, children: [
11536
- /* @__PURE__ */ jsx53(
11537
- Flex29,
12349
+ return /* @__PURE__ */ jsx54(TabPanel, { "aria-labelledby": "tab-diagnostics", id: "panel-diagnostics", children: /* @__PURE__ */ jsxs39(Stack31, { space: 4, children: [
12350
+ /* @__PURE__ */ jsx54(
12351
+ Flex30,
11538
12352
  {
11539
12353
  align: "center",
11540
12354
  gap: 1,
@@ -11543,7 +12357,7 @@ function DiagnosticsPanel({
11543
12357
  paddingBottom: 8
11544
12358
  },
11545
12359
  wrap: "wrap",
11546
- children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs38(
12360
+ children: DIAG_TABS.map((tab) => /* @__PURE__ */ jsxs39(
11547
12361
  "button",
11548
12362
  {
11549
12363
  onClick: () => onNavigate(tab.id === "strengths" ? null : tab.id, null),
@@ -11563,7 +12377,7 @@ function DiagnosticsPanel({
11563
12377
  type: "button",
11564
12378
  children: [
11565
12379
  tab.label,
11566
- tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx53(
12380
+ tab.id === "issues" && issueCount > 0 && /* @__PURE__ */ jsx54(
11567
12381
  "span",
11568
12382
  {
11569
12383
  style: {
@@ -11583,7 +12397,7 @@ function DiagnosticsPanel({
11583
12397
  ))
11584
12398
  }
11585
12399
  ),
11586
- subTab === "strengths" && /* @__PURE__ */ jsx53(
12400
+ subTab === "strengths" && /* @__PURE__ */ jsx54(
11587
12401
  StrengthsList,
11588
12402
  {
11589
12403
  comparison,
@@ -11592,8 +12406,8 @@ function DiagnosticsPanel({
11592
12406
  scores
11593
12407
  }
11594
12408
  ),
11595
- subTab === "issues" && /* @__PURE__ */ jsxs38(Stack30, { space: 5, children: [
11596
- /* @__PURE__ */ jsx53(
12409
+ subTab === "issues" && /* @__PURE__ */ jsxs39(Stack31, { space: 5, children: [
12410
+ /* @__PURE__ */ jsx54(
11597
12411
  WeaknessesList,
11598
12412
  {
11599
12413
  comparison,
@@ -11602,8 +12416,8 @@ function DiagnosticsPanel({
11602
12416
  scores
11603
12417
  }
11604
12418
  ),
11605
- FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx53(FailureModesPanel, { failureModes }),
11606
- judgments && judgments.length > 0 && /* @__PURE__ */ jsx53(
12419
+ FEATURE_FLAGS.showFailureModes.enabled && /* @__PURE__ */ jsx54(FailureModesPanel, { failureModes }),
12420
+ judgments && judgments.length > 0 && /* @__PURE__ */ jsx54(
11607
12421
  JudgmentList,
11608
12422
  {
11609
12423
  artifactCache,
@@ -11639,17 +12453,17 @@ function getDisabledTabTooltip(tabId, summary) {
11639
12453
  if (!summary) return null;
11640
12454
  switch (tabId) {
11641
12455
  case "diagnostics":
11642
- return /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
12456
+ return /* @__PURE__ */ jsx54(Text40, { muted: true, size: 2, children: "No diagnostic data available. Diagnostics require at least one scored feature area." });
11643
12457
  case "activity":
11644
- return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs38(Text39, { muted: true, size: 2, children: [
12458
+ return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs39(Text40, { muted: true, size: 2, children: [
11645
12459
  "Not available for baseline-only evaluations. Run with",
11646
12460
  " ",
11647
- /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode full" }),
12461
+ /* @__PURE__ */ jsx54("code", { style: inlineCodeStyle, children: "--mode full" }),
11648
12462
  " or",
11649
12463
  " ",
11650
- /* @__PURE__ */ jsx53("code", { style: inlineCodeStyle, children: "--mode agentic" }),
12464
+ /* @__PURE__ */ jsx54("code", { style: inlineCodeStyle, children: "--mode agentic" }),
11651
12465
  " to capture agent browsing behavior."
11652
- ] }) : /* @__PURE__ */ jsx53(Text39, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
12466
+ ] }) : /* @__PURE__ */ jsx54(Text40, { muted: true, size: 2, children: "No agent activity data was recorded for this evaluation." });
11653
12467
  default:
11654
12468
  return null;
11655
12469
  }
@@ -11657,12 +12471,12 @@ function getDisabledTabTooltip(tabId, summary) {
11657
12471
 
11658
12472
  // src/components/report-detail/AreaScoreRow.tsx
11659
12473
  import { WarningOutlineIcon as WarningOutlineIcon4 } from "@sanity/icons";
11660
- import { Box as Box27, Flex as Flex30, Stack as Stack31, Text as Text40 } from "@sanity/ui";
11661
- import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
12474
+ import { Box as Box28, Flex as Flex31, Stack as Stack32, Text as Text41 } from "@sanity/ui";
12475
+ import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
11662
12476
 
11663
12477
  // src/components/report-detail/AreaScoreTable.tsx
11664
12478
  import React4 from "react";
11665
- import { Card as Card18, Stack as Stack32, Text as Text42 } from "@sanity/ui";
12479
+ import { Card as Card19, Stack as Stack33, Text as Text43 } from "@sanity/ui";
11666
12480
 
11667
12481
  // src/lib/scoring.ts
11668
12482
  var HEX_MAP = {
@@ -11679,49 +12493,49 @@ function scoreHex(score) {
11679
12493
  }
11680
12494
 
11681
12495
  // src/components/primitives/ScoreCell.tsx
11682
- import { Card as Card17, Text as Text41 } from "@sanity/ui";
11683
- import { jsx as jsx55 } from "react/jsx-runtime";
12496
+ import { Card as Card18, Text as Text42 } from "@sanity/ui";
12497
+ import { jsx as jsx56 } from "react/jsx-runtime";
11684
12498
 
11685
12499
  // src/components/report-detail/AreaScoreTable.tsx
11686
- import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
12500
+ import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
11687
12501
 
11688
12502
  // src/components/report-detail/AutoComparisonCard.tsx
11689
- import { Badge as Badge9, Box as Box28, Card as Card19, Flex as Flex31, Grid as Grid5, Stack as Stack33, Text as Text43, Tooltip as Tooltip11 } from "@sanity/ui";
11690
- import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
12503
+ import { Badge as Badge11, Box as Box29, Card as Card20, Flex as Flex32, Grid as Grid5, Stack as Stack34, Text as Text44, Tooltip as Tooltip11 } from "@sanity/ui";
12504
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
11691
12505
 
11692
12506
  // src/components/report-detail/OverviewStats.tsx
11693
12507
  import { Grid as Grid6 } from "@sanity/ui";
11694
- import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
12508
+ import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
11695
12509
 
11696
12510
  // src/components/report-detail/RecommendationsSection.tsx
11697
12511
  import { BoltIcon as BoltIcon2 } from "@sanity/icons";
11698
- import { Box as Box29, Flex as Flex32, Stack as Stack34, Text as Text44 } from "@sanity/ui";
11699
- import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
12512
+ import { Box as Box30, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
12513
+ import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
11700
12514
 
11701
12515
  // src/components/report-detail/ThreeLayerTable.tsx
11702
12516
  import React5 from "react";
11703
- import { Badge as Badge10, Card as Card20, Flex as Flex33, Stack as Stack35, Text as Text45 } from "@sanity/ui";
11704
- import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
12517
+ import { Badge as Badge12, Card as Card21, Flex as Flex34, Stack as Stack36, Text as Text46 } from "@sanity/ui";
12518
+ import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
11705
12519
 
11706
12520
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
11707
- import { Card as Card21 } from "@sanity/ui";
11708
- import { useCallback as useCallback34, useEffect as useEffect14, useRef as useRef8, useState as useState25 } from "react";
12521
+ import { Card as Card22 } from "@sanity/ui";
12522
+ import { useCallback as useCallback35, useEffect as useEffect14, useRef as useRef8, useState as useState27 } from "react";
11709
12523
 
11710
12524
  // src/components/report-detail/JudgmentDetailDrawer.tsx
11711
- import { useEffect as useEffect13, useState as useState24 } from "react";
12525
+ import { useEffect as useEffect13, useState as useState26 } from "react";
11712
12526
  import { CloseIcon as CloseIcon2 } from "@sanity/icons";
11713
12527
  import {
11714
- Box as Box30,
11715
- Button as Button9,
11716
- Flex as Flex34,
11717
- Stack as Stack36,
12528
+ Box as Box31,
12529
+ Button as Button11,
12530
+ Flex as Flex35,
12531
+ Stack as Stack37,
11718
12532
  Tab as Tab2,
11719
12533
  TabList as TabList2,
11720
12534
  TabPanel as TabPanel2,
11721
- Text as Text46,
12535
+ Text as Text47,
11722
12536
  Tooltip as Tooltip12
11723
12537
  } from "@sanity/ui";
11724
- import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
12538
+ import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
11725
12539
  var HEADER_STYLE = {
11726
12540
  borderBottom: "1px solid var(--card-border-color)"
11727
12541
  };
@@ -11757,10 +12571,10 @@ var COPY_BUTTON_SLOT_STYLE = {
11757
12571
  function DocBadge({
11758
12572
  doc
11759
12573
  }) {
11760
- const [hovered, setHovered] = useState24(false);
12574
+ const [hovered, setHovered] = useState26(false);
11761
12575
  const isLinked = Boolean(doc.documentId);
11762
12576
  const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
11763
- const badge = /* @__PURE__ */ jsx61(
12577
+ const badge = /* @__PURE__ */ jsx62(
11764
12578
  "span",
11765
12579
  {
11766
12580
  style: {
@@ -11773,13 +12587,13 @@ function DocBadge({
11773
12587
  children: doc.slug
11774
12588
  }
11775
12589
  );
11776
- return /* @__PURE__ */ jsx61(
12590
+ return /* @__PURE__ */ jsx62(
11777
12591
  Tooltip12,
11778
12592
  {
11779
- content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 2, children: tooltipLabel }) }),
12593
+ content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 2, children: tooltipLabel }) }),
11780
12594
  placement: "bottom",
11781
12595
  portal: true,
11782
- children: isLinked ? /* @__PURE__ */ jsx61(
12596
+ children: isLinked ? /* @__PURE__ */ jsx62(
11783
12597
  "a",
11784
12598
  {
11785
12599
  href: `/intent/edit/id=${doc.documentId}`,
@@ -11794,7 +12608,7 @@ function DocBadge({
11794
12608
  },
11795
12609
  children: badge
11796
12610
  }
11797
- ) : /* @__PURE__ */ jsx61("span", { children: badge })
12611
+ ) : /* @__PURE__ */ jsx62("span", { children: badge })
11798
12612
  }
11799
12613
  );
11800
12614
  }
@@ -11805,7 +12619,7 @@ function JudgmentDetailDrawer({
11805
12619
  onShowPrompts,
11806
12620
  testResult
11807
12621
  }) {
11808
- const [tab, setTab] = useState24("reasoning");
12622
+ const [tab, setTab] = useState26("reasoning");
11809
12623
  const sep = judgment.taskId.indexOf(" - ");
11810
12624
  const rawTaskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
11811
12625
  const { name: taskName, variant } = splitVariant(rawTaskName);
@@ -11823,7 +12637,7 @@ function JudgmentDetailDrawer({
11823
12637
  useEffect13(() => {
11824
12638
  setTab("reasoning");
11825
12639
  }, [judgment.taskId, judgment.dimension, judgment.modelId]);
11826
- const [fetchDispatched, setFetchDispatched] = useState24(false);
12640
+ const [fetchDispatched, setFetchDispatched] = useState26(false);
11827
12641
  useEffect13(() => {
11828
12642
  setFetchDispatched(false);
11829
12643
  }, [judgment.taskId, judgment.dimension, judgment.modelId]);
@@ -11859,15 +12673,15 @@ function JudgmentDetailDrawer({
11859
12673
  window.addEventListener("keydown", onKeyDown);
11860
12674
  return () => window.removeEventListener("keydown", onKeyDown);
11861
12675
  }, [onClose]);
11862
- return /* @__PURE__ */ jsxs45(
11863
- Flex34,
12676
+ return /* @__PURE__ */ jsxs46(
12677
+ Flex35,
11864
12678
  {
11865
12679
  "aria-label": `Judgment detail: ${judgment.score} ${dimLabel}, ${taskName}`,
11866
12680
  direction: "column",
11867
12681
  role: "dialog",
11868
12682
  style: { flex: 1, height: "100%", minHeight: 0, overflow: "hidden" },
11869
12683
  children: [
11870
- /* @__PURE__ */ jsx61(
12684
+ /* @__PURE__ */ jsx62(
11871
12685
  "div",
11872
12686
  {
11873
12687
  "aria-hidden": true,
@@ -11880,10 +12694,10 @@ function JudgmentDetailDrawer({
11880
12694
  }
11881
12695
  }
11882
12696
  ),
11883
- /* @__PURE__ */ jsxs45(Flex34, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
11884
- /* @__PURE__ */ jsxs45(Stack36, { flex: 1, space: 2, children: [
11885
- /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11886
- /* @__PURE__ */ jsx61(
12697
+ /* @__PURE__ */ jsxs46(Flex35, { align: "flex-start", gap: 2, padding: 4, style: HEADER_STYLE, children: [
12698
+ /* @__PURE__ */ jsxs46(Stack37, { flex: 1, space: 2, children: [
12699
+ /* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
12700
+ /* @__PURE__ */ jsx62(
11887
12701
  "span",
11888
12702
  {
11889
12703
  style: {
@@ -11898,7 +12712,7 @@ function JudgmentDetailDrawer({
11898
12712
  children: judgment.score
11899
12713
  }
11900
12714
  ),
11901
- /* @__PURE__ */ jsx61(
12715
+ /* @__PURE__ */ jsx62(
11902
12716
  "span",
11903
12717
  {
11904
12718
  style: {
@@ -11911,13 +12725,13 @@ function JudgmentDetailDrawer({
11911
12725
  children: dimLabel
11912
12726
  }
11913
12727
  ),
11914
- /* @__PURE__ */ jsx61(
12728
+ /* @__PURE__ */ jsx62(
11915
12729
  Tooltip12,
11916
12730
  {
11917
- content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: judgment.modelId }) }),
12731
+ content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: judgment.modelId }) }),
11918
12732
  placement: "bottom",
11919
12733
  portal: true,
11920
- children: /* @__PURE__ */ jsx61(
12734
+ children: /* @__PURE__ */ jsx62(
11921
12735
  "span",
11922
12736
  {
11923
12737
  style: {
@@ -11934,7 +12748,7 @@ function JudgmentDetailDrawer({
11934
12748
  )
11935
12749
  }
11936
12750
  ),
11937
- (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx61(
12751
+ (testResult?.latencyMs != null || testResult?.cost != null && testResult.cost > 0) && /* @__PURE__ */ jsx62(
11938
12752
  "span",
11939
12753
  {
11940
12754
  "aria-hidden": true,
@@ -11946,38 +12760,38 @@ function JudgmentDetailDrawer({
11946
12760
  }
11947
12761
  }
11948
12762
  ),
11949
- testResult?.latencyMs != null && /* @__PURE__ */ jsx61(
12763
+ testResult?.latencyMs != null && /* @__PURE__ */ jsx62(
11950
12764
  Tooltip12,
11951
12765
  {
11952
- content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "End-to-end generation latency for this model call." }) }),
12766
+ content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: "End-to-end generation latency for this model call." }) }),
11953
12767
  placement: "bottom",
11954
12768
  portal: true,
11955
- children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
12769
+ children: /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, children: [
11956
12770
  (testResult.latencyMs / 1e3).toFixed(1),
11957
12771
  "s"
11958
12772
  ] })
11959
12773
  }
11960
12774
  ),
11961
- testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx61(
12775
+ testResult?.cost != null && testResult.cost > 0 && /* @__PURE__ */ jsx62(
11962
12776
  Tooltip12,
11963
12777
  {
11964
- content: /* @__PURE__ */ jsx61(Box30, { padding: 2, children: /* @__PURE__ */ jsx61(Text46, { size: 1, children: "Provider-reported cost for this model call." }) }),
12778
+ content: /* @__PURE__ */ jsx62(Box31, { padding: 2, children: /* @__PURE__ */ jsx62(Text47, { size: 1, children: "Provider-reported cost for this model call." }) }),
11965
12779
  placement: "bottom",
11966
12780
  portal: true,
11967
- children: /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, children: [
12781
+ children: /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, children: [
11968
12782
  "$",
11969
12783
  testResult.cost.toFixed(4)
11970
12784
  ] })
11971
12785
  }
11972
12786
  )
11973
12787
  ] }),
11974
- /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
11975
- /* @__PURE__ */ jsx61(Text46, { size: 2, weight: "medium", children: taskName }),
11976
- /* @__PURE__ */ jsx61(VariantBadge, { variant })
12788
+ /* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
12789
+ /* @__PURE__ */ jsx62(Text47, { size: 2, weight: "medium", children: taskName }),
12790
+ /* @__PURE__ */ jsx62(VariantBadge, { variant })
11977
12791
  ] })
11978
12792
  ] }),
11979
- /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 1, children: [
11980
- /* @__PURE__ */ jsx61(
12793
+ /* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 1, children: [
12794
+ /* @__PURE__ */ jsx62(
11981
12795
  "span",
11982
12796
  {
11983
12797
  style: {
@@ -11995,8 +12809,8 @@ function JudgmentDetailDrawer({
11995
12809
  children: "Esc"
11996
12810
  }
11997
12811
  ),
11998
- /* @__PURE__ */ jsx61(
11999
- Button9,
12812
+ /* @__PURE__ */ jsx62(
12813
+ Button11,
12000
12814
  {
12001
12815
  "aria-label": "Close (Esc)",
12002
12816
  autoFocus: true,
@@ -12008,8 +12822,8 @@ function JudgmentDetailDrawer({
12008
12822
  )
12009
12823
  ] })
12010
12824
  ] }),
12011
- /* @__PURE__ */ jsxs45(
12012
- Flex34,
12825
+ /* @__PURE__ */ jsxs46(
12826
+ Flex35,
12013
12827
  {
12014
12828
  align: "center",
12015
12829
  gap: 2,
@@ -12018,8 +12832,8 @@ function JudgmentDetailDrawer({
12018
12832
  paddingY: 2,
12019
12833
  style: TAB_BAR_STYLE,
12020
12834
  children: [
12021
- /* @__PURE__ */ jsx61(Box30, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs45(TabList2, { space: 2, children: [
12022
- /* @__PURE__ */ jsx61(
12835
+ /* @__PURE__ */ jsx62(Box31, { flex: 1, style: { minWidth: 0 }, children: /* @__PURE__ */ jsxs46(TabList2, { space: 2, children: [
12836
+ /* @__PURE__ */ jsx62(
12023
12837
  Tab2,
12024
12838
  {
12025
12839
  "aria-controls": "judgment-panel-reasoning",
@@ -12029,7 +12843,7 @@ function JudgmentDetailDrawer({
12029
12843
  selected: tab === "reasoning"
12030
12844
  }
12031
12845
  ),
12032
- hasOutputTab && /* @__PURE__ */ jsx61(
12846
+ hasOutputTab && /* @__PURE__ */ jsx62(
12033
12847
  Tab2,
12034
12848
  {
12035
12849
  "aria-controls": "judgment-panel-output",
@@ -12040,7 +12854,7 @@ function JudgmentDetailDrawer({
12040
12854
  }
12041
12855
  )
12042
12856
  ] }) }),
12043
- /* @__PURE__ */ jsx61(
12857
+ /* @__PURE__ */ jsx62(
12044
12858
  JudgmentActions,
12045
12859
  {
12046
12860
  onShowPrompts: onShowPrompts ? () => onShowPrompts(judgment) : void 0
@@ -12049,15 +12863,15 @@ function JudgmentDetailDrawer({
12049
12863
  ]
12050
12864
  }
12051
12865
  ),
12052
- /* @__PURE__ */ jsxs45(Box30, { padding: 4, style: CONTENT_STYLE, children: [
12053
- /* @__PURE__ */ jsx61(
12866
+ /* @__PURE__ */ jsxs46(Box31, { padding: 4, style: CONTENT_STYLE, children: [
12867
+ /* @__PURE__ */ jsx62(
12054
12868
  TabPanel2,
12055
12869
  {
12056
12870
  "aria-labelledby": "judgment-tab-reasoning",
12057
12871
  hidden: tab !== "reasoning",
12058
12872
  id: "judgment-panel-reasoning",
12059
- children: /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12060
- /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
12873
+ children: /* @__PURE__ */ jsxs46(Box31, { style: COPYABLE_BLOCK_STYLE, children: [
12874
+ /* @__PURE__ */ jsx62(Box31, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx62(
12061
12875
  CopyButton,
12062
12876
  {
12063
12877
  copiedLabel: "Reasoning copied",
@@ -12065,26 +12879,26 @@ function JudgmentDetailDrawer({
12065
12879
  text: reasoningText
12066
12880
  }
12067
12881
  ) }),
12068
- /* @__PURE__ */ jsx61(Markdown, { content: reasoningText }),
12069
- reasoningIsPreview && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
12882
+ /* @__PURE__ */ jsx62(Markdown, { content: reasoningText }),
12883
+ reasoningIsPreview && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, style: { marginTop: 8 }, children: fullStatus === "loading" ? "Loading full reasoning\u2026" : "Showing preview (280 chars). Full reasoning not yet loaded." })
12070
12884
  ] })
12071
12885
  }
12072
12886
  ),
12073
- hasOutputTab && /* @__PURE__ */ jsxs45(
12887
+ hasOutputTab && /* @__PURE__ */ jsxs46(
12074
12888
  TabPanel2,
12075
12889
  {
12076
12890
  "aria-labelledby": "judgment-tab-output",
12077
12891
  hidden: tab !== "output",
12078
12892
  id: "judgment-panel-output",
12079
12893
  children: [
12080
- !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Fetching model output\u2026" }),
12081
- !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs45(Text46, { muted: true, size: 1, style: { color: "#f87171" }, children: [
12894
+ !resolvedOutput && fetchInFlight && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, children: "Fetching model output\u2026" }),
12895
+ !resolvedOutput && fetchFailed && /* @__PURE__ */ jsxs46(Text47, { muted: true, size: 1, style: { color: "#f87171" }, children: [
12082
12896
  "Failed to load model output",
12083
12897
  artifactCache?.error ? `: ${artifactCache.error}` : ""
12084
12898
  ] }),
12085
- !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx61(Text46, { muted: true, size: 1, children: "Model output not available for this entry." }),
12086
- resolvedOutput && /* @__PURE__ */ jsxs45(Box30, { style: COPYABLE_BLOCK_STYLE, children: [
12087
- /* @__PURE__ */ jsx61(Box30, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx61(
12899
+ !resolvedOutput && entryUnavailable && /* @__PURE__ */ jsx62(Text47, { muted: true, size: 1, children: "Model output not available for this entry." }),
12900
+ resolvedOutput && /* @__PURE__ */ jsxs46(Box31, { style: COPYABLE_BLOCK_STYLE, children: [
12901
+ /* @__PURE__ */ jsx62(Box31, { style: COPY_BUTTON_SLOT_STYLE, children: /* @__PURE__ */ jsx62(
12088
12902
  CopyButton,
12089
12903
  {
12090
12904
  copiedLabel: "Output copied",
@@ -12092,15 +12906,15 @@ function JudgmentDetailDrawer({
12092
12906
  text: resolvedOutput
12093
12907
  }
12094
12908
  ) }),
12095
- /* @__PURE__ */ jsx61(Markdown, { content: resolvedOutput })
12909
+ /* @__PURE__ */ jsx62(Markdown, { content: resolvedOutput })
12096
12910
  ] })
12097
12911
  ]
12098
12912
  }
12099
12913
  )
12100
12914
  ] }),
12101
- judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx61(Box30, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs45(Flex34, { align: "center", gap: 2, wrap: "wrap", children: [
12102
- /* @__PURE__ */ jsx61("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
12103
- judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx61(DocBadge, { doc }, doc.slug))
12915
+ judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsx62(Box31, { padding: 4, style: RELATED_DOCS_STYLE, children: /* @__PURE__ */ jsxs46(Flex35, { align: "center", gap: 2, wrap: "wrap", children: [
12916
+ /* @__PURE__ */ jsx62("span", { style: SECTION_LABEL_STYLE, children: "Related docs" }),
12917
+ judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx62(DocBadge, { doc }, doc.slug))
12104
12918
  ] }) })
12105
12919
  ]
12106
12920
  }
@@ -12108,7 +12922,7 @@ function JudgmentDetailDrawer({
12108
12922
  }
12109
12923
 
12110
12924
  // src/components/report-detail/JudgmentDetailDrawerOutlet.tsx
12111
- import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
12925
+ import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
12112
12926
  var MIN_WIDTH2 = 480;
12113
12927
  var MAX_WIDTH2 = 900;
12114
12928
  var OVERLAY_BREAKPOINT2 = 1024;
@@ -12118,7 +12932,7 @@ function computeDefaultWidth() {
12118
12932
  return Math.min(MAX_WIDTH2, Math.max(MIN_WIDTH2, target));
12119
12933
  }
12120
12934
  function useIsNarrow2() {
12121
- const [narrow, setNarrow] = useState25(
12935
+ const [narrow, setNarrow] = useState27(
12122
12936
  () => typeof window !== "undefined" && window.innerWidth < OVERLAY_BREAKPOINT2
12123
12937
  );
12124
12938
  useEffect14(() => {
@@ -12131,11 +12945,11 @@ function useIsNarrow2() {
12131
12945
  return narrow;
12132
12946
  }
12133
12947
  function useResizable2(defaultWidth) {
12134
- const [width, setWidth] = useState25(defaultWidth);
12948
+ const [width, setWidth] = useState27(defaultWidth);
12135
12949
  const dragging = useRef8(false);
12136
12950
  const startX = useRef8(0);
12137
12951
  const startWidth = useRef8(0);
12138
- const handleMouseDown = useCallback34(
12952
+ const handleMouseDown = useCallback35(
12139
12953
  (e) => {
12140
12954
  e.preventDefault();
12141
12955
  dragging.current = true;
@@ -12178,7 +12992,7 @@ function JudgmentDetailDrawerOutlet({
12178
12992
  const isNarrow = useIsNarrow2();
12179
12993
  const { handleMouseDown, width } = useResizable2(computeDefaultWidth());
12180
12994
  if (!isOpen || !active) return null;
12181
- return /* @__PURE__ */ jsxs46(
12995
+ return /* @__PURE__ */ jsxs47(
12182
12996
  "div",
12183
12997
  {
12184
12998
  style: isNarrow ? {
@@ -12204,7 +13018,7 @@ function JudgmentDetailDrawerOutlet({
12204
13018
  width
12205
13019
  },
12206
13020
  children: [
12207
- !isNarrow && /* @__PURE__ */ jsx62(
13021
+ !isNarrow && /* @__PURE__ */ jsx63(
12208
13022
  "div",
12209
13023
  {
12210
13024
  "aria-label": "Resize judgment drawer",
@@ -12229,8 +13043,8 @@ function JudgmentDetailDrawerOutlet({
12229
13043
  }
12230
13044
  }
12231
13045
  ),
12232
- /* @__PURE__ */ jsx62(
12233
- Card21,
13046
+ /* @__PURE__ */ jsx63(
13047
+ Card22,
12234
13048
  {
12235
13049
  borderLeft: !isNarrow,
12236
13050
  style: {
@@ -12239,7 +13053,7 @@ function JudgmentDetailDrawerOutlet({
12239
13053
  flexDirection: "column",
12240
13054
  overflow: "hidden"
12241
13055
  },
12242
- children: /* @__PURE__ */ jsx62(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx62(
13056
+ children: /* @__PURE__ */ jsx63(ReportArtifactProvider, { runId: active.runId, manifest: active.manifest, children: /* @__PURE__ */ jsx63(
12243
13057
  JudgmentDetailDrawer,
12244
13058
  {
12245
13059
  artifactCache: active.artifactCache,
@@ -12257,10 +13071,10 @@ function JudgmentDetailDrawerOutlet({
12257
13071
  }
12258
13072
 
12259
13073
  // src/components/ScoreTimeline.tsx
12260
- import { Card as Card22, Flex as Flex35, Select as Select2, Stack as Stack37, Text as Text47 } from "@sanity/ui";
12261
- import { useCallback as useCallback35, useEffect as useEffect15, useMemo as useMemo16, useState as useState26 } from "react";
13074
+ import { Card as Card23, Flex as Flex36, Select as Select2, Stack as Stack38, Text as Text48 } from "@sanity/ui";
13075
+ import { useCallback as useCallback36, useEffect as useEffect15, useMemo as useMemo16, useState as useState28 } from "react";
12262
13076
  import { useClient as useClient11 } from "sanity";
12263
- import { jsx as jsx63, jsxs as jsxs47 } from "react/jsx-runtime";
13077
+ import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
12264
13078
  var CHART_HEIGHT = 220;
12265
13079
  var CHART_WIDTH = 800;
12266
13080
  var PAD_BOTTOM = 30;
@@ -12295,10 +13109,10 @@ function scoreForPoint(point, area) {
12295
13109
  }
12296
13110
  function ScoreTimeline({ mode = null, source = null }) {
12297
13111
  const client = useClient11({ apiVersion: API_VERSION });
12298
- const [dataPoints, setDataPoints] = useState26([]);
12299
- const [loading, setLoading] = useState26(true);
12300
- const [rangeDays, setRangeDays] = useState26(30);
12301
- const [selectedArea, setSelectedArea] = useState26(null);
13112
+ const [dataPoints, setDataPoints] = useState28([]);
13113
+ const [loading, setLoading] = useState28(true);
13114
+ const [rangeDays, setRangeDays] = useState28(30);
13115
+ const [selectedArea, setSelectedArea] = useState28(null);
12302
13116
  const areaNames = useMemo16(() => {
12303
13117
  const names = /* @__PURE__ */ new Set();
12304
13118
  for (const dp of dataPoints) {
@@ -12308,7 +13122,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12308
13122
  }
12309
13123
  return Array.from(names).sort();
12310
13124
  }, [dataPoints]);
12311
- const fetchData = useCallback35(async () => {
13125
+ const fetchData = useCallback36(async () => {
12312
13126
  setLoading(true);
12313
13127
  try {
12314
13128
  const startDate = rangeDays ? daysAgo(rangeDays) : "1970-01-01T00:00:00Z";
@@ -12344,14 +13158,14 @@ function ScoreTimeline({ mode = null, source = null }) {
12344
13158
  if (chartPoints.length === 0) return 0;
12345
13159
  return chartPoints.reduce((sum, p) => sum + p.score, 0) / chartPoints.length;
12346
13160
  }, [chartPoints]);
12347
- const handleRangeChange = useCallback35(
13161
+ const handleRangeChange = useCallback36(
12348
13162
  (e) => {
12349
13163
  const val = e.currentTarget.value;
12350
13164
  setRangeDays(val === "all" ? null : Number(val));
12351
13165
  },
12352
13166
  []
12353
13167
  );
12354
- const handleAreaChange = useCallback35(
13168
+ const handleAreaChange = useCallback36(
12355
13169
  (e) => {
12356
13170
  const val = e.currentTarget.value;
12357
13171
  setSelectedArea(val || null);
@@ -12359,22 +13173,22 @@ function ScoreTimeline({ mode = null, source = null }) {
12359
13173
  []
12360
13174
  );
12361
13175
  const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
12362
- return /* @__PURE__ */ jsxs47(Stack37, { space: 4, children: [
12363
- /* @__PURE__ */ jsxs47(Flex35, { gap: 3, children: [
12364
- /* @__PURE__ */ jsx63(
13176
+ return /* @__PURE__ */ jsxs48(Stack38, { space: 4, children: [
13177
+ /* @__PURE__ */ jsxs48(Flex36, { gap: 3, children: [
13178
+ /* @__PURE__ */ jsx64(
12365
13179
  Select2,
12366
13180
  {
12367
13181
  onChange: handleRangeChange,
12368
13182
  value: rangeDays?.toString() ?? "all",
12369
- children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx63("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
13183
+ children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx64("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
12370
13184
  }
12371
13185
  ),
12372
- /* @__PURE__ */ jsxs47(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
12373
- /* @__PURE__ */ jsx63("option", { value: "", children: "Overall" }),
12374
- areaNames.map((name) => /* @__PURE__ */ jsx63("option", { value: name, children: name }, name))
13186
+ /* @__PURE__ */ jsxs48(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
13187
+ /* @__PURE__ */ jsx64("option", { value: "", children: "Overall" }),
13188
+ areaNames.map((name) => /* @__PURE__ */ jsx64("option", { value: name, children: name }, name))
12375
13189
  ] })
12376
13190
  ] }),
12377
- /* @__PURE__ */ jsx63(Card22, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx63(Flex35, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx63(Text47, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs47(
13191
+ /* @__PURE__ */ jsx64(Card23, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx64(Flex36, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx64(Flex36, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs48(
12378
13192
  "svg",
12379
13193
  {
12380
13194
  style: { display: "block", width: "100%" },
@@ -12382,8 +13196,8 @@ function ScoreTimeline({ mode = null, source = null }) {
12382
13196
  children: [
12383
13197
  Y_TICKS.map((tick) => {
12384
13198
  const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
12385
- return /* @__PURE__ */ jsxs47("g", { children: [
12386
- /* @__PURE__ */ jsx63(
13199
+ return /* @__PURE__ */ jsxs48("g", { children: [
13200
+ /* @__PURE__ */ jsx64(
12387
13201
  "line",
12388
13202
  {
12389
13203
  stroke: "#ccc",
@@ -12394,7 +13208,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12394
13208
  y2: y
12395
13209
  }
12396
13210
  ),
12397
- /* @__PURE__ */ jsx63(
13211
+ /* @__PURE__ */ jsx64(
12398
13212
  "text",
12399
13213
  {
12400
13214
  dominantBaseline: "middle",
@@ -12414,7 +13228,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12414
13228
  chartPoints.length - 1
12415
13229
  ].map((idx) => {
12416
13230
  const p = chartPoints[idx];
12417
- return /* @__PURE__ */ jsx63(
13231
+ return /* @__PURE__ */ jsx64(
12418
13232
  "text",
12419
13233
  {
12420
13234
  fill: "#999",
@@ -12426,7 +13240,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12426
13240
  },
12427
13241
  idx
12428
13242
  );
12429
- }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
13243
+ }) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx64(
12430
13244
  "text",
12431
13245
  {
12432
13246
  fill: "#999",
@@ -12438,7 +13252,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12438
13252
  },
12439
13253
  idx
12440
13254
  )),
12441
- /* @__PURE__ */ jsx63(
13255
+ /* @__PURE__ */ jsx64(
12442
13256
  "polyline",
12443
13257
  {
12444
13258
  fill: "none",
@@ -12448,7 +13262,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12448
13262
  strokeWidth: 2.5
12449
13263
  }
12450
13264
  ),
12451
- chartPoints.map((p, idx) => /* @__PURE__ */ jsx63(
13265
+ chartPoints.map((p, idx) => /* @__PURE__ */ jsx64(
12452
13266
  "circle",
12453
13267
  {
12454
13268
  cx: p.x,
@@ -12457,7 +13271,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12457
13271
  r: 4,
12458
13272
  stroke: "#fff",
12459
13273
  strokeWidth: 1.5,
12460
- children: /* @__PURE__ */ jsxs47("title", { children: [
13274
+ children: /* @__PURE__ */ jsxs48("title", { children: [
12461
13275
  formatDate(p.date),
12462
13276
  ": ",
12463
13277
  Math.round(p.score)
@@ -12468,7 +13282,7 @@ function ScoreTimeline({ mode = null, source = null }) {
12468
13282
  ]
12469
13283
  }
12470
13284
  ) }),
12471
- /* @__PURE__ */ jsxs47(Text47, { muted: true, size: 2, children: [
13285
+ /* @__PURE__ */ jsxs48(Text48, { muted: true, size: 2, children: [
12472
13286
  chartPoints.length,
12473
13287
  " data point",
12474
13288
  chartPoints.length !== 1 ? "s" : ""
@@ -12478,13 +13292,13 @@ function ScoreTimeline({ mode = null, source = null }) {
12478
13292
  var ScoreTimeline_default = ScoreTimeline;
12479
13293
 
12480
13294
  // src/components/Dashboard.tsx
12481
- import { jsx as jsx64, jsxs as jsxs48 } from "react/jsx-runtime";
13295
+ import { jsx as jsx65, jsxs as jsxs49 } from "react/jsx-runtime";
12482
13296
  var VIEW_PARAM_MAP = {
12483
13297
  compare: "compare",
12484
13298
  timeline: "timeline"
12485
13299
  };
12486
13300
  function Dashboard() {
12487
- return /* @__PURE__ */ jsx64(HelpProvider, { children: /* @__PURE__ */ jsx64(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx64(DashboardShell, {}) }) });
13301
+ return /* @__PURE__ */ jsx65(HelpProvider, { children: /* @__PURE__ */ jsx65(JudgmentDrawerProvider, { children: /* @__PURE__ */ jsx65(DashboardShell, {}) }) });
12488
13302
  }
12489
13303
  function DashboardShell() {
12490
13304
  const router = useRouter3();
@@ -12494,7 +13308,7 @@ function DashboardShell() {
12494
13308
  useEffect16(() => {
12495
13309
  if (!reportId) closeDrawer();
12496
13310
  }, [reportId, closeDrawer]);
12497
- const handleJudgmentDrawerClose = useCallback36(() => {
13311
+ const handleJudgmentDrawerClose = useCallback37(() => {
12498
13312
  closeDrawer();
12499
13313
  const state = { ...router.state };
12500
13314
  if (state.focus) {
@@ -12502,10 +13316,10 @@ function DashboardShell() {
12502
13316
  router.navigate(state);
12503
13317
  }
12504
13318
  }, [closeDrawer, router]);
12505
- return /* @__PURE__ */ jsxs48(Flex36, { style: { height: "100%" }, children: [
12506
- /* @__PURE__ */ jsx64(Box31, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx64(DashboardContent, {}) }),
12507
- /* @__PURE__ */ jsx64(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
12508
- /* @__PURE__ */ jsx64(HelpDrawer, {})
13319
+ return /* @__PURE__ */ jsxs49(Flex37, { style: { height: "100%" }, children: [
13320
+ /* @__PURE__ */ jsx65(Box32, { flex: 1, overflow: "auto", children: /* @__PURE__ */ jsx65(DashboardContent, {}) }),
13321
+ /* @__PURE__ */ jsx65(JudgmentDetailDrawerOutlet, { onClose: handleJudgmentDrawerClose }),
13322
+ /* @__PURE__ */ jsx65(HelpDrawer, {})
12509
13323
  ] });
12510
13324
  }
12511
13325
  function DashboardContent() {
@@ -12516,7 +13330,7 @@ function DashboardContent() {
12516
13330
  const isDetail = reportId !== null;
12517
13331
  const activeTab = isDetail ? "latest" : VIEW_PARAM_MAP[routerState.view ?? ""] ?? "latest";
12518
13332
  const defaultTopic = deriveHelpTopic(routerState);
12519
- const navigateToTab = useCallback36(
13333
+ const navigateToTab = useCallback37(
12520
13334
  (tab) => {
12521
13335
  if (tab === "latest") {
12522
13336
  router.navigate({});
@@ -12526,13 +13340,13 @@ function DashboardContent() {
12526
13340
  },
12527
13341
  [router]
12528
13342
  );
12529
- const handleSelectReport = useCallback36(
13343
+ const handleSelectReport = useCallback37(
12530
13344
  (id) => {
12531
13345
  router.navigate({ reportId: id });
12532
13346
  },
12533
13347
  [router]
12534
13348
  );
12535
- const handleTabChange = useCallback36(
13349
+ const handleTabChange = useCallback37(
12536
13350
  (tab, subTab, focus) => {
12537
13351
  if (!routerState.reportId) return;
12538
13352
  const state = {
@@ -12545,20 +13359,20 @@ function DashboardContent() {
12545
13359
  },
12546
13360
  [router, routerState.reportId]
12547
13361
  );
12548
- const handleBack = useCallback36(() => {
13362
+ const handleBack = useCallback37(() => {
12549
13363
  router.navigate({});
12550
13364
  }, [router]);
12551
- const handleOpenHelp = useCallback36(() => {
13365
+ const handleOpenHelp = useCallback37(() => {
12552
13366
  openHelp(defaultTopic);
12553
13367
  }, [openHelp, defaultTopic]);
12554
- return /* @__PURE__ */ jsx64(Container, { width: 4, children: /* @__PURE__ */ jsxs48(Stack38, { padding: 4, space: 4, children: [
12555
- /* @__PURE__ */ jsxs48(Flex36, { align: "center", gap: 3, children: [
12556
- /* @__PURE__ */ jsxs48(Stack38, { flex: 1, space: 1, children: [
12557
- /* @__PURE__ */ jsx64(Text48, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
12558
- /* @__PURE__ */ jsx64(Text48, { muted: true, size: 2, children: "Evaluation reports and score trends" })
13368
+ return /* @__PURE__ */ jsx65(Container, { width: 4, children: /* @__PURE__ */ jsxs49(Stack39, { padding: 4, space: 4, children: [
13369
+ /* @__PURE__ */ jsxs49(Flex37, { align: "center", gap: 3, children: [
13370
+ /* @__PURE__ */ jsxs49(Stack39, { flex: 1, space: 1, children: [
13371
+ /* @__PURE__ */ jsx65(Text49, { size: 4, weight: "bold", children: "AI Literacy Framework" }),
13372
+ /* @__PURE__ */ jsx65(Text49, { muted: true, size: 2, children: "Evaluation reports and score trends" })
12559
13373
  ] }),
12560
- /* @__PURE__ */ jsx64(
12561
- Button10,
13374
+ /* @__PURE__ */ jsx65(
13375
+ Button12,
12562
13376
  {
12563
13377
  icon: HelpCircleIcon8,
12564
13378
  mode: "bleed",
@@ -12568,8 +13382,8 @@ function DashboardContent() {
12568
13382
  }
12569
13383
  )
12570
13384
  ] }),
12571
- !isDetail && /* @__PURE__ */ jsxs48(TabList3, { space: 1, children: [
12572
- /* @__PURE__ */ jsx64(
13385
+ !isDetail && /* @__PURE__ */ jsxs49(TabList3, { space: 1, children: [
13386
+ /* @__PURE__ */ jsx65(
12573
13387
  Tab3,
12574
13388
  {
12575
13389
  "aria-controls": "latest-panel",
@@ -12579,7 +13393,7 @@ function DashboardContent() {
12579
13393
  selected: activeTab === "latest"
12580
13394
  }
12581
13395
  ),
12582
- /* @__PURE__ */ jsx64(
13396
+ /* @__PURE__ */ jsx65(
12583
13397
  Tab3,
12584
13398
  {
12585
13399
  "aria-controls": "timeline-panel",
@@ -12589,7 +13403,7 @@ function DashboardContent() {
12589
13403
  selected: activeTab === "timeline"
12590
13404
  }
12591
13405
  ),
12592
- /* @__PURE__ */ jsx64(
13406
+ /* @__PURE__ */ jsx65(
12593
13407
  Tab3,
12594
13408
  {
12595
13409
  "aria-controls": "compare-panel",
@@ -12600,10 +13414,10 @@ function DashboardContent() {
12600
13414
  }
12601
13415
  )
12602
13416
  ] }),
12603
- !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx64(LatestReports, { onSelectReport: handleSelectReport }) }),
12604
- !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx64(ScoreTimeline_default, {}) }),
12605
- !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx64(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx64(ComparisonView, {}) }),
12606
- isDetail && reportId && /* @__PURE__ */ jsx64(
13417
+ !isDetail && activeTab === "latest" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx65(LatestReports, { onSelectReport: handleSelectReport }) }),
13418
+ !isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx65(ScoreTimeline_default, {}) }),
13419
+ !isDetail && activeTab === "compare" && /* @__PURE__ */ jsx65(TabPanel3, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx65(ComparisonView, {}) }),
13420
+ isDetail && reportId && /* @__PURE__ */ jsx65(
12607
13421
  ReportDetail,
12608
13422
  {
12609
13423
  activeTab: routerState.tab ?? null,
@@ -12639,7 +13453,7 @@ function ailfTool(options = {}) {
12639
13453
  // src/actions/RunEvaluationAction.tsx
12640
13454
  import { BarChartIcon as BarChartIcon2 } from "@sanity/icons";
12641
13455
  import { useToast as useToast10 } from "@sanity/ui";
12642
- import { useCallback as useCallback37, useEffect as useEffect17, useRef as useRef9, useState as useState27 } from "react";
13456
+ import { useCallback as useCallback38, useEffect as useEffect17, useRef as useRef9, useState as useState29 } from "react";
12643
13457
  import {
12644
13458
  getReleaseIdFromReleaseDocumentId as getReleaseIdFromReleaseDocumentId3,
12645
13459
  useClient as useClient12,
@@ -12670,7 +13484,7 @@ function createRunEvaluationAction(options = {}) {
12670
13484
  const projectId = useProjectId2();
12671
13485
  const currentUser = useCurrentUser4();
12672
13486
  const toast = useToast10();
12673
- const [state, setState] = useState27({ status: "loading" });
13487
+ const [state, setState] = useState29({ status: "loading" });
12674
13488
  const requestedAtRef = useRef9(null);
12675
13489
  const perspectiveId = getReleaseIdFromReleaseDocumentId3(release._id);
12676
13490
  useEffect17(() => {
@@ -12766,7 +13580,7 @@ function createRunEvaluationAction(options = {}) {
12766
13580
  }, 15e3);
12767
13581
  return () => clearTimeout(timer);
12768
13582
  }, [client, perspectiveId, state]);
12769
- const handleRequest = useCallback37(async () => {
13583
+ const handleRequest = useCallback38(async () => {
12770
13584
  const releaseTitle = release.metadata?.title ?? perspectiveId ?? "release";
12771
13585
  const tag = `release-${slugify3(releaseTitle)}-${dateStamp3()}`;
12772
13586
  const now = Date.now();