@agimon-ai/po-log 0.0.0-alpha.2 → 0.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +149 -21
- package/README.md +3 -3
- package/dist/extensions/server.cjs +18 -17
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +15 -14
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +109 -109
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -2
- package/dist/metrics.mjs +1 -2
- package/dist/{metricsSource-DXZLawQu.mjs → metricsSource-BaoBR_Ia.mjs} +2 -2
- package/dist/metricsSource-BaoBR_Ia.mjs.map +1 -0
- package/dist/{metricsSource-DdwQNzoY.cjs → metricsSource-Cy8f47Q0.cjs} +5 -5
- package/dist/metricsSource-Cy8f47Q0.cjs.map +1 -0
- package/dist/{metricsSource-cZnErdv4.d.mts → metricsSource-DNT8BrTF.d.mts} +2 -2
- package/dist/{metricsSource-cZnErdv4.d.mts.map → metricsSource-DNT8BrTF.d.mts.map} +1 -1
- package/dist/metricsSource.cjs +1 -1
- package/dist/metricsSource.d.mts +2 -2
- package/dist/metricsSource.mjs +1 -2
- package/package.json +19 -19
- package/dist/metricsSource-DXZLawQu.mjs.map +0 -1
- package/dist/metricsSource-DdwQNzoY.cjs.map +0 -1
package/dist/extensions/web.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
/**
|
|
8
8
|
* The dimensions the page offers.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* po-logsink also groups by 'workflow-run', 'workflow-name', 'job' and
|
|
11
11
|
* 'step'. Those are omitted on purpose: no Po package emits the matching
|
|
12
12
|
* attributes today, so offering them would draw an empty chart and read as a
|
|
13
13
|
* bug rather than as a gap.
|
|
@@ -215,7 +215,7 @@ function GroupBars({ groups, totalTokens, focus, onFocus }) {
|
|
|
215
215
|
className: "flex flex-col gap-3",
|
|
216
216
|
children: [
|
|
217
217
|
groups.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
218
|
-
className: "rounded-md border border-dashed border-
|
|
218
|
+
className: "rounded-md border border-dashed border-po-border p-5 text-sm text-po-dim",
|
|
219
219
|
children: "No grouped usage was recorded for this selection."
|
|
220
220
|
}) : null,
|
|
221
221
|
/* @__PURE__ */ jsx("ul", {
|
|
@@ -230,27 +230,27 @@ function GroupBars({ groups, totalTokens, focus, onFocus }) {
|
|
|
230
230
|
/* @__PURE__ */ jsxs("span", {
|
|
231
231
|
className: "flex items-start justify-between gap-3",
|
|
232
232
|
children: [/* @__PURE__ */ jsx("span", {
|
|
233
|
-
className: "min-w-0 break-all text-left font-medium text-
|
|
233
|
+
className: "min-w-0 break-all text-left font-medium text-po-hi",
|
|
234
234
|
title: group.key,
|
|
235
235
|
children: unknown ? "Unattributed" : group.key
|
|
236
236
|
}), /* @__PURE__ */ jsx("span", {
|
|
237
|
-
className: "shrink-0 text-right font-semibold tabular-nums text-
|
|
237
|
+
className: "shrink-0 text-right font-semibold tabular-nums text-po-hi",
|
|
238
238
|
title: String(group.totalTokens),
|
|
239
239
|
children: formatTokens(group.totalTokens)
|
|
240
240
|
})]
|
|
241
241
|
}),
|
|
242
242
|
/* @__PURE__ */ jsx("span", {
|
|
243
243
|
"aria-hidden": "true",
|
|
244
|
-
className: "mt-2 block h-1.5 overflow-hidden rounded-full bg-
|
|
244
|
+
className: "mt-2 block h-1.5 overflow-hidden rounded-full bg-po-border",
|
|
245
245
|
children: /* @__PURE__ */ jsx("span", {
|
|
246
|
-
className: `block h-full rounded-full ${unknown ? "bg-
|
|
246
|
+
className: `block h-full rounded-full ${unknown ? "bg-po-yellow" : "bg-po-blue"}`,
|
|
247
247
|
style: { width: `${percentage}%` }
|
|
248
248
|
})
|
|
249
249
|
}),
|
|
250
250
|
/* @__PURE__ */ jsxs("span", {
|
|
251
|
-
className: "mt-2 flex flex-wrap items-center justify-between gap-2 text-sm text-
|
|
251
|
+
className: "mt-2 flex flex-wrap items-center justify-between gap-2 text-sm text-po-dim",
|
|
252
252
|
children: [/* @__PURE__ */ jsx("span", { children: totalTokens !== void 0 && max > 0 ? `${percentage.toFixed(1)}% of total` : "Relative token volume" }), /* @__PURE__ */ jsxs("span", {
|
|
253
|
-
className: group.issueCount > 0 || group.failed ? "text-
|
|
253
|
+
className: group.issueCount > 0 || group.failed ? "text-po-yellow" : "text-po-dim",
|
|
254
254
|
children: [
|
|
255
255
|
group.failed ? "Failed · " : "",
|
|
256
256
|
formatTokens(group.issueCount),
|
|
@@ -266,7 +266,7 @@ function GroupBars({ groups, totalTokens, focus, onFocus }) {
|
|
|
266
266
|
"aria-pressed": selected,
|
|
267
267
|
"aria-label": `Filter to ${group.key}`,
|
|
268
268
|
"data-testid": `metrics-group-${group.key}`,
|
|
269
|
-
className: `block w-full rounded-md p-3 text-base hover:bg-
|
|
269
|
+
className: `block w-full rounded-md p-3 text-base hover:bg-po-tint-blue focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-blue ${selected ? "bg-po-tint-blue" : ""}`,
|
|
270
270
|
children: row
|
|
271
271
|
}) : /* @__PURE__ */ jsx("div", {
|
|
272
272
|
className: "rounded-md p-3 text-base",
|
|
@@ -313,7 +313,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
313
313
|
const slot = PLOT_WIDTH / Math.max(1, buckets.length);
|
|
314
314
|
const width = Math.min(MAX_COLUMN_WIDTH, slot * .65);
|
|
315
315
|
if (buckets.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
316
|
-
className: "rounded-md border border-dashed border-
|
|
316
|
+
className: "rounded-md border border-dashed border-po-border p-5 text-sm text-po-dim",
|
|
317
317
|
"data-testid": "metrics-timeline-chart",
|
|
318
318
|
children: "No timeline buckets were recorded for this selection."
|
|
319
319
|
});
|
|
@@ -321,19 +321,19 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
321
321
|
className: "flex flex-col gap-4",
|
|
322
322
|
"data-testid": "metrics-timeline-chart",
|
|
323
323
|
children: /* @__PURE__ */ jsxs("div", {
|
|
324
|
-
className: "rounded-md border border-
|
|
324
|
+
className: "rounded-md border border-po-border bg-po-deep p-5",
|
|
325
325
|
children: [
|
|
326
326
|
/* @__PURE__ */ jsx("p", {
|
|
327
|
-
className: "text-sm text-
|
|
327
|
+
className: "text-sm text-po-dim",
|
|
328
328
|
children: active.label
|
|
329
329
|
}),
|
|
330
330
|
/* @__PURE__ */ jsxs("p", {
|
|
331
|
-
className: "mt-2 text-lg font-semibold tabular-nums text-
|
|
331
|
+
className: "mt-2 text-lg font-semibold tabular-nums text-po-blue",
|
|
332
332
|
title: String(active.totalTokens),
|
|
333
333
|
children: [formatTokens(active.totalTokens), " tokens"]
|
|
334
334
|
}),
|
|
335
335
|
/* @__PURE__ */ jsxs("p", {
|
|
336
|
-
className: "mt-3 text-sm leading-relaxed text-
|
|
336
|
+
className: "mt-3 text-sm leading-relaxed text-po-dim",
|
|
337
337
|
children: [
|
|
338
338
|
"Only one ",
|
|
339
339
|
unit,
|
|
@@ -341,7 +341,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
341
341
|
]
|
|
342
342
|
}),
|
|
343
343
|
/* @__PURE__ */ jsx("p", {
|
|
344
|
-
className: "mt-2 text-sm text-
|
|
344
|
+
className: "mt-2 text-sm text-po-dim",
|
|
345
345
|
children: "For more detail, pick a shorter period when one is available."
|
|
346
346
|
}),
|
|
347
347
|
onShorterPeriod === void 0 ? null : /* @__PURE__ */ jsx(Button, {
|
|
@@ -372,7 +372,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
372
372
|
children: item.label
|
|
373
373
|
}, item.key))
|
|
374
374
|
}), /* @__PURE__ */ jsxs("span", {
|
|
375
|
-
className: "text-sm text-
|
|
375
|
+
className: "text-sm text-po-dim",
|
|
376
376
|
children: [
|
|
377
377
|
buckets.length,
|
|
378
378
|
" recorded ",
|
|
@@ -385,7 +385,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
385
385
|
className: "flex gap-3",
|
|
386
386
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
387
387
|
"aria-hidden": "true",
|
|
388
|
-
className: "flex w-12 shrink-0 flex-col justify-between text-right text-sm tabular-nums text-
|
|
388
|
+
className: "flex w-12 shrink-0 flex-col justify-between text-right text-sm tabular-nums text-po-dim",
|
|
389
389
|
children: [
|
|
390
390
|
/* @__PURE__ */ jsx("span", { children: formatTokens(max) }),
|
|
391
391
|
/* @__PURE__ */ jsx("span", { children: formatTokens(max / 2) }),
|
|
@@ -406,7 +406,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
406
406
|
x2: PLOT_WIDTH,
|
|
407
407
|
y1: y,
|
|
408
408
|
y2: y,
|
|
409
|
-
className: "text-
|
|
409
|
+
className: "text-po-border",
|
|
410
410
|
stroke: "currentColor",
|
|
411
411
|
vectorEffect: "non-scaling-stroke"
|
|
412
412
|
}, y)), buckets.map((bucket, index) => {
|
|
@@ -419,7 +419,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
419
419
|
height,
|
|
420
420
|
rx: "2",
|
|
421
421
|
fill: "currentColor",
|
|
422
|
-
className: active?.label === bucket.label ? "text-
|
|
422
|
+
className: active?.label === bucket.label ? "text-po-cyan" : "text-po-blue"
|
|
423
423
|
}), /* @__PURE__ */ jsx("rect", {
|
|
424
424
|
x: index * slot,
|
|
425
425
|
y: "0",
|
|
@@ -439,28 +439,28 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
439
439
|
setActiveLabel(bucket.label);
|
|
440
440
|
}
|
|
441
441
|
},
|
|
442
|
-
className: "cursor-pointer focus-visible:outline focus-visible:outline-1 focus-visible:outline-
|
|
442
|
+
className: "cursor-pointer focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-cyan",
|
|
443
443
|
children: /* @__PURE__ */ jsx("title", { children: label })
|
|
444
444
|
})] }, bucket.label);
|
|
445
445
|
})]
|
|
446
446
|
})]
|
|
447
447
|
}),
|
|
448
448
|
/* @__PURE__ */ jsxs("div", {
|
|
449
|
-
className: "ml-15 flex justify-between gap-3 text-sm text-
|
|
449
|
+
className: "ml-15 flex justify-between gap-3 text-sm text-po-dim",
|
|
450
450
|
children: [/* @__PURE__ */ jsx("span", { children: buckets[0]?.label }), /* @__PURE__ */ jsx("span", {
|
|
451
451
|
className: "text-right",
|
|
452
452
|
children: buckets.at(-1)?.label
|
|
453
453
|
})]
|
|
454
454
|
}),
|
|
455
455
|
/* @__PURE__ */ jsxs("div", {
|
|
456
|
-
className: "flex flex-wrap justify-between gap-2 rounded-md bg-
|
|
456
|
+
className: "flex flex-wrap justify-between gap-2 rounded-md bg-po-deep px-3 py-2 text-sm tabular-nums",
|
|
457
457
|
"aria-live": "polite",
|
|
458
458
|
"aria-atomic": "true",
|
|
459
459
|
children: [/* @__PURE__ */ jsx("span", {
|
|
460
|
-
className: "text-
|
|
460
|
+
className: "text-po-dim",
|
|
461
461
|
children: active?.label
|
|
462
462
|
}), /* @__PURE__ */ jsxs("span", {
|
|
463
|
-
className: "text-
|
|
463
|
+
className: "text-po-hi",
|
|
464
464
|
children: [
|
|
465
465
|
formatTokens(active?.[series] ?? NaN),
|
|
466
466
|
" ",
|
|
@@ -470,7 +470,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
470
470
|
})]
|
|
471
471
|
}),
|
|
472
472
|
max === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
473
|
-
className: "text-sm text-
|
|
473
|
+
className: "text-sm text-po-dim",
|
|
474
474
|
children: [
|
|
475
475
|
"Recorded buckets contain zero ",
|
|
476
476
|
SERIES.find((item) => item.key === series)?.label.toLowerCase(),
|
|
@@ -478,9 +478,9 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
478
478
|
]
|
|
479
479
|
}) : null,
|
|
480
480
|
/* @__PURE__ */ jsxs("details", {
|
|
481
|
-
className: "text-sm text-
|
|
481
|
+
className: "text-sm text-po-dim",
|
|
482
482
|
children: [/* @__PURE__ */ jsx("summary", {
|
|
483
|
-
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-
|
|
483
|
+
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-blue",
|
|
484
484
|
children: "View exact bucket values"
|
|
485
485
|
}), /* @__PURE__ */ jsx("div", {
|
|
486
486
|
className: "mt-3 overflow-x-auto",
|
|
@@ -514,7 +514,7 @@ function TimelineChart({ buckets, bucketUnit, onShorterPeriod }) {
|
|
|
514
514
|
})
|
|
515
515
|
] }) }),
|
|
516
516
|
/* @__PURE__ */ jsx("tbody", { children: buckets.map((bucket) => /* @__PURE__ */ jsxs("tr", {
|
|
517
|
-
className: "border-t border-
|
|
517
|
+
className: "border-t border-po-border",
|
|
518
518
|
children: [/* @__PURE__ */ jsx("th", {
|
|
519
519
|
scope: "row",
|
|
520
520
|
className: "py-2 text-left font-normal",
|
|
@@ -604,34 +604,34 @@ function IssueRow({ group, max, tools }) {
|
|
|
604
604
|
const width = `${(barFraction(group.occurrences, max) * 100).toFixed(2)}%`;
|
|
605
605
|
const calls = tools.find((tool) => tool.name === group.tool)?.calls;
|
|
606
606
|
return /* @__PURE__ */ jsxs("li", {
|
|
607
|
-
className: "flex flex-col rounded-md border border-
|
|
607
|
+
className: "flex flex-col rounded-md border border-po-border",
|
|
608
608
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
609
609
|
className: "relative",
|
|
610
610
|
children: [/* @__PURE__ */ jsx("span", {
|
|
611
611
|
"aria-hidden": "true",
|
|
612
|
-
className: "absolute bottom-0 left-0 h-1 rounded-xs bg-
|
|
612
|
+
className: "absolute bottom-0 left-0 h-1 rounded-xs bg-po-yellow/40",
|
|
613
613
|
style: { width }
|
|
614
614
|
}), /* @__PURE__ */ jsxs("button", {
|
|
615
615
|
type: "button",
|
|
616
616
|
onClick: () => setOpen(!open),
|
|
617
617
|
"aria-expanded": open,
|
|
618
618
|
"data-testid": `metrics-issue-${group.key}`,
|
|
619
|
-
className: "relative flex min-h-10 w-full flex-wrap items-start gap-3 rounded-md p-3 text-left text-base hover:bg-
|
|
619
|
+
className: "relative flex min-h-10 w-full flex-wrap items-start gap-3 rounded-md p-3 text-left text-base hover:bg-po-tint-blue focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-blue",
|
|
620
620
|
children: [
|
|
621
621
|
/* @__PURE__ */ jsx("span", {
|
|
622
|
-
className: "w-8 shrink-0 text-right font-semibold text-
|
|
622
|
+
className: "w-8 shrink-0 text-right font-semibold text-po-yellow",
|
|
623
623
|
children: group.occurrences
|
|
624
624
|
}),
|
|
625
625
|
/* @__PURE__ */ jsx("span", {
|
|
626
|
-
className: "w-24 shrink-0 break-words font-medium text-
|
|
626
|
+
className: "w-24 shrink-0 break-words font-medium text-po-hi",
|
|
627
627
|
children: titleOf(group)
|
|
628
628
|
}),
|
|
629
629
|
/* @__PURE__ */ jsx("span", {
|
|
630
|
-
className: "min-w-40 flex-1 break-words text-
|
|
630
|
+
className: "min-w-40 flex-1 break-words text-po-dim",
|
|
631
631
|
children: group.detail
|
|
632
632
|
}),
|
|
633
633
|
calls === void 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
634
|
-
className: "shrink-0 text-
|
|
634
|
+
className: "shrink-0 text-po-dim",
|
|
635
635
|
children: [calls, " token samples"]
|
|
636
636
|
})
|
|
637
637
|
]
|
|
@@ -641,7 +641,7 @@ function IssueRow({ group, max, tools }) {
|
|
|
641
641
|
"data-testid": `metrics-issue-body-${group.key}`,
|
|
642
642
|
children: [
|
|
643
643
|
/* @__PURE__ */ jsxs("div", {
|
|
644
|
-
className: "flex flex-wrap gap-x-3 gap-y-1 text-sm text-
|
|
644
|
+
className: "flex flex-wrap gap-x-3 gap-y-1 text-sm text-po-dim",
|
|
645
645
|
children: [
|
|
646
646
|
/* @__PURE__ */ jsxs("span", { children: ["category ", group.category] }),
|
|
647
647
|
group.tool === null ? null : /* @__PURE__ */ jsxs("span", { children: ["tool ", group.tool] }),
|
|
@@ -653,11 +653,11 @@ function IssueRow({ group, max, tools }) {
|
|
|
653
653
|
]
|
|
654
654
|
}),
|
|
655
655
|
/* @__PURE__ */ jsx("span", {
|
|
656
|
-
className: "break-words text-
|
|
656
|
+
className: "break-words text-po-dim",
|
|
657
657
|
children: group.detail
|
|
658
658
|
}),
|
|
659
659
|
/* @__PURE__ */ jsx("ul", {
|
|
660
|
-
className: "flex flex-col gap-1 text-sm text-
|
|
660
|
+
className: "flex flex-col gap-1 text-sm text-po-dim",
|
|
661
661
|
children: group.members.map((member, index) => /* @__PURE__ */ jsxs("li", {
|
|
662
662
|
className: "flex flex-wrap gap-x-2",
|
|
663
663
|
children: [
|
|
@@ -683,7 +683,7 @@ function IssuesDetail({ view, tools, summaryCount }) {
|
|
|
683
683
|
className: "flex flex-col gap-3",
|
|
684
684
|
children: [
|
|
685
685
|
summaryCount !== void 0 && summaryCount !== view.totalIssues ? /* @__PURE__ */ jsxs("p", {
|
|
686
|
-
className: "rounded-md border border-
|
|
686
|
+
className: "rounded-md border border-po-edge-yellow bg-po-tint-yellow p-3 text-sm leading-relaxed text-po-yellow",
|
|
687
687
|
role: "status",
|
|
688
688
|
"data-testid": "metrics-issue-count-mismatch",
|
|
689
689
|
children: [
|
|
@@ -698,23 +698,23 @@ function IssuesDetail({ view, tools, summaryCount }) {
|
|
|
698
698
|
]
|
|
699
699
|
}) : null,
|
|
700
700
|
/* @__PURE__ */ jsxs("span", {
|
|
701
|
-
className: "text-sm text-
|
|
701
|
+
className: "text-sm text-po-dim",
|
|
702
702
|
children: [
|
|
703
703
|
/* @__PURE__ */ jsx("span", {
|
|
704
|
-
className: "text-
|
|
704
|
+
className: "text-po-hi",
|
|
705
705
|
children: view.totalIssues
|
|
706
706
|
}),
|
|
707
707
|
" occurrences of",
|
|
708
708
|
" ",
|
|
709
709
|
/* @__PURE__ */ jsx("span", {
|
|
710
|
-
className: "text-
|
|
710
|
+
className: "text-po-hi",
|
|
711
711
|
children: groups.length
|
|
712
712
|
}),
|
|
713
713
|
" distinct problems in the returned samples, most frequent first"
|
|
714
714
|
]
|
|
715
715
|
}),
|
|
716
716
|
groups.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
717
|
-
className: "rounded-md border border-dashed border-
|
|
717
|
+
className: "rounded-md border border-dashed border-po-border p-4 text-sm text-po-dim",
|
|
718
718
|
children: view.totalIssues === 0 ? "No issues were detected in the returned analysis. This does not establish coverage of unrecorded activity." : "The analysis counted issues but returned no incident samples."
|
|
719
719
|
}) : /* @__PURE__ */ jsx("ul", {
|
|
720
720
|
className: "flex flex-col gap-2",
|
|
@@ -728,13 +728,13 @@ function IssuesDetail({ view, tools, summaryCount }) {
|
|
|
728
728
|
Object.keys(view.byTool).length === 0 ? null : /* @__PURE__ */ jsxs("div", {
|
|
729
729
|
className: "flex flex-col gap-2 overflow-x-auto",
|
|
730
730
|
children: [/* @__PURE__ */ jsx("h4", {
|
|
731
|
-
className: "text-base font-semibold text-
|
|
731
|
+
className: "text-base font-semibold text-po-hi",
|
|
732
732
|
children: "Failures by tool"
|
|
733
733
|
}), /* @__PURE__ */ jsxs("table", {
|
|
734
734
|
className: "w-full text-sm",
|
|
735
735
|
"data-testid": "metrics-issues-tools",
|
|
736
736
|
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
|
|
737
|
-
className: "text-sm text-
|
|
737
|
+
className: "text-sm text-po-dim",
|
|
738
738
|
children: [
|
|
739
739
|
/* @__PURE__ */ jsx("th", {
|
|
740
740
|
scope: "col",
|
|
@@ -755,18 +755,18 @@ function IssuesDetail({ view, tools, summaryCount }) {
|
|
|
755
755
|
}) }), /* @__PURE__ */ jsx("tbody", { children: countRows(view.byTool).map(([name, failures]) => {
|
|
756
756
|
const calls = callsByTool.get(name);
|
|
757
757
|
return /* @__PURE__ */ jsxs("tr", {
|
|
758
|
-
className: "border-b border-
|
|
758
|
+
className: "border-b border-po-border/40",
|
|
759
759
|
children: [
|
|
760
760
|
/* @__PURE__ */ jsx("td", {
|
|
761
|
-
className: "min-w-0 break-all py-2 text-
|
|
761
|
+
className: "min-w-0 break-all py-2 text-po-dim",
|
|
762
762
|
children: name
|
|
763
763
|
}),
|
|
764
764
|
/* @__PURE__ */ jsx("td", {
|
|
765
|
-
className: "w-16 py-2 text-right text-
|
|
765
|
+
className: "w-16 py-2 text-right text-po-red",
|
|
766
766
|
children: failures
|
|
767
767
|
}),
|
|
768
768
|
/* @__PURE__ */ jsx("td", {
|
|
769
|
-
className: "w-28 py-2 text-right text-
|
|
769
|
+
className: "w-28 py-2 text-right text-po-dim",
|
|
770
770
|
children: calls === void 0 ? "no token samples" : `${String(calls)} token samples`
|
|
771
771
|
})
|
|
772
772
|
]
|
|
@@ -775,15 +775,15 @@ function IssuesDetail({ view, tools, summaryCount }) {
|
|
|
775
775
|
})]
|
|
776
776
|
}),
|
|
777
777
|
/* @__PURE__ */ jsxs("div", {
|
|
778
|
-
className: "flex flex-wrap gap-x-4 gap-y-1 text-sm text-
|
|
778
|
+
className: "flex flex-wrap gap-x-4 gap-y-1 text-sm text-po-dim",
|
|
779
779
|
children: [/* @__PURE__ */ jsx("span", {
|
|
780
|
-
className: "text-sm font-semibold text-
|
|
780
|
+
className: "text-sm font-semibold text-po-dim",
|
|
781
781
|
children: "by category"
|
|
782
782
|
}), countRows(view.byCategory).map(([name, count]) => /* @__PURE__ */ jsxs("span", { children: [
|
|
783
783
|
name,
|
|
784
784
|
" ",
|
|
785
785
|
/* @__PURE__ */ jsx("span", {
|
|
786
|
-
className: "text-
|
|
786
|
+
className: "text-po-hi",
|
|
787
787
|
children: count
|
|
788
788
|
})
|
|
789
789
|
] }, name))]
|
|
@@ -837,16 +837,16 @@ function IssuesSection({ tools, focus, count, startTime, endTime, broaderScope =
|
|
|
837
837
|
});
|
|
838
838
|
};
|
|
839
839
|
return /* @__PURE__ */ jsxs("section", {
|
|
840
|
-
className: "flex min-w-0 flex-col gap-3 rounded-lg border border-
|
|
840
|
+
className: "flex min-w-0 flex-col gap-3 rounded-lg border border-po-border bg-po-panel p-4",
|
|
841
841
|
"data-testid": "metrics-issues",
|
|
842
842
|
children: [
|
|
843
843
|
/* @__PURE__ */ jsxs("div", {
|
|
844
844
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
845
845
|
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("h3", {
|
|
846
|
-
className: "text-lg font-semibold text-
|
|
846
|
+
className: "text-lg font-semibold text-po-hi",
|
|
847
847
|
children: ["Issues to investigate", count === void 0 ? "" : ` · ${count} ${count === 1 ? "issue" : "issues"}`]
|
|
848
848
|
}), /* @__PURE__ */ jsx("p", {
|
|
849
|
-
className: "mt-1 text-sm text-
|
|
849
|
+
className: "mt-1 text-sm text-po-dim",
|
|
850
850
|
children: "Inspect recurring failures and the evidence behind them."
|
|
851
851
|
})] }), /* @__PURE__ */ jsxs("div", {
|
|
852
852
|
className: "flex items-center gap-2",
|
|
@@ -877,7 +877,7 @@ function IssuesSection({ tools, focus, count, startTime, endTime, broaderScope =
|
|
|
877
877
|
})]
|
|
878
878
|
}),
|
|
879
879
|
/* @__PURE__ */ jsxs("p", {
|
|
880
|
-
className: "text-sm leading-relaxed text-
|
|
880
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
881
881
|
children: [
|
|
882
882
|
"Details are loaded on demand.",
|
|
883
883
|
" ",
|
|
@@ -893,13 +893,13 @@ function IssuesSection({ tools, focus, count, startTime, endTime, broaderScope =
|
|
|
893
893
|
children: [
|
|
894
894
|
message === "" ? null : /* @__PURE__ */ jsx("p", {
|
|
895
895
|
role: "alert",
|
|
896
|
-
className: "rounded-md border border-
|
|
896
|
+
className: "rounded-md border border-po-edge-yellow bg-po-tint-yellow p-3 text-sm text-po-yellow",
|
|
897
897
|
"data-testid": "metrics-issues-message",
|
|
898
898
|
children: message
|
|
899
899
|
}),
|
|
900
900
|
loading ? /* @__PURE__ */ jsx("p", {
|
|
901
901
|
role: "status",
|
|
902
|
-
className: "py-3 text-sm text-
|
|
902
|
+
className: "py-3 text-sm text-po-dim",
|
|
903
903
|
children: "Reading recorded incidents..."
|
|
904
904
|
}) : null,
|
|
905
905
|
view === void 0 ? null : /* @__PURE__ */ jsx(IssuesDetail, {
|
|
@@ -921,35 +921,35 @@ function MetricsSummary({ totals }) {
|
|
|
921
921
|
label: "Total tokens",
|
|
922
922
|
value: totals.totalTokens,
|
|
923
923
|
detail: "Provider-reported total",
|
|
924
|
-
color: "text-
|
|
924
|
+
color: "text-po-blue"
|
|
925
925
|
},
|
|
926
926
|
{
|
|
927
927
|
label: "Input tokens",
|
|
928
928
|
value: totals.inputTokens,
|
|
929
929
|
detail: "Reported input counter",
|
|
930
|
-
color: "text-
|
|
930
|
+
color: "text-po-hi"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
933
933
|
label: "Output tokens",
|
|
934
934
|
value: totals.outputTokens,
|
|
935
935
|
detail: "Reported output counter",
|
|
936
|
-
color: "text-
|
|
936
|
+
color: "text-po-hi"
|
|
937
937
|
},
|
|
938
938
|
{
|
|
939
939
|
label: "Recorded issues",
|
|
940
940
|
value: totals.issueCount,
|
|
941
941
|
detail: "Detected in this selection",
|
|
942
|
-
color: totals.issueCount > 0 ? "text-
|
|
942
|
+
color: totals.issueCount > 0 ? "text-po-yellow" : "text-po-hi"
|
|
943
943
|
}
|
|
944
944
|
];
|
|
945
945
|
return /* @__PURE__ */ jsx("dl", {
|
|
946
946
|
className: "grid grid-cols-2 gap-3 @3xl:grid-cols-4",
|
|
947
947
|
"data-testid": "metrics-summary",
|
|
948
948
|
children: cards.map((card) => /* @__PURE__ */ jsxs("div", {
|
|
949
|
-
className: "min-w-0 rounded-lg border border-
|
|
949
|
+
className: "min-w-0 rounded-lg border border-po-border bg-po-panel p-4",
|
|
950
950
|
children: [
|
|
951
951
|
/* @__PURE__ */ jsx("dt", {
|
|
952
|
-
className: "text-sm text-
|
|
952
|
+
className: "text-sm text-po-dim",
|
|
953
953
|
children: card.label
|
|
954
954
|
}),
|
|
955
955
|
/* @__PURE__ */ jsx("dd", {
|
|
@@ -958,7 +958,7 @@ function MetricsSummary({ totals }) {
|
|
|
958
958
|
children: formatTokens(card.value)
|
|
959
959
|
}),
|
|
960
960
|
/* @__PURE__ */ jsx("dd", {
|
|
961
|
-
className: "mt-1 text-sm text-
|
|
961
|
+
className: "mt-1 text-sm text-po-dim",
|
|
962
962
|
children: card.detail
|
|
963
963
|
})
|
|
964
964
|
]
|
|
@@ -972,24 +972,24 @@ function ToolMetrics({ tools }) {
|
|
|
972
972
|
const [sort, setSort] = useState("p90TotalTokens");
|
|
973
973
|
const rows = [...tools].sort((a, b) => b[sort] - a[sort] || a.name.localeCompare(b.name));
|
|
974
974
|
return /* @__PURE__ */ jsxs("section", {
|
|
975
|
-
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-
|
|
975
|
+
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-po-border bg-po-panel p-4",
|
|
976
976
|
"aria-label": "Tool token samples",
|
|
977
977
|
children: [
|
|
978
978
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
979
|
-
className: "text-lg font-semibold text-
|
|
979
|
+
className: "text-lg font-semibold text-po-hi",
|
|
980
980
|
children: "Tool token samples"
|
|
981
981
|
}), /* @__PURE__ */ jsx("p", {
|
|
982
|
-
className: "mt-1 text-sm text-
|
|
982
|
+
className: "mt-1 text-sm text-po-dim",
|
|
983
983
|
children: "Which tools participate in token-heavy turns?"
|
|
984
984
|
})] }),
|
|
985
985
|
rows.length === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
986
|
-
className: "flex flex-1 flex-col justify-center gap-2 rounded-md border border-dashed border-
|
|
986
|
+
className: "flex flex-1 flex-col justify-center gap-2 rounded-md border border-dashed border-po-border p-5",
|
|
987
987
|
"data-testid": "metrics-tools-empty",
|
|
988
988
|
children: [/* @__PURE__ */ jsx("p", {
|
|
989
|
-
className: "text-base font-semibold text-
|
|
989
|
+
className: "text-base font-semibold text-po-hi",
|
|
990
990
|
children: "No token-attributed tool calls"
|
|
991
991
|
}), /* @__PURE__ */ jsx("p", {
|
|
992
|
-
className: "text-sm leading-relaxed text-
|
|
992
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
993
993
|
children: "Tool execution logs may exist, but this selection has no samples that connect tools to model usage. This does not mean no tools ran."
|
|
994
994
|
})]
|
|
995
995
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -1020,7 +1020,7 @@ function ToolMetrics({ tools }) {
|
|
|
1020
1020
|
children: ["Tools ranked by ", sort === "calls" ? "sampled calls" : "90th percentile whole-turn tokens"]
|
|
1021
1021
|
}),
|
|
1022
1022
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
|
|
1023
|
-
className: "border-b border-
|
|
1023
|
+
className: "border-b border-po-border text-sm text-po-dim",
|
|
1024
1024
|
children: [
|
|
1025
1025
|
/* @__PURE__ */ jsx("th", {
|
|
1026
1026
|
scope: "col",
|
|
@@ -1040,19 +1040,19 @@ function ToolMetrics({ tools }) {
|
|
|
1040
1040
|
]
|
|
1041
1041
|
}) }),
|
|
1042
1042
|
/* @__PURE__ */ jsx("tbody", { children: rows.map((tool) => /* @__PURE__ */ jsxs("tr", {
|
|
1043
|
-
className: "border-b border-
|
|
1043
|
+
className: "border-b border-po-border/40",
|
|
1044
1044
|
children: [
|
|
1045
1045
|
/* @__PURE__ */ jsx("th", {
|
|
1046
1046
|
scope: "row",
|
|
1047
|
-
className: "max-w-48 break-all py-3 text-left font-normal text-
|
|
1047
|
+
className: "max-w-48 break-all py-3 text-left font-normal text-po-hi",
|
|
1048
1048
|
children: tool.name
|
|
1049
1049
|
}),
|
|
1050
1050
|
/* @__PURE__ */ jsx("td", {
|
|
1051
|
-
className: "py-3 pl-3 text-right text-
|
|
1051
|
+
className: "py-3 pl-3 text-right text-po-dim",
|
|
1052
1052
|
children: formatTokens(tool.calls)
|
|
1053
1053
|
}),
|
|
1054
1054
|
/* @__PURE__ */ jsx("td", {
|
|
1055
|
-
className: "py-3 pl-3 text-right text-
|
|
1055
|
+
className: "py-3 pl-3 text-right text-po-blue",
|
|
1056
1056
|
title: String(tool.p90TotalTokens),
|
|
1057
1057
|
children: formatTokens(tool.p90TotalTokens)
|
|
1058
1058
|
})
|
|
@@ -1062,9 +1062,9 @@ function ToolMetrics({ tools }) {
|
|
|
1062
1062
|
})
|
|
1063
1063
|
})] }),
|
|
1064
1064
|
/* @__PURE__ */ jsxs("details", {
|
|
1065
|
-
className: "text-sm leading-relaxed text-
|
|
1065
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
1066
1066
|
children: [/* @__PURE__ */ jsx("summary", {
|
|
1067
|
-
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-
|
|
1067
|
+
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-blue",
|
|
1068
1068
|
children: "How these samples are counted"
|
|
1069
1069
|
}), /* @__PURE__ */ jsx("p", {
|
|
1070
1070
|
className: "mt-2",
|
|
@@ -1114,13 +1114,13 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1114
1114
|
/* @__PURE__ */ jsxs("div", {
|
|
1115
1115
|
className: "grid min-w-0 grid-cols-1 gap-4 @3xl:grid-cols-3",
|
|
1116
1116
|
children: [/* @__PURE__ */ jsxs("section", {
|
|
1117
|
-
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-
|
|
1117
|
+
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-po-border bg-po-panel p-4 @3xl:col-span-2",
|
|
1118
1118
|
"aria-label": "Usage over time",
|
|
1119
1119
|
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
1120
|
-
className: "text-lg font-semibold text-
|
|
1120
|
+
className: "text-lg font-semibold text-po-hi",
|
|
1121
1121
|
children: "Usage over time"
|
|
1122
1122
|
}), /* @__PURE__ */ jsx("p", {
|
|
1123
|
-
className: "mt-1 text-sm text-
|
|
1123
|
+
className: "mt-1 text-sm text-po-dim",
|
|
1124
1124
|
children: "Recorded tokens, not estimated spend."
|
|
1125
1125
|
})] }), /* @__PURE__ */ jsx(TimelineChart, {
|
|
1126
1126
|
buckets: report.timeline,
|
|
@@ -1128,35 +1128,35 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1128
1128
|
onShorterPeriod: report.period === "day" || onPeriodChange === void 0 ? void 0 : () => onPeriodChange("day")
|
|
1129
1129
|
})]
|
|
1130
1130
|
}), /* @__PURE__ */ jsxs("section", {
|
|
1131
|
-
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-
|
|
1131
|
+
className: "flex min-w-0 flex-col gap-4 rounded-lg border border-po-border bg-po-panel p-4",
|
|
1132
1132
|
"aria-label": "Reported counters",
|
|
1133
1133
|
children: [
|
|
1134
1134
|
/* @__PURE__ */ jsx("h3", {
|
|
1135
|
-
className: "text-lg font-semibold text-
|
|
1135
|
+
className: "text-lg font-semibold text-po-hi",
|
|
1136
1136
|
children: "Reported counters"
|
|
1137
1137
|
}),
|
|
1138
1138
|
/* @__PURE__ */ jsx("dl", {
|
|
1139
1139
|
className: "flex flex-col gap-3",
|
|
1140
1140
|
children: counters.map((counter) => /* @__PURE__ */ jsxs("div", {
|
|
1141
|
-
className: "flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 border-b border-
|
|
1141
|
+
className: "flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 border-b border-po-border/40 pb-3",
|
|
1142
1142
|
children: [/* @__PURE__ */ jsx("dt", {
|
|
1143
|
-
className: "text-sm text-
|
|
1143
|
+
className: "text-sm text-po-dim",
|
|
1144
1144
|
children: counter.name
|
|
1145
1145
|
}), /* @__PURE__ */ jsx("dd", {
|
|
1146
|
-
className: "text-base font-semibold tabular-nums text-
|
|
1146
|
+
className: "text-base font-semibold tabular-nums text-po-hi",
|
|
1147
1147
|
title: counter.value === void 0 ? "Not reported" : String(counter.value),
|
|
1148
1148
|
children: formatTokens(counter.value ?? NaN)
|
|
1149
1149
|
})]
|
|
1150
1150
|
}, counter.name))
|
|
1151
1151
|
}),
|
|
1152
1152
|
/* @__PURE__ */ jsx("p", {
|
|
1153
|
-
className: "text-sm leading-relaxed text-
|
|
1153
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
1154
1154
|
children: "Monetary cost is not included in this metrics report."
|
|
1155
1155
|
}),
|
|
1156
1156
|
/* @__PURE__ */ jsxs("details", {
|
|
1157
|
-
className: "text-sm leading-relaxed text-
|
|
1157
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
1158
1158
|
children: [/* @__PURE__ */ jsx("summary", {
|
|
1159
|
-
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-
|
|
1159
|
+
className: "cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-1 focus-visible:outline-po-blue",
|
|
1160
1160
|
children: "Why the counters may not add up"
|
|
1161
1161
|
}), /* @__PURE__ */ jsx("p", {
|
|
1162
1162
|
className: "mt-2",
|
|
@@ -1169,24 +1169,24 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1169
1169
|
/* @__PURE__ */ jsxs("div", {
|
|
1170
1170
|
className: "grid min-w-0 grid-cols-1 items-start gap-4 @3xl:grid-cols-2",
|
|
1171
1171
|
children: [/* @__PURE__ */ jsxs("section", {
|
|
1172
|
-
className: "flex min-w-0 flex-col gap-3 rounded-lg border border-
|
|
1172
|
+
className: "flex min-w-0 flex-col gap-3 rounded-lg border border-po-border bg-po-panel p-4",
|
|
1173
1173
|
"aria-label": `Tokens by ${label}`,
|
|
1174
1174
|
children: [
|
|
1175
1175
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("h3", {
|
|
1176
|
-
className: "text-lg font-semibold text-
|
|
1176
|
+
className: "text-lg font-semibold text-po-hi",
|
|
1177
1177
|
children: ["Tokens by ", label]
|
|
1178
1178
|
}), /* @__PURE__ */ jsx("p", {
|
|
1179
|
-
className: "mt-1 text-sm text-
|
|
1179
|
+
className: "mt-1 text-sm text-po-dim",
|
|
1180
1180
|
children: "Largest recorded consumers. Select a named row to filter."
|
|
1181
1181
|
})] }),
|
|
1182
1182
|
unattributed > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1183
|
-
className: "rounded-md border border-
|
|
1183
|
+
className: "rounded-md border border-po-edge-yellow bg-po-tint-yellow p-3",
|
|
1184
1184
|
"data-testid": "metrics-attribution-notice",
|
|
1185
1185
|
children: [/* @__PURE__ */ jsxs("p", {
|
|
1186
|
-
className: "text-sm font-semibold text-
|
|
1186
|
+
className: "text-sm font-semibold text-po-yellow",
|
|
1187
1187
|
children: [label.charAt(0).toUpperCase() + label.slice(1), " attribution missing"]
|
|
1188
1188
|
}), /* @__PURE__ */ jsxs("p", {
|
|
1189
|
-
className: "mt-1 text-sm leading-relaxed text-
|
|
1189
|
+
className: "mt-1 text-sm leading-relaxed text-po-dim",
|
|
1190
1190
|
children: [
|
|
1191
1191
|
formatTokens(unattributed),
|
|
1192
1192
|
" tokens have no ",
|
|
@@ -1198,7 +1198,7 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1198
1198
|
})]
|
|
1199
1199
|
}) : null,
|
|
1200
1200
|
DIMENSION_NOTES[report.dimension] === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
1201
|
-
className: "text-sm leading-relaxed text-
|
|
1201
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
1202
1202
|
children: DIMENSION_NOTES[report.dimension]
|
|
1203
1203
|
}),
|
|
1204
1204
|
/* @__PURE__ */ jsx(GroupBars, {
|
|
@@ -1208,7 +1208,7 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1208
1208
|
onFocus
|
|
1209
1209
|
}, `${report.dimension}:${report.focus ?? ""}`),
|
|
1210
1210
|
/* @__PURE__ */ jsxs("p", {
|
|
1211
|
-
className: "text-sm text-
|
|
1211
|
+
className: "text-sm text-po-dim",
|
|
1212
1212
|
children: [
|
|
1213
1213
|
"Showing ",
|
|
1214
1214
|
report.groups.length,
|
|
@@ -1220,7 +1220,7 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1220
1220
|
]
|
|
1221
1221
|
}),
|
|
1222
1222
|
report.totals.failedGroups > 0 ? /* @__PURE__ */ jsxs("p", {
|
|
1223
|
-
className: "text-sm text-
|
|
1223
|
+
className: "text-sm text-po-yellow",
|
|
1224
1224
|
children: [
|
|
1225
1225
|
report.totals.failedGroups,
|
|
1226
1226
|
" of ",
|
|
@@ -1242,7 +1242,7 @@ function MetricsReportView({ report, onFocus, onPeriodChange }) {
|
|
|
1242
1242
|
broaderScope: report.focus !== void 0 && report.dimension !== "session"
|
|
1243
1243
|
}, `${report.generatedAt}:${report.dimension}:${report.focus ?? ""}`),
|
|
1244
1244
|
/* @__PURE__ */ jsxs("footer", {
|
|
1245
|
-
className: "flex flex-wrap justify-between gap-2 border-t border-
|
|
1245
|
+
className: "flex flex-wrap justify-between gap-2 border-t border-po-border pt-3 text-sm text-po-dim",
|
|
1246
1246
|
"data-testid": "metrics-provenance",
|
|
1247
1247
|
children: [/* @__PURE__ */ jsxs("span", { children: [
|
|
1248
1248
|
"Source: LogSink ·",
|
|
@@ -1282,7 +1282,7 @@ function EmptyForReason({ response }) {
|
|
|
1282
1282
|
function FocusNotice({ requested, applied, dimension, onClear }) {
|
|
1283
1283
|
if (requested === "") return null;
|
|
1284
1284
|
if (applied === void 0) return /* @__PURE__ */ jsxs("span", {
|
|
1285
|
-
className: "rounded-md border border-
|
|
1285
|
+
className: "rounded-md border border-po-edge-yellow bg-po-tint-yellow p-3 text-sm text-po-yellow",
|
|
1286
1286
|
"data-testid": "metrics-focus-refused",
|
|
1287
1287
|
children: [
|
|
1288
1288
|
"this log sink does not support narrowing by ",
|
|
@@ -1298,12 +1298,12 @@ function FocusNotice({ requested, applied, dimension, onClear }) {
|
|
|
1298
1298
|
]
|
|
1299
1299
|
});
|
|
1300
1300
|
return /* @__PURE__ */ jsxs("span", {
|
|
1301
|
-
className: "flex flex-wrap items-center gap-2 rounded-md border border-
|
|
1301
|
+
className: "flex flex-wrap items-center gap-2 rounded-md border border-po-border bg-po-panel p-3 text-sm text-po-dim",
|
|
1302
1302
|
"data-testid": "metrics-focus",
|
|
1303
1303
|
children: [
|
|
1304
1304
|
"narrowed to ",
|
|
1305
1305
|
/* @__PURE__ */ jsx("span", {
|
|
1306
|
-
className: "min-w-0 break-all text-
|
|
1306
|
+
className: "min-w-0 break-all text-po-hi",
|
|
1307
1307
|
children: applied
|
|
1308
1308
|
}),
|
|
1309
1309
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -1325,7 +1325,7 @@ function MetricsLoading() {
|
|
|
1325
1325
|
"data-testid": "metrics-loading",
|
|
1326
1326
|
children: [
|
|
1327
1327
|
/* @__PURE__ */ jsx("span", {
|
|
1328
|
-
className: "text-sm text-
|
|
1328
|
+
className: "text-sm text-po-dim",
|
|
1329
1329
|
children: "Loading recorded metrics..."
|
|
1330
1330
|
}),
|
|
1331
1331
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -1336,11 +1336,11 @@ function MetricsLoading() {
|
|
|
1336
1336
|
1,
|
|
1337
1337
|
2,
|
|
1338
1338
|
3
|
|
1339
|
-
].map((index) => /* @__PURE__ */ jsx("div", { className: "h-24 animate-pulse rounded-lg border border-
|
|
1339
|
+
].map((index) => /* @__PURE__ */ jsx("div", { className: "h-24 animate-pulse rounded-lg border border-po-border bg-po-panel motion-reduce:animate-none" }, index))
|
|
1340
1340
|
}),
|
|
1341
1341
|
/* @__PURE__ */ jsx("div", {
|
|
1342
1342
|
"aria-hidden": "true",
|
|
1343
|
-
className: "h-48 animate-pulse rounded-lg border border-
|
|
1343
|
+
className: "h-48 animate-pulse rounded-lg border border-po-border bg-po-panel motion-reduce:animate-none"
|
|
1344
1344
|
})
|
|
1345
1345
|
]
|
|
1346
1346
|
});
|
|
@@ -1397,12 +1397,12 @@ function MetricsPanel(_props) {
|
|
|
1397
1397
|
"aria-busy": loading,
|
|
1398
1398
|
children: [
|
|
1399
1399
|
/* @__PURE__ */ jsxs("div", {
|
|
1400
|
-
className: "flex min-w-0 flex-wrap items-end gap-3 rounded-lg border border-
|
|
1400
|
+
className: "flex min-w-0 flex-wrap items-end gap-3 rounded-lg border border-po-border bg-po-panel p-3",
|
|
1401
1401
|
children: [
|
|
1402
1402
|
/* @__PURE__ */ jsxs("div", {
|
|
1403
1403
|
className: "flex flex-col gap-2",
|
|
1404
1404
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1405
|
-
className: "text-base font-medium text-
|
|
1405
|
+
className: "text-base font-medium text-po-text",
|
|
1406
1406
|
children: "Group by"
|
|
1407
1407
|
}), /* @__PURE__ */ jsxs(Select, {
|
|
1408
1408
|
value: dimension,
|
|
@@ -1424,7 +1424,7 @@ function MetricsPanel(_props) {
|
|
|
1424
1424
|
/* @__PURE__ */ jsxs("div", {
|
|
1425
1425
|
className: "flex flex-col gap-2",
|
|
1426
1426
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1427
|
-
className: "text-base font-medium text-
|
|
1427
|
+
className: "text-base font-medium text-po-text",
|
|
1428
1428
|
children: "Period"
|
|
1429
1429
|
}), /* @__PURE__ */ jsxs(Select, {
|
|
1430
1430
|
value: period,
|
|
@@ -1454,7 +1454,7 @@ function MetricsPanel(_props) {
|
|
|
1454
1454
|
loading ? /* @__PURE__ */ jsx(MetricsLoading, {}) : null,
|
|
1455
1455
|
error === "" ? null : /* @__PURE__ */ jsxs("p", {
|
|
1456
1456
|
role: "alert",
|
|
1457
|
-
className: "rounded-lg border border-
|
|
1457
|
+
className: "rounded-lg border border-po-edge-red bg-po-tint-red p-4 text-sm text-po-red",
|
|
1458
1458
|
"data-testid": "metrics-error",
|
|
1459
1459
|
children: [error, " Use Refresh to try again."]
|
|
1460
1460
|
}),
|