@gobing-ai/knowledge-kit 0.1.8 → 0.1.10

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 (78) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.js +725 -1101
  3. package/dist/board/daily-voice/index.js +722 -101
  4. package/dist/board/itc/index.js +13 -0
  5. package/dist/index.js +1796 -102
  6. package/package.json +1 -1
  7. package/plugins/generations/content-gen/dist/index.js +4 -0
  8. package/plugins/generations/core-facts-gen/dist/index.js +4 -0
  9. package/plugins/generations/daily-article-gen/dist/index.js +4 -0
  10. package/plugins/generations/dailynews-gen/dist/index.js +4 -0
  11. package/plugins/generations/episode-plan-gen/dist/index.js +102 -1
  12. package/plugins/generations/episode-plan-gen/src/index.ts +2 -4
  13. package/plugins/generations/gemini-tts/dist/index.js +4 -0
  14. package/plugins/generations/image-gen/dist/index.js +4 -0
  15. package/plugins/generations/news-report-gen/dist/index.js +4 -0
  16. package/plugins/generations/voice-gen/dist/index.js +4 -0
  17. package/plugins/generations/voxcpm-tts/dist/index.js +4 -0
  18. package/plugins/ingestions/aihot-ingest/dist/index.js +4 -0
  19. package/plugins/ingestions/horizon-ingest/dist/index.js +28 -1
  20. package/plugins/ingestions/horizon-ingest/src/index.ts +34 -0
  21. package/plugins/ingestions/last30days-ingest/dist/index.js +11 -3
  22. package/plugins/ingestions/last30days-ingest/src/index.ts +14 -3
  23. package/plugins/ingestions/web-search/dist/index.js +4 -0
  24. package/plugins/kk/config.example.yaml +8 -0
  25. package/plugins/kk/plugin.json +1 -1
  26. package/plugins/kk/publish-presets/daily-ai-voice.json +123 -0
  27. package/plugins/kk/schedules/kk-daily-publish3-cn-peak.cron.tmpl +20 -0
  28. package/plugins/kk/schedules/kk-daily-publish3-overseas.cron.tmpl +17 -0
  29. package/plugins/kk/scripts/daily-stages.ts +665 -78
  30. package/plugins/kk/scripts/kk-workflow-stages.ts +11 -1
  31. package/plugins/kk/scripts/sentences.ts +134 -0
  32. package/plugins/kk/scripts/series-names.ts +124 -0
  33. package/plugins/kk/scripts/topic-boundary.json +18 -83
  34. package/plugins/kk/workflows/kk-collect.yaml +2 -0
  35. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +112 -9
  36. package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +842 -0
  37. package/plugins/kk/workflows/kk-daily-publish3.yaml +282 -0
  38. package/plugins/kk/workflows/kk-daily-safety.yaml +50 -5
  39. package/plugins/publishings/bilibili-pub/dist/index.js +4 -0
  40. package/plugins/publishings/cnblogs-pub/dist/index.js +4 -0
  41. package/plugins/publishings/csdn-pub/dist/index.js +4 -0
  42. package/plugins/publishings/csdn-pub/dist/profile-check.js +4 -0
  43. package/plugins/publishings/emdash-pub/dist/index.js +4 -0
  44. package/plugins/publishings/infoq-pub/dist/index.js +4 -0
  45. package/plugins/publishings/infoq-pub/dist/profile-check.js +4 -0
  46. package/plugins/publishings/jike-pub/dist/index.js +4 -0
  47. package/plugins/publishings/jike-pub/dist/profile-check.js +4 -0
  48. package/plugins/publishings/juejin-pub/dist/index.js +4 -0
  49. package/plugins/publishings/juejin-pub/dist/profile-check.js +4 -0
  50. package/plugins/publishings/medium-pub/dist/index.js +4 -0
  51. package/plugins/publishings/podcast-pub/README.md +65 -0
  52. package/plugins/publishings/podcast-pub/dist/index.js +1906 -374
  53. package/plugins/publishings/podcast-pub/plugin.json +1 -1
  54. package/plugins/publishings/podcast-pub/src/backfill.ts +465 -0
  55. package/plugins/publishings/podcast-pub/src/index.ts +211 -34
  56. package/plugins/publishings/podcast-pub/src/microfeed-client.ts +32 -3
  57. package/plugins/publishings/podcast-pub/src/seo.ts +1079 -0
  58. package/plugins/publishings/podcast-pub/src/show-notes.ts +74 -14
  59. package/plugins/publishings/qiita-pub/dist/index.js +4 -0
  60. package/plugins/publishings/shipinhao-pub/dist/index.js +4 -0
  61. package/plugins/publishings/sspai-pub/dist/index.js +4 -0
  62. package/plugins/publishings/substack-pub/dist/index.js +4 -0
  63. package/plugins/publishings/substack-pub/dist/profile-check.js +4 -0
  64. package/plugins/publishings/surfdash-pub/dist/index.js +313 -32
  65. package/plugins/publishings/surfdash-pub/src/digest-check.ts +218 -0
  66. package/plugins/publishings/surfdash-pub/src/index.ts +170 -39
  67. package/plugins/publishings/surfdash-pub/src/patch.ts +44 -7
  68. package/plugins/publishings/threads-pub/dist/index.js +4 -0
  69. package/plugins/publishings/wechatmp-pub/dist/index.js +4 -0
  70. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +4 -0
  71. package/plugins/publishings/weibo-pub/dist/index.js +4 -0
  72. package/plugins/publishings/weibo-pub/dist/profile-check.js +4 -0
  73. package/plugins/publishings/x-pub/dist/index.js +4 -0
  74. package/plugins/publishings/x-pub/dist/profile-check.js +4 -0
  75. package/plugins/publishings/xhs-pub/dist/index.js +4 -0
  76. package/plugins/publishings/xhs-pub/dist/profile-check.js +4 -0
  77. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +4 -0
  78. package/plugins/publishings/zenn-pub/dist/index.js +4 -0
@@ -43,6 +43,14 @@ function storeSelectionsQueryString(query) {
43
43
  }
44
44
  return params.toString();
45
45
  }
46
+ function storeChannelsQueryString(query) {
47
+ const params = new URLSearchParams({
48
+ from: String(query.fromMs),
49
+ until: String(query.untilMs),
50
+ page: String(query.page)
51
+ });
52
+ return params.toString();
53
+ }
46
54
  var DEFAULT_READER_ORIGIN = "http://127.0.0.1:4340";
47
55
  function readerOriginFrom(search, defaultOrigin = DEFAULT_READER_ORIGIN) {
48
56
  const override = new URLSearchParams(search).get("kkApi");
@@ -118,6 +126,10 @@ function createBoardClient(options) {
118
126
  if (!isNativeSpur && !isLoopbackHttpOrigin(options.readerOrigin)) {
119
127
  throw new Error(`reader origin must be loopback http, got '${options.readerOrigin}'`);
120
128
  }
129
+ const aggregateReader = origin(options.aggregateReaderOrigin ?? DEFAULT_READER_ORIGIN);
130
+ if (!isLoopbackHttpOrigin(options.aggregateReaderOrigin ?? DEFAULT_READER_ORIGIN)) {
131
+ throw new Error(`aggregate reader origin must be loopback http, got '${options.aggregateReaderOrigin}'`);
132
+ }
121
133
  const doFetch = options.fetchImpl ?? fetch;
122
134
  async function getJson(url) {
123
135
  const response = await doFetch(url, { headers: { accept: "application/json" } });
@@ -512,6 +524,7 @@ function createBoardClient(options) {
512
524
  return getJson(path);
513
525
  },
514
526
  storeSelections: (query = {}) => isNativeSpur ? nativeStoreSelections(query) : getJson(`${reader}/api/workflows/kk-collect/store/selections?${storeSelectionsQueryString(query)}`),
527
+ storeChannels: (query) => getJson(`${aggregateReader}/api/workflows/kk-collect/store/channels?${storeChannelsQueryString(query)}`),
515
528
  runDetail: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}`),
516
529
  progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
517
530
  };
@@ -967,8 +980,186 @@ function mergeRunPages(existing, page) {
967
980
  return { runs: merged, count: merged.length, nextCursor: page.nextCursor, hasMore: page.hasMore };
968
981
  }
969
982
 
983
+ // ../board/src/shared/channel-yield.tsx
984
+ import { jsx, jsxs } from "react/jsx-runtime";
985
+ function localDayKey(ms, timeZone) {
986
+ return new Intl.DateTimeFormat("en-CA", {
987
+ timeZone,
988
+ year: "numeric",
989
+ month: "2-digit",
990
+ day: "2-digit"
991
+ }).format(ms);
992
+ }
993
+ function isLocalMidnight(ms, timeZone) {
994
+ return new Intl.DateTimeFormat("en-GB", {
995
+ timeZone,
996
+ hour: "2-digit",
997
+ minute: "2-digit",
998
+ second: "2-digit",
999
+ hour12: false
1000
+ }).format(ms) === "00:00:00";
1001
+ }
1002
+ function isPartialDay(day, data) {
1003
+ const fromDay = localDayKey(data.fromMs, data.timeZone);
1004
+ const untilDay = localDayKey(Math.max(data.fromMs, data.untilMs - 1), data.timeZone);
1005
+ if (day === fromDay && !isLocalMidnight(data.fromMs, data.timeZone))
1006
+ return true;
1007
+ if (day === untilDay && !isLocalMidnight(data.untilMs, data.timeZone))
1008
+ return true;
1009
+ return false;
1010
+ }
1011
+ function lastPositiveLabel(at) {
1012
+ return at === null ? "unknown" : `${new Date(at).toLocaleString()} (${new Date(at).toISOString()})`;
1013
+ }
1014
+ function ChannelYieldTable({ data }) {
1015
+ const { sources, byDay, bySource } = data;
1016
+ if (byDay.length === 0) {
1017
+ return /* @__PURE__ */ jsx("p", {
1018
+ className: "kk-board-state",
1019
+ children: "No new items in this range."
1020
+ });
1021
+ }
1022
+ const grandTotal = sources.reduce((sum, source) => sum + (bySource[source] ?? 0), 0);
1023
+ return /* @__PURE__ */ jsxs("table", {
1024
+ className: "kk-table kk-channel-yield-table",
1025
+ children: [
1026
+ /* @__PURE__ */ jsx("thead", {
1027
+ children: /* @__PURE__ */ jsxs("tr", {
1028
+ children: [
1029
+ /* @__PURE__ */ jsx("th", {
1030
+ scope: "col",
1031
+ children: "Day"
1032
+ }),
1033
+ sources.map((source) => /* @__PURE__ */ jsx("th", {
1034
+ scope: "col",
1035
+ children: source
1036
+ }, source)),
1037
+ /* @__PURE__ */ jsx("th", {
1038
+ scope: "col",
1039
+ children: "Total"
1040
+ })
1041
+ ]
1042
+ })
1043
+ }),
1044
+ /* @__PURE__ */ jsxs("tbody", {
1045
+ children: [
1046
+ byDay.map((day) => /* @__PURE__ */ jsxs("tr", {
1047
+ children: [
1048
+ /* @__PURE__ */ jsxs("td", {
1049
+ children: [
1050
+ day.day,
1051
+ isPartialDay(day.day, data) ? " (partial)" : ""
1052
+ ]
1053
+ }),
1054
+ sources.map((source) => /* @__PURE__ */ jsx("td", {
1055
+ children: day.sources[source] ?? 0
1056
+ }, source)),
1057
+ /* @__PURE__ */ jsx("td", {
1058
+ children: day.total
1059
+ })
1060
+ ]
1061
+ }, day.day)),
1062
+ /* @__PURE__ */ jsxs("tr", {
1063
+ className: "kk-table-total",
1064
+ children: [
1065
+ /* @__PURE__ */ jsx("td", {
1066
+ children: "Total"
1067
+ }),
1068
+ sources.map((source) => /* @__PURE__ */ jsx("td", {
1069
+ children: bySource[source] ?? 0
1070
+ }, source)),
1071
+ /* @__PURE__ */ jsx("td", {
1072
+ children: grandTotal
1073
+ })
1074
+ ]
1075
+ })
1076
+ ]
1077
+ })
1078
+ ]
1079
+ });
1080
+ }
1081
+ function PluginRunTable({ data }) {
1082
+ const { plugins, runsByDay, lastPositiveAt } = data;
1083
+ if (runsByDay.length === 0) {
1084
+ return /* @__PURE__ */ jsx("p", {
1085
+ className: "kk-board-state",
1086
+ children: "No collection ticks in this range."
1087
+ });
1088
+ }
1089
+ return /* @__PURE__ */ jsxs("div", {
1090
+ className: "kk-plugin-run",
1091
+ children: [
1092
+ /* @__PURE__ */ jsxs("table", {
1093
+ className: "kk-table kk-plugin-run-table",
1094
+ children: [
1095
+ /* @__PURE__ */ jsx("caption", {
1096
+ className: "kk-plugin-run-caption",
1097
+ children: "Zero recorded contributions — plugin invocation health unknown."
1098
+ }),
1099
+ /* @__PURE__ */ jsx("thead", {
1100
+ children: /* @__PURE__ */ jsxs("tr", {
1101
+ children: [
1102
+ /* @__PURE__ */ jsx("th", {
1103
+ scope: "col",
1104
+ children: "Day"
1105
+ }),
1106
+ /* @__PURE__ */ jsx("th", {
1107
+ scope: "col",
1108
+ children: "Runs"
1109
+ }),
1110
+ plugins.map((plugin) => /* @__PURE__ */ jsx("th", {
1111
+ scope: "col",
1112
+ children: plugin
1113
+ }, plugin))
1114
+ ]
1115
+ })
1116
+ }),
1117
+ /* @__PURE__ */ jsx("tbody", {
1118
+ children: runsByDay.map((day) => {
1119
+ const pluginCounts = day.plugins;
1120
+ return /* @__PURE__ */ jsxs("tr", {
1121
+ children: [
1122
+ /* @__PURE__ */ jsx("td", {
1123
+ children: day.day
1124
+ }),
1125
+ /* @__PURE__ */ jsx("td", {
1126
+ children: day.runs
1127
+ }),
1128
+ pluginCounts === null ? /* @__PURE__ */ jsx("td", {
1129
+ colSpan: plugins.length,
1130
+ className: "kk-board-state",
1131
+ children: "unknown"
1132
+ }) : plugins.map((plugin) => /* @__PURE__ */ jsx("td", {
1133
+ children: pluginCounts[plugin] ?? 0
1134
+ }, plugin))
1135
+ ]
1136
+ }, day.day);
1137
+ })
1138
+ })
1139
+ ]
1140
+ }),
1141
+ /* @__PURE__ */ jsx("dl", {
1142
+ className: "kk-board-facts",
1143
+ children: plugins.map((plugin) => /* @__PURE__ */ jsxs("div", {
1144
+ children: [
1145
+ /* @__PURE__ */ jsxs("dt", {
1146
+ children: [
1147
+ "Last positive ",
1148
+ plugin
1149
+ ]
1150
+ }),
1151
+ /* @__PURE__ */ jsx("dd", {
1152
+ children: lastPositiveLabel(lastPositiveAt[plugin] ?? null)
1153
+ })
1154
+ ]
1155
+ }, plugin))
1156
+ })
1157
+ ]
1158
+ });
1159
+ }
1160
+
970
1161
  // ../board/src/collect/panels.tsx
971
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1162
+ import { jsx as jsx2, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
972
1163
  function cadenceBadge(cadence) {
973
1164
  switch (cadence?.state) {
974
1165
  case "on schedule":
@@ -984,8 +1175,8 @@ function cadenceBadge(cadence) {
984
1175
  function StoreState({ diagnostics }) {
985
1176
  if (diagnostics.length === 0)
986
1177
  return null;
987
- return /* @__PURE__ */ jsx(Fragment, {
988
- children: dedupeDiagnostics(diagnostics).map((diagnostic) => /* @__PURE__ */ jsx("p", {
1178
+ return /* @__PURE__ */ jsx2(Fragment, {
1179
+ children: dedupeDiagnostics(diagnostics).map((diagnostic) => /* @__PURE__ */ jsx2("p", {
989
1180
  role: "status",
990
1181
  className: "kk-board-diagnostic",
991
1182
  children: diagnosticLine(diagnostic)
@@ -995,793 +1186,156 @@ function StoreState({ diagnostics }) {
995
1186
  function storeCellText(status) {
996
1187
  return status === "running" ? "in progress" : "no store row";
997
1188
  }
998
- function Sparkline({ data, color = "var(--color-spur-accent)" }) {
999
- if (data.length < 2)
1000
- return null;
1001
- const min = Math.min(...data);
1002
- const max = Math.max(...data);
1003
- const range = max - min || 1;
1004
- const width = 72;
1005
- const height = 28;
1006
- const padding = 2;
1007
- const points = data.map((val, idx) => {
1008
- const x = idx / (data.length - 1) * (width - padding * 2) + padding;
1009
- const y = height - padding - (val - min) / range * (height - padding * 2);
1010
- return `${x.toFixed(1)},${y.toFixed(1)}`;
1011
- });
1012
- const pathD = `M ${points.join(" L ")}`;
1013
- return /* @__PURE__ */ jsx("svg", {
1014
- className: "kk-sparkline-svg",
1015
- viewBox: `0 0 ${width} ${height}`,
1016
- "aria-hidden": "true",
1017
- children: /* @__PURE__ */ jsx("path", {
1018
- d: pathD,
1019
- fill: "none",
1020
- stroke: color,
1021
- strokeWidth: "1.75",
1022
- strokeLinecap: "round",
1023
- strokeLinejoin: "round"
1024
- })
1025
- });
1026
- }
1027
- var TIME_RANGES = ["1h", "4h", "24h", "7d", "30d", "All"];
1189
+ var TIME_RANGES = ["24h", "7d", "14d", "30d", "All"];
1028
1190
  function SummaryPanel({
1029
- runs,
1030
- overview,
1031
- now,
1032
- timeRange = "24h",
1191
+ channels,
1192
+ timeRange = "14d",
1033
1193
  onTimeRangeChange,
1034
- onInspectRun
1194
+ channelsPage = 1,
1195
+ onChannelsPageChange
1035
1196
  }) {
1036
- const page = runs.slice(0, MAX_OVERVIEW_RUNS);
1037
- const storeState = overview === null ? "loading" : overview.availability;
1038
- const counts = overview !== null && storeState === "available" ? bannerCounts(page, overview.rows) : null;
1039
- const cadence = overview === null ? null : cadenceState(overview.lastStoredAt, now);
1040
- let totalInserted = 0;
1041
- let totalUpdated = 0;
1042
- let totalLabelRows = 0;
1043
- let totalLabeledItems = 0;
1044
- let totalYieldSelected = 0;
1045
- let totalYieldPublished = 0;
1046
- let totalYieldDropped = 0;
1047
- const sourceTotals = new Map;
1048
- const insertedTrend = [];
1049
- const yieldTrend = [];
1050
- if (overview !== null && storeState === "available") {
1051
- for (const run of page) {
1052
- const row = overview.rows[run.id];
1053
- if (row) {
1054
- totalInserted += row.inserted;
1055
- totalUpdated += row.updated;
1056
- totalLabelRows += row.labelRows;
1057
- totalLabeledItems += row.labeledItems;
1058
- totalYieldSelected += row.yield.selected;
1059
- totalYieldPublished += row.yield.published;
1060
- totalYieldDropped += row.yield.dropped;
1061
- insertedTrend.push(row.inserted + row.updated);
1062
- yieldTrend.push(row.yield.selected);
1063
- for (const [source, count] of Object.entries(row.sourceCounts)) {
1064
- sourceTotals.set(source, (sourceTotals.get(source) ?? 0) + count);
1065
- }
1066
- }
1067
- }
1068
- }
1069
- const totalCollected = totalInserted + totalUpdated;
1070
- const completedRuns = page.filter((r) => r.status === "done").length;
1071
- const failedRuns = page.filter((r) => r.status === "failed").length;
1072
- const successRate = page.length > 0 ? Math.round(completedRuns / page.length * 100) : 100;
1073
- const totalSelections = totalYieldSelected + totalYieldPublished + totalYieldDropped;
1074
- const yieldRate = totalCollected > 0 ? Math.round(totalSelections / totalCollected * 100) : 0;
1075
- const sortedSources = [...sourceTotals.entries()].sort((a, b) => b[1] - a[1]);
1076
- const chartRuns = page.slice(0, 16).reverse();
1077
- return /* @__PURE__ */ jsxs("section", {
1197
+ const totalPages = channels === null ? 1 : Math.max(1, Math.ceil(channels.totalDays / channels.pageSize));
1198
+ const showPager = channels !== null && channels.availability === "available" && channels.totalDays > channels.pageSize;
1199
+ return /* @__PURE__ */ jsxs2("section", {
1078
1200
  className: "kk-card kk-collect-overview",
1079
1201
  children: [
1080
- /* @__PURE__ */ jsxs("div", {
1202
+ /* @__PURE__ */ jsxs2("div", {
1081
1203
  className: "kk-summary-topbar",
1082
1204
  children: [
1083
- /* @__PURE__ */ jsxs("div", {
1205
+ /* @__PURE__ */ jsx2("div", {
1084
1206
  className: "kk-summary-topbar-left",
1085
- children: [
1086
- /* @__PURE__ */ jsx("div", {
1087
- className: "kk-time-pills",
1088
- children: TIME_RANGES.map((range) => /* @__PURE__ */ jsx("button", {
1089
- type: "button",
1090
- className: `kk-time-pill ${timeRange === range ? "active" : ""}`,
1091
- onClick: () => onTimeRangeChange?.(range),
1092
- children: range
1093
- }, range))
1094
- }),
1095
- /* @__PURE__ */ jsxs("span", {
1096
- className: `kk-badge ${cadenceBadge(cadence)}`,
1097
- children: [
1098
- "● ",
1099
- cadence?.state ?? "cadence: pending"
1100
- ]
1101
- }),
1102
- counts !== null && counts.failed + counts.doneWithoutRow > 0 ? /* @__PURE__ */ jsxs("span", {
1103
- className: "kk-badge kk-badge-warning",
1104
- children: [
1105
- counts.failed + counts.doneWithoutRow,
1106
- " needs attention"
1107
- ]
1108
- }) : null
1109
- ]
1207
+ children: /* @__PURE__ */ jsx2("div", {
1208
+ className: "kk-time-pills",
1209
+ children: TIME_RANGES.map((range) => /* @__PURE__ */ jsx2("button", {
1210
+ type: "button",
1211
+ className: `kk-time-pill ${timeRange === range ? "active" : ""}`,
1212
+ onClick: () => onTimeRangeChange?.(range),
1213
+ children: range
1214
+ }, range))
1215
+ })
1110
1216
  }),
1111
- /* @__PURE__ */ jsxs("div", {
1217
+ /* @__PURE__ */ jsx2("div", {
1112
1218
  className: "kk-summary-kpi-footer",
1113
- children: [
1114
- /* @__PURE__ */ jsx("span", {
1115
- children: cadence?.detail ?? "The store has not answered yet."
1116
- }),
1117
- overview?.lastStoredAt ? /* @__PURE__ */ jsxs("span", {
1118
- children: [
1119
- "· Last store: ",
1120
- formatTimestamp(overview.lastStoredAt)
1121
- ]
1122
- }) : null
1123
- ]
1219
+ children: channels === null ? /* @__PURE__ */ jsx2("span", {
1220
+ children: "The channel-yield aggregate has not loaded yet."
1221
+ }) : channels.availability === "unavailable" ? /* @__PURE__ */ jsx2("span", {
1222
+ children: "The store could not be read; no counts are shown."
1223
+ }) : /* @__PURE__ */ jsxs2("span", {
1224
+ children: [
1225
+ channels.totalDays,
1226
+ " day",
1227
+ channels.totalDays === 1 ? "" : "s",
1228
+ " · time zone",
1229
+ " ",
1230
+ channels.timeZone
1231
+ ]
1232
+ })
1124
1233
  })
1125
1234
  ]
1126
1235
  }),
1127
- overview !== null && overview.availability === "unavailable" ? /* @__PURE__ */ jsxs(Fragment, {
1236
+ channels !== null && channels.availability === "unavailable" ? /* @__PURE__ */ jsxs2(Fragment, {
1128
1237
  children: [
1129
- /* @__PURE__ */ jsx("p", {
1130
- children: "The store could not be read for this page; no counts are shown."
1238
+ /* @__PURE__ */ jsx2("p", {
1239
+ children: "The store could not be read for this range; no counts are shown."
1131
1240
  }),
1132
- /* @__PURE__ */ jsx(StoreState, {
1133
- diagnostics: overview.diagnostics
1241
+ /* @__PURE__ */ jsx2(StoreState, {
1242
+ diagnostics: channels.diagnostics
1134
1243
  })
1135
1244
  ]
1136
1245
  }) : null,
1137
- overview === null ? /* @__PURE__ */ jsx("p", {
1138
- children: "The store overview has not loaded yet."
1246
+ channels !== null && channels.availability === "available" && channels.diagnostics.length > 0 ? /* @__PURE__ */ jsx2(StoreState, {
1247
+ diagnostics: channels.diagnostics
1139
1248
  }) : null,
1140
- /* @__PURE__ */ jsxs("div", {
1141
- className: "kk-summary-kpis",
1142
- children: [
1143
- /* @__PURE__ */ jsxs("div", {
1144
- className: "kk-summary-kpi-card",
1145
- children: [
1146
- /* @__PURE__ */ jsxs("div", {
1147
- className: "kk-summary-kpi-header",
1148
- children: [
1149
- /* @__PURE__ */ jsx("span", {
1150
- className: "kk-stat-label",
1151
- children: "Total Ingested Items"
1152
- }),
1153
- /* @__PURE__ */ jsxs("span", {
1154
- className: "kk-badge kk-badge-success",
1155
- children: [
1156
- "+",
1157
- totalInserted,
1158
- " new"
1159
- ]
1160
- })
1161
- ]
1162
- }),
1163
- /* @__PURE__ */ jsxs("div", {
1164
- className: "kk-summary-kpi-body",
1165
- children: [
1166
- /* @__PURE__ */ jsx("span", {
1167
- className: "kk-summary-kpi-val",
1168
- children: totalCollected.toLocaleString()
1169
- }),
1170
- /* @__PURE__ */ jsx(Sparkline, {
1171
- data: insertedTrend.length >= 2 ? insertedTrend : [2, 5, 4, 8, 7, 10]
1172
- })
1173
- ]
1174
- }),
1175
- /* @__PURE__ */ jsx("div", {
1176
- className: "kk-summary-kpi-footer",
1177
- children: /* @__PURE__ */ jsxs("span", {
1178
- children: [
1179
- totalInserted,
1180
- " inserted · ",
1181
- totalUpdated,
1182
- " updated"
1183
- ]
1184
- })
1185
- })
1186
- ]
1187
- }),
1188
- /* @__PURE__ */ jsxs("div", {
1189
- className: "kk-summary-kpi-card",
1190
- children: [
1191
- /* @__PURE__ */ jsxs("div", {
1192
- className: "kk-summary-kpi-header",
1193
- children: [
1194
- /* @__PURE__ */ jsx("span", {
1195
- className: "kk-stat-label",
1196
- children: "Ingestion Success Rate"
1197
- }),
1198
- /* @__PURE__ */ jsxs("span", {
1199
- className: "kk-badge kk-badge-running",
1200
- children: [
1201
- completedRuns,
1202
- " completed"
1203
- ]
1204
- })
1205
- ]
1206
- }),
1207
- /* @__PURE__ */ jsxs("div", {
1208
- className: "kk-summary-kpi-body",
1209
- children: [
1210
- /* @__PURE__ */ jsxs("span", {
1211
- className: "kk-summary-kpi-val",
1212
- children: [
1213
- successRate,
1214
- "%"
1215
- ]
1216
- }),
1217
- /* @__PURE__ */ jsx(Sparkline, {
1218
- data: [95, 98, 97, 100, 99, successRate],
1219
- color: "var(--color-spur-success)"
1220
- })
1221
- ]
1222
- }),
1223
- /* @__PURE__ */ jsx("div", {
1224
- className: "kk-summary-kpi-footer",
1225
- children: /* @__PURE__ */ jsxs("span", {
1226
- children: [
1227
- completedRuns,
1228
- " ok / ",
1229
- failedRuns,
1230
- " failed runs"
1231
- ]
1232
- })
1233
- })
1234
- ]
1235
- }),
1236
- /* @__PURE__ */ jsxs("div", {
1237
- className: "kk-summary-kpi-card",
1238
- children: [
1239
- /* @__PURE__ */ jsxs("div", {
1240
- className: "kk-summary-kpi-header",
1241
- children: [
1242
- /* @__PURE__ */ jsx("span", {
1243
- className: "kk-stat-label",
1244
- children: "Label Decisions"
1245
- }),
1246
- /* @__PURE__ */ jsxs("span", {
1247
- className: "kk-badge kk-badge-neutral",
1248
- children: [
1249
- totalLabeledItems,
1250
- " items"
1251
- ]
1252
- })
1253
- ]
1254
- }),
1255
- /* @__PURE__ */ jsxs("div", {
1256
- className: "kk-summary-kpi-body",
1257
- children: [
1258
- /* @__PURE__ */ jsx("span", {
1259
- className: "kk-summary-kpi-val",
1260
- children: totalLabelRows.toLocaleString()
1261
- }),
1262
- /* @__PURE__ */ jsx(Sparkline, {
1263
- data: [120, 140, 135, 180, 190, 210],
1264
- color: "#a855f7"
1265
- })
1266
- ]
1267
- }),
1268
- /* @__PURE__ */ jsx("div", {
1269
- className: "kk-summary-kpi-footer",
1270
- children: /* @__PURE__ */ jsxs("span", {
1271
- children: [
1272
- "Evaluated across ",
1273
- totalLabeledItems,
1274
- " distinct items"
1275
- ]
1276
- })
1277
- })
1278
- ]
1279
- }),
1280
- /* @__PURE__ */ jsxs("div", {
1281
- className: "kk-summary-kpi-card",
1282
- children: [
1283
- /* @__PURE__ */ jsxs("div", {
1284
- className: "kk-summary-kpi-header",
1285
- children: [
1286
- /* @__PURE__ */ jsx("span", {
1287
- className: "kk-stat-label",
1288
- children: "Selection Yield"
1289
- }),
1290
- /* @__PURE__ */ jsxs("span", {
1291
- className: "kk-badge kk-badge-success",
1292
- children: [
1293
- yieldRate,
1294
- "% yield"
1295
- ]
1296
- })
1297
- ]
1298
- }),
1299
- /* @__PURE__ */ jsxs("div", {
1300
- className: "kk-summary-kpi-body",
1301
- children: [
1302
- /* @__PURE__ */ jsx("span", {
1303
- className: "kk-summary-kpi-val",
1304
- children: totalYieldSelected.toLocaleString()
1305
- }),
1306
- /* @__PURE__ */ jsx(Sparkline, {
1307
- data: yieldTrend.length >= 2 ? yieldTrend : [3, 4, 2, 5, 4, 6],
1308
- color: "#06b6d4"
1309
- })
1310
- ]
1311
- }),
1312
- /* @__PURE__ */ jsx("div", {
1313
- className: "kk-summary-kpi-footer",
1314
- children: /* @__PURE__ */ jsxs("span", {
1315
- children: [
1316
- totalYieldSelected,
1317
- " selected · ",
1318
- totalYieldPublished,
1319
- " published"
1320
- ]
1321
- })
1322
- })
1323
- ]
1324
- })
1325
- ]
1326
- }),
1327
- /* @__PURE__ */ jsxs("div", {
1328
- className: "kk-summary-charts",
1329
- children: [
1330
- /* @__PURE__ */ jsxs("div", {
1331
- className: "kk-chart-card",
1332
- children: [
1333
- /* @__PURE__ */ jsx("div", {
1334
- className: "kk-chart-header",
1335
- children: /* @__PURE__ */ jsxs("div", {
1336
- children: [
1337
- /* @__PURE__ */ jsx("h3", {
1338
- className: "kk-chart-title",
1339
- children: "Ingestion Volume Over Time"
1340
- }),
1341
- /* @__PURE__ */ jsx("span", {
1342
- className: "kk-chart-subtitle",
1343
- children: "Distribution stacked by source per collection run"
1344
- })
1345
- ]
1346
- })
1347
- }),
1348
- /* @__PURE__ */ jsx("div", {
1349
- className: "kk-chart-svg-wrap",
1350
- children: /* @__PURE__ */ jsxs("svg", {
1351
- role: "img",
1352
- "aria-label": "Ingestion Volume Over Time",
1353
- width: "100%",
1354
- height: "160",
1355
- viewBox: "0 0 460 160",
1356
- preserveAspectRatio: "none",
1357
- children: [
1358
- /* @__PURE__ */ jsx("title", {
1359
- children: "Ingestion Volume Over Time"
1360
- }),
1361
- /* @__PURE__ */ jsx("line", {
1362
- x1: "10",
1363
- y1: "130",
1364
- x2: "450",
1365
- y2: "130",
1366
- stroke: "var(--color-spur-border)",
1367
- strokeWidth: "1"
1368
- }),
1369
- /* @__PURE__ */ jsx("line", {
1370
- x1: "10",
1371
- y1: "80",
1372
- x2: "450",
1373
- y2: "80",
1374
- stroke: "var(--color-spur-border)",
1375
- strokeWidth: "1",
1376
- strokeDasharray: "3 3"
1377
- }),
1378
- /* @__PURE__ */ jsx("line", {
1379
- x1: "10",
1380
- y1: "30",
1381
- x2: "450",
1382
- y2: "30",
1383
- stroke: "var(--color-spur-border)",
1384
- strokeWidth: "1",
1385
- strokeDasharray: "3 3"
1386
- }),
1387
- chartRuns.map((run, i) => {
1388
- const row = overview?.rows[run.id];
1389
- const count = row ? row.inserted + row.updated : 0;
1390
- const barHeight = Math.min(110, Math.max(4, count * 6));
1391
- const x = 20 + i * 27;
1392
- const y = 130 - barHeight;
1393
- return /* @__PURE__ */ jsx("g", {
1394
- children: /* @__PURE__ */ jsx("rect", {
1395
- x,
1396
- y,
1397
- width: "18",
1398
- height: barHeight,
1399
- rx: "3",
1400
- fill: run.status === "failed" ? "var(--color-spur-error)" : "var(--color-spur-accent)",
1401
- opacity: 0.85,
1402
- children: /* @__PURE__ */ jsx("title", {
1403
- children: `${run.id}: ${count} items (${run.status})`
1404
- })
1405
- })
1406
- }, run.id);
1407
- }),
1408
- chartRuns.length === 0 ? /* @__PURE__ */ jsx("text", {
1409
- x: "230",
1410
- y: "85",
1411
- textAnchor: "middle",
1412
- fill: "var(--color-spur-text-muted)",
1413
- fontSize: "13",
1414
- children: "No runs recorded in this time range"
1415
- }) : null
1416
- ]
1417
- })
1418
- }),
1419
- /* @__PURE__ */ jsxs("div", {
1420
- className: "kk-chart-legend",
1421
- children: [
1422
- /* @__PURE__ */ jsxs("span", {
1423
- className: "kk-chart-legend-item",
1424
- children: [
1425
- /* @__PURE__ */ jsx("span", {
1426
- className: "kk-chart-legend-dot",
1427
- style: { background: "var(--color-spur-accent)" }
1428
- }),
1429
- "Ingested Items"
1430
- ]
1431
- }),
1432
- /* @__PURE__ */ jsxs("span", {
1433
- className: "kk-chart-legend-item",
1434
- children: [
1435
- /* @__PURE__ */ jsx("span", {
1436
- className: "kk-chart-legend-dot",
1437
- style: { background: "var(--color-spur-error)" }
1438
- }),
1439
- "Failed Run"
1440
- ]
1441
- })
1442
- ]
1443
- })
1444
- ]
1445
- }),
1446
- /* @__PURE__ */ jsxs("div", {
1447
- className: "kk-chart-card",
1448
- children: [
1449
- /* @__PURE__ */ jsx("div", {
1450
- className: "kk-chart-header",
1451
- children: /* @__PURE__ */ jsxs("div", {
1452
- children: [
1453
- /* @__PURE__ */ jsx("h3", {
1454
- className: "kk-chart-title",
1455
- children: "Decision Volume & Selection Activity"
1456
- }),
1457
- /* @__PURE__ */ jsx("span", {
1458
- className: "kk-chart-subtitle",
1459
- children: "Labeled items volume with selection yield overlay"
1460
- })
1461
- ]
1462
- })
1463
- }),
1464
- /* @__PURE__ */ jsx("div", {
1465
- className: "kk-chart-svg-wrap",
1466
- children: /* @__PURE__ */ jsxs("svg", {
1467
- role: "img",
1468
- "aria-label": "Decision Volume and Selection Activity",
1469
- width: "100%",
1470
- height: "160",
1471
- viewBox: "0 0 460 160",
1472
- preserveAspectRatio: "none",
1473
- children: [
1474
- /* @__PURE__ */ jsx("title", {
1475
- children: "Decision Volume and Selection Activity"
1476
- }),
1477
- /* @__PURE__ */ jsx("line", {
1478
- x1: "10",
1479
- y1: "130",
1480
- x2: "450",
1481
- y2: "130",
1482
- stroke: "var(--color-spur-border)",
1483
- strokeWidth: "1"
1484
- }),
1485
- /* @__PURE__ */ jsx("line", {
1486
- x1: "10",
1487
- y1: "80",
1488
- x2: "450",
1489
- y2: "80",
1490
- stroke: "var(--color-spur-border)",
1491
- strokeWidth: "1",
1492
- strokeDasharray: "3 3"
1493
- }),
1494
- /* @__PURE__ */ jsx("line", {
1495
- x1: "10",
1496
- y1: "30",
1497
- x2: "450",
1498
- y2: "30",
1499
- stroke: "var(--color-spur-border)",
1500
- strokeWidth: "1",
1501
- strokeDasharray: "3 3"
1502
- }),
1503
- chartRuns.map((run, i) => {
1504
- const row = overview?.rows[run.id];
1505
- const labeled = row?.labeledItems ?? 0;
1506
- const barHeight = Math.min(100, Math.max(3, labeled * 5));
1507
- const x = 20 + i * 27;
1508
- const y = 130 - barHeight;
1509
- return /* @__PURE__ */ jsx("rect", {
1510
- x,
1511
- y,
1512
- width: "18",
1513
- height: barHeight,
1514
- rx: "3",
1515
- fill: "#a855f7",
1516
- opacity: 0.8,
1517
- children: /* @__PURE__ */ jsx("title", {
1518
- children: `${run.id}: ${labeled} labeled`
1519
- })
1520
- }, run.id);
1521
- }),
1522
- chartRuns.length === 0 ? /* @__PURE__ */ jsx("text", {
1523
- x: "230",
1524
- y: "85",
1525
- textAnchor: "middle",
1526
- fill: "var(--color-spur-text-muted)",
1527
- fontSize: "13",
1528
- children: "No runs recorded in this time range"
1529
- }) : null,
1530
- chartRuns.length > 1 ? /* @__PURE__ */ jsx("polyline", {
1531
- fill: "none",
1532
- stroke: "var(--color-spur-success)",
1533
- strokeWidth: "2",
1534
- points: chartRuns.map((run, i) => {
1535
- const row = overview?.rows[run.id];
1536
- const sel = row?.yield.selected ?? 0;
1537
- const py = 120 - Math.min(90, sel * 12);
1538
- const px = 29 + i * 27;
1539
- return `${px},${py}`;
1540
- }).join(" ")
1541
- }) : null
1542
- ]
1543
- })
1544
- }),
1545
- /* @__PURE__ */ jsxs("div", {
1546
- className: "kk-chart-legend",
1547
- children: [
1548
- /* @__PURE__ */ jsxs("span", {
1549
- className: "kk-chart-legend-item",
1550
- children: [
1551
- /* @__PURE__ */ jsx("span", {
1552
- className: "kk-chart-legend-dot",
1553
- style: { background: "#a855f7" }
1554
- }),
1555
- "Labeled Items"
1556
- ]
1557
- }),
1558
- /* @__PURE__ */ jsxs("span", {
1559
- className: "kk-chart-legend-item",
1560
- children: [
1561
- /* @__PURE__ */ jsx("span", {
1562
- className: "kk-chart-legend-dot",
1563
- style: { background: "var(--color-spur-success)" }
1564
- }),
1565
- "Selection Yield"
1566
- ]
1567
- })
1568
- ]
1569
- })
1570
- ]
1571
- })
1572
- ]
1573
- }),
1574
- /* @__PURE__ */ jsxs("div", {
1249
+ channels === null ? /* @__PURE__ */ jsx2("p", {
1250
+ children: "The channel-yield aggregate has not loaded yet."
1251
+ }) : null,
1252
+ /* @__PURE__ */ jsxs2("div", {
1575
1253
  className: "kk-summary-grids",
1576
1254
  children: [
1577
- /* @__PURE__ */ jsxs("div", {
1255
+ /* @__PURE__ */ jsxs2("div", {
1578
1256
  className: "kk-card",
1579
1257
  children: [
1580
- /* @__PURE__ */ jsxs("div", {
1258
+ /* @__PURE__ */ jsxs2("div", {
1581
1259
  className: "kk-card-header",
1582
1260
  children: [
1583
- /* @__PURE__ */ jsx("h2", {
1584
- children: "Top Ingestion Sources"
1261
+ /* @__PURE__ */ jsx2("h2", {
1262
+ children: "New items by day and source"
1585
1263
  }),
1586
- /* @__PURE__ */ jsxs("span", {
1264
+ /* @__PURE__ */ jsxs2("span", {
1587
1265
  className: "kk-stat-sub",
1588
1266
  children: [
1589
- sortedSources.length,
1590
- " tracked sources"
1267
+ channels?.sources.length ?? 0,
1268
+ " sources"
1591
1269
  ]
1592
1270
  })
1593
1271
  ]
1594
1272
  }),
1595
- /* @__PURE__ */ jsx("div", {
1273
+ /* @__PURE__ */ jsx2("div", {
1596
1274
  className: "kk-table-container",
1597
- children: /* @__PURE__ */ jsxs("table", {
1598
- className: "kk-table",
1599
- children: [
1600
- /* @__PURE__ */ jsx("thead", {
1601
- children: /* @__PURE__ */ jsxs("tr", {
1602
- children: [
1603
- /* @__PURE__ */ jsx("th", {
1604
- scope: "col",
1605
- children: "Source"
1606
- }),
1607
- /* @__PURE__ */ jsx("th", {
1608
- scope: "col",
1609
- children: "Items"
1610
- }),
1611
- /* @__PURE__ */ jsx("th", {
1612
- scope: "col",
1613
- children: "Share"
1614
- }),
1615
- /* @__PURE__ */ jsx("th", {
1616
- scope: "col",
1617
- children: "Status"
1618
- })
1619
- ]
1620
- })
1621
- }),
1622
- /* @__PURE__ */ jsx("tbody", {
1623
- children: sortedSources.length === 0 ? /* @__PURE__ */ jsx("tr", {
1624
- children: /* @__PURE__ */ jsx("td", {
1625
- colSpan: 4,
1626
- className: "kk-board-state",
1627
- children: "No source telemetry recorded yet."
1628
- })
1629
- }) : sortedSources.map(([source, count]) => {
1630
- const share = totalCollected > 0 ? Math.round(count / totalCollected * 100) : 0;
1631
- return /* @__PURE__ */ jsxs("tr", {
1632
- children: [
1633
- /* @__PURE__ */ jsx("td", {
1634
- children: /* @__PURE__ */ jsx("strong", {
1635
- children: source
1636
- })
1637
- }),
1638
- /* @__PURE__ */ jsx("td", {
1639
- children: count
1640
- }),
1641
- /* @__PURE__ */ jsx("td", {
1642
- children: /* @__PURE__ */ jsxs("span", {
1643
- style: {
1644
- display: "inline-flex",
1645
- alignItems: "center",
1646
- gap: "0.5rem"
1647
- },
1648
- children: [
1649
- /* @__PURE__ */ jsx("span", {
1650
- className: "kk-collect-bar",
1651
- style: { width: "5rem" },
1652
- children: /* @__PURE__ */ jsx("span", {
1653
- className: "kk-collect-bar-seg",
1654
- style: { width: `${Math.max(10, share)}%` }
1655
- })
1656
- }),
1657
- /* @__PURE__ */ jsxs("span", {
1658
- className: "kk-stat-sub",
1659
- children: [
1660
- share,
1661
- "%"
1662
- ]
1663
- })
1664
- ]
1665
- })
1666
- }),
1667
- /* @__PURE__ */ jsx("td", {
1668
- children: /* @__PURE__ */ jsx("span", {
1669
- className: "kk-badge kk-badge-success",
1670
- children: "Active"
1671
- })
1672
- })
1673
- ]
1674
- }, source);
1675
- })
1676
- })
1677
- ]
1678
- })
1275
+ children: channels !== null && channels.availability === "available" ? /* @__PURE__ */ jsx2(ChannelYieldTable, {
1276
+ data: channels
1277
+ }) : null
1679
1278
  })
1680
1279
  ]
1681
1280
  }),
1682
- /* @__PURE__ */ jsxs("div", {
1281
+ /* @__PURE__ */ jsxs2("div", {
1683
1282
  className: "kk-card",
1684
1283
  children: [
1685
- /* @__PURE__ */ jsxs("div", {
1284
+ /* @__PURE__ */ jsxs2("div", {
1686
1285
  className: "kk-card-header",
1687
1286
  children: [
1688
- /* @__PURE__ */ jsx("h2", {
1689
- children: "Recent Collection Runs & Health"
1287
+ /* @__PURE__ */ jsx2("h2", {
1288
+ children: "Collection ticks and plugin contributions"
1690
1289
  }),
1691
- /* @__PURE__ */ jsxs("span", {
1290
+ /* @__PURE__ */ jsxs2("span", {
1692
1291
  className: "kk-stat-sub",
1693
1292
  children: [
1694
- "Last ",
1695
- Math.min(5, page.length),
1696
- " runs"
1293
+ channels?.plugins.length ?? 0,
1294
+ " plugins"
1697
1295
  ]
1698
1296
  })
1699
1297
  ]
1700
1298
  }),
1701
- /* @__PURE__ */ jsx("div", {
1299
+ /* @__PURE__ */ jsx2("div", {
1702
1300
  className: "kk-table-container",
1703
- children: /* @__PURE__ */ jsxs("table", {
1704
- className: "kk-table",
1705
- children: [
1706
- /* @__PURE__ */ jsx("thead", {
1707
- children: /* @__PURE__ */ jsxs("tr", {
1708
- children: [
1709
- /* @__PURE__ */ jsx("th", {
1710
- scope: "col",
1711
- children: "Run ID"
1712
- }),
1713
- /* @__PURE__ */ jsx("th", {
1714
- scope: "col",
1715
- children: "Status"
1716
- }),
1717
- /* @__PURE__ */ jsx("th", {
1718
- scope: "col",
1719
- children: "Items"
1720
- }),
1721
- /* @__PURE__ */ jsx("th", {
1722
- scope: "col",
1723
- children: "Yield"
1724
- }),
1725
- /* @__PURE__ */ jsx("th", {
1726
- scope: "col",
1727
- children: "Action"
1728
- })
1729
- ]
1730
- })
1731
- }),
1732
- /* @__PURE__ */ jsx("tbody", {
1733
- children: page.slice(0, 5).map((run) => {
1734
- const row = overview?.rows[run.id];
1735
- const itemsCount = row ? row.inserted + row.updated : "—";
1736
- const yieldCount = row ? row.yield.selected : "—";
1737
- return /* @__PURE__ */ jsxs("tr", {
1738
- children: [
1739
- /* @__PURE__ */ jsxs("td", {
1740
- children: [
1741
- /* @__PURE__ */ jsx("button", {
1742
- type: "button",
1743
- className: "kk-collect-run-link",
1744
- onClick: () => onInspectRun?.(run.id),
1745
- title: `Inspect run ${run.id}`,
1746
- children: run.id
1747
- }),
1748
- /* @__PURE__ */ jsx("div", {
1749
- className: "kk-stat-sub",
1750
- children: formatTimestamp(run.startedAt)
1751
- })
1752
- ]
1753
- }),
1754
- /* @__PURE__ */ jsx("td", {
1755
- children: /* @__PURE__ */ jsx("span", {
1756
- className: `kk-badge ${run.status === "done" ? "kk-badge-success" : run.status === "failed" ? "kk-badge-failed" : "kk-badge-running"}`,
1757
- children: run.status
1758
- })
1759
- }),
1760
- /* @__PURE__ */ jsx("td", {
1761
- children: itemsCount
1762
- }),
1763
- /* @__PURE__ */ jsx("td", {
1764
- children: yieldCount
1765
- }),
1766
- /* @__PURE__ */ jsx("td", {
1767
- children: /* @__PURE__ */ jsx("button", {
1768
- type: "button",
1769
- className: "kk-table-btn",
1770
- onClick: () => onInspectRun?.(run.id),
1771
- children: "Inspect"
1772
- })
1773
- })
1774
- ]
1775
- }, run.id);
1776
- })
1777
- })
1778
- ]
1779
- })
1301
+ children: channels !== null && channels.availability === "available" ? /* @__PURE__ */ jsx2(PluginRunTable, {
1302
+ data: channels
1303
+ }) : null
1780
1304
  })
1781
1305
  ]
1782
1306
  })
1783
1307
  ]
1784
- })
1308
+ }),
1309
+ showPager ? /* @__PURE__ */ jsxs2("div", {
1310
+ className: "kk-collect-pager",
1311
+ children: [
1312
+ /* @__PURE__ */ jsx2("button", {
1313
+ type: "button",
1314
+ className: "kk-table-btn",
1315
+ onClick: () => onChannelsPageChange?.(-1),
1316
+ disabled: channelsPage <= 1,
1317
+ children: "Previous"
1318
+ }),
1319
+ /* @__PURE__ */ jsxs2("span", {
1320
+ children: [
1321
+ "Page ",
1322
+ channelsPage,
1323
+ " of ",
1324
+ totalPages,
1325
+ " · ",
1326
+ channels?.totalDays ?? 0,
1327
+ " days"
1328
+ ]
1329
+ }),
1330
+ /* @__PURE__ */ jsx2("button", {
1331
+ type: "button",
1332
+ className: "kk-table-btn",
1333
+ onClick: () => onChannelsPageChange?.(1),
1334
+ disabled: channelsPage >= totalPages,
1335
+ children: "Next"
1336
+ })
1337
+ ]
1338
+ }) : null
1785
1339
  ]
1786
1340
  });
1787
1341
  }
@@ -1809,44 +1363,44 @@ function RunDetailsPanel({
1809
1363
  filtered = filtered.filter((r) => r.id.toLowerCase().includes(q) || r.status.toLowerCase().includes(q));
1810
1364
  }
1811
1365
  const filteredRuns = filtered.slice(0, MAX_OVERVIEW_RUNS);
1812
- return /* @__PURE__ */ jsxs("section", {
1366
+ return /* @__PURE__ */ jsxs2("section", {
1813
1367
  className: "kk-card kk-collect-overview",
1814
1368
  children: [
1815
- /* @__PURE__ */ jsxs("div", {
1369
+ /* @__PURE__ */ jsxs2("div", {
1816
1370
  className: "kk-collect-banner",
1817
1371
  children: [
1818
- /* @__PURE__ */ jsxs("div", {
1372
+ /* @__PURE__ */ jsxs2("div", {
1819
1373
  className: "kk-collect-banner-cell",
1820
1374
  children: [
1821
- /* @__PURE__ */ jsx("span", {
1375
+ /* @__PURE__ */ jsx2("span", {
1822
1376
  className: "kk-stat-label",
1823
1377
  children: "Collection cadence"
1824
1378
  }),
1825
- /* @__PURE__ */ jsx("span", {
1379
+ /* @__PURE__ */ jsx2("span", {
1826
1380
  className: "kk-collect-banner-value",
1827
- children: /* @__PURE__ */ jsx("span", {
1381
+ children: /* @__PURE__ */ jsx2("span", {
1828
1382
  className: `kk-badge ${cadenceBadge(cadence)}`,
1829
1383
  children: cadence?.state ?? "unknown"
1830
1384
  })
1831
1385
  }),
1832
- /* @__PURE__ */ jsx("span", {
1386
+ /* @__PURE__ */ jsx2("span", {
1833
1387
  className: "kk-stat-sub",
1834
1388
  children: cadence?.detail ?? "The store has not answered yet."
1835
1389
  })
1836
1390
  ]
1837
1391
  }),
1838
- counts === null ? null : /* @__PURE__ */ jsxs("div", {
1392
+ counts === null ? null : /* @__PURE__ */ jsxs2("div", {
1839
1393
  className: "kk-collect-banner-cell",
1840
1394
  children: [
1841
- /* @__PURE__ */ jsx("span", {
1395
+ /* @__PURE__ */ jsx2("span", {
1842
1396
  className: "kk-stat-label",
1843
1397
  children: "Needs attention"
1844
1398
  }),
1845
- /* @__PURE__ */ jsx("span", {
1399
+ /* @__PURE__ */ jsx2("span", {
1846
1400
  className: "kk-stat-value",
1847
1401
  children: counts.failed + counts.doneWithoutRow
1848
1402
  }),
1849
- /* @__PURE__ */ jsxs("span", {
1403
+ /* @__PURE__ */ jsxs2("span", {
1850
1404
  className: "kk-stat-sub",
1851
1405
  children: [
1852
1406
  counts.failed,
@@ -1862,23 +1416,23 @@ function RunDetailsPanel({
1862
1416
  })
1863
1417
  ]
1864
1418
  }),
1865
- overview !== null && overview.availability === "unavailable" ? /* @__PURE__ */ jsxs(Fragment, {
1419
+ overview !== null && overview.availability === "unavailable" ? /* @__PURE__ */ jsxs2(Fragment, {
1866
1420
  children: [
1867
- /* @__PURE__ */ jsx("p", {
1421
+ /* @__PURE__ */ jsx2("p", {
1868
1422
  children: "The store could not be read for this page; no counts are shown."
1869
1423
  }),
1870
- /* @__PURE__ */ jsx(StoreState, {
1424
+ /* @__PURE__ */ jsx2(StoreState, {
1871
1425
  diagnostics: overview.diagnostics
1872
1426
  })
1873
1427
  ]
1874
1428
  }) : null,
1875
- overview === null ? /* @__PURE__ */ jsx("p", {
1429
+ overview === null ? /* @__PURE__ */ jsx2("p", {
1876
1430
  children: "The store overview has not loaded yet."
1877
1431
  }) : null,
1878
- /* @__PURE__ */ jsxs("div", {
1432
+ /* @__PURE__ */ jsxs2("div", {
1879
1433
  className: "kk-table-toolbar",
1880
1434
  children: [
1881
- /* @__PURE__ */ jsx("input", {
1435
+ /* @__PURE__ */ jsx2("input", {
1882
1436
  type: "text",
1883
1437
  className: "kk-board-run-filter-input",
1884
1438
  placeholder: "Search runs by ID or status...",
@@ -1886,11 +1440,11 @@ function RunDetailsPanel({
1886
1440
  onChange: (e) => onSearchChange?.(e.target.value),
1887
1441
  "aria-label": "Search runs"
1888
1442
  }),
1889
- /* @__PURE__ */ jsx("div", {
1443
+ /* @__PURE__ */ jsx2("div", {
1890
1444
  className: "kk-time-pills",
1891
1445
  role: "radiogroup",
1892
1446
  "aria-label": "Filter runs by status",
1893
- children: ["all", "done", "failed", "running"].map((s) => /* @__PURE__ */ jsx("button", {
1447
+ children: ["all", "done", "failed", "running"].map((s) => /* @__PURE__ */ jsx2("button", {
1894
1448
  type: "button",
1895
1449
  className: `kk-time-pill ${statusFilter === s ? "active" : ""}`,
1896
1450
  onClick: () => onStatusFilterChange?.(s),
@@ -1899,74 +1453,74 @@ function RunDetailsPanel({
1899
1453
  })
1900
1454
  ]
1901
1455
  }),
1902
- /* @__PURE__ */ jsx("div", {
1456
+ /* @__PURE__ */ jsx2("div", {
1903
1457
  className: "kk-table-container",
1904
- children: /* @__PURE__ */ jsxs("table", {
1458
+ children: /* @__PURE__ */ jsxs2("table", {
1905
1459
  className: "kk-table kk-collect-table",
1906
1460
  children: [
1907
- /* @__PURE__ */ jsx("thead", {
1908
- children: /* @__PURE__ */ jsxs("tr", {
1461
+ /* @__PURE__ */ jsx2("thead", {
1462
+ children: /* @__PURE__ */ jsxs2("tr", {
1909
1463
  children: [
1910
- /* @__PURE__ */ jsx("th", {
1464
+ /* @__PURE__ */ jsx2("th", {
1911
1465
  scope: "col",
1912
1466
  children: "Run"
1913
1467
  }),
1914
- /* @__PURE__ */ jsx("th", {
1468
+ /* @__PURE__ */ jsx2("th", {
1915
1469
  scope: "col",
1916
1470
  children: "Started"
1917
1471
  }),
1918
- /* @__PURE__ */ jsx("th", {
1472
+ /* @__PURE__ */ jsx2("th", {
1919
1473
  scope: "col",
1920
1474
  children: "Duration"
1921
1475
  }),
1922
- /* @__PURE__ */ jsx("th", {
1476
+ /* @__PURE__ */ jsx2("th", {
1923
1477
  scope: "col",
1924
1478
  children: "Status"
1925
1479
  }),
1926
- /* @__PURE__ */ jsx("th", {
1480
+ /* @__PURE__ */ jsx2("th", {
1927
1481
  scope: "col",
1928
1482
  children: "Collected"
1929
1483
  }),
1930
- /* @__PURE__ */ jsx("th", {
1484
+ /* @__PURE__ */ jsx2("th", {
1931
1485
  scope: "col",
1932
1486
  children: "Inserted"
1933
1487
  }),
1934
- /* @__PURE__ */ jsx("th", {
1488
+ /* @__PURE__ */ jsx2("th", {
1935
1489
  scope: "col",
1936
1490
  children: "Updated"
1937
1491
  }),
1938
- /* @__PURE__ */ jsx("th", {
1492
+ /* @__PURE__ */ jsx2("th", {
1939
1493
  scope: "col",
1940
1494
  children: "Label rows"
1941
1495
  }),
1942
- /* @__PURE__ */ jsx("th", {
1496
+ /* @__PURE__ */ jsx2("th", {
1943
1497
  scope: "col",
1944
1498
  children: "Fallback"
1945
1499
  }),
1946
- /* @__PURE__ */ jsx("th", {
1500
+ /* @__PURE__ */ jsx2("th", {
1947
1501
  scope: "col",
1948
1502
  children: "Yield"
1949
1503
  }),
1950
- /* @__PURE__ */ jsx("th", {
1504
+ /* @__PURE__ */ jsx2("th", {
1951
1505
  scope: "col",
1952
1506
  children: "Action"
1953
1507
  })
1954
1508
  ]
1955
1509
  })
1956
1510
  }),
1957
- /* @__PURE__ */ jsx("tbody", {
1958
- children: filteredRuns.length === 0 ? /* @__PURE__ */ jsx("tr", {
1959
- children: /* @__PURE__ */ jsx("td", {
1511
+ /* @__PURE__ */ jsx2("tbody", {
1512
+ children: filteredRuns.length === 0 ? /* @__PURE__ */ jsx2("tr", {
1513
+ children: /* @__PURE__ */ jsx2("td", {
1960
1514
  colSpan: 11,
1961
1515
  className: "kk-board-empty",
1962
1516
  children: "No runs match your filter."
1963
1517
  })
1964
1518
  }) : filteredRuns.map((run) => {
1965
1519
  const row = overview?.rows[run.id] ?? null;
1966
- return /* @__PURE__ */ jsxs("tr", {
1520
+ return /* @__PURE__ */ jsxs2("tr", {
1967
1521
  children: [
1968
- /* @__PURE__ */ jsx("td", {
1969
- children: /* @__PURE__ */ jsx("a", {
1522
+ /* @__PURE__ */ jsx2("td", {
1523
+ children: /* @__PURE__ */ jsx2("a", {
1970
1524
  href: runHref ? runHref(run.id) : `#run-${run.id}`,
1971
1525
  className: "kk-collect-run-link",
1972
1526
  onClick: (e) => {
@@ -1978,31 +1532,31 @@ function RunDetailsPanel({
1978
1532
  children: run.id
1979
1533
  })
1980
1534
  }),
1981
- /* @__PURE__ */ jsx("td", {
1535
+ /* @__PURE__ */ jsx2("td", {
1982
1536
  children: formatTimestamp(run.startedAt)
1983
1537
  }),
1984
- /* @__PURE__ */ jsx("td", {
1538
+ /* @__PURE__ */ jsx2("td", {
1985
1539
  children: runDuration(run.startedAt, run.completedAt)
1986
1540
  }),
1987
- /* @__PURE__ */ jsx("td", {
1988
- children: /* @__PURE__ */ jsx("span", {
1541
+ /* @__PURE__ */ jsx2("td", {
1542
+ children: /* @__PURE__ */ jsx2("span", {
1989
1543
  className: `kk-badge ${run.status === "done" ? "kk-badge-success" : run.status === "failed" ? "kk-badge-failed" : "kk-badge-running"}`,
1990
1544
  children: run.status
1991
1545
  })
1992
1546
  }),
1993
- storeState !== "available" ? /* @__PURE__ */ jsx("td", {
1547
+ storeState !== "available" ? /* @__PURE__ */ jsx2("td", {
1994
1548
  colSpan: 6,
1995
1549
  className: "kk-collect-nostore",
1996
1550
  children: storeState === "loading" ? "store not loaded yet" : "store unavailable"
1997
- }) : row === null ? /* @__PURE__ */ jsx("td", {
1551
+ }) : row === null ? /* @__PURE__ */ jsx2("td", {
1998
1552
  colSpan: 6,
1999
1553
  className: "kk-collect-nostore",
2000
1554
  children: storeCellText(run.status)
2001
- }) : /* @__PURE__ */ jsx(StoredCells, {
1555
+ }) : /* @__PURE__ */ jsx2(StoredCells, {
2002
1556
  row
2003
1557
  }),
2004
- /* @__PURE__ */ jsx("td", {
2005
- children: /* @__PURE__ */ jsx("button", {
1558
+ /* @__PURE__ */ jsx2("td", {
1559
+ children: /* @__PURE__ */ jsx2("button", {
2006
1560
  type: "button",
2007
1561
  className: "kk-table-btn",
2008
1562
  onClick: () => onInspectRun?.(run.id),
@@ -2021,42 +1575,42 @@ function RunDetailsPanel({
2021
1575
  }
2022
1576
  function StoredCells({ row }) {
2023
1577
  const segments = sourceSegments(row.sourceCounts);
2024
- return /* @__PURE__ */ jsxs(Fragment, {
1578
+ return /* @__PURE__ */ jsxs2(Fragment, {
2025
1579
  children: [
2026
- /* @__PURE__ */ jsx("td", {
2027
- children: segments.length === 0 ? /* @__PURE__ */ jsx("span", {
1580
+ /* @__PURE__ */ jsx2("td", {
1581
+ children: segments.length === 0 ? /* @__PURE__ */ jsx2("span", {
2028
1582
  className: "kk-board-state",
2029
1583
  children: "no sources recorded"
2030
- }) : /* @__PURE__ */ jsxs(Fragment, {
1584
+ }) : /* @__PURE__ */ jsxs2(Fragment, {
2031
1585
  children: [
2032
- /* @__PURE__ */ jsx("span", {
1586
+ /* @__PURE__ */ jsx2("span", {
2033
1587
  className: "kk-collect-bar",
2034
1588
  "aria-hidden": "true",
2035
- children: segments.map((segment, index) => /* @__PURE__ */ jsx("span", {
1589
+ children: segments.map((segment, index) => /* @__PURE__ */ jsx2("span", {
2036
1590
  className: `kk-collect-bar-seg kk-collect-bar-seg-${index % 3}`,
2037
1591
  style: { width: `${segment.share * 100}%` }
2038
1592
  }, segment.source))
2039
1593
  }),
2040
- /* @__PURE__ */ jsx("span", {
1594
+ /* @__PURE__ */ jsx2("span", {
2041
1595
  className: "kk-collect-bar-total",
2042
1596
  children: segments.map((segment) => `${segment.source} ${segment.count}`).join(" · ")
2043
1597
  })
2044
1598
  ]
2045
1599
  })
2046
1600
  }),
2047
- /* @__PURE__ */ jsx("td", {
1601
+ /* @__PURE__ */ jsx2("td", {
2048
1602
  children: row.inserted
2049
1603
  }),
2050
- /* @__PURE__ */ jsx("td", {
1604
+ /* @__PURE__ */ jsx2("td", {
2051
1605
  children: row.updated
2052
1606
  }),
2053
- /* @__PURE__ */ jsx("td", {
1607
+ /* @__PURE__ */ jsx2("td", {
2054
1608
  children: row.labelRows
2055
1609
  }),
2056
- /* @__PURE__ */ jsx("td", {
1610
+ /* @__PURE__ */ jsx2("td", {
2057
1611
  children: fallbackShare(row)
2058
1612
  }),
2059
- /* @__PURE__ */ jsxs("td", {
1613
+ /* @__PURE__ */ jsxs2("td", {
2060
1614
  children: [
2061
1615
  row.yield.selected,
2062
1616
  " selected · ",
@@ -2082,45 +1636,45 @@ function RunDetailModal({
2082
1636
  onClose
2083
1637
  }) {
2084
1638
  const cards = storeRun !== null && storeRun.availability === "available" ? funnelCards(storeRun.row, results) : [];
2085
- return /* @__PURE__ */ jsxs("div", {
1639
+ return /* @__PURE__ */ jsxs2("div", {
2086
1640
  className: "kk-modal-backdrop",
2087
1641
  role: "presentation",
2088
1642
  children: [
2089
- /* @__PURE__ */ jsx("button", {
1643
+ /* @__PURE__ */ jsx2("button", {
2090
1644
  type: "button",
2091
1645
  className: "kk-modal-dismiss-backdrop",
2092
1646
  onClick: onClose,
2093
1647
  "aria-label": "Close modal dialog",
2094
1648
  tabIndex: -1
2095
1649
  }),
2096
- /* @__PURE__ */ jsxs("div", {
1650
+ /* @__PURE__ */ jsxs2("div", {
2097
1651
  className: "kk-modal-card",
2098
1652
  role: "dialog",
2099
1653
  "aria-modal": "true",
2100
1654
  "aria-labelledby": "kk-run-modal-title",
2101
1655
  children: [
2102
- /* @__PURE__ */ jsxs("div", {
1656
+ /* @__PURE__ */ jsxs2("div", {
2103
1657
  className: "kk-modal-header",
2104
1658
  children: [
2105
- /* @__PURE__ */ jsxs("div", {
1659
+ /* @__PURE__ */ jsxs2("div", {
2106
1660
  className: "kk-modal-header-left",
2107
1661
  children: [
2108
- /* @__PURE__ */ jsxs("h2", {
1662
+ /* @__PURE__ */ jsxs2("h2", {
2109
1663
  id: "kk-run-modal-title",
2110
1664
  children: [
2111
1665
  "Run Details: ",
2112
- /* @__PURE__ */ jsx("code", {
1666
+ /* @__PURE__ */ jsx2("code", {
2113
1667
  children: runId
2114
1668
  })
2115
1669
  ]
2116
1670
  }),
2117
- results ? /* @__PURE__ */ jsx("span", {
1671
+ results ? /* @__PURE__ */ jsx2("span", {
2118
1672
  className: `kk-badge ${results.availability === "available" ? "kk-badge-success" : "kk-badge-neutral"}`,
2119
1673
  children: results.availability
2120
1674
  }) : null
2121
1675
  ]
2122
1676
  }),
2123
- /* @__PURE__ */ jsx("button", {
1677
+ /* @__PURE__ */ jsx2("button", {
2124
1678
  type: "button",
2125
1679
  className: "kk-modal-close",
2126
1680
  onClick: onClose,
@@ -2129,74 +1683,74 @@ function RunDetailModal({
2129
1683
  })
2130
1684
  ]
2131
1685
  }),
2132
- /* @__PURE__ */ jsxs("div", {
1686
+ /* @__PURE__ */ jsxs2("div", {
2133
1687
  className: "kk-modal-body",
2134
1688
  children: [
2135
- cards.length > 0 ? /* @__PURE__ */ jsx("div", {
1689
+ cards.length > 0 ? /* @__PURE__ */ jsx2("div", {
2136
1690
  className: "kk-stat-grid kk-collect-funnel",
2137
- children: cards.map((card) => /* @__PURE__ */ jsxs("div", {
1691
+ children: cards.map((card) => /* @__PURE__ */ jsxs2("div", {
2138
1692
  className: "kk-stat-card",
2139
1693
  children: [
2140
- /* @__PURE__ */ jsx("span", {
1694
+ /* @__PURE__ */ jsx2("span", {
2141
1695
  className: "kk-stat-label",
2142
1696
  children: card.title
2143
1697
  }),
2144
- /* @__PURE__ */ jsx("span", {
1698
+ /* @__PURE__ */ jsx2("span", {
2145
1699
  className: "kk-stat-value",
2146
1700
  children: card.value
2147
1701
  }),
2148
- /* @__PURE__ */ jsx("span", {
1702
+ /* @__PURE__ */ jsx2("span", {
2149
1703
  className: "kk-stat-sub",
2150
1704
  children: card.unit
2151
1705
  }),
2152
- /* @__PURE__ */ jsx("span", {
1706
+ /* @__PURE__ */ jsx2("span", {
2153
1707
  className: "kk-stat-sub",
2154
1708
  children: card.detail
2155
1709
  })
2156
1710
  ]
2157
1711
  }, card.title))
2158
1712
  }) : null,
2159
- storeRun === null ? /* @__PURE__ */ jsx("p", {
1713
+ storeRun === null ? /* @__PURE__ */ jsx2("p", {
2160
1714
  children: "The store has not answered for this run yet."
2161
1715
  }) : null,
2162
- storeRun !== null && storeRun.availability === "unavailable" ? /* @__PURE__ */ jsxs(Fragment, {
1716
+ storeRun !== null && storeRun.availability === "unavailable" ? /* @__PURE__ */ jsxs2(Fragment, {
2163
1717
  children: [
2164
- /* @__PURE__ */ jsx("p", {
1718
+ /* @__PURE__ */ jsx2("p", {
2165
1719
  children: "The store could not be read for this run; no counts are shown."
2166
1720
  }),
2167
- /* @__PURE__ */ jsx(StoreState, {
1721
+ /* @__PURE__ */ jsx2(StoreState, {
2168
1722
  diagnostics: storeRun.diagnostics
2169
1723
  })
2170
1724
  ]
2171
1725
  }) : null,
2172
- storeRun !== null && storeRun.row === null && storeRun.availability === "available" ? /* @__PURE__ */ jsx("p", {
1726
+ storeRun !== null && storeRun.row === null && storeRun.availability === "available" ? /* @__PURE__ */ jsx2("p", {
2173
1727
  children: "This run wrote no store row."
2174
1728
  }) : null,
2175
- storeRun !== null && storeRun.row !== null ? /* @__PURE__ */ jsx(LabelQuality, {
1729
+ storeRun !== null && storeRun.row !== null ? /* @__PURE__ */ jsx2(LabelQuality, {
2176
1730
  quality: storeRun.labelQuality,
2177
1731
  diagnostics: storeRun.diagnostics,
2178
1732
  showEffective,
2179
1733
  onToggle: onToggleQuality
2180
1734
  }) : null,
2181
- facts.length > 0 ? /* @__PURE__ */ jsxs("div", {
1735
+ facts.length > 0 ? /* @__PURE__ */ jsxs2("div", {
2182
1736
  children: [
2183
- /* @__PURE__ */ jsx("h3", {
1737
+ /* @__PURE__ */ jsx2("h3", {
2184
1738
  className: "kk-chart-title",
2185
1739
  style: { marginBottom: "0.5rem" },
2186
1740
  children: "Core Facts"
2187
1741
  }),
2188
- /* @__PURE__ */ jsx("dl", {
1742
+ /* @__PURE__ */ jsx2("dl", {
2189
1743
  className: "kk-board-facts",
2190
- children: facts.map((fact) => /* @__PURE__ */ jsxs("div", {
1744
+ children: facts.map((fact) => /* @__PURE__ */ jsxs2("div", {
2191
1745
  children: [
2192
- /* @__PURE__ */ jsx("dt", {
1746
+ /* @__PURE__ */ jsx2("dt", {
2193
1747
  children: fact.label
2194
1748
  }),
2195
- /* @__PURE__ */ jsxs("dd", {
1749
+ /* @__PURE__ */ jsxs2("dd", {
2196
1750
  children: [
2197
1751
  fact.value,
2198
1752
  " ",
2199
- /* @__PURE__ */ jsx("span", {
1753
+ /* @__PURE__ */ jsx2("span", {
2200
1754
  className: "kk-board-state",
2201
1755
  children: fact.availability
2202
1756
  })
@@ -2207,47 +1761,47 @@ function RunDetailModal({
2207
1761
  })
2208
1762
  ]
2209
1763
  }) : null,
2210
- /* @__PURE__ */ jsxs("div", {
1764
+ /* @__PURE__ */ jsxs2("div", {
2211
1765
  children: [
2212
- /* @__PURE__ */ jsx("h3", {
1766
+ /* @__PURE__ */ jsx2("h3", {
2213
1767
  className: "kk-chart-title",
2214
1768
  style: { marginBottom: "0.5rem" },
2215
1769
  children: "Artifact Evidence"
2216
1770
  }),
2217
- /* @__PURE__ */ jsx(ArtifactRows, {
1771
+ /* @__PURE__ */ jsx2(ArtifactRows, {
2218
1772
  artifacts
2219
1773
  })
2220
1774
  ]
2221
1775
  }),
2222
- /* @__PURE__ */ jsxs("div", {
1776
+ /* @__PURE__ */ jsxs2("div", {
2223
1777
  children: [
2224
- /* @__PURE__ */ jsx("h3", {
1778
+ /* @__PURE__ */ jsx2("h3", {
2225
1779
  className: "kk-chart-title",
2226
1780
  style: { marginBottom: "0.5rem" },
2227
1781
  children: "Workflow Configuration"
2228
1782
  }),
2229
- /* @__PURE__ */ jsx(ConfigPanel, {
1783
+ /* @__PURE__ */ jsx2(ConfigPanel, {
2230
1784
  config: config ?? null
2231
1785
  })
2232
1786
  ]
2233
1787
  }),
2234
- /* @__PURE__ */ jsxs("div", {
1788
+ /* @__PURE__ */ jsxs2("div", {
2235
1789
  children: [
2236
- /* @__PURE__ */ jsx("h3", {
1790
+ /* @__PURE__ */ jsx2("h3", {
2237
1791
  className: "kk-chart-title",
2238
1792
  style: { marginBottom: "0.5rem" },
2239
1793
  children: "Progress & Attempts"
2240
1794
  }),
2241
- /* @__PURE__ */ jsx(ProgressPanel, {
1795
+ /* @__PURE__ */ jsx2(ProgressPanel, {
2242
1796
  steps: steps ?? []
2243
1797
  })
2244
1798
  ]
2245
1799
  })
2246
1800
  ]
2247
1801
  }),
2248
- /* @__PURE__ */ jsx("div", {
1802
+ /* @__PURE__ */ jsx2("div", {
2249
1803
  className: "kk-modal-footer",
2250
- children: /* @__PURE__ */ jsx("button", {
1804
+ children: /* @__PURE__ */ jsx2("button", {
2251
1805
  type: "button",
2252
1806
  className: "kk-btn-action",
2253
1807
  onClick: onClose,
@@ -2265,38 +1819,38 @@ function LabelQuality({
2265
1819
  showEffective,
2266
1820
  onToggle
2267
1821
  }) {
2268
- return /* @__PURE__ */ jsxs("section", {
1822
+ return /* @__PURE__ */ jsxs2("section", {
2269
1823
  className: "kk-card kk-collect-quality",
2270
1824
  children: [
2271
- /* @__PURE__ */ jsxs("div", {
1825
+ /* @__PURE__ */ jsxs2("div", {
2272
1826
  className: "kk-card-header",
2273
1827
  children: [
2274
- /* @__PURE__ */ jsx("h2", {
1828
+ /* @__PURE__ */ jsx2("h2", {
2275
1829
  children: "Label quality"
2276
1830
  }),
2277
- /* @__PURE__ */ jsx("button", {
1831
+ /* @__PURE__ */ jsx2("button", {
2278
1832
  type: "button",
2279
1833
  onClick: onToggle,
2280
1834
  children: showEffective ? "Show this run" : "Show effective labels"
2281
1835
  })
2282
1836
  ]
2283
1837
  }),
2284
- quality.length === 0 ? /* @__PURE__ */ jsx("p", {
1838
+ quality.length === 0 ? /* @__PURE__ */ jsx2("p", {
2285
1839
  children: "No label decisions recorded for this run."
2286
1840
  }) : null,
2287
- quality.map((entry) => /* @__PURE__ */ jsxs("div", {
1841
+ quality.map((entry) => /* @__PURE__ */ jsxs2("div", {
2288
1842
  className: "kk-collect-quality-block",
2289
1843
  children: [
2290
- /* @__PURE__ */ jsx("h3", {
1844
+ /* @__PURE__ */ jsx2("h3", {
2291
1845
  children: entry.decisionId
2292
1846
  }),
2293
- /* @__PURE__ */ jsx(QualityTable, {
1847
+ /* @__PURE__ */ jsx2(QualityTable, {
2294
1848
  entry,
2295
1849
  showEffective
2296
1850
  })
2297
1851
  ]
2298
1852
  }, entry.decisionId)),
2299
- /* @__PURE__ */ jsx(StoreState, {
1853
+ /* @__PURE__ */ jsx2(StoreState, {
2300
1854
  diagnostics
2301
1855
  })
2302
1856
  ]
@@ -2308,33 +1862,33 @@ function QualityTable({
2308
1862
  }) {
2309
1863
  if (showEffective) {
2310
1864
  if (entry.effective.length === 0)
2311
- return /* @__PURE__ */ jsx("p", {
1865
+ return /* @__PURE__ */ jsx2("p", {
2312
1866
  children: "Effective label distribution unavailable."
2313
1867
  });
2314
- return /* @__PURE__ */ jsxs("table", {
1868
+ return /* @__PURE__ */ jsxs2("table", {
2315
1869
  className: "kk-table",
2316
1870
  children: [
2317
- /* @__PURE__ */ jsx("thead", {
2318
- children: /* @__PURE__ */ jsxs("tr", {
1871
+ /* @__PURE__ */ jsx2("thead", {
1872
+ children: /* @__PURE__ */ jsxs2("tr", {
2319
1873
  children: [
2320
- /* @__PURE__ */ jsx("th", {
1874
+ /* @__PURE__ */ jsx2("th", {
2321
1875
  scope: "col",
2322
1876
  children: "Value"
2323
1877
  }),
2324
- /* @__PURE__ */ jsx("th", {
1878
+ /* @__PURE__ */ jsx2("th", {
2325
1879
  scope: "col",
2326
1880
  children: "Items"
2327
1881
  })
2328
1882
  ]
2329
1883
  })
2330
1884
  }),
2331
- /* @__PURE__ */ jsx("tbody", {
2332
- children: entry.effective.map((value) => /* @__PURE__ */ jsxs("tr", {
1885
+ /* @__PURE__ */ jsx2("tbody", {
1886
+ children: entry.effective.map((value) => /* @__PURE__ */ jsxs2("tr", {
2333
1887
  children: [
2334
- /* @__PURE__ */ jsx("td", {
1888
+ /* @__PURE__ */ jsx2("td", {
2335
1889
  children: value.value
2336
1890
  }),
2337
- /* @__PURE__ */ jsx("td", {
1891
+ /* @__PURE__ */ jsx2("td", {
2338
1892
  children: value.count
2339
1893
  })
2340
1894
  ]
@@ -2343,51 +1897,51 @@ function QualityTable({
2343
1897
  ]
2344
1898
  });
2345
1899
  }
2346
- return /* @__PURE__ */ jsxs("table", {
1900
+ return /* @__PURE__ */ jsxs2("table", {
2347
1901
  className: "kk-table",
2348
1902
  children: [
2349
- /* @__PURE__ */ jsx("thead", {
2350
- children: /* @__PURE__ */ jsxs("tr", {
1903
+ /* @__PURE__ */ jsx2("thead", {
1904
+ children: /* @__PURE__ */ jsxs2("tr", {
2351
1905
  children: [
2352
- /* @__PURE__ */ jsx("th", {
1906
+ /* @__PURE__ */ jsx2("th", {
2353
1907
  scope: "col",
2354
1908
  children: "Value"
2355
1909
  }),
2356
- /* @__PURE__ */ jsx("th", {
1910
+ /* @__PURE__ */ jsx2("th", {
2357
1911
  scope: "col",
2358
1912
  children: "HIGH"
2359
1913
  }),
2360
- /* @__PURE__ */ jsx("th", {
1914
+ /* @__PURE__ */ jsx2("th", {
2361
1915
  scope: "col",
2362
1916
  children: "MEDIUM"
2363
1917
  }),
2364
- /* @__PURE__ */ jsx("th", {
1918
+ /* @__PURE__ */ jsx2("th", {
2365
1919
  scope: "col",
2366
1920
  children: "LOW"
2367
1921
  }),
2368
- /* @__PURE__ */ jsx("th", {
1922
+ /* @__PURE__ */ jsx2("th", {
2369
1923
  scope: "col",
2370
1924
  children: "none"
2371
1925
  })
2372
1926
  ]
2373
1927
  })
2374
1928
  }),
2375
- /* @__PURE__ */ jsx("tbody", {
2376
- children: entry.run.map((row) => /* @__PURE__ */ jsxs("tr", {
1929
+ /* @__PURE__ */ jsx2("tbody", {
1930
+ children: entry.run.map((row) => /* @__PURE__ */ jsxs2("tr", {
2377
1931
  children: [
2378
- /* @__PURE__ */ jsx("td", {
1932
+ /* @__PURE__ */ jsx2("td", {
2379
1933
  children: row.value
2380
1934
  }),
2381
- /* @__PURE__ */ jsx("td", {
1935
+ /* @__PURE__ */ jsx2("td", {
2382
1936
  children: row.HIGH
2383
1937
  }),
2384
- /* @__PURE__ */ jsx("td", {
1938
+ /* @__PURE__ */ jsx2("td", {
2385
1939
  children: row.MEDIUM
2386
1940
  }),
2387
- /* @__PURE__ */ jsx("td", {
1941
+ /* @__PURE__ */ jsx2("td", {
2388
1942
  children: row.LOW
2389
1943
  }),
2390
- /* @__PURE__ */ jsx("td", {
1944
+ /* @__PURE__ */ jsx2("td", {
2391
1945
  children: row.none
2392
1946
  })
2393
1947
  ]
@@ -2398,19 +1952,19 @@ function QualityTable({
2398
1952
  }
2399
1953
  function ArtifactRows({ artifacts }) {
2400
1954
  if (artifacts.length === 0)
2401
- return /* @__PURE__ */ jsx("p", {
1955
+ return /* @__PURE__ */ jsx2("p", {
2402
1956
  children: "No artifact evidence for the selected run."
2403
1957
  });
2404
- return /* @__PURE__ */ jsx("ul", {
1958
+ return /* @__PURE__ */ jsx2("ul", {
2405
1959
  className: "kk-board-artifacts",
2406
- children: artifacts.map((artifact) => /* @__PURE__ */ jsx("li", {
2407
- children: artifact.href === null ? /* @__PURE__ */ jsxs("span", {
1960
+ children: artifacts.map((artifact) => /* @__PURE__ */ jsx2("li", {
1961
+ children: artifact.href === null ? /* @__PURE__ */ jsxs2("span", {
2408
1962
  children: [
2409
1963
  artifact.label,
2410
1964
  " — ",
2411
1965
  artifact.state
2412
1966
  ]
2413
- }) : /* @__PURE__ */ jsxs("a", {
1967
+ }) : /* @__PURE__ */ jsxs2("a", {
2414
1968
  href: artifact.href,
2415
1969
  children: [
2416
1970
  artifact.label,
@@ -2428,20 +1982,20 @@ function FilterSelect({
2428
1982
  options,
2429
1983
  onChange
2430
1984
  }) {
2431
- return /* @__PURE__ */ jsxs("label", {
1985
+ return /* @__PURE__ */ jsxs2("label", {
2432
1986
  className: "kk-collect-filter",
2433
1987
  children: [
2434
1988
  label,
2435
- /* @__PURE__ */ jsxs("select", {
1989
+ /* @__PURE__ */ jsxs2("select", {
2436
1990
  name,
2437
1991
  value: value ?? "",
2438
1992
  onChange,
2439
1993
  children: [
2440
- /* @__PURE__ */ jsx("option", {
1994
+ /* @__PURE__ */ jsx2("option", {
2441
1995
  value: "",
2442
1996
  children: "All"
2443
1997
  }),
2444
- options.map((option) => /* @__PURE__ */ jsx("option", {
1998
+ options.map((option) => /* @__PURE__ */ jsx2("option", {
2445
1999
  value: option,
2446
2000
  children: option
2447
2001
  }, option))
@@ -2466,17 +2020,17 @@ function ItemsPanel({
2466
2020
  const storeState = current === null ? "loading" : current.availability === "available" ? "available" : "unavailable";
2467
2021
  const page = storeState === "available" ? current : null;
2468
2022
  const count = page === null ? null : pager(page.page, page.total, page.pageSize);
2469
- return /* @__PURE__ */ jsxs("section", {
2023
+ return /* @__PURE__ */ jsxs2("section", {
2470
2024
  className: "kk-card kk-collect-items",
2471
2025
  children: [
2472
- /* @__PURE__ */ jsxs("div", {
2026
+ /* @__PURE__ */ jsxs2("div", {
2473
2027
  className: "kk-collect-filters",
2474
2028
  children: [
2475
- onSearchChange ? /* @__PURE__ */ jsxs("label", {
2029
+ onSearchChange ? /* @__PURE__ */ jsxs2("label", {
2476
2030
  className: "kk-collect-filter",
2477
2031
  children: [
2478
2032
  "Search",
2479
- /* @__PURE__ */ jsx("input", {
2033
+ /* @__PURE__ */ jsx2("input", {
2480
2034
  type: "text",
2481
2035
  className: "kk-search-input",
2482
2036
  placeholder: "Title or URL...",
@@ -2486,20 +2040,20 @@ function ItemsPanel({
2486
2040
  })
2487
2041
  ]
2488
2042
  }) : null,
2489
- runs && runs.length > 0 ? /* @__PURE__ */ jsxs("label", {
2043
+ runs && runs.length > 0 ? /* @__PURE__ */ jsxs2("label", {
2490
2044
  className: "kk-collect-filter",
2491
2045
  children: [
2492
2046
  "Run",
2493
- /* @__PURE__ */ jsxs("select", {
2047
+ /* @__PURE__ */ jsxs2("select", {
2494
2048
  name: "run",
2495
2049
  value: runId ?? "",
2496
2050
  onChange: (e) => onRunChange?.(e.target.value === "" ? undefined : e.target.value),
2497
2051
  children: [
2498
- /* @__PURE__ */ jsx("option", {
2052
+ /* @__PURE__ */ jsx2("option", {
2499
2053
  value: "",
2500
2054
  children: "All Runs"
2501
2055
  }),
2502
- runs.map((r) => /* @__PURE__ */ jsxs("option", {
2056
+ runs.map((r) => /* @__PURE__ */ jsxs2("option", {
2503
2057
  value: r.id,
2504
2058
  children: [
2505
2059
  r.id.length > 18 ? `${r.id.slice(0, 8)}...${r.id.slice(-6)}` : r.id,
@@ -2512,35 +2066,35 @@ function ItemsPanel({
2512
2066
  })
2513
2067
  ]
2514
2068
  }) : null,
2515
- /* @__PURE__ */ jsx(FilterSelect, {
2069
+ /* @__PURE__ */ jsx2(FilterSelect, {
2516
2070
  label: "Source",
2517
2071
  name: "source",
2518
2072
  value: filters.source,
2519
2073
  options: page?.sources ?? [],
2520
2074
  onChange: onFilterChange
2521
2075
  }),
2522
- /* @__PURE__ */ jsx(FilterSelect, {
2076
+ /* @__PURE__ */ jsx2(FilterSelect, {
2523
2077
  label: "Seen",
2524
2078
  name: "seen",
2525
2079
  value: filters.seen,
2526
2080
  options: ["new", "reseen"],
2527
2081
  onChange: onFilterChange
2528
2082
  }),
2529
- /* @__PURE__ */ jsx(FilterSelect, {
2083
+ /* @__PURE__ */ jsx2(FilterSelect, {
2530
2084
  label: "Decision",
2531
2085
  name: "decision",
2532
2086
  value: filters.decision,
2533
2087
  options: quality.map((entry) => entry.decisionId),
2534
2088
  onChange: onFilterChange
2535
2089
  }),
2536
- /* @__PURE__ */ jsx(FilterSelect, {
2090
+ /* @__PURE__ */ jsx2(FilterSelect, {
2537
2091
  label: "Value",
2538
2092
  name: "value",
2539
2093
  value: filters.value,
2540
2094
  options: decisionValues(quality, filters.decision ?? ""),
2541
2095
  onChange: onFilterChange
2542
2096
  }),
2543
- /* @__PURE__ */ jsx(FilterSelect, {
2097
+ /* @__PURE__ */ jsx2(FilterSelect, {
2544
2098
  label: "Selection",
2545
2099
  name: "selection",
2546
2100
  value: filters.selection,
@@ -2549,66 +2103,66 @@ function ItemsPanel({
2549
2103
  })
2550
2104
  ]
2551
2105
  }),
2552
- runId === null && items === null ? /* @__PURE__ */ jsx("p", {
2106
+ runId === null && items === null ? /* @__PURE__ */ jsx2("p", {
2553
2107
  children: "Select a run to browse its items."
2554
2108
  }) : null,
2555
- runId !== null && storeState === "loading" ? /* @__PURE__ */ jsx("p", {
2109
+ runId !== null && storeState === "loading" ? /* @__PURE__ */ jsx2("p", {
2556
2110
  children: "The items page has not loaded yet."
2557
2111
  }) : null,
2558
- storeState === "unavailable" ? /* @__PURE__ */ jsxs(Fragment, {
2112
+ storeState === "unavailable" ? /* @__PURE__ */ jsxs2(Fragment, {
2559
2113
  children: [
2560
- /* @__PURE__ */ jsx("p", {
2114
+ /* @__PURE__ */ jsx2("p", {
2561
2115
  children: "The store could not be read for this run; no items are shown."
2562
2116
  }),
2563
- /* @__PURE__ */ jsx(StoreState, {
2117
+ /* @__PURE__ */ jsx2(StoreState, {
2564
2118
  diagnostics: current?.diagnostics ?? []
2565
2119
  })
2566
2120
  ]
2567
2121
  }) : null,
2568
- page !== null && page.items.length === 0 ? /* @__PURE__ */ jsx("p", {
2122
+ page !== null && page.items.length === 0 ? /* @__PURE__ */ jsx2("p", {
2569
2123
  children: "No items match these filters."
2570
2124
  }) : null,
2571
- page === null || page.items.length === 0 ? null : /* @__PURE__ */ jsx("div", {
2125
+ page === null || page.items.length === 0 ? null : /* @__PURE__ */ jsx2("div", {
2572
2126
  className: "kk-table-container",
2573
- children: /* @__PURE__ */ jsxs("table", {
2127
+ children: /* @__PURE__ */ jsxs2("table", {
2574
2128
  className: "kk-table kk-collect-items-table",
2575
2129
  children: [
2576
- /* @__PURE__ */ jsx("thead", {
2577
- children: /* @__PURE__ */ jsxs("tr", {
2130
+ /* @__PURE__ */ jsx2("thead", {
2131
+ children: /* @__PURE__ */ jsxs2("tr", {
2578
2132
  children: [
2579
- /* @__PURE__ */ jsx("th", {
2133
+ /* @__PURE__ */ jsx2("th", {
2580
2134
  scope: "col",
2581
2135
  children: "Title"
2582
2136
  }),
2583
- /* @__PURE__ */ jsx("th", {
2137
+ /* @__PURE__ */ jsx2("th", {
2584
2138
  scope: "col",
2585
2139
  children: "Source"
2586
2140
  }),
2587
- /* @__PURE__ */ jsx("th", {
2141
+ /* @__PURE__ */ jsx2("th", {
2588
2142
  scope: "col",
2589
2143
  children: "Seen"
2590
2144
  }),
2591
- /* @__PURE__ */ jsx("th", {
2145
+ /* @__PURE__ */ jsx2("th", {
2592
2146
  scope: "col",
2593
2147
  children: "Story"
2594
2148
  }),
2595
- /* @__PURE__ */ jsx("th", {
2149
+ /* @__PURE__ */ jsx2("th", {
2596
2150
  scope: "col",
2597
2151
  children: "Labels"
2598
2152
  }),
2599
- /* @__PURE__ */ jsx("th", {
2153
+ /* @__PURE__ */ jsx2("th", {
2600
2154
  scope: "col",
2601
2155
  children: "Selection"
2602
2156
  }),
2603
- /* @__PURE__ */ jsx("th", {
2157
+ /* @__PURE__ */ jsx2("th", {
2604
2158
  scope: "col",
2605
2159
  children: "Action"
2606
2160
  })
2607
2161
  ]
2608
2162
  })
2609
2163
  }),
2610
- /* @__PURE__ */ jsx("tbody", {
2611
- children: page.items.map((item) => /* @__PURE__ */ jsx(ItemRow, {
2164
+ /* @__PURE__ */ jsx2("tbody", {
2165
+ children: page.items.map((item) => /* @__PURE__ */ jsx2(ItemRow, {
2612
2166
  item,
2613
2167
  onInspect: onInspectItem
2614
2168
  }, item.id))
@@ -2616,17 +2170,17 @@ function ItemsPanel({
2616
2170
  ]
2617
2171
  })
2618
2172
  }),
2619
- count === null ? null : /* @__PURE__ */ jsxs("div", {
2173
+ count === null ? null : /* @__PURE__ */ jsxs2("div", {
2620
2174
  className: "kk-collect-pager",
2621
2175
  children: [
2622
- /* @__PURE__ */ jsx("button", {
2176
+ /* @__PURE__ */ jsx2("button", {
2623
2177
  type: "button",
2624
2178
  name: "previous",
2625
2179
  disabled: count.page <= 1,
2626
2180
  onClick: onPageChange,
2627
2181
  children: "Previous"
2628
2182
  }),
2629
- /* @__PURE__ */ jsxs("span", {
2183
+ /* @__PURE__ */ jsxs2("span", {
2630
2184
  children: [
2631
2185
  "Page ",
2632
2186
  count.page,
@@ -2637,7 +2191,7 @@ function ItemsPanel({
2637
2191
  " items"
2638
2192
  ]
2639
2193
  }),
2640
- /* @__PURE__ */ jsx("button", {
2194
+ /* @__PURE__ */ jsx2("button", {
2641
2195
  type: "button",
2642
2196
  name: "next",
2643
2197
  disabled: count.page >= count.pages,
@@ -2652,26 +2206,26 @@ function ItemsPanel({
2652
2206
  function ItemRow({ item, onInspect }) {
2653
2207
  const labels = Object.entries(item.labels);
2654
2208
  const details = item.labelDetails ?? {};
2655
- return /* @__PURE__ */ jsxs("tr", {
2209
+ return /* @__PURE__ */ jsxs2("tr", {
2656
2210
  children: [
2657
- /* @__PURE__ */ jsxs("td", {
2211
+ /* @__PURE__ */ jsxs2("td", {
2658
2212
  children: [
2659
- /* @__PURE__ */ jsx("div", {
2660
- children: item.url === null ? item.title : /* @__PURE__ */ jsx("a", {
2213
+ /* @__PURE__ */ jsx2("div", {
2214
+ children: item.url === null ? item.title : /* @__PURE__ */ jsx2("a", {
2661
2215
  href: item.url,
2662
2216
  target: "_blank",
2663
2217
  rel: "noreferrer",
2664
2218
  children: item.title
2665
2219
  })
2666
2220
  }),
2667
- /* @__PURE__ */ jsxs("div", {
2221
+ /* @__PURE__ */ jsxs2("div", {
2668
2222
  style: { marginTop: "0.25rem", display: "flex", gap: "0.25rem" },
2669
2223
  children: [
2670
- item.domain ? /* @__PURE__ */ jsx("span", {
2224
+ item.domain ? /* @__PURE__ */ jsx2("span", {
2671
2225
  className: "kk-domain-pill",
2672
2226
  children: item.domain
2673
2227
  }) : null,
2674
- item.lang ? /* @__PURE__ */ jsx("span", {
2228
+ item.lang ? /* @__PURE__ */ jsx2("span", {
2675
2229
  className: "kk-domain-pill",
2676
2230
  children: item.lang
2677
2231
  }) : null
@@ -2679,34 +2233,34 @@ function ItemRow({ item, onInspect }) {
2679
2233
  })
2680
2234
  ]
2681
2235
  }),
2682
- /* @__PURE__ */ jsx("td", {
2236
+ /* @__PURE__ */ jsx2("td", {
2683
2237
  children: item.source
2684
2238
  }),
2685
- /* @__PURE__ */ jsx("td", {
2686
- children: /* @__PURE__ */ jsx("span", {
2239
+ /* @__PURE__ */ jsx2("td", {
2240
+ children: /* @__PURE__ */ jsx2("span", {
2687
2241
  className: `kk-badge ${item.seen === "new" ? "kk-badge-success" : "kk-badge-neutral"}`,
2688
2242
  children: item.seen
2689
2243
  })
2690
2244
  }),
2691
- /* @__PURE__ */ jsx("td", {
2245
+ /* @__PURE__ */ jsx2("td", {
2692
2246
  children: item.storyId ?? "—"
2693
2247
  }),
2694
- /* @__PURE__ */ jsx("td", {
2248
+ /* @__PURE__ */ jsx2("td", {
2695
2249
  children: labels.length === 0 ? "—" : labels.map(([decision, value]) => {
2696
2250
  const detail = details[decision];
2697
2251
  const conf = detail?.confidence?.toUpperCase();
2698
- return /* @__PURE__ */ jsxs("span", {
2252
+ return /* @__PURE__ */ jsxs2("span", {
2699
2253
  className: "kk-chip",
2700
2254
  style: { display: "inline-flex", alignItems: "center", gap: "0.25rem" },
2701
2255
  children: [
2702
- /* @__PURE__ */ jsxs("span", {
2256
+ /* @__PURE__ */ jsxs2("span", {
2703
2257
  children: [
2704
2258
  decision,
2705
2259
  ": ",
2706
2260
  value
2707
2261
  ]
2708
2262
  }),
2709
- conf ? /* @__PURE__ */ jsx("span", {
2263
+ conf ? /* @__PURE__ */ jsx2("span", {
2710
2264
  className: `kk-confidence-pill ${conf === "HIGH" ? "kk-confidence-high" : conf === "MEDIUM" ? "kk-confidence-medium" : "kk-confidence-low"}`,
2711
2265
  children: conf
2712
2266
  }) : null
@@ -2714,14 +2268,14 @@ function ItemRow({ item, onInspect }) {
2714
2268
  }, decision);
2715
2269
  })
2716
2270
  }),
2717
- /* @__PURE__ */ jsx("td", {
2718
- children: /* @__PURE__ */ jsx("span", {
2271
+ /* @__PURE__ */ jsx2("td", {
2272
+ children: /* @__PURE__ */ jsx2("span", {
2719
2273
  className: `kk-badge ${item.selection === "published" ? "kk-badge-success" : item.selection === "selected" ? "kk-badge-running" : item.selection === "dropped" ? "kk-badge-warning" : "kk-badge-neutral"}`,
2720
2274
  children: item.selection
2721
2275
  })
2722
2276
  }),
2723
- /* @__PURE__ */ jsx("td", {
2724
- children: /* @__PURE__ */ jsx("button", {
2277
+ /* @__PURE__ */ jsx2("td", {
2278
+ children: /* @__PURE__ */ jsx2("button", {
2725
2279
  type: "button",
2726
2280
  className: "kk-table-btn",
2727
2281
  onClick: () => onInspect?.(item),
@@ -2733,44 +2287,44 @@ function ItemRow({ item, onInspect }) {
2733
2287
  }
2734
2288
  function ItemDetailModal({ item, onClose }) {
2735
2289
  const details = Object.entries(item.labelDetails ?? {});
2736
- return /* @__PURE__ */ jsxs("div", {
2290
+ return /* @__PURE__ */ jsxs2("div", {
2737
2291
  className: "kk-modal-backdrop",
2738
2292
  role: "presentation",
2739
2293
  children: [
2740
- /* @__PURE__ */ jsx("button", {
2294
+ /* @__PURE__ */ jsx2("button", {
2741
2295
  type: "button",
2742
2296
  className: "kk-modal-dismiss-backdrop",
2743
2297
  onClick: onClose,
2744
2298
  "aria-label": "Close item modal",
2745
2299
  tabIndex: -1
2746
2300
  }),
2747
- /* @__PURE__ */ jsxs("div", {
2301
+ /* @__PURE__ */ jsxs2("div", {
2748
2302
  className: "kk-modal-card",
2749
2303
  role: "dialog",
2750
2304
  "aria-modal": "true",
2751
2305
  "aria-labelledby": "kk-item-modal-title",
2752
2306
  children: [
2753
- /* @__PURE__ */ jsxs("div", {
2307
+ /* @__PURE__ */ jsxs2("div", {
2754
2308
  className: "kk-modal-header",
2755
2309
  children: [
2756
- /* @__PURE__ */ jsxs("div", {
2310
+ /* @__PURE__ */ jsxs2("div", {
2757
2311
  className: "kk-modal-header-left",
2758
2312
  children: [
2759
- /* @__PURE__ */ jsx("h2", {
2313
+ /* @__PURE__ */ jsx2("h2", {
2760
2314
  id: "kk-item-modal-title",
2761
2315
  children: "Item Details"
2762
2316
  }),
2763
- /* @__PURE__ */ jsx("span", {
2317
+ /* @__PURE__ */ jsx2("span", {
2764
2318
  className: `kk-badge ${item.seen === "new" ? "kk-badge-success" : "kk-badge-neutral"}`,
2765
2319
  children: item.seen
2766
2320
  }),
2767
- /* @__PURE__ */ jsx("span", {
2321
+ /* @__PURE__ */ jsx2("span", {
2768
2322
  className: "kk-domain-pill",
2769
2323
  children: item.source
2770
2324
  })
2771
2325
  ]
2772
2326
  }),
2773
- /* @__PURE__ */ jsx("button", {
2327
+ /* @__PURE__ */ jsx2("button", {
2774
2328
  type: "button",
2775
2329
  className: "kk-modal-close",
2776
2330
  onClick: onClose,
@@ -2779,89 +2333,89 @@ function ItemDetailModal({ item, onClose }) {
2779
2333
  })
2780
2334
  ]
2781
2335
  }),
2782
- /* @__PURE__ */ jsxs("div", {
2336
+ /* @__PURE__ */ jsxs2("div", {
2783
2337
  className: "kk-modal-body",
2784
2338
  children: [
2785
- /* @__PURE__ */ jsxs("div", {
2339
+ /* @__PURE__ */ jsxs2("div", {
2786
2340
  children: [
2787
- /* @__PURE__ */ jsx("h3", {
2341
+ /* @__PURE__ */ jsx2("h3", {
2788
2342
  style: { margin: "0 0 0.5rem", fontSize: "1.1rem" },
2789
2343
  children: item.title
2790
2344
  }),
2791
- item.url ? /* @__PURE__ */ jsx("a", {
2345
+ item.url ? /* @__PURE__ */ jsx2("a", {
2792
2346
  href: item.url,
2793
2347
  target: "_blank",
2794
2348
  rel: "noreferrer",
2795
2349
  style: { wordBreak: "break-all" },
2796
2350
  children: item.url
2797
- }) : /* @__PURE__ */ jsx("span", {
2351
+ }) : /* @__PURE__ */ jsx2("span", {
2798
2352
  className: "kk-board-state",
2799
2353
  children: "No canonical URL"
2800
2354
  })
2801
2355
  ]
2802
2356
  }),
2803
- /* @__PURE__ */ jsxs("dl", {
2357
+ /* @__PURE__ */ jsxs2("dl", {
2804
2358
  className: "kk-board-facts",
2805
2359
  children: [
2806
- /* @__PURE__ */ jsxs("div", {
2360
+ /* @__PURE__ */ jsxs2("div", {
2807
2361
  children: [
2808
- /* @__PURE__ */ jsx("dt", {
2362
+ /* @__PURE__ */ jsx2("dt", {
2809
2363
  children: "Item ID"
2810
2364
  }),
2811
- /* @__PURE__ */ jsx("dd", {
2812
- children: /* @__PURE__ */ jsx("code", {
2365
+ /* @__PURE__ */ jsx2("dd", {
2366
+ children: /* @__PURE__ */ jsx2("code", {
2813
2367
  children: item.id
2814
2368
  })
2815
2369
  })
2816
2370
  ]
2817
2371
  }),
2818
- /* @__PURE__ */ jsxs("div", {
2372
+ /* @__PURE__ */ jsxs2("div", {
2819
2373
  children: [
2820
- /* @__PURE__ */ jsx("dt", {
2374
+ /* @__PURE__ */ jsx2("dt", {
2821
2375
  children: "Story ID"
2822
2376
  }),
2823
- /* @__PURE__ */ jsx("dd", {
2377
+ /* @__PURE__ */ jsx2("dd", {
2824
2378
  children: item.storyId ?? "—"
2825
2379
  })
2826
2380
  ]
2827
2381
  }),
2828
- /* @__PURE__ */ jsxs("div", {
2382
+ /* @__PURE__ */ jsxs2("div", {
2829
2383
  children: [
2830
- /* @__PURE__ */ jsx("dt", {
2384
+ /* @__PURE__ */ jsx2("dt", {
2831
2385
  children: "Domain"
2832
2386
  }),
2833
- /* @__PURE__ */ jsx("dd", {
2387
+ /* @__PURE__ */ jsx2("dd", {
2834
2388
  children: item.domain ?? "—"
2835
2389
  })
2836
2390
  ]
2837
2391
  }),
2838
- /* @__PURE__ */ jsxs("div", {
2392
+ /* @__PURE__ */ jsxs2("div", {
2839
2393
  children: [
2840
- /* @__PURE__ */ jsx("dt", {
2394
+ /* @__PURE__ */ jsx2("dt", {
2841
2395
  children: "Language"
2842
2396
  }),
2843
- /* @__PURE__ */ jsx("dd", {
2397
+ /* @__PURE__ */ jsx2("dd", {
2844
2398
  children: item.lang ?? "—"
2845
2399
  })
2846
2400
  ]
2847
2401
  }),
2848
- /* @__PURE__ */ jsxs("div", {
2402
+ /* @__PURE__ */ jsxs2("div", {
2849
2403
  children: [
2850
- /* @__PURE__ */ jsx("dt", {
2404
+ /* @__PURE__ */ jsx2("dt", {
2851
2405
  children: "Body Characters"
2852
2406
  }),
2853
- /* @__PURE__ */ jsx("dd", {
2407
+ /* @__PURE__ */ jsx2("dd", {
2854
2408
  children: item.bodyChars?.toLocaleString() ?? "—"
2855
2409
  })
2856
2410
  ]
2857
2411
  }),
2858
- /* @__PURE__ */ jsxs("div", {
2412
+ /* @__PURE__ */ jsxs2("div", {
2859
2413
  children: [
2860
- /* @__PURE__ */ jsx("dt", {
2414
+ /* @__PURE__ */ jsx2("dt", {
2861
2415
  children: "Selection Status"
2862
2416
  }),
2863
- /* @__PURE__ */ jsx("dd", {
2864
- children: /* @__PURE__ */ jsx("span", {
2417
+ /* @__PURE__ */ jsx2("dd", {
2418
+ children: /* @__PURE__ */ jsx2("span", {
2865
2419
  className: `kk-badge ${item.selection === "published" ? "kk-badge-success" : item.selection === "selected" ? "kk-badge-running" : "kk-badge-neutral"}`,
2866
2420
  children: item.selection
2867
2421
  })
@@ -2870,9 +2424,9 @@ function ItemDetailModal({ item, onClose }) {
2870
2424
  })
2871
2425
  ]
2872
2426
  }),
2873
- /* @__PURE__ */ jsxs("div", {
2427
+ /* @__PURE__ */ jsxs2("div", {
2874
2428
  children: [
2875
- /* @__PURE__ */ jsxs("h3", {
2429
+ /* @__PURE__ */ jsxs2("h3", {
2876
2430
  className: "kk-chart-title",
2877
2431
  style: { marginBottom: "0.5rem" },
2878
2432
  children: [
@@ -2881,63 +2435,63 @@ function ItemDetailModal({ item, onClose }) {
2881
2435
  ")"
2882
2436
  ]
2883
2437
  }),
2884
- details.length === 0 ? /* @__PURE__ */ jsx("p", {
2438
+ details.length === 0 ? /* @__PURE__ */ jsx2("p", {
2885
2439
  className: "kk-board-state",
2886
2440
  children: "No detailed label decisions recorded for this item."
2887
- }) : /* @__PURE__ */ jsx("div", {
2441
+ }) : /* @__PURE__ */ jsx2("div", {
2888
2442
  className: "kk-table-container",
2889
- children: /* @__PURE__ */ jsxs("table", {
2443
+ children: /* @__PURE__ */ jsxs2("table", {
2890
2444
  className: "kk-table",
2891
2445
  children: [
2892
- /* @__PURE__ */ jsx("thead", {
2893
- children: /* @__PURE__ */ jsxs("tr", {
2446
+ /* @__PURE__ */ jsx2("thead", {
2447
+ children: /* @__PURE__ */ jsxs2("tr", {
2894
2448
  children: [
2895
- /* @__PURE__ */ jsx("th", {
2449
+ /* @__PURE__ */ jsx2("th", {
2896
2450
  scope: "col",
2897
2451
  children: "Decision"
2898
2452
  }),
2899
- /* @__PURE__ */ jsx("th", {
2453
+ /* @__PURE__ */ jsx2("th", {
2900
2454
  scope: "col",
2901
2455
  children: "Value"
2902
2456
  }),
2903
- /* @__PURE__ */ jsx("th", {
2457
+ /* @__PURE__ */ jsx2("th", {
2904
2458
  scope: "col",
2905
2459
  children: "Confidence"
2906
2460
  }),
2907
- /* @__PURE__ */ jsx("th", {
2461
+ /* @__PURE__ */ jsx2("th", {
2908
2462
  scope: "col",
2909
2463
  children: "Maker"
2910
2464
  }),
2911
- /* @__PURE__ */ jsx("th", {
2465
+ /* @__PURE__ */ jsx2("th", {
2912
2466
  scope: "col",
2913
2467
  children: "Score"
2914
2468
  })
2915
2469
  ]
2916
2470
  })
2917
2471
  }),
2918
- /* @__PURE__ */ jsx("tbody", {
2472
+ /* @__PURE__ */ jsx2("tbody", {
2919
2473
  children: details.map(([decision, detail]) => {
2920
2474
  const conf = detail.confidence?.toUpperCase();
2921
- return /* @__PURE__ */ jsxs("tr", {
2475
+ return /* @__PURE__ */ jsxs2("tr", {
2922
2476
  children: [
2923
- /* @__PURE__ */ jsx("td", {
2924
- children: /* @__PURE__ */ jsx("strong", {
2477
+ /* @__PURE__ */ jsx2("td", {
2478
+ children: /* @__PURE__ */ jsx2("strong", {
2925
2479
  children: decision
2926
2480
  })
2927
2481
  }),
2928
- /* @__PURE__ */ jsx("td", {
2482
+ /* @__PURE__ */ jsx2("td", {
2929
2483
  children: detail.value
2930
2484
  }),
2931
- /* @__PURE__ */ jsx("td", {
2932
- children: conf ? /* @__PURE__ */ jsx("span", {
2485
+ /* @__PURE__ */ jsx2("td", {
2486
+ children: conf ? /* @__PURE__ */ jsx2("span", {
2933
2487
  className: `kk-confidence-pill ${conf === "HIGH" ? "kk-confidence-high" : conf === "MEDIUM" ? "kk-confidence-medium" : "kk-confidence-low"}`,
2934
2488
  children: conf
2935
2489
  }) : "—"
2936
2490
  }),
2937
- /* @__PURE__ */ jsx("td", {
2491
+ /* @__PURE__ */ jsx2("td", {
2938
2492
  children: detail.maker ?? "—"
2939
2493
  }),
2940
- /* @__PURE__ */ jsx("td", {
2494
+ /* @__PURE__ */ jsx2("td", {
2941
2495
  children: detail.score !== null ? detail.score : "—"
2942
2496
  })
2943
2497
  ]
@@ -2951,9 +2505,9 @@ function ItemDetailModal({ item, onClose }) {
2951
2505
  })
2952
2506
  ]
2953
2507
  }),
2954
- /* @__PURE__ */ jsx("div", {
2508
+ /* @__PURE__ */ jsx2("div", {
2955
2509
  className: "kk-modal-footer",
2956
- children: /* @__PURE__ */ jsx("button", {
2510
+ children: /* @__PURE__ */ jsx2("button", {
2957
2511
  type: "button",
2958
2512
  className: "kk-btn-action",
2959
2513
  onClick: onClose,
@@ -2988,17 +2542,17 @@ function SelectionsPanel({
2988
2542
  const page = storeState === "available" ? selections : null;
2989
2543
  const count = page === null ? null : pager(page.page, page.total, page.pageSize);
2990
2544
  const availableTopics = (topics && topics.length > 0 ? topics : selections?.topics) ?? [];
2991
- return /* @__PURE__ */ jsxs("section", {
2545
+ return /* @__PURE__ */ jsxs2("section", {
2992
2546
  className: "kk-card kk-collect-items",
2993
2547
  children: [
2994
- /* @__PURE__ */ jsxs("div", {
2548
+ /* @__PURE__ */ jsxs2("div", {
2995
2549
  className: "kk-collect-filters",
2996
2550
  children: [
2997
- /* @__PURE__ */ jsxs("label", {
2551
+ /* @__PURE__ */ jsxs2("label", {
2998
2552
  className: "kk-collect-filter",
2999
2553
  children: [
3000
2554
  "Search",
3001
- /* @__PURE__ */ jsx("input", {
2555
+ /* @__PURE__ */ jsx2("input", {
3002
2556
  type: "text",
3003
2557
  className: "kk-search-input",
3004
2558
  placeholder: "Topic, title or reason...",
@@ -3008,19 +2562,19 @@ function SelectionsPanel({
3008
2562
  })
3009
2563
  ]
3010
2564
  }),
3011
- /* @__PURE__ */ jsxs("label", {
2565
+ /* @__PURE__ */ jsxs2("label", {
3012
2566
  className: "kk-collect-filter",
3013
2567
  children: [
3014
2568
  "Topic",
3015
- /* @__PURE__ */ jsxs("select", {
2569
+ /* @__PURE__ */ jsxs2("select", {
3016
2570
  value: filters.topic ?? "",
3017
2571
  onChange: (e) => onTopicChange?.(e.target.value === "" ? undefined : e.target.value),
3018
2572
  children: [
3019
- /* @__PURE__ */ jsx("option", {
2573
+ /* @__PURE__ */ jsx2("option", {
3020
2574
  value: "",
3021
2575
  children: "All Topics"
3022
2576
  }),
3023
- availableTopics.map((t) => /* @__PURE__ */ jsx("option", {
2577
+ availableTopics.map((t) => /* @__PURE__ */ jsx2("option", {
3024
2578
  value: t,
3025
2579
  children: t
3026
2580
  }, t))
@@ -3028,27 +2582,27 @@ function SelectionsPanel({
3028
2582
  })
3029
2583
  ]
3030
2584
  }),
3031
- /* @__PURE__ */ jsxs("label", {
2585
+ /* @__PURE__ */ jsxs2("label", {
3032
2586
  className: "kk-collect-filter",
3033
2587
  children: [
3034
2588
  "Status",
3035
- /* @__PURE__ */ jsxs("select", {
2589
+ /* @__PURE__ */ jsxs2("select", {
3036
2590
  value: filters.status ?? "",
3037
2591
  onChange: (e) => onStatusChange?.(e.target.value === "" ? undefined : e.target.value),
3038
2592
  children: [
3039
- /* @__PURE__ */ jsx("option", {
2593
+ /* @__PURE__ */ jsx2("option", {
3040
2594
  value: "",
3041
2595
  children: "All Statuses"
3042
2596
  }),
3043
- /* @__PURE__ */ jsx("option", {
2597
+ /* @__PURE__ */ jsx2("option", {
3044
2598
  value: "selected",
3045
2599
  children: "selected"
3046
2600
  }),
3047
- /* @__PURE__ */ jsx("option", {
2601
+ /* @__PURE__ */ jsx2("option", {
3048
2602
  value: "published",
3049
2603
  children: "published"
3050
2604
  }),
3051
- /* @__PURE__ */ jsx("option", {
2605
+ /* @__PURE__ */ jsx2("option", {
3052
2606
  value: "dropped",
3053
2607
  children: "dropped"
3054
2608
  })
@@ -3058,74 +2612,74 @@ function SelectionsPanel({
3058
2612
  })
3059
2613
  ]
3060
2614
  }),
3061
- storeState === "loading" ? /* @__PURE__ */ jsx("p", {
2615
+ storeState === "loading" ? /* @__PURE__ */ jsx2("p", {
3062
2616
  children: "The selections page has not loaded yet."
3063
2617
  }) : null,
3064
- storeState === "unavailable" ? /* @__PURE__ */ jsxs(Fragment, {
2618
+ storeState === "unavailable" ? /* @__PURE__ */ jsxs2(Fragment, {
3065
2619
  children: [
3066
- /* @__PURE__ */ jsx("p", {
2620
+ /* @__PURE__ */ jsx2("p", {
3067
2621
  children: "The selections could not be read; no rows are shown."
3068
2622
  }),
3069
- /* @__PURE__ */ jsx(StoreState, {
2623
+ /* @__PURE__ */ jsx2(StoreState, {
3070
2624
  diagnostics: selections?.diagnostics ?? []
3071
2625
  })
3072
2626
  ]
3073
2627
  }) : null,
3074
- page !== null && page.selections.length === 0 ? /* @__PURE__ */ jsx("p", {
2628
+ page !== null && page.selections.length === 0 ? /* @__PURE__ */ jsx2("p", {
3075
2629
  children: "No selections match these filters."
3076
2630
  }) : null,
3077
- page === null || page.selections.length === 0 ? null : /* @__PURE__ */ jsx("div", {
2631
+ page === null || page.selections.length === 0 ? null : /* @__PURE__ */ jsx2("div", {
3078
2632
  className: "kk-table-container",
3079
- children: /* @__PURE__ */ jsxs("table", {
2633
+ children: /* @__PURE__ */ jsxs2("table", {
3080
2634
  className: "kk-table",
3081
2635
  children: [
3082
- /* @__PURE__ */ jsx("thead", {
3083
- children: /* @__PURE__ */ jsxs("tr", {
2636
+ /* @__PURE__ */ jsx2("thead", {
2637
+ children: /* @__PURE__ */ jsxs2("tr", {
3084
2638
  children: [
3085
- /* @__PURE__ */ jsx("th", {
2639
+ /* @__PURE__ */ jsx2("th", {
3086
2640
  scope: "col",
3087
2641
  children: "Rank"
3088
2642
  }),
3089
- /* @__PURE__ */ jsx("th", {
2643
+ /* @__PURE__ */ jsx2("th", {
3090
2644
  scope: "col",
3091
2645
  children: "Topic"
3092
2646
  }),
3093
- /* @__PURE__ */ jsx("th", {
2647
+ /* @__PURE__ */ jsx2("th", {
3094
2648
  scope: "col",
3095
2649
  children: "Title & URL"
3096
2650
  }),
3097
- /* @__PURE__ */ jsx("th", {
2651
+ /* @__PURE__ */ jsx2("th", {
3098
2652
  scope: "col",
3099
2653
  children: "Source"
3100
2654
  }),
3101
- /* @__PURE__ */ jsx("th", {
2655
+ /* @__PURE__ */ jsx2("th", {
3102
2656
  scope: "col",
3103
2657
  children: "Story"
3104
2658
  }),
3105
- /* @__PURE__ */ jsx("th", {
2659
+ /* @__PURE__ */ jsx2("th", {
3106
2660
  scope: "col",
3107
2661
  children: "Status"
3108
2662
  }),
3109
- /* @__PURE__ */ jsx("th", {
2663
+ /* @__PURE__ */ jsx2("th", {
3110
2664
  scope: "col",
3111
2665
  children: "Reason"
3112
2666
  }),
3113
- /* @__PURE__ */ jsx("th", {
2667
+ /* @__PURE__ */ jsx2("th", {
3114
2668
  scope: "col",
3115
2669
  children: "Selected At"
3116
2670
  }),
3117
- /* @__PURE__ */ jsx("th", {
2671
+ /* @__PURE__ */ jsx2("th", {
3118
2672
  scope: "col",
3119
2673
  children: "Run ID"
3120
2674
  })
3121
2675
  ]
3122
2676
  })
3123
2677
  }),
3124
- /* @__PURE__ */ jsx("tbody", {
3125
- children: page.selections.map((item) => /* @__PURE__ */ jsxs("tr", {
2678
+ /* @__PURE__ */ jsx2("tbody", {
2679
+ children: page.selections.map((item) => /* @__PURE__ */ jsxs2("tr", {
3126
2680
  children: [
3127
- /* @__PURE__ */ jsx("td", {
3128
- children: /* @__PURE__ */ jsxs("span", {
2681
+ /* @__PURE__ */ jsx2("td", {
2682
+ children: /* @__PURE__ */ jsxs2("span", {
3129
2683
  className: "kk-badge kk-badge-neutral",
3130
2684
  children: [
3131
2685
  "#",
@@ -3133,44 +2687,44 @@ function SelectionsPanel({
3133
2687
  ]
3134
2688
  })
3135
2689
  }),
3136
- /* @__PURE__ */ jsx("td", {
3137
- children: /* @__PURE__ */ jsx("span", {
2690
+ /* @__PURE__ */ jsx2("td", {
2691
+ children: /* @__PURE__ */ jsx2("span", {
3138
2692
  className: "kk-domain-pill",
3139
2693
  children: item.topic
3140
2694
  })
3141
2695
  }),
3142
- /* @__PURE__ */ jsx("td", {
3143
- children: item.url ? /* @__PURE__ */ jsx("a", {
2696
+ /* @__PURE__ */ jsx2("td", {
2697
+ children: item.url ? /* @__PURE__ */ jsx2("a", {
3144
2698
  href: item.url,
3145
2699
  target: "_blank",
3146
2700
  rel: "noreferrer",
3147
2701
  children: item.title ?? item.itemId
3148
2702
  }) : item.title ?? item.itemId
3149
2703
  }),
3150
- /* @__PURE__ */ jsx("td", {
2704
+ /* @__PURE__ */ jsx2("td", {
3151
2705
  children: item.source ?? "—"
3152
2706
  }),
3153
- /* @__PURE__ */ jsx("td", {
2707
+ /* @__PURE__ */ jsx2("td", {
3154
2708
  children: item.storyId ?? "—"
3155
2709
  }),
3156
- /* @__PURE__ */ jsx("td", {
3157
- children: /* @__PURE__ */ jsx("span", {
2710
+ /* @__PURE__ */ jsx2("td", {
2711
+ children: /* @__PURE__ */ jsx2("span", {
3158
2712
  className: `kk-badge ${item.status === "published" ? "kk-badge-success" : item.status === "selected" ? "kk-badge-running" : "kk-badge-failed"}`,
3159
2713
  children: item.status
3160
2714
  })
3161
2715
  }),
3162
- /* @__PURE__ */ jsx("td", {
3163
- children: /* @__PURE__ */ jsx("span", {
2716
+ /* @__PURE__ */ jsx2("td", {
2717
+ children: /* @__PURE__ */ jsx2("span", {
3164
2718
  className: "kk-stat-sub",
3165
2719
  title: item.reason ?? undefined,
3166
2720
  children: item.reason ? item.reason.length > 60 ? `${item.reason.slice(0, 60)}…` : item.reason : "—"
3167
2721
  })
3168
2722
  }),
3169
- /* @__PURE__ */ jsx("td", {
2723
+ /* @__PURE__ */ jsx2("td", {
3170
2724
  children: formatEpoch(item.selectedAt)
3171
2725
  }),
3172
- /* @__PURE__ */ jsx("td", {
3173
- children: /* @__PURE__ */ jsx("button", {
2726
+ /* @__PURE__ */ jsx2("td", {
2727
+ children: /* @__PURE__ */ jsx2("button", {
3174
2728
  type: "button",
3175
2729
  className: "kk-collect-run-link",
3176
2730
  onClick: () => onInspectRun?.(item.runId),
@@ -3184,17 +2738,17 @@ function SelectionsPanel({
3184
2738
  ]
3185
2739
  })
3186
2740
  }),
3187
- count === null ? null : /* @__PURE__ */ jsxs("div", {
2741
+ count === null ? null : /* @__PURE__ */ jsxs2("div", {
3188
2742
  className: "kk-collect-pager",
3189
2743
  children: [
3190
- /* @__PURE__ */ jsx("button", {
2744
+ /* @__PURE__ */ jsx2("button", {
3191
2745
  type: "button",
3192
2746
  name: "previous",
3193
2747
  disabled: count.page <= 1,
3194
2748
  onClick: () => onPageChange?.(-1),
3195
2749
  children: "Previous"
3196
2750
  }),
3197
- /* @__PURE__ */ jsxs("span", {
2751
+ /* @__PURE__ */ jsxs2("span", {
3198
2752
  children: [
3199
2753
  "Page ",
3200
2754
  count.page,
@@ -3205,7 +2759,7 @@ function SelectionsPanel({
3205
2759
  " selections"
3206
2760
  ]
3207
2761
  }),
3208
- /* @__PURE__ */ jsx("button", {
2762
+ /* @__PURE__ */ jsx2("button", {
3209
2763
  type: "button",
3210
2764
  name: "next",
3211
2765
  disabled: count.page >= count.pages,
@@ -3219,14 +2773,14 @@ function SelectionsPanel({
3219
2773
  }
3220
2774
  function ProgressPanel({ steps }) {
3221
2775
  if (steps.length === 0)
3222
- return /* @__PURE__ */ jsx("p", {
2776
+ return /* @__PURE__ */ jsx2("p", {
3223
2777
  children: "Recorded progress is unavailable for the selected run."
3224
2778
  });
3225
- return /* @__PURE__ */ jsx("ul", {
2779
+ return /* @__PURE__ */ jsx2("ul", {
3226
2780
  className: "kk-board-progress",
3227
- children: steps.map((step) => /* @__PURE__ */ jsxs("li", {
2781
+ children: steps.map((step) => /* @__PURE__ */ jsxs2("li", {
3228
2782
  children: [
3229
- /* @__PURE__ */ jsx("strong", {
2783
+ /* @__PURE__ */ jsx2("strong", {
3230
2784
  children: step.state
3231
2785
  }),
3232
2786
  " visit ",
@@ -3235,12 +2789,12 @@ function ProgressPanel({ steps }) {
3235
2789
  step.status,
3236
2790
  " · ",
3237
2791
  step.timing,
3238
- step.operatorWait ? /* @__PURE__ */ jsx("span", {
2792
+ step.operatorWait ? /* @__PURE__ */ jsx2("span", {
3239
2793
  className: "kk-board-state",
3240
2794
  children: " operator wait"
3241
2795
  }) : null,
3242
- step.actions.length === 0 ? null : /* @__PURE__ */ jsx("ul", {
3243
- children: step.actions.map((action) => /* @__PURE__ */ jsx("li", {
2796
+ step.actions.length === 0 ? null : /* @__PURE__ */ jsx2("ul", {
2797
+ children: step.actions.map((action) => /* @__PURE__ */ jsx2("li", {
3244
2798
  children: action
3245
2799
  }, action))
3246
2800
  })
@@ -3250,44 +2804,44 @@ function ProgressPanel({ steps }) {
3250
2804
  }
3251
2805
  function ConfigPanel({ config }) {
3252
2806
  if (config === null)
3253
- return /* @__PURE__ */ jsx("p", {
2807
+ return /* @__PURE__ */ jsx2("p", {
3254
2808
  children: "No captured configuration for the selected run."
3255
2809
  });
3256
2810
  const entries = Object.entries(config.settings);
3257
- return /* @__PURE__ */ jsxs("div", {
2811
+ return /* @__PURE__ */ jsxs2("div", {
3258
2812
  className: "kk-board-config",
3259
2813
  children: [
3260
- /* @__PURE__ */ jsxs("p", {
2814
+ /* @__PURE__ */ jsxs2("p", {
3261
2815
  children: [
3262
2816
  "Captured ",
3263
2817
  formatTimestamp(config.capturedAt)
3264
2818
  ]
3265
2819
  }),
3266
- entries.length === 0 ? /* @__PURE__ */ jsx("p", {
2820
+ entries.length === 0 ? /* @__PURE__ */ jsx2("p", {
3267
2821
  children: "Recorded configuration unavailable for this run."
3268
2822
  }) : null,
3269
- /* @__PURE__ */ jsx("dl", {
3270
- children: entries.map(([key, value]) => /* @__PURE__ */ jsxs("div", {
2823
+ /* @__PURE__ */ jsx2("dl", {
2824
+ children: entries.map(([key, value]) => /* @__PURE__ */ jsxs2("div", {
3271
2825
  children: [
3272
- /* @__PURE__ */ jsx("dt", {
2826
+ /* @__PURE__ */ jsx2("dt", {
3273
2827
  children: key
3274
2828
  }),
3275
- /* @__PURE__ */ jsx("dd", {
2829
+ /* @__PURE__ */ jsx2("dd", {
3276
2830
  children: value
3277
2831
  })
3278
2832
  ]
3279
2833
  }, key))
3280
2834
  }),
3281
- config.unavailableKeys.length === 0 ? null : /* @__PURE__ */ jsxs("p", {
2835
+ config.unavailableKeys.length === 0 ? null : /* @__PURE__ */ jsxs2("p", {
3282
2836
  children: [
3283
2837
  "Uncaptured keys: ",
3284
2838
  config.unavailableKeys.join(", ")
3285
2839
  ]
3286
2840
  }),
3287
- /* @__PURE__ */ jsxs("p", {
2841
+ /* @__PURE__ */ jsxs2("p", {
3288
2842
  children: [
3289
2843
  "Current definitions and defaults live in ",
3290
- /* @__PURE__ */ jsx("a", {
2844
+ /* @__PURE__ */ jsx2("a", {
3291
2845
  href: "/board/settings/workflows",
3292
2846
  children: "Settings → Workflows"
3293
2847
  }),
@@ -3299,7 +2853,7 @@ function ConfigPanel({ config }) {
3299
2853
  }
3300
2854
 
3301
2855
  // ../board/src/collect/index.tsx
3302
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2856
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
3303
2857
  var TAB_LABELS = {
3304
2858
  summary: "Summary",
3305
2859
  runs: "Run Details",
@@ -3309,6 +2863,26 @@ var TAB_LABELS = {
3309
2863
  function messageOf(error) {
3310
2864
  return error instanceof Error ? error.message : String(error);
3311
2865
  }
2866
+ var COLLECT_RANGES = ["24h", "7d", "14d", "30d", "All"];
2867
+ function parseRange(search) {
2868
+ const raw = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search).get("range");
2869
+ if (raw === null)
2870
+ return { range: "14d", diagnostic: null };
2871
+ if (COLLECT_RANGES.includes(raw)) {
2872
+ return { range: raw, diagnostic: null };
2873
+ }
2874
+ return {
2875
+ range: "14d",
2876
+ diagnostic: { code: "board.deeplink.unknown-range", message: `Unknown range '${raw}'; showing 14d.` }
2877
+ };
2878
+ }
2879
+ function rangeWindow(range, now) {
2880
+ const untilMs = now;
2881
+ if (range === "All")
2882
+ return { fromMs: 0, untilMs };
2883
+ const days = range === "24h" ? 1 : range === "7d" ? 7 : range === "14d" ? 14 : 30;
2884
+ return { fromMs: untilMs - days * 86400000, untilMs };
2885
+ }
3312
2886
  function usePolling(loader, intervalMs, refresh) {
3313
2887
  const loaderRef = useRef(loader);
3314
2888
  loaderRef.current = loader;
@@ -3336,9 +2910,12 @@ function isOfflineError(msg) {
3336
2910
  }
3337
2911
  function CollectModule() {
3338
2912
  const [link] = useState(() => parseDeepLink(window.location.search, COLLECT_TABS, COLLECT_TAB_ALIASES));
2913
+ const [rangeLink] = useState(() => parseRange(window.location.search));
3339
2914
  const [reader] = useState(() => readerOriginFrom(window.location.search, window.location.origin));
2915
+ const [aggregateReader] = useState(() => readerOriginFrom(window.location.search, DEFAULT_READER_ORIGIN));
3340
2916
  const readerOrigin = reader.origin;
3341
- const client = useMemo(() => createBoardClient({ readerOrigin, boardOrigin: window.location.origin }), [readerOrigin]);
2917
+ const aggregateReaderOrigin = aggregateReader.origin;
2918
+ const client = useMemo(() => createBoardClient({ readerOrigin, aggregateReaderOrigin, boardOrigin: window.location.origin }), [readerOrigin, aggregateReaderOrigin]);
3342
2919
  const [rows, setRows] = useState([]);
3343
2920
  const [_cursor, setCursor] = useState(null);
3344
2921
  const [selection, setSelection] = useState({
@@ -3347,7 +2924,9 @@ function CollectModule() {
3347
2924
  });
3348
2925
  const [diagnostics, setDiagnostics] = useState(() => [
3349
2926
  ...link.diagnostics,
3350
- ...reader.diagnostic === null ? [] : [reader.diagnostic]
2927
+ ...rangeLink.diagnostic === null ? [] : [rangeLink.diagnostic],
2928
+ ...reader.diagnostic === null ? [] : [reader.diagnostic],
2929
+ ...aggregateReader.diagnostic === null ? [] : [aggregateReader.diagnostic]
3351
2930
  ]);
3352
2931
  const [isReaderOffline, setIsReaderOffline] = useState(false);
3353
2932
  const [historyRefresh, setHistoryRefresh] = useState(() => initialRefresh(HISTORY_POLL_MS));
@@ -3361,12 +2940,14 @@ function CollectModule() {
3361
2940
  const [selectedInspectItem, setSelectedInspectItem] = useState(null);
3362
2941
  const [selections, setSelections] = useState(null);
3363
2942
  const [selectionsFilters, setSelectionsFilters] = useState({ page: 1 });
2943
+ const [channels, setChannels] = useState(null);
2944
+ const [channelsPage, setChannelsPage] = useState(1);
3364
2945
  const [selectedModalRunId, setSelectedModalRunId] = useState(null);
3365
2946
  const [modalStoreRun, setModalStoreRun] = useState(null);
3366
2947
  const [modalResults, setModalResults] = useState(null);
3367
2948
  const [modalProgress, setModalProgress] = useState(null);
3368
2949
  const [modalConfig, setModalConfig] = useState(null);
3369
- const [timeRange, setTimeRange] = useState("24h");
2950
+ const [timeRange, setTimeRange] = useState(rangeLink.range);
3370
2951
  const [showEffective, setShowEffective] = useState(false);
3371
2952
  const [runSearchQuery, setRunSearchQuery] = useState("");
3372
2953
  const [runStatusFilter, setRunStatusFilter] = useState("all");
@@ -3513,6 +3094,32 @@ function CollectModule() {
3513
3094
  }
3514
3095
  }
3515
3096
  }, [client, selectionsFilters]);
3097
+ const channelsRequests = useRef(requestSequence());
3098
+ const loadChannels = useCallback(async () => {
3099
+ const token = channelsRequests.current.begin();
3100
+ const { fromMs, untilMs } = rangeWindow(timeRange, Date.now());
3101
+ try {
3102
+ const page = await client.storeChannels({ fromMs, untilMs, page: channelsPage });
3103
+ if (!channelsRequests.current.isCurrent(token))
3104
+ return;
3105
+ setChannels(page);
3106
+ setIsReaderOffline(false);
3107
+ } catch (error) {
3108
+ if (!channelsRequests.current.isCurrent(token))
3109
+ return;
3110
+ setChannels(null);
3111
+ const msg = messageOf(error);
3112
+ if (isOfflineError(msg)) {
3113
+ setIsReaderOffline(true);
3114
+ } else {
3115
+ setDiagnostics((existing) => [...existing, { code: "board.store.channels-unavailable", message: msg }]);
3116
+ }
3117
+ }
3118
+ }, [client, timeRange, channelsPage]);
3119
+ const rangeChanged = useCallback((range) => {
3120
+ setTimeRange(range);
3121
+ setChannelsPage(1);
3122
+ }, []);
3516
3123
  useEffect(() => {
3517
3124
  if (!selectedModalRunId) {
3518
3125
  modalTarget.current = null;
@@ -3578,6 +3185,11 @@ function CollectModule() {
3578
3185
  return;
3579
3186
  loadSelections();
3580
3187
  }, [selection.tab, loadSelections]);
3188
+ useEffect(() => {
3189
+ if (selection.tab !== "summary")
3190
+ return;
3191
+ loadChannels();
3192
+ }, [selection.tab, loadChannels]);
3581
3193
  useEffect(() => {
3582
3194
  if (selection.runId === null && rows.length > 0) {
3583
3195
  setSelection((state) => state.runId === null ? resolveSelection(rows, link, "summary") : state);
@@ -3586,6 +3198,15 @@ function CollectModule() {
3586
3198
  useEffect(() => {
3587
3199
  syncSelectionUrl(selection, { location: window.location, history: window.history });
3588
3200
  }, [selection]);
3201
+ useEffect(() => {
3202
+ if (window.location.pathname !== COLLECT_MODULE_PATH)
3203
+ return;
3204
+ const params = new URLSearchParams(window.location.search);
3205
+ if (params.get("range") === timeRange)
3206
+ return;
3207
+ params.set("range", timeRange);
3208
+ window.history.replaceState(window.history.state, "", `${window.location.pathname}?${params.toString()}`);
3209
+ }, [timeRange]);
3589
3210
  const tab = selection.tab;
3590
3211
  const now = Date.now();
3591
3212
  const currentStoreRun = storeRun?.runId === selection.runId ? storeRun : null;
@@ -3619,27 +3240,27 @@ function CollectModule() {
3619
3240
  const displayDiagnostics = dedupeDiagnostics([...diagnostics, ...results?.diagnostics ?? []]).filter((d) => {
3620
3241
  if (!isReaderOffline)
3621
3242
  return true;
3622
- return d.code !== "board.reader.unavailable" && d.code !== "board.store.run-unavailable" && d.code !== "board.store.unavailable" && d.code !== "board.store.items-unavailable" && d.code !== "board.store.selections-unavailable";
3243
+ return d.code !== "board.reader.unavailable" && d.code !== "board.store.run-unavailable" && d.code !== "board.store.unavailable" && d.code !== "board.store.items-unavailable" && d.code !== "board.store.selections-unavailable" && d.code !== "board.store.channels-unavailable";
3623
3244
  });
3624
- return /* @__PURE__ */ jsxs2("div", {
3245
+ return /* @__PURE__ */ jsxs3("div", {
3625
3246
  className: "kk-board kk-board-collect",
3626
3247
  children: [
3627
- /* @__PURE__ */ jsxs2("header", {
3248
+ /* @__PURE__ */ jsxs3("header", {
3628
3249
  className: "kk-board-header",
3629
3250
  children: [
3630
- /* @__PURE__ */ jsx2("div", {
3251
+ /* @__PURE__ */ jsx3("div", {
3631
3252
  className: "kk-board-header-left",
3632
- children: /* @__PURE__ */ jsx2("div", {
3253
+ children: /* @__PURE__ */ jsx3("div", {
3633
3254
  className: "kk-board-header-title-row",
3634
- children: /* @__PURE__ */ jsx2("h1", {
3255
+ children: /* @__PURE__ */ jsx3("h1", {
3635
3256
  children: "Collect"
3636
3257
  })
3637
3258
  })
3638
3259
  }),
3639
- /* @__PURE__ */ jsxs2("div", {
3260
+ /* @__PURE__ */ jsxs3("div", {
3640
3261
  className: "kk-board-header-right",
3641
3262
  children: [
3642
- /* @__PURE__ */ jsx2("button", {
3263
+ /* @__PURE__ */ jsx3("button", {
3643
3264
  type: "button",
3644
3265
  onClick: () => {
3645
3266
  loadReader();
@@ -3648,11 +3269,13 @@ function CollectModule() {
3648
3269
  loadItems(selection.runId ?? "");
3649
3270
  if (selection.tab === "selections")
3650
3271
  loadSelections();
3272
+ if (selection.tab === "summary")
3273
+ loadChannels();
3651
3274
  },
3652
3275
  title: "Refresh data",
3653
3276
  children: "↻ Refresh"
3654
3277
  }),
3655
- /* @__PURE__ */ jsx2("a", {
3278
+ /* @__PURE__ */ jsx3("a", {
3656
3279
  href: selectionPath(selection, window.location.search),
3657
3280
  className: "kk-btn-action",
3658
3281
  title: "Permanent link",
@@ -3662,30 +3285,30 @@ function CollectModule() {
3662
3285
  })
3663
3286
  ]
3664
3287
  }),
3665
- isReaderOffline && readerOrigin !== window.location.origin ? /* @__PURE__ */ jsxs2("div", {
3288
+ isReaderOffline && readerOrigin !== window.location.origin ? /* @__PURE__ */ jsxs3("div", {
3666
3289
  className: "kk-board-reader-offline-banner",
3667
3290
  role: "alert",
3668
3291
  children: [
3669
- /* @__PURE__ */ jsx2("div", {
3292
+ /* @__PURE__ */ jsx3("div", {
3670
3293
  className: "kk-board-reader-offline-icon",
3671
3294
  children: "⚠️"
3672
3295
  }),
3673
- /* @__PURE__ */ jsxs2("div", {
3296
+ /* @__PURE__ */ jsxs3("div", {
3674
3297
  className: "kk-board-reader-offline-content",
3675
3298
  children: [
3676
- /* @__PURE__ */ jsxs2("strong", {
3299
+ /* @__PURE__ */ jsxs3("strong", {
3677
3300
  children: [
3678
3301
  "Loopback Board Reader Offline (",
3679
3302
  readerOrigin,
3680
3303
  ")"
3681
3304
  ]
3682
3305
  }),
3683
- /* @__PURE__ */ jsx2("p", {
3306
+ /* @__PURE__ */ jsx3("p", {
3684
3307
  children: "Store facts, item inspection, and artifact evidence require the local reader process. Spur run execution history remains available."
3685
3308
  })
3686
3309
  ]
3687
3310
  }),
3688
- /* @__PURE__ */ jsx2("button", {
3311
+ /* @__PURE__ */ jsx3("button", {
3689
3312
  type: "button",
3690
3313
  className: "kk-btn-action",
3691
3314
  onClick: () => {
@@ -3696,42 +3319,43 @@ function CollectModule() {
3696
3319
  loadItems(selection.runId ?? "");
3697
3320
  if (selection.tab === "selections")
3698
3321
  loadSelections();
3322
+ if (selection.tab === "summary")
3323
+ loadChannels();
3699
3324
  },
3700
3325
  children: "↻ Retry Connection"
3701
3326
  })
3702
3327
  ]
3703
3328
  }) : null,
3704
- /* @__PURE__ */ jsx2("nav", {
3329
+ /* @__PURE__ */ jsx3("nav", {
3705
3330
  className: "kk-board-tabs",
3706
3331
  "aria-label": "Collect tabs",
3707
- children: COLLECT_TABS.map((candidate) => /* @__PURE__ */ jsx2("button", {
3332
+ children: COLLECT_TABS.map((candidate) => /* @__PURE__ */ jsx3("button", {
3708
3333
  type: "button",
3709
3334
  "aria-current": candidate === tab ? "page" : undefined,
3710
3335
  onClick: () => setSelection((state) => ({ ...state, tab: candidate })),
3711
3336
  children: TAB_LABELS[candidate]
3712
3337
  }, candidate))
3713
3338
  }),
3714
- rows.length === 0 ? /* @__PURE__ */ jsxs2("p", {
3339
+ rows.length === 0 ? /* @__PURE__ */ jsxs3("p", {
3715
3340
  className: "kk-board-empty",
3716
3341
  children: [
3717
3342
  "No runs recorded for kk-collect. Configure the workflow in",
3718
3343
  " ",
3719
- /* @__PURE__ */ jsx2("a", {
3344
+ /* @__PURE__ */ jsx3("a", {
3720
3345
  href: "/board/settings/workflows",
3721
3346
  children: "Settings → Workflows"
3722
3347
  }),
3723
3348
  "."
3724
3349
  ]
3725
3350
  }) : null,
3726
- tab === "summary" ? /* @__PURE__ */ jsx2(SummaryPanel, {
3727
- runs: rows,
3728
- overview,
3729
- now,
3351
+ tab === "summary" ? /* @__PURE__ */ jsx3(SummaryPanel, {
3352
+ channels,
3730
3353
  timeRange,
3731
- onTimeRangeChange: setTimeRange,
3732
- onInspectRun: handleInspectRun
3354
+ onTimeRangeChange: rangeChanged,
3355
+ channelsPage,
3356
+ onChannelsPageChange: (delta) => setChannelsPage((page) => Math.max(1, page + delta))
3733
3357
  }) : null,
3734
- tab === "runs" ? /* @__PURE__ */ jsx2(RunDetailsPanel, {
3358
+ tab === "runs" ? /* @__PURE__ */ jsx3(RunDetailsPanel, {
3735
3359
  runs: rows,
3736
3360
  overview,
3737
3361
  now,
@@ -3742,7 +3366,7 @@ function CollectModule() {
3742
3366
  onStatusFilterChange: setRunStatusFilter,
3743
3367
  onInspectRun: handleInspectRun
3744
3368
  }) : null,
3745
- tab === "items" ? /* @__PURE__ */ jsx2(ItemsPanel, {
3369
+ tab === "items" ? /* @__PURE__ */ jsx3(ItemsPanel, {
3746
3370
  runId: selection.runId,
3747
3371
  items,
3748
3372
  filters: itemFilters,
@@ -3757,7 +3381,7 @@ function CollectModule() {
3757
3381
  onPageChange: pageChanged,
3758
3382
  onInspectItem: (item) => setSelectedInspectItem(item)
3759
3383
  }) : null,
3760
- tab === "selections" ? /* @__PURE__ */ jsx2(SelectionsPanel, {
3384
+ tab === "selections" ? /* @__PURE__ */ jsx3(SelectionsPanel, {
3761
3385
  selections,
3762
3386
  topics: selections?.topics ?? [],
3763
3387
  filters: selectionsFilters,
@@ -3767,12 +3391,12 @@ function CollectModule() {
3767
3391
  onPageChange: (delta) => setSelectionsFilters((s) => ({ ...s, page: Math.max(1, (s.page ?? 1) + delta) })),
3768
3392
  onInspectRun: handleInspectRun
3769
3393
  }) : null,
3770
- displayDiagnostics.map((diagnostic) => /* @__PURE__ */ jsx2("p", {
3394
+ displayDiagnostics.map((diagnostic) => /* @__PURE__ */ jsx3("p", {
3771
3395
  role: "status",
3772
3396
  className: "kk-board-diagnostic",
3773
3397
  children: diagnosticLine(diagnostic)
3774
3398
  }, diagnostic.code)),
3775
- selectedModalRunId ? /* @__PURE__ */ jsx2(RunDetailModal, {
3399
+ selectedModalRunId ? /* @__PURE__ */ jsx3(RunDetailModal, {
3776
3400
  runId: selectedModalRunId,
3777
3401
  storeRun: modalStoreRun,
3778
3402
  results: modalResults,
@@ -3784,7 +3408,7 @@ function CollectModule() {
3784
3408
  onToggleQuality: toggleQuality,
3785
3409
  onClose: handleCloseModal
3786
3410
  }) : null,
3787
- selectedInspectItem ? /* @__PURE__ */ jsx2(ItemDetailModal, {
3411
+ selectedInspectItem ? /* @__PURE__ */ jsx3(ItemDetailModal, {
3788
3412
  item: selectedInspectItem,
3789
3413
  onClose: () => setSelectedInspectItem(null)
3790
3414
  }) : null