@sanity/ailf-studio 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +362 -331
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3455,7 +3455,7 @@ function formatOption(r) {
|
|
|
3455
3455
|
// src/components/LatestReports.tsx
|
|
3456
3456
|
import { SortIcon } from "@sanity/icons";
|
|
3457
3457
|
import {
|
|
3458
|
-
Badge as
|
|
3458
|
+
Badge as Badge15,
|
|
3459
3459
|
Box as Box8,
|
|
3460
3460
|
Button,
|
|
3461
3461
|
Card as Card12,
|
|
@@ -3675,7 +3675,7 @@ function PerspectiveFilter({ value, onChange }) {
|
|
|
3675
3675
|
}
|
|
3676
3676
|
|
|
3677
3677
|
// src/components/report-card/ReportCard.tsx
|
|
3678
|
-
import { Badge as
|
|
3678
|
+
import { Badge as Badge12, Card as Card9, Flex as Flex13, Text as Text17 } from "@sanity/ui";
|
|
3679
3679
|
import { useCallback as useCallback8 } from "react";
|
|
3680
3680
|
|
|
3681
3681
|
// src/components/primitives/DeltaIndicator.tsx
|
|
@@ -3730,19 +3730,33 @@ function stopPropagation(e) {
|
|
|
3730
3730
|
e.stopPropagation();
|
|
3731
3731
|
}
|
|
3732
3732
|
|
|
3733
|
+
// src/components/report-card/ModeBadge.tsx
|
|
3734
|
+
import { Badge as Badge7 } from "@sanity/ui";
|
|
3735
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3736
|
+
var modeTone = {
|
|
3737
|
+
agentic: "positive",
|
|
3738
|
+
baseline: "default",
|
|
3739
|
+
full: "primary",
|
|
3740
|
+
observed: "caution"
|
|
3741
|
+
};
|
|
3742
|
+
function ModeBadge({ mode }) {
|
|
3743
|
+
const tone = modeTone[mode] ?? "default";
|
|
3744
|
+
return /* @__PURE__ */ jsx17(Badge7, { fontSize: 0, tone, children: mode });
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3733
3747
|
// src/components/report-card/ReportMeta.tsx
|
|
3734
3748
|
import { Stack as Stack11, Text as Text16 } from "@sanity/ui";
|
|
3735
3749
|
|
|
3736
3750
|
// src/components/report-card/AreaTags.tsx
|
|
3737
|
-
import { Badge as
|
|
3738
|
-
import { jsx as
|
|
3751
|
+
import { Badge as Badge8, Flex as Flex11 } from "@sanity/ui";
|
|
3752
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3739
3753
|
function AreaTags({ areas, targetDocuments }) {
|
|
3740
3754
|
const hasAreas = areas && areas.length > 0;
|
|
3741
3755
|
const hasDocs = targetDocuments && targetDocuments.length > 0;
|
|
3742
3756
|
if (!hasAreas && !hasDocs) return null;
|
|
3743
3757
|
return /* @__PURE__ */ jsxs14(Flex11, { gap: 1, paddingTop: 1, wrap: "wrap", children: [
|
|
3744
|
-
hasAreas && areas.map((area) => /* @__PURE__ */
|
|
3745
|
-
|
|
3758
|
+
hasAreas && areas.map((area) => /* @__PURE__ */ jsx18(
|
|
3759
|
+
Badge8,
|
|
3746
3760
|
{
|
|
3747
3761
|
fontSize: 0,
|
|
3748
3762
|
mode: "outline",
|
|
@@ -3751,7 +3765,7 @@ function AreaTags({ areas, targetDocuments }) {
|
|
|
3751
3765
|
},
|
|
3752
3766
|
`area-${area}`
|
|
3753
3767
|
)),
|
|
3754
|
-
hasDocs && targetDocuments.map((doc) => /* @__PURE__ */
|
|
3768
|
+
hasDocs && targetDocuments.map((doc) => /* @__PURE__ */ jsx18(Badge8, { fontSize: 0, mode: "outline", tone: "primary", children: doc }, `doc-${doc}`))
|
|
3755
3769
|
] });
|
|
3756
3770
|
}
|
|
3757
3771
|
|
|
@@ -3795,9 +3809,9 @@ function formatCardDate(iso) {
|
|
|
3795
3809
|
}
|
|
3796
3810
|
|
|
3797
3811
|
// src/components/report-card/ReportMeta.tsx
|
|
3798
|
-
import { jsx as
|
|
3812
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3799
3813
|
function ReportMeta({ data }) {
|
|
3800
|
-
const segments = [
|
|
3814
|
+
const segments = [];
|
|
3801
3815
|
if (data.models && data.models.length > 0) {
|
|
3802
3816
|
segments.push(data.models.join(", "));
|
|
3803
3817
|
}
|
|
@@ -3808,14 +3822,14 @@ function ReportMeta({ data }) {
|
|
|
3808
3822
|
segments.push(formatDuration(data.durationMs));
|
|
3809
3823
|
}
|
|
3810
3824
|
return /* @__PURE__ */ jsxs15(Stack11, { flex: 1, space: 1, children: [
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3813
|
-
/* @__PURE__ */
|
|
3825
|
+
/* @__PURE__ */ jsx19(Text16, { weight: "semibold", children: data.tag ?? formatCardDate(data.completedAt) }),
|
|
3826
|
+
segments.length > 0 && /* @__PURE__ */ jsx19(Text16, { muted: true, size: 1, children: segments.join(" \xB7 ") }),
|
|
3827
|
+
/* @__PURE__ */ jsx19(AreaTags, { areas: data.areas, targetDocuments: data.targetDocuments })
|
|
3814
3828
|
] });
|
|
3815
3829
|
}
|
|
3816
3830
|
|
|
3817
3831
|
// src/components/primitives/ScoreBadge.tsx
|
|
3818
|
-
import { Badge as
|
|
3832
|
+
import { Badge as Badge9 } from "@sanity/ui";
|
|
3819
3833
|
|
|
3820
3834
|
// src/lib/scoring.ts
|
|
3821
3835
|
var TONE_MAP = {
|
|
@@ -3847,11 +3861,11 @@ function rowBackground(index) {
|
|
|
3847
3861
|
}
|
|
3848
3862
|
|
|
3849
3863
|
// src/components/primitives/ScoreBadge.tsx
|
|
3850
|
-
import { jsx as
|
|
3864
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3851
3865
|
function ScoreBadge({ score, fontSize = 1 }) {
|
|
3852
3866
|
const rounded = Math.round(score);
|
|
3853
|
-
return /* @__PURE__ */
|
|
3854
|
-
|
|
3867
|
+
return /* @__PURE__ */ jsx20(
|
|
3868
|
+
Badge9,
|
|
3855
3869
|
{
|
|
3856
3870
|
fontSize,
|
|
3857
3871
|
style: { minWidth: 48, textAlign: "center" },
|
|
@@ -3861,19 +3875,32 @@ function ScoreBadge({ score, fontSize = 1 }) {
|
|
|
3861
3875
|
);
|
|
3862
3876
|
}
|
|
3863
3877
|
|
|
3878
|
+
// src/components/report-card/SourceBadge.tsx
|
|
3879
|
+
import { Badge as Badge10 } from "@sanity/ui";
|
|
3880
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3881
|
+
var sourceTone = {
|
|
3882
|
+
branch: "primary",
|
|
3883
|
+
local: "default",
|
|
3884
|
+
production: "caution"
|
|
3885
|
+
};
|
|
3886
|
+
function SourceBadge({ source }) {
|
|
3887
|
+
const tone = sourceTone[source] ?? "default";
|
|
3888
|
+
return /* @__PURE__ */ jsx21(Badge10, { fontSize: 0, mode: "outline", tone, children: source });
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3864
3891
|
// src/components/primitives/StatusBadges.tsx
|
|
3865
|
-
import { Badge as
|
|
3892
|
+
import { Badge as Badge11, Flex as Flex12 } from "@sanity/ui";
|
|
3866
3893
|
import { jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3867
3894
|
function StatusBadges({ regressed, improved }) {
|
|
3868
3895
|
const hasRegressed = regressed && regressed.length > 0;
|
|
3869
3896
|
const hasImproved = improved && improved.length > 0;
|
|
3870
3897
|
if (!hasRegressed && !hasImproved) return null;
|
|
3871
3898
|
return /* @__PURE__ */ jsxs16(Flex12, { gap: 1, children: [
|
|
3872
|
-
hasRegressed && /* @__PURE__ */ jsxs16(
|
|
3899
|
+
hasRegressed && /* @__PURE__ */ jsxs16(Badge11, { fontSize: 0, tone: "critical", children: [
|
|
3873
3900
|
regressed.length,
|
|
3874
3901
|
" regressed"
|
|
3875
3902
|
] }),
|
|
3876
|
-
hasImproved && /* @__PURE__ */ jsxs16(
|
|
3903
|
+
hasImproved && /* @__PURE__ */ jsxs16(Badge11, { fontSize: 0, tone: "positive", children: [
|
|
3877
3904
|
improved.length,
|
|
3878
3905
|
" improved"
|
|
3879
3906
|
] })
|
|
@@ -3881,12 +3908,12 @@ function StatusBadges({ regressed, improved }) {
|
|
|
3881
3908
|
}
|
|
3882
3909
|
|
|
3883
3910
|
// src/components/report-card/ReportCard.tsx
|
|
3884
|
-
import { jsx as
|
|
3911
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3885
3912
|
function ReportCard({ data, onSelectReport }) {
|
|
3886
3913
|
const handleClick = useCallback8(() => {
|
|
3887
3914
|
onSelectReport(data.reportId);
|
|
3888
3915
|
}, [data.reportId, onSelectReport]);
|
|
3889
|
-
return /* @__PURE__ */
|
|
3916
|
+
return /* @__PURE__ */ jsx22(
|
|
3890
3917
|
Card9,
|
|
3891
3918
|
{
|
|
3892
3919
|
onClick: handleClick,
|
|
@@ -3895,13 +3922,17 @@ function ReportCard({ data, onSelectReport }) {
|
|
|
3895
3922
|
shadow: 1,
|
|
3896
3923
|
style: { cursor: "pointer" },
|
|
3897
3924
|
children: /* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 3, children: [
|
|
3898
|
-
/* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3925
|
+
/* @__PURE__ */ jsx22(ScoreBadge, { score: data.overall }),
|
|
3926
|
+
/* @__PURE__ */ jsx22(ReportMeta, { data }),
|
|
3900
3927
|
/* @__PURE__ */ jsxs17(Flex13, { align: "flex-end", direction: "column", gap: 2, shrink: 0, children: [
|
|
3901
3928
|
/* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 2, children: [
|
|
3902
|
-
|
|
3903
|
-
/* @__PURE__ */
|
|
3904
|
-
|
|
3929
|
+
/* @__PURE__ */ jsx22(ModeBadge, { mode: data.mode }),
|
|
3930
|
+
/* @__PURE__ */ jsx22(SourceBadge, { source: data.source })
|
|
3931
|
+
] }),
|
|
3932
|
+
/* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 2, children: [
|
|
3933
|
+
data.comparisonDelta != null && /* @__PURE__ */ jsx22(DeltaIndicator, { delta: data.comparisonDelta }),
|
|
3934
|
+
/* @__PURE__ */ jsx22(StatusBadges, { improved: data.improved, regressed: data.regressed }),
|
|
3935
|
+
/* @__PURE__ */ jsx22(
|
|
3905
3936
|
Text17,
|
|
3906
3937
|
{
|
|
3907
3938
|
muted: true,
|
|
@@ -3910,9 +3941,9 @@ function ReportCard({ data, onSelectReport }) {
|
|
|
3910
3941
|
children: formatRelativeTime(data.completedAt)
|
|
3911
3942
|
}
|
|
3912
3943
|
),
|
|
3913
|
-
data.trigger && /* @__PURE__ */
|
|
3944
|
+
data.trigger && /* @__PURE__ */ jsx22(Badge12, { fontSize: 0, tone: "default", children: data.trigger })
|
|
3914
3945
|
] }),
|
|
3915
|
-
data.git && /* @__PURE__ */
|
|
3946
|
+
data.git && /* @__PURE__ */ jsx22(GitOrigin, { git: data.git })
|
|
3916
3947
|
] })
|
|
3917
3948
|
] })
|
|
3918
3949
|
}
|
|
@@ -4066,9 +4097,9 @@ function filterAndExclude(values, query, dim, activeTokens) {
|
|
|
4066
4097
|
|
|
4067
4098
|
// src/components/search-bar/FilterBadge.tsx
|
|
4068
4099
|
import { CloseIcon } from "@sanity/icons";
|
|
4069
|
-
import { Badge as
|
|
4100
|
+
import { Badge as Badge13, Flex as Flex14, Text as Text18 } from "@sanity/ui";
|
|
4070
4101
|
import { useCallback as useCallback9 } from "react";
|
|
4071
|
-
import { jsx as
|
|
4102
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4072
4103
|
function FilterBadge({ token, onRemove }) {
|
|
4073
4104
|
const dim = DIMENSIONS.find((d) => d.key === token.dimension);
|
|
4074
4105
|
const tone = dim?.tone ?? "default";
|
|
@@ -4079,8 +4110,8 @@ function FilterBadge({ token, onRemove }) {
|
|
|
4079
4110
|
},
|
|
4080
4111
|
[onRemove, token.id]
|
|
4081
4112
|
);
|
|
4082
|
-
return /* @__PURE__ */
|
|
4083
|
-
|
|
4113
|
+
return /* @__PURE__ */ jsx23(
|
|
4114
|
+
Badge13,
|
|
4084
4115
|
{
|
|
4085
4116
|
fontSize: 0,
|
|
4086
4117
|
style: {
|
|
@@ -4095,14 +4126,14 @@ function FilterBadge({ token, onRemove }) {
|
|
|
4095
4126
|
":",
|
|
4096
4127
|
token.label
|
|
4097
4128
|
] }),
|
|
4098
|
-
/* @__PURE__ */
|
|
4129
|
+
/* @__PURE__ */ jsx23(
|
|
4099
4130
|
Text18,
|
|
4100
4131
|
{
|
|
4101
4132
|
muted: true,
|
|
4102
4133
|
onClick: handleRemove,
|
|
4103
4134
|
size: 0,
|
|
4104
4135
|
style: { cursor: "pointer", lineHeight: 1 },
|
|
4105
|
-
children: /* @__PURE__ */
|
|
4136
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
4106
4137
|
}
|
|
4107
4138
|
)
|
|
4108
4139
|
] })
|
|
@@ -4111,9 +4142,9 @@ function FilterBadge({ token, onRemove }) {
|
|
|
4111
4142
|
}
|
|
4112
4143
|
|
|
4113
4144
|
// src/components/search-bar/SuggestionList.tsx
|
|
4114
|
-
import { Badge as
|
|
4145
|
+
import { Badge as Badge14, Card as Card10, Flex as Flex15, Stack as Stack12, Text as Text19 } from "@sanity/ui";
|
|
4115
4146
|
import { useCallback as useCallback10 } from "react";
|
|
4116
|
-
import { jsx as
|
|
4147
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4117
4148
|
function SuggestionList({
|
|
4118
4149
|
suggestions,
|
|
4119
4150
|
activeIndex,
|
|
@@ -4122,7 +4153,7 @@ function SuggestionList({
|
|
|
4122
4153
|
if (suggestions.length === 0) return null;
|
|
4123
4154
|
const groups = groupByCategory(suggestions);
|
|
4124
4155
|
let globalIndex = -1;
|
|
4125
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ jsx24(
|
|
4126
4157
|
Card10,
|
|
4127
4158
|
{
|
|
4128
4159
|
overflow: "auto",
|
|
@@ -4136,8 +4167,8 @@ function SuggestionList({
|
|
|
4136
4167
|
top: "100%",
|
|
4137
4168
|
zIndex: 100
|
|
4138
4169
|
},
|
|
4139
|
-
children: /* @__PURE__ */
|
|
4140
|
-
/* @__PURE__ */
|
|
4170
|
+
children: /* @__PURE__ */ jsx24(Stack12, { padding: 1, space: 1, children: groups.map(([category, items]) => /* @__PURE__ */ jsxs19(Stack12, { space: 0, children: [
|
|
4171
|
+
/* @__PURE__ */ jsx24(
|
|
4141
4172
|
Text19,
|
|
4142
4173
|
{
|
|
4143
4174
|
muted: true,
|
|
@@ -4154,7 +4185,7 @@ function SuggestionList({
|
|
|
4154
4185
|
items.map((suggestion) => {
|
|
4155
4186
|
globalIndex++;
|
|
4156
4187
|
const isActive = globalIndex === activeIndex;
|
|
4157
|
-
return /* @__PURE__ */
|
|
4188
|
+
return /* @__PURE__ */ jsx24(
|
|
4158
4189
|
SuggestionItem,
|
|
4159
4190
|
{
|
|
4160
4191
|
active: isActive,
|
|
@@ -4179,7 +4210,7 @@ function SuggestionItem({
|
|
|
4179
4210
|
const handleClick = useCallback10(() => {
|
|
4180
4211
|
onSelect(suggestion);
|
|
4181
4212
|
}, [onSelect, suggestion]);
|
|
4182
|
-
return /* @__PURE__ */
|
|
4213
|
+
return /* @__PURE__ */ jsx24(
|
|
4183
4214
|
Card10,
|
|
4184
4215
|
{
|
|
4185
4216
|
onClick: handleClick,
|
|
@@ -4188,8 +4219,8 @@ function SuggestionItem({
|
|
|
4188
4219
|
style: { cursor: "pointer" },
|
|
4189
4220
|
tone: active ? "primary" : "default",
|
|
4190
4221
|
children: /* @__PURE__ */ jsxs19(Flex15, { align: "center", gap: 2, children: [
|
|
4191
|
-
!isHint && /* @__PURE__ */
|
|
4192
|
-
/* @__PURE__ */
|
|
4222
|
+
!isHint && /* @__PURE__ */ jsx24(Badge14, { fontSize: 0, tone, children: suggestion.dimension }),
|
|
4223
|
+
/* @__PURE__ */ jsx24(Text19, { size: 1, children: suggestion.label })
|
|
4193
4224
|
] })
|
|
4194
4225
|
}
|
|
4195
4226
|
);
|
|
@@ -4204,7 +4235,7 @@ function groupByCategory(suggestions) {
|
|
|
4204
4235
|
}
|
|
4205
4236
|
|
|
4206
4237
|
// src/components/search-bar/SearchBar.tsx
|
|
4207
|
-
import { jsx as
|
|
4238
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4208
4239
|
function SearchBar({
|
|
4209
4240
|
tokens,
|
|
4210
4241
|
query,
|
|
@@ -4309,7 +4340,7 @@ function SearchBar({
|
|
|
4309
4340
|
inputRef.current?.focus();
|
|
4310
4341
|
}, []);
|
|
4311
4342
|
return /* @__PURE__ */ jsxs20("div", { style: { position: "relative" }, children: [
|
|
4312
|
-
/* @__PURE__ */
|
|
4343
|
+
/* @__PURE__ */ jsx25(
|
|
4313
4344
|
Card11,
|
|
4314
4345
|
{
|
|
4315
4346
|
border: true,
|
|
@@ -4318,8 +4349,8 @@ function SearchBar({
|
|
|
4318
4349
|
radius: 2,
|
|
4319
4350
|
style: { cursor: "text" },
|
|
4320
4351
|
children: /* @__PURE__ */ jsxs20(Flex16, { align: "center", gap: 1, wrap: "wrap", children: [
|
|
4321
|
-
/* @__PURE__ */
|
|
4322
|
-
tokens.map((token) => /* @__PURE__ */
|
|
4352
|
+
/* @__PURE__ */ jsx25(Text20, { muted: true, size: 1, style: { flexShrink: 0, padding: "0 4px" }, children: /* @__PURE__ */ jsx25(SearchIcon4, {}) }),
|
|
4353
|
+
tokens.map((token) => /* @__PURE__ */ jsx25(
|
|
4323
4354
|
FilterBadge,
|
|
4324
4355
|
{
|
|
4325
4356
|
onRemove: handleTokenRemove,
|
|
@@ -4327,7 +4358,7 @@ function SearchBar({
|
|
|
4327
4358
|
},
|
|
4328
4359
|
token.id
|
|
4329
4360
|
)),
|
|
4330
|
-
/* @__PURE__ */
|
|
4361
|
+
/* @__PURE__ */ jsx25(
|
|
4331
4362
|
"input",
|
|
4332
4363
|
{
|
|
4333
4364
|
onBlur: handleBlur,
|
|
@@ -4354,7 +4385,7 @@ function SearchBar({
|
|
|
4354
4385
|
] })
|
|
4355
4386
|
}
|
|
4356
4387
|
),
|
|
4357
|
-
focused && suggestions.length > 0 && /* @__PURE__ */
|
|
4388
|
+
focused && suggestions.length > 0 && /* @__PURE__ */ jsx25(
|
|
4358
4389
|
SuggestionList,
|
|
4359
4390
|
{
|
|
4360
4391
|
activeIndex,
|
|
@@ -4366,7 +4397,7 @@ function SearchBar({
|
|
|
4366
4397
|
}
|
|
4367
4398
|
|
|
4368
4399
|
// src/components/LatestReports.tsx
|
|
4369
|
-
import { jsx as
|
|
4400
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4370
4401
|
var SORT_LABELS = {
|
|
4371
4402
|
date: "Date",
|
|
4372
4403
|
name: "Name",
|
|
@@ -4544,16 +4575,16 @@ function LatestReports({
|
|
|
4544
4575
|
setPerspective("");
|
|
4545
4576
|
}, []);
|
|
4546
4577
|
if (initialLoading) {
|
|
4547
|
-
return /* @__PURE__ */
|
|
4578
|
+
return /* @__PURE__ */ jsx26(Card12, { padding: 4, children: /* @__PURE__ */ jsx26(Text21, { muted: true, children: "Loading reports\u2026" }) });
|
|
4548
4579
|
}
|
|
4549
4580
|
if (reports.length === 0) {
|
|
4550
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ jsx26(Card12, { padding: 4, children: /* @__PURE__ */ jsx26(Text21, { muted: true, children: "No reports found. Run the pipeline with --publish to create reports." }) });
|
|
4551
4582
|
}
|
|
4552
4583
|
return /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4553
|
-
/* @__PURE__ */
|
|
4584
|
+
/* @__PURE__ */ jsx26(Card12, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4554
4585
|
/* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4586
|
+
/* @__PURE__ */ jsx26(Text21, { muted: true, size: 0, children: "Search & filter" }),
|
|
4587
|
+
/* @__PURE__ */ jsx26(
|
|
4557
4588
|
SearchBar,
|
|
4558
4589
|
{
|
|
4559
4590
|
areas: availableAreas,
|
|
@@ -4567,9 +4598,9 @@ function LatestReports({
|
|
|
4567
4598
|
)
|
|
4568
4599
|
] }),
|
|
4569
4600
|
/* @__PURE__ */ jsxs21(Flex17, { gap: 2, children: [
|
|
4570
|
-
/* @__PURE__ */
|
|
4571
|
-
/* @__PURE__ */
|
|
4572
|
-
/* @__PURE__ */
|
|
4601
|
+
/* @__PURE__ */ jsx26(Box8, { flex: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4602
|
+
/* @__PURE__ */ jsx26(Text21, { muted: true, size: 0, children: "Document" }),
|
|
4603
|
+
/* @__PURE__ */ jsx26(
|
|
4573
4604
|
DocumentFilter,
|
|
4574
4605
|
{
|
|
4575
4606
|
onChange: setDocumentSlug,
|
|
@@ -4578,9 +4609,9 @@ function LatestReports({
|
|
|
4578
4609
|
}
|
|
4579
4610
|
)
|
|
4580
4611
|
] }) }),
|
|
4581
|
-
/* @__PURE__ */
|
|
4582
|
-
/* @__PURE__ */
|
|
4583
|
-
/* @__PURE__ */
|
|
4612
|
+
/* @__PURE__ */ jsx26(Box8, { flex: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4613
|
+
/* @__PURE__ */ jsx26(Text21, { muted: true, size: 0, children: "Content release" }),
|
|
4614
|
+
/* @__PURE__ */ jsx26(
|
|
4584
4615
|
PerspectiveFilter,
|
|
4585
4616
|
{
|
|
4586
4617
|
onChange: setPerspective,
|
|
@@ -4590,19 +4621,19 @@ function LatestReports({
|
|
|
4590
4621
|
] }) })
|
|
4591
4622
|
] }),
|
|
4592
4623
|
(documentSlug.trim() || perspective.trim()) && /* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 1, children: [
|
|
4593
|
-
documentSlug.trim() && /* @__PURE__ */ jsxs21(
|
|
4624
|
+
documentSlug.trim() && /* @__PURE__ */ jsxs21(Badge15, { fontSize: 0, tone: "primary", children: [
|
|
4594
4625
|
"Document: ",
|
|
4595
4626
|
documentSlug.trim()
|
|
4596
4627
|
] }),
|
|
4597
|
-
perspective.trim() && /* @__PURE__ */ jsxs21(
|
|
4628
|
+
perspective.trim() && /* @__PURE__ */ jsxs21(Badge15, { fontSize: 0, tone: "primary", children: [
|
|
4598
4629
|
"Perspective: ",
|
|
4599
4630
|
perspective.trim()
|
|
4600
4631
|
] })
|
|
4601
4632
|
] })
|
|
4602
4633
|
] }) }),
|
|
4603
4634
|
/* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 2, paddingX: 1, wrap: "wrap", children: [
|
|
4604
|
-
/* @__PURE__ */
|
|
4605
|
-
hasActiveFilters && /* @__PURE__ */
|
|
4635
|
+
/* @__PURE__ */ jsx26(Text21, { muted: true, size: 1, children: filteredReports.length === reports.length ? `${reports.length} reports` : `${filteredReports.length} of ${reports.length} reports` }),
|
|
4636
|
+
hasActiveFilters && /* @__PURE__ */ jsx26(
|
|
4606
4637
|
Button,
|
|
4607
4638
|
{
|
|
4608
4639
|
fontSize: 0,
|
|
@@ -4613,10 +4644,10 @@ function LatestReports({
|
|
|
4613
4644
|
}
|
|
4614
4645
|
),
|
|
4615
4646
|
/* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: [
|
|
4616
|
-
/* @__PURE__ */
|
|
4647
|
+
/* @__PURE__ */ jsx26(
|
|
4617
4648
|
MenuButton,
|
|
4618
4649
|
{
|
|
4619
|
-
button: /* @__PURE__ */
|
|
4650
|
+
button: /* @__PURE__ */ jsx26(
|
|
4620
4651
|
Button,
|
|
4621
4652
|
{
|
|
4622
4653
|
fontSize: 1,
|
|
@@ -4627,7 +4658,7 @@ function LatestReports({
|
|
|
4627
4658
|
),
|
|
4628
4659
|
id: "sort-menu",
|
|
4629
4660
|
menu: /* @__PURE__ */ jsxs21(Menu, { children: [
|
|
4630
|
-
/* @__PURE__ */
|
|
4661
|
+
/* @__PURE__ */ jsx26(
|
|
4631
4662
|
MenuItem,
|
|
4632
4663
|
{
|
|
4633
4664
|
onClick: () => handleSortFieldChange("date"),
|
|
@@ -4635,7 +4666,7 @@ function LatestReports({
|
|
|
4635
4666
|
text: "Date"
|
|
4636
4667
|
}
|
|
4637
4668
|
),
|
|
4638
|
-
/* @__PURE__ */
|
|
4669
|
+
/* @__PURE__ */ jsx26(
|
|
4639
4670
|
MenuItem,
|
|
4640
4671
|
{
|
|
4641
4672
|
onClick: () => handleSortFieldChange("score"),
|
|
@@ -4643,7 +4674,7 @@ function LatestReports({
|
|
|
4643
4674
|
text: "Score"
|
|
4644
4675
|
}
|
|
4645
4676
|
),
|
|
4646
|
-
/* @__PURE__ */
|
|
4677
|
+
/* @__PURE__ */ jsx26(
|
|
4647
4678
|
MenuItem,
|
|
4648
4679
|
{
|
|
4649
4680
|
onClick: () => handleSortFieldChange("name"),
|
|
@@ -4655,7 +4686,7 @@ function LatestReports({
|
|
|
4655
4686
|
popover: { portal: true }
|
|
4656
4687
|
}
|
|
4657
4688
|
),
|
|
4658
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ jsx26(
|
|
4659
4690
|
Button,
|
|
4660
4691
|
{
|
|
4661
4692
|
fontSize: 1,
|
|
@@ -4667,9 +4698,9 @@ function LatestReports({
|
|
|
4667
4698
|
)
|
|
4668
4699
|
] })
|
|
4669
4700
|
] }),
|
|
4670
|
-
filteredReports.length === 0 ? /* @__PURE__ */
|
|
4671
|
-
/* @__PURE__ */
|
|
4672
|
-
/* @__PURE__ */
|
|
4701
|
+
filteredReports.length === 0 ? /* @__PURE__ */ jsx26(Card12, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4702
|
+
/* @__PURE__ */ jsx26(Text21, { align: "center", muted: true, size: 2, children: "No reports match the current filters." }),
|
|
4703
|
+
/* @__PURE__ */ jsx26(Flex17, { justify: "center", children: /* @__PURE__ */ jsx26(
|
|
4673
4704
|
Button,
|
|
4674
4705
|
{
|
|
4675
4706
|
fontSize: 1,
|
|
@@ -4678,7 +4709,7 @@ function LatestReports({
|
|
|
4678
4709
|
text: "Clear all filters"
|
|
4679
4710
|
}
|
|
4680
4711
|
) })
|
|
4681
|
-
] }) }) : /* @__PURE__ */
|
|
4712
|
+
] }) }) : /* @__PURE__ */ jsx26(Stack13, { space: 2, children: filteredReports.map((report) => /* @__PURE__ */ jsx26(
|
|
4682
4713
|
ReportCard,
|
|
4683
4714
|
{
|
|
4684
4715
|
data: fromReportListItem(report),
|
|
@@ -4686,7 +4717,7 @@ function LatestReports({
|
|
|
4686
4717
|
},
|
|
4687
4718
|
report._id
|
|
4688
4719
|
)) }),
|
|
4689
|
-
hasMore && /* @__PURE__ */
|
|
4720
|
+
hasMore && /* @__PURE__ */ jsx26(Flex17, { justify: "center", paddingY: 3, children: /* @__PURE__ */ jsx26(
|
|
4690
4721
|
Button,
|
|
4691
4722
|
{
|
|
4692
4723
|
disabled: loadingMore,
|
|
@@ -4756,7 +4787,7 @@ import { useClient as useClient7 } from "sanity";
|
|
|
4756
4787
|
import { useMemo as useMemo6, useState as useState8 } from "react";
|
|
4757
4788
|
import { HelpCircleIcon as HelpCircleIcon5, SearchIcon as SearchIcon5 } from "@sanity/icons";
|
|
4758
4789
|
import {
|
|
4759
|
-
Badge as
|
|
4790
|
+
Badge as Badge16,
|
|
4760
4791
|
Box as Box10,
|
|
4761
4792
|
Card as Card14,
|
|
4762
4793
|
Flex as Flex18,
|
|
@@ -4770,7 +4801,7 @@ import {
|
|
|
4770
4801
|
// src/components/primitives/StatCard.tsx
|
|
4771
4802
|
import { HelpCircleIcon as HelpCircleIcon4 } from "@sanity/icons";
|
|
4772
4803
|
import { Box as Box9, Card as Card13, Stack as Stack14, Text as Text22, Tooltip as Tooltip3 } from "@sanity/ui";
|
|
4773
|
-
import { Fragment as Fragment4, jsx as
|
|
4804
|
+
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4774
4805
|
function StatCard({
|
|
4775
4806
|
label,
|
|
4776
4807
|
value,
|
|
@@ -4778,17 +4809,17 @@ function StatCard({
|
|
|
4778
4809
|
suffix,
|
|
4779
4810
|
tone = "default"
|
|
4780
4811
|
}) {
|
|
4781
|
-
return /* @__PURE__ */
|
|
4812
|
+
return /* @__PURE__ */ jsx27(Card13, { padding: 3, radius: 2, shadow: 1, tone, children: /* @__PURE__ */ jsxs22(Stack14, { space: 2, children: [
|
|
4782
4813
|
/* @__PURE__ */ jsxs22(Text22, { muted: true, size: 1, children: [
|
|
4783
4814
|
label,
|
|
4784
4815
|
tooltip && /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
4785
4816
|
" ",
|
|
4786
|
-
/* @__PURE__ */
|
|
4817
|
+
/* @__PURE__ */ jsx27(
|
|
4787
4818
|
Tooltip3,
|
|
4788
4819
|
{
|
|
4789
|
-
content: /* @__PURE__ */
|
|
4820
|
+
content: /* @__PURE__ */ jsx27(Box9, { padding: 2, children: /* @__PURE__ */ jsx27(Text22, { size: 1, children: tooltip }) }),
|
|
4790
4821
|
portal: true,
|
|
4791
|
-
children: /* @__PURE__ */
|
|
4822
|
+
children: /* @__PURE__ */ jsx27("span", { style: { cursor: "help" }, children: /* @__PURE__ */ jsx27(HelpCircleIcon4, {}) })
|
|
4792
4823
|
}
|
|
4793
4824
|
)
|
|
4794
4825
|
] })
|
|
@@ -4804,24 +4835,24 @@ function StatCard({
|
|
|
4804
4835
|
}
|
|
4805
4836
|
|
|
4806
4837
|
// src/components/report-detail/AgentActivitySection.tsx
|
|
4807
|
-
import { jsx as
|
|
4838
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4808
4839
|
function AgentActivitySection({
|
|
4809
4840
|
agentBehavior,
|
|
4810
4841
|
overall
|
|
4811
4842
|
}) {
|
|
4812
4843
|
return /* @__PURE__ */ jsxs23(Stack15, { space: 5, children: [
|
|
4813
|
-
overall && /* @__PURE__ */
|
|
4814
|
-
agentBehavior.map((ab) => /* @__PURE__ */
|
|
4844
|
+
overall && /* @__PURE__ */ jsx28(OverviewGrid, { overall }),
|
|
4845
|
+
agentBehavior.map((ab) => /* @__PURE__ */ jsx28(FeatureActivityCard, { behavior: ab }, ab.feature))
|
|
4815
4846
|
] });
|
|
4816
4847
|
}
|
|
4817
4848
|
function OverviewGrid({ overall }) {
|
|
4818
|
-
return /* @__PURE__ */
|
|
4849
|
+
return /* @__PURE__ */ jsx28(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack15, { space: 4, children: [
|
|
4819
4850
|
/* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, children: [
|
|
4820
|
-
/* @__PURE__ */
|
|
4821
|
-
/* @__PURE__ */
|
|
4851
|
+
/* @__PURE__ */ jsx28(Text23, { size: 2, weight: "semibold", children: "Agent Activity Overview" }),
|
|
4852
|
+
/* @__PURE__ */ jsx28(GlossaryTip, { text: GLOSSARY.agentBehaviorOverview })
|
|
4822
4853
|
] }),
|
|
4823
4854
|
/* @__PURE__ */ jsxs23(Grid2, { columns: [1, 2, 3], gap: 3, children: [
|
|
4824
|
-
/* @__PURE__ */
|
|
4855
|
+
/* @__PURE__ */ jsx28(
|
|
4825
4856
|
StatCard,
|
|
4826
4857
|
{
|
|
4827
4858
|
label: "Avg Pages Visited",
|
|
@@ -4829,7 +4860,7 @@ function OverviewGrid({ overall }) {
|
|
|
4829
4860
|
value: overall.avgDocPagesVisited.toFixed(1)
|
|
4830
4861
|
}
|
|
4831
4862
|
),
|
|
4832
|
-
/* @__PURE__ */
|
|
4863
|
+
/* @__PURE__ */ jsx28(
|
|
4833
4864
|
StatCard,
|
|
4834
4865
|
{
|
|
4835
4866
|
label: "Avg Searches",
|
|
@@ -4837,7 +4868,7 @@ function OverviewGrid({ overall }) {
|
|
|
4837
4868
|
value: overall.avgSearchesPerformed.toFixed(1)
|
|
4838
4869
|
}
|
|
4839
4870
|
),
|
|
4840
|
-
/* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsx28(
|
|
4841
4872
|
StatCard,
|
|
4842
4873
|
{
|
|
4843
4874
|
label: "Avg Network Time",
|
|
@@ -4845,7 +4876,7 @@ function OverviewGrid({ overall }) {
|
|
|
4845
4876
|
value: formatDuration(overall.avgNetworkTimeMs)
|
|
4846
4877
|
}
|
|
4847
4878
|
),
|
|
4848
|
-
/* @__PURE__ */
|
|
4879
|
+
/* @__PURE__ */ jsx28(
|
|
4849
4880
|
StatCard,
|
|
4850
4881
|
{
|
|
4851
4882
|
label: "Unique Doc Slugs",
|
|
@@ -4853,7 +4884,7 @@ function OverviewGrid({ overall }) {
|
|
|
4853
4884
|
value: String(overall.totalUniqueDocSlugs)
|
|
4854
4885
|
}
|
|
4855
4886
|
),
|
|
4856
|
-
/* @__PURE__ */
|
|
4887
|
+
/* @__PURE__ */ jsx28(
|
|
4857
4888
|
StatCard,
|
|
4858
4889
|
{
|
|
4859
4890
|
label: "Unique Search Queries",
|
|
@@ -4861,7 +4892,7 @@ function OverviewGrid({ overall }) {
|
|
|
4861
4892
|
value: String(overall.totalUniqueSearchQueries)
|
|
4862
4893
|
}
|
|
4863
4894
|
),
|
|
4864
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ jsx28(
|
|
4865
4896
|
StatCard,
|
|
4866
4897
|
{
|
|
4867
4898
|
label: "Tests with Data",
|
|
@@ -4874,31 +4905,31 @@ function OverviewGrid({ overall }) {
|
|
|
4874
4905
|
function FeatureActivityCard({
|
|
4875
4906
|
behavior
|
|
4876
4907
|
}) {
|
|
4877
|
-
return /* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ jsx28(Card14, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack15, { space: 4, children: [
|
|
4878
4909
|
/* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4879
|
-
/* @__PURE__ */
|
|
4880
|
-
/* @__PURE__ */ jsxs23(
|
|
4910
|
+
/* @__PURE__ */ jsx28(Text23, { size: 2, weight: "semibold", children: behavior.feature }),
|
|
4911
|
+
/* @__PURE__ */ jsxs23(Badge16, { tone: "primary", children: [
|
|
4881
4912
|
behavior.tasksWithBehaviorData,
|
|
4882
4913
|
" test",
|
|
4883
4914
|
behavior.tasksWithBehaviorData === 1 ? "" : "s"
|
|
4884
4915
|
] })
|
|
4885
4916
|
] }),
|
|
4886
4917
|
/* @__PURE__ */ jsxs23(Grid2, { columns: [1, 3], gap: 3, children: [
|
|
4887
|
-
/* @__PURE__ */
|
|
4918
|
+
/* @__PURE__ */ jsx28(
|
|
4888
4919
|
MiniStat,
|
|
4889
4920
|
{
|
|
4890
4921
|
label: "Avg pages visited",
|
|
4891
4922
|
value: behavior.avgDocPagesVisited.toFixed(1)
|
|
4892
4923
|
}
|
|
4893
4924
|
),
|
|
4894
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx28(
|
|
4895
4926
|
MiniStat,
|
|
4896
4927
|
{
|
|
4897
4928
|
label: "Avg searches",
|
|
4898
4929
|
value: behavior.avgSearchesPerformed.toFixed(1)
|
|
4899
4930
|
}
|
|
4900
4931
|
),
|
|
4901
|
-
/* @__PURE__ */
|
|
4932
|
+
/* @__PURE__ */ jsx28(
|
|
4902
4933
|
MiniStat,
|
|
4903
4934
|
{
|
|
4904
4935
|
label: "Avg network time",
|
|
@@ -4906,8 +4937,8 @@ function FeatureActivityCard({
|
|
|
4906
4937
|
}
|
|
4907
4938
|
)
|
|
4908
4939
|
] }),
|
|
4909
|
-
behavior.searchQueries.length > 0 && /* @__PURE__ */
|
|
4910
|
-
behavior.docSlugsVisited.length > 0 && /* @__PURE__ */
|
|
4940
|
+
behavior.searchQueries.length > 0 && /* @__PURE__ */ jsx28(SearchQueryList, { queries: behavior.searchQueries }),
|
|
4941
|
+
behavior.docSlugsVisited.length > 0 && /* @__PURE__ */ jsx28(
|
|
4911
4942
|
BadgeList,
|
|
4912
4943
|
{
|
|
4913
4944
|
items: behavior.docSlugsVisited,
|
|
@@ -4916,7 +4947,7 @@ function FeatureActivityCard({
|
|
|
4916
4947
|
tooltip: GLOSSARY.docSlugsVisited
|
|
4917
4948
|
}
|
|
4918
4949
|
),
|
|
4919
|
-
behavior.externalDomains.length > 0 && /* @__PURE__ */
|
|
4950
|
+
behavior.externalDomains.length > 0 && /* @__PURE__ */ jsx28(
|
|
4920
4951
|
BadgeList,
|
|
4921
4952
|
{
|
|
4922
4953
|
items: behavior.externalDomains,
|
|
@@ -4936,11 +4967,11 @@ function SearchQueryList({ queries }) {
|
|
|
4936
4967
|
}, [queries, filter]);
|
|
4937
4968
|
return /* @__PURE__ */ jsxs23(Stack15, { space: 3, children: [
|
|
4938
4969
|
/* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4939
|
-
/* @__PURE__ */
|
|
4940
|
-
/* @__PURE__ */
|
|
4941
|
-
/* @__PURE__ */
|
|
4970
|
+
/* @__PURE__ */ jsx28(Text23, { size: 1, weight: "semibold", children: "Search Queries" }),
|
|
4971
|
+
/* @__PURE__ */ jsx28(GlossaryTip, { text: GLOSSARY.searchQueries }),
|
|
4972
|
+
/* @__PURE__ */ jsx28(Badge16, { tone: "default", children: queries.length })
|
|
4942
4973
|
] }),
|
|
4943
|
-
queries.length > 5 && /* @__PURE__ */
|
|
4974
|
+
queries.length > 5 && /* @__PURE__ */ jsx28(
|
|
4944
4975
|
TextInput,
|
|
4945
4976
|
{
|
|
4946
4977
|
fontSize: 1,
|
|
@@ -4950,7 +4981,7 @@ function SearchQueryList({ queries }) {
|
|
|
4950
4981
|
value: filter
|
|
4951
4982
|
}
|
|
4952
4983
|
),
|
|
4953
|
-
/* @__PURE__ */
|
|
4984
|
+
/* @__PURE__ */ jsx28(
|
|
4954
4985
|
Card14,
|
|
4955
4986
|
{
|
|
4956
4987
|
overflow: "auto",
|
|
@@ -4959,8 +4990,8 @@ function SearchQueryList({ queries }) {
|
|
|
4959
4990
|
style: { maxHeight: 300 },
|
|
4960
4991
|
tone: "transparent",
|
|
4961
4992
|
children: /* @__PURE__ */ jsxs23(Stack15, { space: 2, children: [
|
|
4962
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
4963
|
-
filtered.map((query, i) => /* @__PURE__ */
|
|
4993
|
+
filtered.length === 0 && /* @__PURE__ */ jsx28(Text23, { muted: true, size: 1, children: "No matching queries" }),
|
|
4994
|
+
filtered.map((query, i) => /* @__PURE__ */ jsx28(
|
|
4964
4995
|
Text23,
|
|
4965
4996
|
{
|
|
4966
4997
|
muted: true,
|
|
@@ -4987,16 +5018,16 @@ function BadgeList({
|
|
|
4987
5018
|
}) {
|
|
4988
5019
|
return /* @__PURE__ */ jsxs23(Stack15, { space: 3, children: [
|
|
4989
5020
|
/* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
tooltip && /* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ jsx28(Text23, { size: 1, weight: "semibold", children: label }),
|
|
5022
|
+
tooltip && /* @__PURE__ */ jsx28(GlossaryTip, { text: tooltip }),
|
|
5023
|
+
/* @__PURE__ */ jsx28(Badge16, { tone: "default", children: items.length })
|
|
4993
5024
|
] }),
|
|
4994
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsx28(Flex18, { gap: 2, wrap: "wrap", children: items.map((item) => /* @__PURE__ */ jsx28(Badge16, { mode: "outline", tone, children: item }, item)) })
|
|
4995
5026
|
] });
|
|
4996
5027
|
}
|
|
4997
5028
|
function MiniStat({ label, value }) {
|
|
4998
5029
|
return /* @__PURE__ */ jsxs23(Stack15, { space: 1, children: [
|
|
4999
|
-
/* @__PURE__ */
|
|
5030
|
+
/* @__PURE__ */ jsx28(
|
|
5000
5031
|
Text23,
|
|
5001
5032
|
{
|
|
5002
5033
|
muted: true,
|
|
@@ -5006,17 +5037,17 @@ function MiniStat({ label, value }) {
|
|
|
5006
5037
|
children: label
|
|
5007
5038
|
}
|
|
5008
5039
|
),
|
|
5009
|
-
/* @__PURE__ */
|
|
5040
|
+
/* @__PURE__ */ jsx28(Text23, { size: 2, weight: "bold", children: value })
|
|
5010
5041
|
] });
|
|
5011
5042
|
}
|
|
5012
5043
|
function GlossaryTip({ text }) {
|
|
5013
|
-
return /* @__PURE__ */
|
|
5044
|
+
return /* @__PURE__ */ jsx28(
|
|
5014
5045
|
Tooltip4,
|
|
5015
5046
|
{
|
|
5016
|
-
content: /* @__PURE__ */
|
|
5047
|
+
content: /* @__PURE__ */ jsx28(Box10, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx28(Text23, { size: 1, children: text }) }),
|
|
5017
5048
|
placement: "bottom",
|
|
5018
5049
|
portal: true,
|
|
5019
|
-
children: /* @__PURE__ */
|
|
5050
|
+
children: /* @__PURE__ */ jsx28(Text23, { muted: true, size: 0, children: /* @__PURE__ */ jsx28(HelpCircleIcon5, {}) })
|
|
5020
5051
|
}
|
|
5021
5052
|
);
|
|
5022
5053
|
}
|
|
@@ -5027,17 +5058,17 @@ import { Card as Card16, Stack as Stack16, Text as Text25 } from "@sanity/ui";
|
|
|
5027
5058
|
|
|
5028
5059
|
// src/components/primitives/ScoreCell.tsx
|
|
5029
5060
|
import { Card as Card15, Text as Text24 } from "@sanity/ui";
|
|
5030
|
-
import { jsx as
|
|
5061
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5031
5062
|
function ScoreCell({ score, size = 1 }) {
|
|
5032
5063
|
const rounded = Math.round(score);
|
|
5033
|
-
return /* @__PURE__ */
|
|
5064
|
+
return /* @__PURE__ */ jsx29(Card15, { padding: 1, radius: 2, tone: scoreTone(rounded), children: /* @__PURE__ */ jsx29(Text24, { align: "center", size, weight: "medium", children: rounded }) });
|
|
5034
5065
|
}
|
|
5035
5066
|
|
|
5036
5067
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
5037
|
-
import { jsx as
|
|
5068
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5038
5069
|
function AreaScoreTable({ scores }) {
|
|
5039
|
-
return /* @__PURE__ */
|
|
5040
|
-
/* @__PURE__ */
|
|
5070
|
+
return /* @__PURE__ */ jsx30(Card16, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack16, { space: 4, children: [
|
|
5071
|
+
/* @__PURE__ */ jsx30(Text25, { size: 2, weight: "semibold", children: "Per-Area Scores" }),
|
|
5041
5072
|
/* @__PURE__ */ jsxs24(
|
|
5042
5073
|
"div",
|
|
5043
5074
|
{
|
|
@@ -5047,9 +5078,9 @@ function AreaScoreTable({ scores }) {
|
|
|
5047
5078
|
gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr 1fr"
|
|
5048
5079
|
},
|
|
5049
5080
|
children: [
|
|
5050
|
-
/* @__PURE__ */
|
|
5051
|
-
/* @__PURE__ */
|
|
5052
|
-
/* @__PURE__ */
|
|
5081
|
+
/* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
5082
|
+
/* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Score", tooltip: GLOSSARY.score }),
|
|
5083
|
+
/* @__PURE__ */ jsx30(
|
|
5053
5084
|
ColumnHeader,
|
|
5054
5085
|
{
|
|
5055
5086
|
borderBottom: true,
|
|
@@ -5057,7 +5088,7 @@ function AreaScoreTable({ scores }) {
|
|
|
5057
5088
|
tooltip: GLOSSARY.taskCompletion
|
|
5058
5089
|
}
|
|
5059
5090
|
),
|
|
5060
|
-
/* @__PURE__ */
|
|
5091
|
+
/* @__PURE__ */ jsx30(
|
|
5061
5092
|
ColumnHeader,
|
|
5062
5093
|
{
|
|
5063
5094
|
borderBottom: true,
|
|
@@ -5065,7 +5096,7 @@ function AreaScoreTable({ scores }) {
|
|
|
5065
5096
|
tooltip: GLOSSARY.codeCorrectness
|
|
5066
5097
|
}
|
|
5067
5098
|
),
|
|
5068
|
-
/* @__PURE__ */
|
|
5099
|
+
/* @__PURE__ */ jsx30(
|
|
5069
5100
|
ColumnHeader,
|
|
5070
5101
|
{
|
|
5071
5102
|
borderBottom: true,
|
|
@@ -5073,10 +5104,10 @@ function AreaScoreTable({ scores }) {
|
|
|
5073
5104
|
tooltip: GLOSSARY.docCoverage
|
|
5074
5105
|
}
|
|
5075
5106
|
),
|
|
5076
|
-
/* @__PURE__ */
|
|
5077
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Lift", tooltip: GLOSSARY.docLift }),
|
|
5108
|
+
/* @__PURE__ */ jsx30(ColumnHeader, { borderBottom: true, label: "Tests", tooltip: GLOSSARY.tests }),
|
|
5078
5109
|
scores.map((score, i) => /* @__PURE__ */ jsxs24(React2.Fragment, { children: [
|
|
5079
|
-
/* @__PURE__ */
|
|
5110
|
+
/* @__PURE__ */ jsx30(
|
|
5080
5111
|
"div",
|
|
5081
5112
|
{
|
|
5082
5113
|
style: {
|
|
@@ -5084,14 +5115,14 @@ function AreaScoreTable({ scores }) {
|
|
|
5084
5115
|
borderRadius: 4,
|
|
5085
5116
|
padding: "8px 0 8px 4px"
|
|
5086
5117
|
},
|
|
5087
|
-
children: /* @__PURE__ */
|
|
5118
|
+
children: /* @__PURE__ */ jsx30(Text25, { size: 1, weight: "medium", children: score.feature })
|
|
5088
5119
|
}
|
|
5089
5120
|
),
|
|
5090
|
-
/* @__PURE__ */
|
|
5091
|
-
/* @__PURE__ */
|
|
5092
|
-
/* @__PURE__ */
|
|
5093
|
-
/* @__PURE__ */
|
|
5094
|
-
/* @__PURE__ */
|
|
5121
|
+
/* @__PURE__ */ jsx30("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx30(ScoreCell, { score: score.totalScore }) }),
|
|
5122
|
+
/* @__PURE__ */ jsx30("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx30(ScoreCell, { score: score.taskCompletion }) }),
|
|
5123
|
+
/* @__PURE__ */ jsx30("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx30(ScoreCell, { score: score.codeCorrectness }) }),
|
|
5124
|
+
/* @__PURE__ */ jsx30("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx30(ScoreCell, { score: score.docCoverage }) }),
|
|
5125
|
+
/* @__PURE__ */ jsx30(
|
|
5095
5126
|
"div",
|
|
5096
5127
|
{
|
|
5097
5128
|
style: {
|
|
@@ -5099,10 +5130,10 @@ function AreaScoreTable({ scores }) {
|
|
|
5099
5130
|
background: rowBackground(i),
|
|
5100
5131
|
display: "flex"
|
|
5101
5132
|
},
|
|
5102
|
-
children: /* @__PURE__ */
|
|
5133
|
+
children: /* @__PURE__ */ jsx30(Text25, { size: 1, children: formatDelta(score.docLift) })
|
|
5103
5134
|
}
|
|
5104
5135
|
),
|
|
5105
|
-
/* @__PURE__ */
|
|
5136
|
+
/* @__PURE__ */ jsx30(
|
|
5106
5137
|
"div",
|
|
5107
5138
|
{
|
|
5108
5139
|
style: {
|
|
@@ -5110,7 +5141,7 @@ function AreaScoreTable({ scores }) {
|
|
|
5110
5141
|
background: rowBackground(i),
|
|
5111
5142
|
display: "flex"
|
|
5112
5143
|
},
|
|
5113
|
-
children: /* @__PURE__ */
|
|
5144
|
+
children: /* @__PURE__ */ jsx30(Text25, { muted: true, size: 1, children: score.testCount })
|
|
5114
5145
|
}
|
|
5115
5146
|
)
|
|
5116
5147
|
] }, score.feature))
|
|
@@ -5121,13 +5152,13 @@ function AreaScoreTable({ scores }) {
|
|
|
5121
5152
|
}
|
|
5122
5153
|
|
|
5123
5154
|
// src/components/report-detail/ComparisonSummary.tsx
|
|
5124
|
-
import { Badge as
|
|
5125
|
-
import { jsx as
|
|
5155
|
+
import { Badge as Badge17, Box as Box11, Card as Card17, Flex as Flex19, Grid as Grid3, Stack as Stack17, Text as Text26, Tooltip as Tooltip5 } from "@sanity/ui";
|
|
5156
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5126
5157
|
function ComparisonSummary({ comparison }) {
|
|
5127
|
-
return /* @__PURE__ */
|
|
5158
|
+
return /* @__PURE__ */ jsx31(Card17, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs25(Stack17, { space: 4, children: [
|
|
5128
5159
|
/* @__PURE__ */ jsxs25(Flex19, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5129
|
-
/* @__PURE__ */
|
|
5130
|
-
/* @__PURE__ */
|
|
5160
|
+
/* @__PURE__ */ jsx31(Text26, { size: 2, weight: "semibold", children: "Comparison" }),
|
|
5161
|
+
/* @__PURE__ */ jsx31(
|
|
5131
5162
|
DeltaCard,
|
|
5132
5163
|
{
|
|
5133
5164
|
delta: comparison.deltas.overall,
|
|
@@ -5135,7 +5166,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
5135
5166
|
tooltip: GLOSSARY.overallDelta
|
|
5136
5167
|
}
|
|
5137
5168
|
),
|
|
5138
|
-
comparison.deltas.actualDelta != null && /* @__PURE__ */
|
|
5169
|
+
comparison.deltas.actualDelta != null && /* @__PURE__ */ jsx31(
|
|
5139
5170
|
DeltaCard,
|
|
5140
5171
|
{
|
|
5141
5172
|
delta: comparison.deltas.actualDelta,
|
|
@@ -5143,7 +5174,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
5143
5174
|
tooltip: GLOSSARY.actualDelta
|
|
5144
5175
|
}
|
|
5145
5176
|
),
|
|
5146
|
-
comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */
|
|
5177
|
+
comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */ jsx31(
|
|
5147
5178
|
DeltaCard,
|
|
5148
5179
|
{
|
|
5149
5180
|
delta: comparison.deltas.retrievalGapDelta,
|
|
@@ -5154,7 +5185,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
5154
5185
|
)
|
|
5155
5186
|
] }),
|
|
5156
5187
|
/* @__PURE__ */ jsxs25(Grid3, { columns: [1, 1, 3], gap: 3, children: [
|
|
5157
|
-
comparison.improved.length > 0 && /* @__PURE__ */
|
|
5188
|
+
comparison.improved.length > 0 && /* @__PURE__ */ jsx31(
|
|
5158
5189
|
AreaBadgeGroup,
|
|
5159
5190
|
{
|
|
5160
5191
|
areas: comparison.improved,
|
|
@@ -5162,7 +5193,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
5162
5193
|
tone: "positive"
|
|
5163
5194
|
}
|
|
5164
5195
|
),
|
|
5165
|
-
comparison.regressed.length > 0 && /* @__PURE__ */
|
|
5196
|
+
comparison.regressed.length > 0 && /* @__PURE__ */ jsx31(
|
|
5166
5197
|
AreaBadgeGroup,
|
|
5167
5198
|
{
|
|
5168
5199
|
areas: comparison.regressed,
|
|
@@ -5170,7 +5201,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
5170
5201
|
tone: "critical"
|
|
5171
5202
|
}
|
|
5172
5203
|
),
|
|
5173
|
-
comparison.unchanged.length > 0 && /* @__PURE__ */
|
|
5204
|
+
comparison.unchanged.length > 0 && /* @__PURE__ */ jsx31(
|
|
5174
5205
|
AreaBadgeGroup,
|
|
5175
5206
|
{
|
|
5176
5207
|
areas: comparison.unchanged,
|
|
@@ -5189,13 +5220,13 @@ function DeltaCard({
|
|
|
5189
5220
|
}) {
|
|
5190
5221
|
const isPositive = invertedPolarity ? delta < 0 : delta > 0;
|
|
5191
5222
|
const isNegative = invertedPolarity ? delta > 0 : delta < 0;
|
|
5192
|
-
return /* @__PURE__ */
|
|
5223
|
+
return /* @__PURE__ */ jsx31(
|
|
5193
5224
|
Tooltip5,
|
|
5194
5225
|
{
|
|
5195
|
-
content: /* @__PURE__ */
|
|
5226
|
+
content: /* @__PURE__ */ jsx31(Box11, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx31(Text26, { size: 1, children: tooltip }) }),
|
|
5196
5227
|
placement: "bottom",
|
|
5197
5228
|
portal: true,
|
|
5198
|
-
children: /* @__PURE__ */
|
|
5229
|
+
children: /* @__PURE__ */ jsx31(
|
|
5199
5230
|
Card17,
|
|
5200
5231
|
{
|
|
5201
5232
|
padding: 2,
|
|
@@ -5217,7 +5248,7 @@ function AreaBadgeGroup({
|
|
|
5217
5248
|
tone
|
|
5218
5249
|
}) {
|
|
5219
5250
|
return /* @__PURE__ */ jsxs25(Stack17, { space: 2, children: [
|
|
5220
|
-
/* @__PURE__ */
|
|
5251
|
+
/* @__PURE__ */ jsx31(
|
|
5221
5252
|
Text26,
|
|
5222
5253
|
{
|
|
5223
5254
|
muted: true,
|
|
@@ -5227,21 +5258,21 @@ function AreaBadgeGroup({
|
|
|
5227
5258
|
children: label
|
|
5228
5259
|
}
|
|
5229
5260
|
),
|
|
5230
|
-
/* @__PURE__ */
|
|
5261
|
+
/* @__PURE__ */ jsx31(Flex19, { gap: 1, wrap: "wrap", children: areas.map((a) => /* @__PURE__ */ jsx31(Badge17, { tone, children: a }, a)) })
|
|
5231
5262
|
] });
|
|
5232
5263
|
}
|
|
5233
5264
|
|
|
5234
5265
|
// src/components/report-detail/JudgmentList.tsx
|
|
5235
5266
|
import { useState as useState9 } from "react";
|
|
5236
5267
|
import { HelpCircleIcon as HelpCircleIcon6 } from "@sanity/icons";
|
|
5237
|
-
import { Badge as
|
|
5268
|
+
import { Badge as Badge18, Box as Box12, Card as Card18, Flex as Flex20, Stack as Stack18, Text as Text27, Tooltip as Tooltip6 } from "@sanity/ui";
|
|
5238
5269
|
|
|
5239
5270
|
// src/components/primitives/InlineCode.tsx
|
|
5240
|
-
import { Fragment as Fragment5, jsx as
|
|
5271
|
+
import { Fragment as Fragment5, jsx as jsx32 } from "react/jsx-runtime";
|
|
5241
5272
|
function InlineCode({ text }) {
|
|
5242
5273
|
const parts = text.split(/`([^`]+)`/);
|
|
5243
|
-
return /* @__PURE__ */
|
|
5244
|
-
(part, i) => i % 2 === 1 ? /* @__PURE__ */
|
|
5274
|
+
return /* @__PURE__ */ jsx32(Fragment5, { children: parts.map(
|
|
5275
|
+
(part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx32(
|
|
5245
5276
|
"code",
|
|
5246
5277
|
{
|
|
5247
5278
|
style: {
|
|
@@ -5253,12 +5284,12 @@ function InlineCode({ text }) {
|
|
|
5253
5284
|
children: part
|
|
5254
5285
|
},
|
|
5255
5286
|
i
|
|
5256
|
-
) : /* @__PURE__ */
|
|
5287
|
+
) : /* @__PURE__ */ jsx32("span", { children: part }, i)
|
|
5257
5288
|
) });
|
|
5258
5289
|
}
|
|
5259
5290
|
|
|
5260
5291
|
// src/components/report-detail/JudgmentList.tsx
|
|
5261
|
-
import { jsx as
|
|
5292
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5262
5293
|
function groupByArea(judgments) {
|
|
5263
5294
|
const byArea = /* @__PURE__ */ new Map();
|
|
5264
5295
|
for (const j of judgments) {
|
|
@@ -5273,26 +5304,26 @@ var DIMENSION_LABELS = DIMENSION_LABELS_KEBAB;
|
|
|
5273
5304
|
function JudgmentList({ judgments }) {
|
|
5274
5305
|
if (judgments.length === 0) return null;
|
|
5275
5306
|
const grouped = groupByArea(judgments);
|
|
5276
|
-
return /* @__PURE__ */
|
|
5307
|
+
return /* @__PURE__ */ jsx33(Card18, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs26(Stack18, { space: 4, children: [
|
|
5277
5308
|
/* @__PURE__ */ jsxs26(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5278
|
-
/* @__PURE__ */
|
|
5279
|
-
/* @__PURE__ */
|
|
5309
|
+
/* @__PURE__ */ jsx33(Text27, { size: 2, weight: "semibold", children: "Low-Scoring Judgments" }),
|
|
5310
|
+
/* @__PURE__ */ jsx33(
|
|
5280
5311
|
Tooltip6,
|
|
5281
5312
|
{
|
|
5282
|
-
content: /* @__PURE__ */
|
|
5313
|
+
content: /* @__PURE__ */ jsx33(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx33(Text27, { size: 1, children: GLOSSARY.lowScoringJudgments }) }),
|
|
5283
5314
|
placement: "bottom",
|
|
5284
5315
|
portal: true,
|
|
5285
|
-
children: /* @__PURE__ */
|
|
5316
|
+
children: /* @__PURE__ */ jsx33(Text27, { muted: true, size: 0, children: /* @__PURE__ */ jsx33(HelpCircleIcon6, {}) })
|
|
5286
5317
|
}
|
|
5287
5318
|
),
|
|
5288
|
-
/* @__PURE__ */
|
|
5319
|
+
/* @__PURE__ */ jsx33(Card18, { padding: 2, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs26(Text27, { size: 1, weight: "bold", children: [
|
|
5289
5320
|
judgments.length,
|
|
5290
5321
|
" judgment",
|
|
5291
5322
|
judgments.length === 1 ? "" : "s",
|
|
5292
5323
|
" below 70"
|
|
5293
5324
|
] }) })
|
|
5294
5325
|
] }),
|
|
5295
|
-
grouped.map(([area, areaJudgments]) => /* @__PURE__ */
|
|
5326
|
+
grouped.map(([area, areaJudgments]) => /* @__PURE__ */ jsx33(Card18, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs26(Stack18, { space: 3, children: [
|
|
5296
5327
|
/* @__PURE__ */ jsxs26(Text27, { size: 1, weight: "semibold", children: [
|
|
5297
5328
|
area,
|
|
5298
5329
|
" ",
|
|
@@ -5302,7 +5333,7 @@ function JudgmentList({ judgments }) {
|
|
|
5302
5333
|
")"
|
|
5303
5334
|
] })
|
|
5304
5335
|
] }),
|
|
5305
|
-
areaJudgments.map((j, i) => /* @__PURE__ */
|
|
5336
|
+
areaJudgments.map((j, i) => /* @__PURE__ */ jsx33(JudgmentCard, { judgment: j }, `${area}-${i}`))
|
|
5306
5337
|
] }) }, area))
|
|
5307
5338
|
] }) });
|
|
5308
5339
|
}
|
|
@@ -5311,7 +5342,7 @@ function JudgmentCard({ judgment }) {
|
|
|
5311
5342
|
const dimLabel = DIMENSION_LABELS[judgment.dimension] ?? judgment.dimension;
|
|
5312
5343
|
const sep = judgment.taskId.indexOf(" - ");
|
|
5313
5344
|
const taskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
|
|
5314
|
-
return /* @__PURE__ */
|
|
5345
|
+
return /* @__PURE__ */ jsx33(
|
|
5315
5346
|
Card18,
|
|
5316
5347
|
{
|
|
5317
5348
|
padding: 3,
|
|
@@ -5321,7 +5352,7 @@ function JudgmentCard({ judgment }) {
|
|
|
5321
5352
|
onClick: () => setExpanded(!expanded),
|
|
5322
5353
|
children: /* @__PURE__ */ jsxs26(Stack18, { space: 3, children: [
|
|
5323
5354
|
/* @__PURE__ */ jsxs26(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
5324
|
-
/* @__PURE__ */
|
|
5355
|
+
/* @__PURE__ */ jsx33(Card18, { padding: 2, radius: 2, tone: scoreTone(judgment.score), children: /* @__PURE__ */ jsx33(
|
|
5325
5356
|
Text27,
|
|
5326
5357
|
{
|
|
5327
5358
|
align: "center",
|
|
@@ -5331,24 +5362,24 @@ function JudgmentCard({ judgment }) {
|
|
|
5331
5362
|
children: judgment.score
|
|
5332
5363
|
}
|
|
5333
5364
|
) }),
|
|
5334
|
-
/* @__PURE__ */
|
|
5335
|
-
/* @__PURE__ */
|
|
5336
|
-
/* @__PURE__ */
|
|
5337
|
-
/* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ jsx33(Badge18, { tone: "default", children: dimLabel }),
|
|
5366
|
+
/* @__PURE__ */ jsx33(Text27, { size: 1, weight: "medium", children: taskName }),
|
|
5367
|
+
/* @__PURE__ */ jsx33(Text27, { muted: true, size: 0, children: judgment.modelId }),
|
|
5368
|
+
/* @__PURE__ */ jsx33(Text27, { muted: true, size: 0, style: { marginLeft: "auto" }, children: expanded ? "\u25B2" : "\u25BC" })
|
|
5338
5369
|
] }),
|
|
5339
5370
|
expanded && /* @__PURE__ */ jsxs26(Stack18, { space: 3, children: [
|
|
5340
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ jsx33(Card18, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx33(
|
|
5341
5372
|
Text27,
|
|
5342
5373
|
{
|
|
5343
5374
|
muted: true,
|
|
5344
5375
|
size: 1,
|
|
5345
5376
|
style: { lineHeight: 1.6, whiteSpace: "pre-wrap" },
|
|
5346
|
-
children: /* @__PURE__ */
|
|
5377
|
+
children: /* @__PURE__ */ jsx33(InlineCode, { text: judgment.reason })
|
|
5347
5378
|
}
|
|
5348
5379
|
) }),
|
|
5349
5380
|
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs26(Flex20, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
5350
|
-
/* @__PURE__ */
|
|
5351
|
-
judgment.canonicalDocs.map((doc) => /* @__PURE__ */
|
|
5381
|
+
/* @__PURE__ */ jsx33(Text27, { muted: true, size: 0, children: "Docs:" }),
|
|
5382
|
+
judgment.canonicalDocs.map((doc) => /* @__PURE__ */ jsx33(DocBadge, { doc }, doc.slug))
|
|
5352
5383
|
] })
|
|
5353
5384
|
] })
|
|
5354
5385
|
] })
|
|
@@ -5367,14 +5398,14 @@ function DocBadge({
|
|
|
5367
5398
|
const [hovered, setHovered] = useState9(false);
|
|
5368
5399
|
const isLinked = Boolean(doc.documentId);
|
|
5369
5400
|
const tooltipLabel = isLinked ? `Edit "${doc.title || doc.slug}"` : doc.title || doc.slug;
|
|
5370
|
-
const badge = /* @__PURE__ */
|
|
5371
|
-
return /* @__PURE__ */
|
|
5401
|
+
const badge = /* @__PURE__ */ jsx33(Badge18, { mode: "outline", tone: isLinked && hovered ? "caution" : "primary", children: doc.slug });
|
|
5402
|
+
return /* @__PURE__ */ jsx33(
|
|
5372
5403
|
Tooltip6,
|
|
5373
5404
|
{
|
|
5374
|
-
content: /* @__PURE__ */
|
|
5405
|
+
content: /* @__PURE__ */ jsx33(Box12, { padding: 2, children: /* @__PURE__ */ jsx33(Text27, { size: 1, children: tooltipLabel }) }),
|
|
5375
5406
|
placement: "bottom",
|
|
5376
5407
|
portal: true,
|
|
5377
|
-
children: isLinked ? /* @__PURE__ */
|
|
5408
|
+
children: isLinked ? /* @__PURE__ */ jsx33(
|
|
5378
5409
|
"a",
|
|
5379
5410
|
{
|
|
5380
5411
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -5387,14 +5418,14 @@ function DocBadge({
|
|
|
5387
5418
|
},
|
|
5388
5419
|
children: badge
|
|
5389
5420
|
}
|
|
5390
|
-
) : /* @__PURE__ */
|
|
5421
|
+
) : /* @__PURE__ */ jsx33("span", { children: badge })
|
|
5391
5422
|
}
|
|
5392
5423
|
);
|
|
5393
5424
|
}
|
|
5394
5425
|
|
|
5395
5426
|
// src/components/report-detail/OverviewStats.tsx
|
|
5396
5427
|
import { Grid as Grid4 } from "@sanity/ui";
|
|
5397
|
-
import { jsx as
|
|
5428
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5398
5429
|
function OverviewStats({
|
|
5399
5430
|
overall,
|
|
5400
5431
|
durationMs,
|
|
@@ -5403,7 +5434,7 @@ function OverviewStats({
|
|
|
5403
5434
|
}) {
|
|
5404
5435
|
const overallTone = scoreTone(overall.avgScore);
|
|
5405
5436
|
return /* @__PURE__ */ jsxs27(Grid4, { columns: [1, 1, 2, isFullMode ? 4 : 4], gap: 3, children: [
|
|
5406
|
-
/* @__PURE__ */
|
|
5437
|
+
/* @__PURE__ */ jsx34(
|
|
5407
5438
|
StatCard,
|
|
5408
5439
|
{
|
|
5409
5440
|
label: "Overall Score",
|
|
@@ -5412,7 +5443,7 @@ function OverviewStats({
|
|
|
5412
5443
|
value: overall.avgScore.toFixed(1)
|
|
5413
5444
|
}
|
|
5414
5445
|
),
|
|
5415
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ jsx34(
|
|
5416
5447
|
StatCard,
|
|
5417
5448
|
{
|
|
5418
5449
|
label: "Doc Lift",
|
|
@@ -5421,7 +5452,7 @@ function OverviewStats({
|
|
|
5421
5452
|
value: overall.avgDocLift.toFixed(1)
|
|
5422
5453
|
}
|
|
5423
5454
|
),
|
|
5424
|
-
isFullMode && overall.avgActualScore != null && /* @__PURE__ */
|
|
5455
|
+
isFullMode && overall.avgActualScore != null && /* @__PURE__ */ jsx34(
|
|
5425
5456
|
StatCard,
|
|
5426
5457
|
{
|
|
5427
5458
|
label: "Actual Score",
|
|
@@ -5430,7 +5461,7 @@ function OverviewStats({
|
|
|
5430
5461
|
value: overall.avgActualScore.toFixed(1)
|
|
5431
5462
|
}
|
|
5432
5463
|
),
|
|
5433
|
-
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */
|
|
5464
|
+
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */ jsx34(
|
|
5434
5465
|
StatCard,
|
|
5435
5466
|
{
|
|
5436
5467
|
label: "Retrieval Gap",
|
|
@@ -5440,7 +5471,7 @@ function OverviewStats({
|
|
|
5440
5471
|
value: overall.avgRetrievalGap.toFixed(1)
|
|
5441
5472
|
}
|
|
5442
5473
|
),
|
|
5443
|
-
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */
|
|
5474
|
+
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */ jsx34(
|
|
5444
5475
|
StatCard,
|
|
5445
5476
|
{
|
|
5446
5477
|
label: "Infra Efficiency",
|
|
@@ -5448,8 +5479,8 @@ function OverviewStats({
|
|
|
5448
5479
|
value: formatPercent(overall.avgInfrastructureEfficiency)
|
|
5449
5480
|
}
|
|
5450
5481
|
),
|
|
5451
|
-
/* @__PURE__ */
|
|
5452
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ jsx34(StatCard, { label: "Duration", value: formatDuration(durationMs) }),
|
|
5483
|
+
/* @__PURE__ */ jsx34(
|
|
5453
5484
|
StatCard,
|
|
5454
5485
|
{
|
|
5455
5486
|
label: "Tests",
|
|
@@ -5462,30 +5493,30 @@ function OverviewStats({
|
|
|
5462
5493
|
|
|
5463
5494
|
// src/components/report-detail/ProvenanceCard.tsx
|
|
5464
5495
|
import { Card as Card19, Flex as Flex21, Grid as Grid5, Stack as Stack19, Text as Text28 } from "@sanity/ui";
|
|
5465
|
-
import { jsx as
|
|
5496
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5466
5497
|
var VIEWABLE_PROMPTFOO_MODES = /* @__PURE__ */ new Set(["agentic", "observed"]);
|
|
5467
5498
|
function ProvenanceCard({ provenance }) {
|
|
5468
|
-
return /* @__PURE__ */
|
|
5469
|
-
/* @__PURE__ */
|
|
5499
|
+
return /* @__PURE__ */ jsx35(Card19, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack19, { space: 4, children: [
|
|
5500
|
+
/* @__PURE__ */ jsx35(Text28, { size: 2, weight: "semibold", children: "Provenance" }),
|
|
5470
5501
|
/* @__PURE__ */ jsxs28(Grid5, { columns: [1, 2, 3], gap: 4, children: [
|
|
5471
|
-
/* @__PURE__ */
|
|
5472
|
-
/* @__PURE__ */
|
|
5473
|
-
/* @__PURE__ */
|
|
5502
|
+
/* @__PURE__ */ jsx35(Field, { label: "Mode", value: provenance.mode }),
|
|
5503
|
+
/* @__PURE__ */ jsx35(Field, { label: "Source", value: provenance.source.name }),
|
|
5504
|
+
/* @__PURE__ */ jsx35(
|
|
5474
5505
|
Field,
|
|
5475
5506
|
{
|
|
5476
5507
|
label: "Trigger",
|
|
5477
5508
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
5478
5509
|
}
|
|
5479
5510
|
),
|
|
5480
|
-
/* @__PURE__ */
|
|
5511
|
+
/* @__PURE__ */ jsx35(
|
|
5481
5512
|
Field,
|
|
5482
5513
|
{
|
|
5483
5514
|
label: "Models",
|
|
5484
5515
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
5485
5516
|
}
|
|
5486
5517
|
),
|
|
5487
|
-
/* @__PURE__ */
|
|
5488
|
-
provenance.contextHash && /* @__PURE__ */
|
|
5518
|
+
/* @__PURE__ */ jsx35(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
5519
|
+
provenance.contextHash && /* @__PURE__ */ jsx35(
|
|
5489
5520
|
Field,
|
|
5490
5521
|
{
|
|
5491
5522
|
label: "Context Hash",
|
|
@@ -5494,8 +5525,8 @@ function ProvenanceCard({ provenance }) {
|
|
|
5494
5525
|
}
|
|
5495
5526
|
)
|
|
5496
5527
|
] }),
|
|
5497
|
-
provenance.git && /* @__PURE__ */
|
|
5498
|
-
/* @__PURE__ */
|
|
5528
|
+
provenance.git && /* @__PURE__ */ jsx35(GitInfo, { git: provenance.git }),
|
|
5529
|
+
/* @__PURE__ */ jsx35(PromptfooLinks, { provenance })
|
|
5499
5530
|
] }) });
|
|
5500
5531
|
}
|
|
5501
5532
|
function Field({
|
|
@@ -5504,7 +5535,7 @@ function Field({
|
|
|
5504
5535
|
value
|
|
5505
5536
|
}) {
|
|
5506
5537
|
return /* @__PURE__ */ jsxs28(Stack19, { space: 1, children: [
|
|
5507
|
-
/* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ jsx35(
|
|
5508
5539
|
Text28,
|
|
5509
5540
|
{
|
|
5510
5541
|
muted: true,
|
|
@@ -5514,7 +5545,7 @@ function Field({
|
|
|
5514
5545
|
children: label
|
|
5515
5546
|
}
|
|
5516
5547
|
),
|
|
5517
|
-
/* @__PURE__ */
|
|
5548
|
+
/* @__PURE__ */ jsx35(Text28, { size: 1, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
5518
5549
|
] });
|
|
5519
5550
|
}
|
|
5520
5551
|
function GitInfo({ git }) {
|
|
@@ -5522,15 +5553,15 @@ function GitInfo({ git }) {
|
|
|
5522
5553
|
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
5523
5554
|
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
5524
5555
|
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
5525
|
-
return /* @__PURE__ */
|
|
5526
|
-
/* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsx35(Card19, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5557
|
+
/* @__PURE__ */ jsx35(Text28, { muted: true, size: 1, weight: "semibold", children: "Git" }),
|
|
5527
5558
|
/* @__PURE__ */ jsxs28(Text28, { size: 1, children: [
|
|
5528
|
-
/* @__PURE__ */
|
|
5559
|
+
/* @__PURE__ */ jsx35("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
5529
5560
|
" / ",
|
|
5530
|
-
/* @__PURE__ */
|
|
5561
|
+
/* @__PURE__ */ jsx35("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
5531
5562
|
] }),
|
|
5532
|
-
/* @__PURE__ */
|
|
5533
|
-
prUrl && /* @__PURE__ */
|
|
5563
|
+
/* @__PURE__ */ jsx35(Text28, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx35("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
5564
|
+
prUrl && /* @__PURE__ */ jsx35(Text28, { size: 1, children: /* @__PURE__ */ jsxs28("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
5534
5565
|
"PR #",
|
|
5535
5566
|
git.prNumber,
|
|
5536
5567
|
" \u2192"
|
|
@@ -5545,14 +5576,14 @@ function PromptfooLinks({
|
|
|
5545
5576
|
(e) => VIEWABLE_PROMPTFOO_MODES.has(e.mode)
|
|
5546
5577
|
);
|
|
5547
5578
|
if (viewable.length === 0) return null;
|
|
5548
|
-
return /* @__PURE__ */
|
|
5579
|
+
return /* @__PURE__ */ jsx35(Flex21, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx35(Text28, { size: 1, children: /* @__PURE__ */ jsxs28("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
5549
5580
|
"View in Promptfoo (",
|
|
5550
5581
|
entry.mode,
|
|
5551
5582
|
") \u2192"
|
|
5552
5583
|
] }) }, entry.mode)) });
|
|
5553
5584
|
}
|
|
5554
5585
|
if (provenance.promptfooUrl && VIEWABLE_PROMPTFOO_MODES.has(provenance.mode)) {
|
|
5555
|
-
return /* @__PURE__ */
|
|
5586
|
+
return /* @__PURE__ */ jsx35(Text28, { size: 1, children: /* @__PURE__ */ jsx35(
|
|
5556
5587
|
"a",
|
|
5557
5588
|
{
|
|
5558
5589
|
href: provenance.promptfooUrl,
|
|
@@ -5567,32 +5598,32 @@ function PromptfooLinks({
|
|
|
5567
5598
|
|
|
5568
5599
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
5569
5600
|
import React4 from "react";
|
|
5570
|
-
import { Badge as
|
|
5601
|
+
import { Badge as Badge19, Box as Box13, Card as Card20, Flex as Flex22, Stack as Stack20, Text as Text29, Tooltip as Tooltip7 } from "@sanity/ui";
|
|
5571
5602
|
import { HelpCircleIcon as HelpCircleIcon7 } from "@sanity/icons";
|
|
5572
|
-
import { jsx as
|
|
5603
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5573
5604
|
function RecommendationsSection({
|
|
5574
5605
|
recommendations
|
|
5575
5606
|
}) {
|
|
5576
5607
|
if (recommendations.gaps.length === 0) return null;
|
|
5577
|
-
return /* @__PURE__ */
|
|
5608
|
+
return /* @__PURE__ */ jsx36(Card20, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs29(Stack20, { space: 4, children: [
|
|
5578
5609
|
/* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
/* @__PURE__ */
|
|
5610
|
+
/* @__PURE__ */ jsx36(Text29, { size: 2, weight: "semibold", children: "Recommendations" }),
|
|
5611
|
+
/* @__PURE__ */ jsx36(
|
|
5581
5612
|
Tooltip7,
|
|
5582
5613
|
{
|
|
5583
|
-
content: /* @__PURE__ */
|
|
5614
|
+
content: /* @__PURE__ */ jsx36(Box13, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx36(Text29, { size: 1, children: GLOSSARY.recommendations }) }),
|
|
5584
5615
|
placement: "bottom",
|
|
5585
5616
|
portal: true,
|
|
5586
|
-
children: /* @__PURE__ */
|
|
5617
|
+
children: /* @__PURE__ */ jsx36(Text29, { muted: true, size: 0, children: /* @__PURE__ */ jsx36(HelpCircleIcon7, {}) })
|
|
5587
5618
|
}
|
|
5588
5619
|
),
|
|
5589
|
-
/* @__PURE__ */
|
|
5620
|
+
/* @__PURE__ */ jsx36(
|
|
5590
5621
|
Tooltip7,
|
|
5591
5622
|
{
|
|
5592
|
-
content: /* @__PURE__ */
|
|
5623
|
+
content: /* @__PURE__ */ jsx36(Box13, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx36(Text29, { size: 1, children: GLOSSARY.totalPotentialLift }) }),
|
|
5593
5624
|
placement: "bottom",
|
|
5594
5625
|
portal: true,
|
|
5595
|
-
children: /* @__PURE__ */
|
|
5626
|
+
children: /* @__PURE__ */ jsx36(Card20, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs29(Text29, { size: 1, weight: "bold", children: [
|
|
5596
5627
|
"+",
|
|
5597
5628
|
recommendations.totalPotentialLift.toFixed(1),
|
|
5598
5629
|
" pts potential lift"
|
|
@@ -5609,9 +5640,9 @@ function RecommendationsSection({
|
|
|
5609
5640
|
gridTemplateColumns: "auto 2fr 2fr 1fr 1fr 1fr"
|
|
5610
5641
|
},
|
|
5611
5642
|
children: [
|
|
5612
|
-
/* @__PURE__ */
|
|
5613
|
-
/* @__PURE__ */
|
|
5614
|
-
/* @__PURE__ */
|
|
5643
|
+
/* @__PURE__ */ jsx36(ColumnHeader, { borderBottom: true, label: "#" }),
|
|
5644
|
+
/* @__PURE__ */ jsx36(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
5645
|
+
/* @__PURE__ */ jsx36(
|
|
5615
5646
|
ColumnHeader,
|
|
5616
5647
|
{
|
|
5617
5648
|
borderBottom: true,
|
|
@@ -5619,8 +5650,8 @@ function RecommendationsSection({
|
|
|
5619
5650
|
tooltip: GLOSSARY.failureMode
|
|
5620
5651
|
}
|
|
5621
5652
|
),
|
|
5622
|
-
/* @__PURE__ */
|
|
5623
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ jsx36(ColumnHeader, { borderBottom: true, label: "Action" }),
|
|
5654
|
+
/* @__PURE__ */ jsx36(
|
|
5624
5655
|
ColumnHeader,
|
|
5625
5656
|
{
|
|
5626
5657
|
borderBottom: true,
|
|
@@ -5628,7 +5659,7 @@ function RecommendationsSection({
|
|
|
5628
5659
|
tooltip: GLOSSARY.estimatedLift
|
|
5629
5660
|
}
|
|
5630
5661
|
),
|
|
5631
|
-
/* @__PURE__ */
|
|
5662
|
+
/* @__PURE__ */ jsx36(
|
|
5632
5663
|
ColumnHeader,
|
|
5633
5664
|
{
|
|
5634
5665
|
borderBottom: true,
|
|
@@ -5636,7 +5667,7 @@ function RecommendationsSection({
|
|
|
5636
5667
|
tooltip: GLOSSARY.confidence
|
|
5637
5668
|
}
|
|
5638
5669
|
),
|
|
5639
|
-
recommendations.gaps.map((gap, i) => /* @__PURE__ */
|
|
5670
|
+
recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx36(RecommendationRow, { gap, index: i }, `gap-${i}`))
|
|
5640
5671
|
]
|
|
5641
5672
|
}
|
|
5642
5673
|
)
|
|
@@ -5649,7 +5680,7 @@ function RecommendationRow({
|
|
|
5649
5680
|
const confIcon = gap.confidence === "high" ? "\u{1F7E2}" : gap.confidence === "medium" ? "\u{1F7E1}" : "\u{1F534}";
|
|
5650
5681
|
const bg = rowBackground(index);
|
|
5651
5682
|
return /* @__PURE__ */ jsxs29(React4.Fragment, { children: [
|
|
5652
|
-
/* @__PURE__ */
|
|
5683
|
+
/* @__PURE__ */ jsx36(
|
|
5653
5684
|
"div",
|
|
5654
5685
|
{
|
|
5655
5686
|
style: {
|
|
@@ -5659,10 +5690,10 @@ function RecommendationRow({
|
|
|
5659
5690
|
display: "flex",
|
|
5660
5691
|
padding: "8px 4px"
|
|
5661
5692
|
},
|
|
5662
|
-
children: /* @__PURE__ */
|
|
5693
|
+
children: /* @__PURE__ */ jsx36(Text29, { muted: true, size: 1, children: index + 1 })
|
|
5663
5694
|
}
|
|
5664
5695
|
),
|
|
5665
|
-
/* @__PURE__ */
|
|
5696
|
+
/* @__PURE__ */ jsx36(
|
|
5666
5697
|
"div",
|
|
5667
5698
|
{
|
|
5668
5699
|
style: {
|
|
@@ -5671,10 +5702,10 @@ function RecommendationRow({
|
|
|
5671
5702
|
display: "flex",
|
|
5672
5703
|
padding: "8px 0"
|
|
5673
5704
|
},
|
|
5674
|
-
children: /* @__PURE__ */
|
|
5705
|
+
children: /* @__PURE__ */ jsx36(Text29, { size: 1, weight: "medium", children: gap.area })
|
|
5675
5706
|
}
|
|
5676
5707
|
),
|
|
5677
|
-
/* @__PURE__ */
|
|
5708
|
+
/* @__PURE__ */ jsx36(
|
|
5678
5709
|
"div",
|
|
5679
5710
|
{
|
|
5680
5711
|
style: {
|
|
@@ -5683,8 +5714,8 @@ function RecommendationRow({
|
|
|
5683
5714
|
display: "flex",
|
|
5684
5715
|
padding: "8px 0"
|
|
5685
5716
|
},
|
|
5686
|
-
children: /* @__PURE__ */
|
|
5687
|
-
|
|
5717
|
+
children: /* @__PURE__ */ jsx36(
|
|
5718
|
+
Badge19,
|
|
5688
5719
|
{
|
|
5689
5720
|
tone: gap.failureMode === "missing-docs" ? "critical" : gap.failureMode === "incorrect-docs" ? "critical" : gap.failureMode === "outdated-docs" ? "caution" : "default",
|
|
5690
5721
|
children: gap.failureMode
|
|
@@ -5692,7 +5723,7 @@ function RecommendationRow({
|
|
|
5692
5723
|
)
|
|
5693
5724
|
}
|
|
5694
5725
|
),
|
|
5695
|
-
/* @__PURE__ */
|
|
5726
|
+
/* @__PURE__ */ jsx36(
|
|
5696
5727
|
"div",
|
|
5697
5728
|
{
|
|
5698
5729
|
style: {
|
|
@@ -5701,10 +5732,10 @@ function RecommendationRow({
|
|
|
5701
5732
|
display: "flex",
|
|
5702
5733
|
padding: "8px 0"
|
|
5703
5734
|
},
|
|
5704
|
-
children: /* @__PURE__ */
|
|
5735
|
+
children: /* @__PURE__ */ jsx36(Text29, { muted: true, size: 1, children: gap.remediation })
|
|
5705
5736
|
}
|
|
5706
5737
|
),
|
|
5707
|
-
/* @__PURE__ */
|
|
5738
|
+
/* @__PURE__ */ jsx36(
|
|
5708
5739
|
"div",
|
|
5709
5740
|
{
|
|
5710
5741
|
style: {
|
|
@@ -5713,13 +5744,13 @@ function RecommendationRow({
|
|
|
5713
5744
|
display: "flex",
|
|
5714
5745
|
padding: "8px 0"
|
|
5715
5746
|
},
|
|
5716
|
-
children: /* @__PURE__ */
|
|
5747
|
+
children: /* @__PURE__ */ jsx36(Card20, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs29(Text29, { align: "center", size: 1, weight: "medium", children: [
|
|
5717
5748
|
"+",
|
|
5718
5749
|
gap.estimatedLift.toFixed(1)
|
|
5719
5750
|
] }) })
|
|
5720
5751
|
}
|
|
5721
5752
|
),
|
|
5722
|
-
/* @__PURE__ */
|
|
5753
|
+
/* @__PURE__ */ jsx36(
|
|
5723
5754
|
"div",
|
|
5724
5755
|
{
|
|
5725
5756
|
style: {
|
|
@@ -5741,7 +5772,7 @@ function RecommendationRow({
|
|
|
5741
5772
|
// src/components/report-detail/ReportHeader.tsx
|
|
5742
5773
|
import { ArrowLeftIcon, ClipboardIcon } from "@sanity/icons";
|
|
5743
5774
|
import {
|
|
5744
|
-
Badge as
|
|
5775
|
+
Badge as Badge20,
|
|
5745
5776
|
Box as Box14,
|
|
5746
5777
|
Button as Button2,
|
|
5747
5778
|
Card as Card21,
|
|
@@ -5750,7 +5781,7 @@ import {
|
|
|
5750
5781
|
Text as Text30,
|
|
5751
5782
|
Tooltip as Tooltip8
|
|
5752
5783
|
} from "@sanity/ui";
|
|
5753
|
-
import { Fragment as Fragment6, jsx as
|
|
5784
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5754
5785
|
function ReportHeader({
|
|
5755
5786
|
completedAt,
|
|
5756
5787
|
mode,
|
|
@@ -5765,7 +5796,7 @@ function ReportHeader({
|
|
|
5765
5796
|
const hasTag = Boolean(tag);
|
|
5766
5797
|
return /* @__PURE__ */ jsxs30(Fragment6, { children: [
|
|
5767
5798
|
/* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 3, children: [
|
|
5768
|
-
/* @__PURE__ */
|
|
5799
|
+
/* @__PURE__ */ jsx37(
|
|
5769
5800
|
Button2,
|
|
5770
5801
|
{
|
|
5771
5802
|
icon: ArrowLeftIcon,
|
|
@@ -5775,21 +5806,21 @@ function ReportHeader({
|
|
|
5775
5806
|
}
|
|
5776
5807
|
),
|
|
5777
5808
|
/* @__PURE__ */ jsxs30(Stack21, { flex: 1, space: 1, children: [
|
|
5778
|
-
/* @__PURE__ */
|
|
5779
|
-
hasTag && /* @__PURE__ */
|
|
5809
|
+
/* @__PURE__ */ jsx37(Text30, { size: 3, weight: "bold", children: title }),
|
|
5810
|
+
hasTag && /* @__PURE__ */ jsx37(Text30, { muted: true, size: 1, children: dateLabel })
|
|
5780
5811
|
] }),
|
|
5781
5812
|
/* @__PURE__ */ jsxs30(Flex23, { gap: 2, children: [
|
|
5782
|
-
/* @__PURE__ */
|
|
5783
|
-
/* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ jsx37(Badge20, { mode: "outline", tone: "default", children: sourceName }),
|
|
5814
|
+
/* @__PURE__ */ jsx37(Badge20, { tone: "primary", children: mode })
|
|
5784
5815
|
] })
|
|
5785
5816
|
] }),
|
|
5786
|
-
/* @__PURE__ */
|
|
5817
|
+
/* @__PURE__ */ jsx37(
|
|
5787
5818
|
Tooltip8,
|
|
5788
5819
|
{
|
|
5789
|
-
content: /* @__PURE__ */
|
|
5820
|
+
content: /* @__PURE__ */ jsx37(Box14, { padding: 2, children: /* @__PURE__ */ jsx37(Text30, { size: 1, children: "Click to copy report ID" }) }),
|
|
5790
5821
|
placement: "bottom",
|
|
5791
5822
|
portal: true,
|
|
5792
|
-
children: /* @__PURE__ */
|
|
5823
|
+
children: /* @__PURE__ */ jsx37(
|
|
5793
5824
|
Card21,
|
|
5794
5825
|
{
|
|
5795
5826
|
border: true,
|
|
@@ -5799,7 +5830,7 @@ function ReportHeader({
|
|
|
5799
5830
|
style: { cursor: "pointer" },
|
|
5800
5831
|
tone: "transparent",
|
|
5801
5832
|
children: /* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 3, children: [
|
|
5802
|
-
/* @__PURE__ */
|
|
5833
|
+
/* @__PURE__ */ jsx37(
|
|
5803
5834
|
Text30,
|
|
5804
5835
|
{
|
|
5805
5836
|
muted: true,
|
|
@@ -5812,7 +5843,7 @@ function ReportHeader({
|
|
|
5812
5843
|
children: "Report ID"
|
|
5813
5844
|
}
|
|
5814
5845
|
),
|
|
5815
|
-
/* @__PURE__ */
|
|
5846
|
+
/* @__PURE__ */ jsx37(
|
|
5816
5847
|
Text30,
|
|
5817
5848
|
{
|
|
5818
5849
|
size: 1,
|
|
@@ -5823,7 +5854,7 @@ function ReportHeader({
|
|
|
5823
5854
|
children: reportId
|
|
5824
5855
|
}
|
|
5825
5856
|
),
|
|
5826
|
-
/* @__PURE__ */
|
|
5857
|
+
/* @__PURE__ */ jsx37(Box14, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx37(Text30, { muted: true, size: 1, children: /* @__PURE__ */ jsx37(ClipboardIcon, {}) }) })
|
|
5827
5858
|
] })
|
|
5828
5859
|
}
|
|
5829
5860
|
)
|
|
@@ -5834,16 +5865,16 @@ function ReportHeader({
|
|
|
5834
5865
|
|
|
5835
5866
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
5836
5867
|
import React5 from "react";
|
|
5837
|
-
import { Badge as
|
|
5838
|
-
import { jsx as
|
|
5868
|
+
import { Badge as Badge21, Card as Card22, Flex as Flex24, Stack as Stack22, Text as Text31 } from "@sanity/ui";
|
|
5869
|
+
import { jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5839
5870
|
function ThreeLayerTable({ scores }) {
|
|
5840
5871
|
const filtered = scores.filter((s) => s.actualScore != null);
|
|
5841
5872
|
if (filtered.length === 0) return null;
|
|
5842
5873
|
const hasInverted = filtered.some((s) => s.invertedRetrievalGap);
|
|
5843
|
-
return /* @__PURE__ */
|
|
5874
|
+
return /* @__PURE__ */ jsx38(Card22, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs31(Stack22, { space: 4, children: [
|
|
5844
5875
|
/* @__PURE__ */ jsxs31(Flex24, { align: "center", gap: 3, children: [
|
|
5845
|
-
/* @__PURE__ */
|
|
5846
|
-
/* @__PURE__ */
|
|
5876
|
+
/* @__PURE__ */ jsx38(Text31, { size: 2, weight: "semibold", children: "Three-Layer Decomposition" }),
|
|
5877
|
+
/* @__PURE__ */ jsx38(Badge21, { tone: "primary", children: "full mode" })
|
|
5847
5878
|
] }),
|
|
5848
5879
|
/* @__PURE__ */ jsxs31(
|
|
5849
5880
|
"div",
|
|
@@ -5854,9 +5885,9 @@ function ThreeLayerTable({ scores }) {
|
|
|
5854
5885
|
gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr"
|
|
5855
5886
|
},
|
|
5856
5887
|
children: [
|
|
5857
|
-
/* @__PURE__ */
|
|
5858
|
-
/* @__PURE__ */
|
|
5859
|
-
/* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ jsx38(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
5889
|
+
/* @__PURE__ */ jsx38(ColumnHeader, { borderBottom: true, label: "Floor", tooltip: GLOSSARY.floor }),
|
|
5890
|
+
/* @__PURE__ */ jsx38(
|
|
5860
5891
|
ColumnHeader,
|
|
5861
5892
|
{
|
|
5862
5893
|
borderBottom: true,
|
|
@@ -5864,8 +5895,8 @@ function ThreeLayerTable({ scores }) {
|
|
|
5864
5895
|
tooltip: GLOSSARY.ceiling
|
|
5865
5896
|
}
|
|
5866
5897
|
),
|
|
5867
|
-
/* @__PURE__ */
|
|
5868
|
-
/* @__PURE__ */
|
|
5898
|
+
/* @__PURE__ */ jsx38(ColumnHeader, { borderBottom: true, label: "Actual", tooltip: GLOSSARY.actual }),
|
|
5899
|
+
/* @__PURE__ */ jsx38(
|
|
5869
5900
|
ColumnHeader,
|
|
5870
5901
|
{
|
|
5871
5902
|
borderBottom: true,
|
|
@@ -5873,7 +5904,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
5873
5904
|
tooltip: GLOSSARY.retGap
|
|
5874
5905
|
}
|
|
5875
5906
|
),
|
|
5876
|
-
/* @__PURE__ */
|
|
5907
|
+
/* @__PURE__ */ jsx38(
|
|
5877
5908
|
ColumnHeader,
|
|
5878
5909
|
{
|
|
5879
5910
|
borderBottom: true,
|
|
@@ -5882,7 +5913,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
5882
5913
|
}
|
|
5883
5914
|
),
|
|
5884
5915
|
filtered.map((score, i) => /* @__PURE__ */ jsxs31(React5.Fragment, { children: [
|
|
5885
|
-
/* @__PURE__ */
|
|
5916
|
+
/* @__PURE__ */ jsx38(
|
|
5886
5917
|
"div",
|
|
5887
5918
|
{
|
|
5888
5919
|
style: {
|
|
@@ -5890,13 +5921,13 @@ function ThreeLayerTable({ scores }) {
|
|
|
5890
5921
|
borderRadius: 4,
|
|
5891
5922
|
padding: "8px 0 8px 4px"
|
|
5892
5923
|
},
|
|
5893
|
-
children: /* @__PURE__ */
|
|
5924
|
+
children: /* @__PURE__ */ jsx38(Text31, { size: 1, weight: "medium", children: score.feature })
|
|
5894
5925
|
}
|
|
5895
5926
|
),
|
|
5896
|
-
/* @__PURE__ */
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
/* @__PURE__ */
|
|
5899
|
-
/* @__PURE__ */
|
|
5927
|
+
/* @__PURE__ */ jsx38("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx38(ScoreCell, { score: score.floorScore ?? 0 }) }),
|
|
5928
|
+
/* @__PURE__ */ jsx38("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx38(ScoreCell, { score: score.ceilingScore ?? score.totalScore }) }),
|
|
5929
|
+
/* @__PURE__ */ jsx38("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx38(ScoreCell, { score: score.actualScore ?? 0 }) }),
|
|
5930
|
+
/* @__PURE__ */ jsx38(
|
|
5900
5931
|
"div",
|
|
5901
5932
|
{
|
|
5902
5933
|
style: {
|
|
@@ -5905,10 +5936,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
5905
5936
|
display: "flex",
|
|
5906
5937
|
padding: "6px 0"
|
|
5907
5938
|
},
|
|
5908
|
-
children: /* @__PURE__ */
|
|
5939
|
+
children: /* @__PURE__ */ jsx38(Text31, { size: 1, children: score.retrievalGap != null ? score.retrievalGap.toFixed(1) : "\u2014" })
|
|
5909
5940
|
}
|
|
5910
5941
|
),
|
|
5911
|
-
/* @__PURE__ */
|
|
5942
|
+
/* @__PURE__ */ jsx38(
|
|
5912
5943
|
"div",
|
|
5913
5944
|
{
|
|
5914
5945
|
style: {
|
|
@@ -5927,12 +5958,12 @@ function ThreeLayerTable({ scores }) {
|
|
|
5927
5958
|
]
|
|
5928
5959
|
}
|
|
5929
5960
|
),
|
|
5930
|
-
hasInverted && /* @__PURE__ */
|
|
5961
|
+
hasInverted && /* @__PURE__ */ jsx38(Text31, { muted: true, size: 0, children: GLOSSARY.invertedRetGap })
|
|
5931
5962
|
] }) });
|
|
5932
5963
|
}
|
|
5933
5964
|
|
|
5934
5965
|
// src/components/report-detail/ReportDetail.tsx
|
|
5935
|
-
import { jsx as
|
|
5966
|
+
import { jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5936
5967
|
var OVERVIEW_TAB = { id: "overview", label: "Overview" };
|
|
5937
5968
|
var DIAGNOSTICS_TAB = { id: "diagnostics", label: "Diagnostics" };
|
|
5938
5969
|
var ACTIVITY_TAB = { id: "activity", label: "Agent Activity" };
|
|
@@ -5998,11 +6029,11 @@ function ReportDetail({
|
|
|
5998
6029
|
[onTabChange]
|
|
5999
6030
|
);
|
|
6000
6031
|
if (loading) {
|
|
6001
|
-
return /* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ jsx39(LoadingState, { message: "Loading report\u2026" });
|
|
6002
6033
|
}
|
|
6003
6034
|
if (!report || !summary) {
|
|
6004
|
-
return /* @__PURE__ */
|
|
6005
|
-
/* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ jsx39(Box15, { padding: 5, children: /* @__PURE__ */ jsxs32(Stack23, { space: 4, children: [
|
|
6036
|
+
/* @__PURE__ */ jsx39(
|
|
6006
6037
|
Button3,
|
|
6007
6038
|
{
|
|
6008
6039
|
icon: ArrowLeftIcon2,
|
|
@@ -6011,14 +6042,14 @@ function ReportDetail({
|
|
|
6011
6042
|
text: "Back"
|
|
6012
6043
|
}
|
|
6013
6044
|
),
|
|
6014
|
-
/* @__PURE__ */
|
|
6045
|
+
/* @__PURE__ */ jsx39(Text32, { align: "center", muted: true, size: 2, children: "Report not found" })
|
|
6015
6046
|
] }) });
|
|
6016
6047
|
}
|
|
6017
6048
|
const { comparison, provenance } = report;
|
|
6018
6049
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
6019
6050
|
const isFullMode = summary.evaluationMode === "full" || summary.scores.some((s) => s.actualScore != null);
|
|
6020
|
-
return /* @__PURE__ */
|
|
6021
|
-
/* @__PURE__ */
|
|
6051
|
+
return /* @__PURE__ */ jsx39(Box15, { padding: 4, children: /* @__PURE__ */ jsxs32(Stack23, { space: 5, children: [
|
|
6052
|
+
/* @__PURE__ */ jsx39(
|
|
6022
6053
|
ReportHeader,
|
|
6023
6054
|
{
|
|
6024
6055
|
completedAt: report.completedAt,
|
|
@@ -6030,10 +6061,10 @@ function ReportDetail({
|
|
|
6030
6061
|
tag: report.tag
|
|
6031
6062
|
}
|
|
6032
6063
|
),
|
|
6033
|
-
/* @__PURE__ */
|
|
6064
|
+
/* @__PURE__ */ jsx39(TabList, { space: 1, children: tabs.map((tab) => {
|
|
6034
6065
|
const isDisabled = disabledTabs.has(tab.id);
|
|
6035
6066
|
const tooltip = getDisabledTabTooltip(tab.id, summary);
|
|
6036
|
-
const tabElement = /* @__PURE__ */
|
|
6067
|
+
const tabElement = /* @__PURE__ */ jsx39(
|
|
6037
6068
|
Tab,
|
|
6038
6069
|
{
|
|
6039
6070
|
"aria-controls": `panel-${tab.id}`,
|
|
@@ -6044,25 +6075,25 @@ function ReportDetail({
|
|
|
6044
6075
|
selected: currentTab === tab.id
|
|
6045
6076
|
}
|
|
6046
6077
|
);
|
|
6047
|
-
return isDisabled && tooltip ? /* @__PURE__ */
|
|
6078
|
+
return isDisabled && tooltip ? /* @__PURE__ */ jsx39(
|
|
6048
6079
|
Tooltip9,
|
|
6049
6080
|
{
|
|
6050
|
-
content: /* @__PURE__ */
|
|
6081
|
+
content: /* @__PURE__ */ jsx39(Box15, { padding: 2, style: { maxWidth: 280 }, children: tooltip }),
|
|
6051
6082
|
placement: "bottom",
|
|
6052
6083
|
portal: true,
|
|
6053
|
-
children: /* @__PURE__ */
|
|
6084
|
+
children: /* @__PURE__ */ jsx39("span", { style: { display: "inline-block" }, children: tabElement })
|
|
6054
6085
|
},
|
|
6055
6086
|
tab.id
|
|
6056
|
-
) : /* @__PURE__ */
|
|
6087
|
+
) : /* @__PURE__ */ jsx39("span", { children: tabElement }, tab.id);
|
|
6057
6088
|
}) }),
|
|
6058
|
-
currentTab === "overview" && /* @__PURE__ */
|
|
6089
|
+
currentTab === "overview" && /* @__PURE__ */ jsx39(
|
|
6059
6090
|
TabPanel,
|
|
6060
6091
|
{
|
|
6061
6092
|
"aria-labelledby": "tab-overview",
|
|
6062
6093
|
hidden: currentTab !== "overview",
|
|
6063
6094
|
id: "panel-overview",
|
|
6064
6095
|
children: /* @__PURE__ */ jsxs32(Stack23, { space: 5, children: [
|
|
6065
|
-
/* @__PURE__ */
|
|
6096
|
+
/* @__PURE__ */ jsx39(
|
|
6066
6097
|
OverviewStats,
|
|
6067
6098
|
{
|
|
6068
6099
|
durationMs: report.durationMs,
|
|
@@ -6071,37 +6102,37 @@ function ReportDetail({
|
|
|
6071
6102
|
totalTests
|
|
6072
6103
|
}
|
|
6073
6104
|
),
|
|
6074
|
-
isFullMode && /* @__PURE__ */
|
|
6075
|
-
/* @__PURE__ */
|
|
6076
|
-
comparison && /* @__PURE__ */
|
|
6077
|
-
/* @__PURE__ */
|
|
6105
|
+
isFullMode && /* @__PURE__ */ jsx39(ThreeLayerTable, { scores: summary.scores }),
|
|
6106
|
+
/* @__PURE__ */ jsx39(AreaScoreTable, { scores: summary.scores }),
|
|
6107
|
+
comparison && /* @__PURE__ */ jsx39(ComparisonSummary, { comparison }),
|
|
6108
|
+
/* @__PURE__ */ jsx39(ProvenanceCard, { provenance })
|
|
6078
6109
|
] })
|
|
6079
6110
|
}
|
|
6080
6111
|
),
|
|
6081
|
-
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */
|
|
6112
|
+
currentTab === "diagnostics" && hasDiagnostics && /* @__PURE__ */ jsx39(
|
|
6082
6113
|
TabPanel,
|
|
6083
6114
|
{
|
|
6084
6115
|
"aria-labelledby": "tab-diagnostics",
|
|
6085
6116
|
hidden: currentTab !== "diagnostics",
|
|
6086
6117
|
id: "panel-diagnostics",
|
|
6087
6118
|
children: /* @__PURE__ */ jsxs32(Stack23, { space: 5, children: [
|
|
6088
|
-
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */
|
|
6119
|
+
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */ jsx39(
|
|
6089
6120
|
RecommendationsSection,
|
|
6090
6121
|
{
|
|
6091
6122
|
recommendations: summary.recommendations
|
|
6092
6123
|
}
|
|
6093
6124
|
),
|
|
6094
|
-
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */
|
|
6125
|
+
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */ jsx39(JudgmentList, { judgments: summary.lowScoringJudgments })
|
|
6095
6126
|
] })
|
|
6096
6127
|
}
|
|
6097
6128
|
),
|
|
6098
|
-
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */
|
|
6129
|
+
currentTab === "activity" && hasAgentActivity && /* @__PURE__ */ jsx39(
|
|
6099
6130
|
TabPanel,
|
|
6100
6131
|
{
|
|
6101
6132
|
"aria-labelledby": "tab-activity",
|
|
6102
6133
|
hidden: currentTab !== "activity",
|
|
6103
6134
|
id: "panel-activity",
|
|
6104
|
-
children: /* @__PURE__ */
|
|
6135
|
+
children: /* @__PURE__ */ jsx39(
|
|
6105
6136
|
AgentActivitySection,
|
|
6106
6137
|
{
|
|
6107
6138
|
agentBehavior: summary.agentBehavior,
|
|
@@ -6123,17 +6154,17 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
6123
6154
|
if (!summary) return null;
|
|
6124
6155
|
switch (tabId) {
|
|
6125
6156
|
case "diagnostics":
|
|
6126
|
-
return /* @__PURE__ */
|
|
6157
|
+
return /* @__PURE__ */ jsx39(Text32, { muted: true, size: 1, children: "No diagnostic data available. Diagnostics require low-scoring judgments or gap analysis recommendations." });
|
|
6127
6158
|
case "activity":
|
|
6128
6159
|
return summary.evaluationMode === "baseline" ? /* @__PURE__ */ jsxs32(Text32, { muted: true, size: 1, children: [
|
|
6129
6160
|
"Not available for baseline-only evaluations. Run with",
|
|
6130
6161
|
" ",
|
|
6131
|
-
/* @__PURE__ */
|
|
6162
|
+
/* @__PURE__ */ jsx39("code", { style: inlineCodeStyle, children: "--mode full" }),
|
|
6132
6163
|
" or",
|
|
6133
6164
|
" ",
|
|
6134
|
-
/* @__PURE__ */
|
|
6165
|
+
/* @__PURE__ */ jsx39("code", { style: inlineCodeStyle, children: "--mode agentic" }),
|
|
6135
6166
|
" to capture agent browsing behavior."
|
|
6136
|
-
] }) : /* @__PURE__ */
|
|
6167
|
+
] }) : /* @__PURE__ */ jsx39(Text32, { muted: true, size: 1, children: "No agent activity data was recorded for this evaluation." });
|
|
6137
6168
|
default:
|
|
6138
6169
|
return null;
|
|
6139
6170
|
}
|
|
@@ -6143,7 +6174,7 @@ function getDisabledTabTooltip(tabId, summary) {
|
|
|
6143
6174
|
import { Card as Card23, Flex as Flex25, Select as Select2, Stack as Stack24, Text as Text33 } from "@sanity/ui";
|
|
6144
6175
|
import { useCallback as useCallback14, useEffect as useEffect9, useMemo as useMemo8, useState as useState11 } from "react";
|
|
6145
6176
|
import { useClient as useClient8 } from "sanity";
|
|
6146
|
-
import { jsx as
|
|
6177
|
+
import { jsx as jsx40, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6147
6178
|
var CHART_HEIGHT = 220;
|
|
6148
6179
|
var CHART_WIDTH = 800;
|
|
6149
6180
|
var PAD_BOTTOM = 30;
|
|
@@ -6244,20 +6275,20 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6244
6275
|
const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
|
|
6245
6276
|
return /* @__PURE__ */ jsxs33(Stack24, { space: 4, children: [
|
|
6246
6277
|
/* @__PURE__ */ jsxs33(Flex25, { gap: 3, children: [
|
|
6247
|
-
/* @__PURE__ */
|
|
6278
|
+
/* @__PURE__ */ jsx40(
|
|
6248
6279
|
Select2,
|
|
6249
6280
|
{
|
|
6250
6281
|
onChange: handleRangeChange,
|
|
6251
6282
|
value: rangeDays?.toString() ?? "all",
|
|
6252
|
-
children: TIME_RANGES.map((r) => /* @__PURE__ */
|
|
6283
|
+
children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx40("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
|
|
6253
6284
|
}
|
|
6254
6285
|
),
|
|
6255
6286
|
/* @__PURE__ */ jsxs33(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
|
|
6256
|
-
/* @__PURE__ */
|
|
6257
|
-
areaNames.map((name) => /* @__PURE__ */
|
|
6287
|
+
/* @__PURE__ */ jsx40("option", { value: "", children: "Overall" }),
|
|
6288
|
+
areaNames.map((name) => /* @__PURE__ */ jsx40("option", { value: name, children: name }, name))
|
|
6258
6289
|
] })
|
|
6259
6290
|
] }),
|
|
6260
|
-
/* @__PURE__ */
|
|
6291
|
+
/* @__PURE__ */ jsx40(Card23, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx40(Flex25, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx40(Text33, { muted: true, size: 1, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx40(Flex25, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx40(Text33, { muted: true, size: 1, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs33(
|
|
6261
6292
|
"svg",
|
|
6262
6293
|
{
|
|
6263
6294
|
style: { display: "block", width: "100%" },
|
|
@@ -6266,7 +6297,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6266
6297
|
Y_TICKS.map((tick) => {
|
|
6267
6298
|
const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
|
|
6268
6299
|
return /* @__PURE__ */ jsxs33("g", { children: [
|
|
6269
|
-
/* @__PURE__ */
|
|
6300
|
+
/* @__PURE__ */ jsx40(
|
|
6270
6301
|
"line",
|
|
6271
6302
|
{
|
|
6272
6303
|
stroke: "#ccc",
|
|
@@ -6277,7 +6308,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6277
6308
|
y2: y
|
|
6278
6309
|
}
|
|
6279
6310
|
),
|
|
6280
|
-
/* @__PURE__ */
|
|
6311
|
+
/* @__PURE__ */ jsx40(
|
|
6281
6312
|
"text",
|
|
6282
6313
|
{
|
|
6283
6314
|
dominantBaseline: "middle",
|
|
@@ -6297,7 +6328,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6297
6328
|
chartPoints.length - 1
|
|
6298
6329
|
].map((idx) => {
|
|
6299
6330
|
const p = chartPoints[idx];
|
|
6300
|
-
return /* @__PURE__ */
|
|
6331
|
+
return /* @__PURE__ */ jsx40(
|
|
6301
6332
|
"text",
|
|
6302
6333
|
{
|
|
6303
6334
|
fill: "#999",
|
|
@@ -6309,7 +6340,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6309
6340
|
},
|
|
6310
6341
|
idx
|
|
6311
6342
|
);
|
|
6312
|
-
}) : chartPoints.map((p, idx) => /* @__PURE__ */
|
|
6343
|
+
}) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx40(
|
|
6313
6344
|
"text",
|
|
6314
6345
|
{
|
|
6315
6346
|
fill: "#999",
|
|
@@ -6321,7 +6352,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6321
6352
|
},
|
|
6322
6353
|
idx
|
|
6323
6354
|
)),
|
|
6324
|
-
/* @__PURE__ */
|
|
6355
|
+
/* @__PURE__ */ jsx40(
|
|
6325
6356
|
"polyline",
|
|
6326
6357
|
{
|
|
6327
6358
|
fill: "none",
|
|
@@ -6331,7 +6362,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6331
6362
|
strokeWidth: 2.5
|
|
6332
6363
|
}
|
|
6333
6364
|
),
|
|
6334
|
-
chartPoints.map((p, idx) => /* @__PURE__ */
|
|
6365
|
+
chartPoints.map((p, idx) => /* @__PURE__ */ jsx40(
|
|
6335
6366
|
"circle",
|
|
6336
6367
|
{
|
|
6337
6368
|
cx: p.x,
|
|
@@ -6361,7 +6392,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
6361
6392
|
var ScoreTimeline_default = ScoreTimeline;
|
|
6362
6393
|
|
|
6363
6394
|
// src/components/Dashboard.tsx
|
|
6364
|
-
import { jsx as
|
|
6395
|
+
import { jsx as jsx41, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6365
6396
|
var VIEW_PARAM_MAP = {
|
|
6366
6397
|
compare: "compare",
|
|
6367
6398
|
timeline: "timeline"
|
|
@@ -6411,11 +6442,11 @@ function Dashboard() {
|
|
|
6411
6442
|
client.fetch(distinctSourcesQuery).then((data) => setSources(data ?? [])).catch(() => setSources([]));
|
|
6412
6443
|
client.fetch(distinctModesQuery).then((data) => setModes(data ?? [])).catch(() => setModes([]));
|
|
6413
6444
|
}, [client]);
|
|
6414
|
-
return /* @__PURE__ */
|
|
6445
|
+
return /* @__PURE__ */ jsx41(Container, { width: 2, children: /* @__PURE__ */ jsxs34(Stack25, { padding: 4, space: 4, children: [
|
|
6415
6446
|
/* @__PURE__ */ jsxs34(Flex26, { align: "center", gap: 3, children: [
|
|
6416
6447
|
/* @__PURE__ */ jsxs34(Stack25, { flex: 1, space: 1, children: [
|
|
6417
|
-
/* @__PURE__ */
|
|
6418
|
-
/* @__PURE__ */
|
|
6448
|
+
/* @__PURE__ */ jsx41(Text34, { size: 3, weight: "bold", children: "AI Literacy Framework" }),
|
|
6449
|
+
/* @__PURE__ */ jsx41(Text34, { muted: true, size: 1, children: "Evaluation reports and score trends" })
|
|
6419
6450
|
] }),
|
|
6420
6451
|
!isDetail && /* @__PURE__ */ jsxs34(Flex26, { gap: 2, children: [
|
|
6421
6452
|
/* @__PURE__ */ jsxs34(
|
|
@@ -6425,8 +6456,8 @@ function Dashboard() {
|
|
|
6425
6456
|
onChange: (e) => setSource(e.currentTarget.value || null),
|
|
6426
6457
|
value: source ?? "",
|
|
6427
6458
|
children: [
|
|
6428
|
-
/* @__PURE__ */
|
|
6429
|
-
sources.map((s) => /* @__PURE__ */
|
|
6459
|
+
/* @__PURE__ */ jsx41("option", { value: "", children: "All sources" }),
|
|
6460
|
+
sources.map((s) => /* @__PURE__ */ jsx41("option", { value: s, children: s }, s))
|
|
6430
6461
|
]
|
|
6431
6462
|
}
|
|
6432
6463
|
),
|
|
@@ -6437,15 +6468,15 @@ function Dashboard() {
|
|
|
6437
6468
|
onChange: (e) => setMode(e.currentTarget.value || null),
|
|
6438
6469
|
value: mode ?? "",
|
|
6439
6470
|
children: [
|
|
6440
|
-
/* @__PURE__ */
|
|
6441
|
-
modes.map((m) => /* @__PURE__ */
|
|
6471
|
+
/* @__PURE__ */ jsx41("option", { value: "", children: "All modes" }),
|
|
6472
|
+
modes.map((m) => /* @__PURE__ */ jsx41("option", { value: m, children: m }, m))
|
|
6442
6473
|
]
|
|
6443
6474
|
}
|
|
6444
6475
|
)
|
|
6445
6476
|
] })
|
|
6446
6477
|
] }),
|
|
6447
6478
|
!isDetail && /* @__PURE__ */ jsxs34(TabList2, { space: 1, children: [
|
|
6448
|
-
/* @__PURE__ */
|
|
6479
|
+
/* @__PURE__ */ jsx41(
|
|
6449
6480
|
Tab2,
|
|
6450
6481
|
{
|
|
6451
6482
|
"aria-controls": "latest-panel",
|
|
@@ -6455,7 +6486,7 @@ function Dashboard() {
|
|
|
6455
6486
|
selected: activeTab === "latest"
|
|
6456
6487
|
}
|
|
6457
6488
|
),
|
|
6458
|
-
/* @__PURE__ */
|
|
6489
|
+
/* @__PURE__ */ jsx41(
|
|
6459
6490
|
Tab2,
|
|
6460
6491
|
{
|
|
6461
6492
|
"aria-controls": "timeline-panel",
|
|
@@ -6465,7 +6496,7 @@ function Dashboard() {
|
|
|
6465
6496
|
selected: activeTab === "timeline"
|
|
6466
6497
|
}
|
|
6467
6498
|
),
|
|
6468
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx41(
|
|
6469
6500
|
Tab2,
|
|
6470
6501
|
{
|
|
6471
6502
|
"aria-controls": "compare-panel",
|
|
@@ -6476,7 +6507,7 @@ function Dashboard() {
|
|
|
6476
6507
|
}
|
|
6477
6508
|
)
|
|
6478
6509
|
] }),
|
|
6479
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
6510
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx41(TabPanel2, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx41(
|
|
6480
6511
|
LatestReports,
|
|
6481
6512
|
{
|
|
6482
6513
|
mode,
|
|
@@ -6484,9 +6515,9 @@ function Dashboard() {
|
|
|
6484
6515
|
source
|
|
6485
6516
|
}
|
|
6486
6517
|
) }),
|
|
6487
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
6488
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
6489
|
-
isDetail && reportId && /* @__PURE__ */
|
|
6518
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx41(TabPanel2, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx41(ScoreTimeline_default, { mode, source }) }),
|
|
6519
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx41(TabPanel2, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx41(ComparisonView, {}) }),
|
|
6520
|
+
isDetail && reportId && /* @__PURE__ */ jsx41(
|
|
6490
6521
|
ReportDetail,
|
|
6491
6522
|
{
|
|
6492
6523
|
activeTab: routerState.tab ?? null,
|