@sanity/ailf-studio 0.1.4 → 0.1.6
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/README.md +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +419 -374
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2333,13 +2333,13 @@ import { route } from "sanity/router";
|
|
|
2333
2333
|
// src/components/Dashboard.tsx
|
|
2334
2334
|
import {
|
|
2335
2335
|
Container,
|
|
2336
|
-
Flex as
|
|
2336
|
+
Flex as Flex25,
|
|
2337
2337
|
Select as Select3,
|
|
2338
2338
|
Stack as Stack24,
|
|
2339
2339
|
Tab,
|
|
2340
2340
|
TabList,
|
|
2341
2341
|
TabPanel,
|
|
2342
|
-
Text as
|
|
2342
|
+
Text as Text33
|
|
2343
2343
|
} from "@sanity/ui";
|
|
2344
2344
|
import { useCallback as useCallback14, useEffect as useEffect9, useState as useState10 } from "react";
|
|
2345
2345
|
import { useClient as useClient8 } from "sanity";
|
|
@@ -3064,16 +3064,16 @@ function formatOption(r) {
|
|
|
3064
3064
|
// src/components/LatestReports.tsx
|
|
3065
3065
|
import { SortIcon } from "@sanity/icons";
|
|
3066
3066
|
import {
|
|
3067
|
-
Badge as
|
|
3067
|
+
Badge as Badge13,
|
|
3068
3068
|
Box as Box8,
|
|
3069
3069
|
Button,
|
|
3070
3070
|
Card as Card12,
|
|
3071
|
-
Flex as
|
|
3071
|
+
Flex as Flex17,
|
|
3072
3072
|
Menu,
|
|
3073
3073
|
MenuButton,
|
|
3074
3074
|
MenuItem,
|
|
3075
3075
|
Stack as Stack13,
|
|
3076
|
-
Text as
|
|
3076
|
+
Text as Text21
|
|
3077
3077
|
} from "@sanity/ui";
|
|
3078
3078
|
import { useCallback as useCallback11, useEffect as useEffect6, useMemo as useMemo5, useState as useState6 } from "react";
|
|
3079
3079
|
import { useClient as useClient5 } from "sanity";
|
|
@@ -3284,7 +3284,7 @@ function PerspectiveFilter({ value, onChange }) {
|
|
|
3284
3284
|
}
|
|
3285
3285
|
|
|
3286
3286
|
// src/components/report-card/ReportCard.tsx
|
|
3287
|
-
import { Badge as
|
|
3287
|
+
import { Badge as Badge10, Card as Card9, Flex as Flex13, Text as Text17 } from "@sanity/ui";
|
|
3288
3288
|
import { useCallback as useCallback7 } from "react";
|
|
3289
3289
|
|
|
3290
3290
|
// src/components/primitives/DeltaIndicator.tsx
|
|
@@ -3303,19 +3303,55 @@ function DeltaIndicator({ delta, size = 1 }) {
|
|
|
3303
3303
|
);
|
|
3304
3304
|
}
|
|
3305
3305
|
|
|
3306
|
+
// src/components/report-card/GitOrigin.tsx
|
|
3307
|
+
import { Badge as Badge6, Flex as Flex10, Text as Text15 } from "@sanity/ui";
|
|
3308
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3309
|
+
function GitOrigin({ git }) {
|
|
3310
|
+
const prUrl = git.prNumber ? `https://github.com/${git.repo}/pull/${git.prNumber}` : null;
|
|
3311
|
+
return /* @__PURE__ */ jsxs13(Flex10, { align: "center", gap: 2, children: [
|
|
3312
|
+
/* @__PURE__ */ jsx16(
|
|
3313
|
+
Text15,
|
|
3314
|
+
{
|
|
3315
|
+
muted: true,
|
|
3316
|
+
size: 0,
|
|
3317
|
+
style: { fontFamily: "monospace", whiteSpace: "nowrap" },
|
|
3318
|
+
title: `${git.repo} @ ${git.sha.slice(0, 7)} (${git.branch})`,
|
|
3319
|
+
children: git.repo
|
|
3320
|
+
}
|
|
3321
|
+
),
|
|
3322
|
+
prUrl && /* @__PURE__ */ jsx16(
|
|
3323
|
+
"a",
|
|
3324
|
+
{
|
|
3325
|
+
href: prUrl,
|
|
3326
|
+
onClick: stopPropagation,
|
|
3327
|
+
rel: "noopener noreferrer",
|
|
3328
|
+
style: { textDecoration: "none" },
|
|
3329
|
+
target: "_blank",
|
|
3330
|
+
children: /* @__PURE__ */ jsxs13(Badge6, { fontSize: 0, mode: "outline", tone: "primary", children: [
|
|
3331
|
+
"#",
|
|
3332
|
+
git.prNumber
|
|
3333
|
+
] })
|
|
3334
|
+
}
|
|
3335
|
+
)
|
|
3336
|
+
] });
|
|
3337
|
+
}
|
|
3338
|
+
function stopPropagation(e) {
|
|
3339
|
+
e.stopPropagation();
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3306
3342
|
// src/components/report-card/ReportMeta.tsx
|
|
3307
|
-
import { Stack as Stack11, Text as
|
|
3343
|
+
import { Stack as Stack11, Text as Text16 } from "@sanity/ui";
|
|
3308
3344
|
|
|
3309
3345
|
// src/components/report-card/AreaTags.tsx
|
|
3310
|
-
import { Badge as
|
|
3311
|
-
import { jsx as
|
|
3346
|
+
import { Badge as Badge7, Flex as Flex11 } from "@sanity/ui";
|
|
3347
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3312
3348
|
function AreaTags({ areas, targetDocuments }) {
|
|
3313
3349
|
const hasAreas = areas && areas.length > 0;
|
|
3314
3350
|
const hasDocs = targetDocuments && targetDocuments.length > 0;
|
|
3315
3351
|
if (!hasAreas && !hasDocs) return null;
|
|
3316
|
-
return /* @__PURE__ */
|
|
3317
|
-
hasAreas && areas.map((area) => /* @__PURE__ */
|
|
3318
|
-
|
|
3352
|
+
return /* @__PURE__ */ jsxs14(Flex11, { gap: 1, paddingTop: 1, wrap: "wrap", children: [
|
|
3353
|
+
hasAreas && areas.map((area) => /* @__PURE__ */ jsx17(
|
|
3354
|
+
Badge7,
|
|
3319
3355
|
{
|
|
3320
3356
|
fontSize: 0,
|
|
3321
3357
|
mode: "outline",
|
|
@@ -3324,7 +3360,7 @@ function AreaTags({ areas, targetDocuments }) {
|
|
|
3324
3360
|
},
|
|
3325
3361
|
`area-${area}`
|
|
3326
3362
|
)),
|
|
3327
|
-
hasDocs && targetDocuments.map((doc) => /* @__PURE__ */
|
|
3363
|
+
hasDocs && targetDocuments.map((doc) => /* @__PURE__ */ jsx17(Badge7, { fontSize: 0, mode: "outline", tone: "primary", children: doc }, `doc-${doc}`))
|
|
3328
3364
|
] });
|
|
3329
3365
|
}
|
|
3330
3366
|
|
|
@@ -3368,7 +3404,7 @@ function formatCardDate(iso) {
|
|
|
3368
3404
|
}
|
|
3369
3405
|
|
|
3370
3406
|
// src/components/report-card/ReportMeta.tsx
|
|
3371
|
-
import { jsx as
|
|
3407
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3372
3408
|
function ReportMeta({ data }) {
|
|
3373
3409
|
const segments = [data.mode, data.source];
|
|
3374
3410
|
if (data.models && data.models.length > 0) {
|
|
@@ -3380,15 +3416,15 @@ function ReportMeta({ data }) {
|
|
|
3380
3416
|
if (data.durationMs && data.durationMs > 0) {
|
|
3381
3417
|
segments.push(formatDuration(data.durationMs));
|
|
3382
3418
|
}
|
|
3383
|
-
return /* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3419
|
+
return /* @__PURE__ */ jsxs15(Stack11, { flex: 1, space: 1, children: [
|
|
3420
|
+
/* @__PURE__ */ jsx18(Text16, { weight: "semibold", children: data.tag ?? formatCardDate(data.completedAt) }),
|
|
3421
|
+
/* @__PURE__ */ jsx18(Text16, { muted: true, size: 1, children: segments.join(" \xB7 ") }),
|
|
3422
|
+
/* @__PURE__ */ jsx18(AreaTags, { areas: data.areas, targetDocuments: data.targetDocuments })
|
|
3387
3423
|
] });
|
|
3388
3424
|
}
|
|
3389
3425
|
|
|
3390
3426
|
// src/components/primitives/ScoreBadge.tsx
|
|
3391
|
-
import { Badge as
|
|
3427
|
+
import { Badge as Badge8 } from "@sanity/ui";
|
|
3392
3428
|
|
|
3393
3429
|
// src/lib/scoring.ts
|
|
3394
3430
|
var TONE_MAP = {
|
|
@@ -3420,11 +3456,11 @@ function rowBackground(index) {
|
|
|
3420
3456
|
}
|
|
3421
3457
|
|
|
3422
3458
|
// src/components/primitives/ScoreBadge.tsx
|
|
3423
|
-
import { jsx as
|
|
3459
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
3424
3460
|
function ScoreBadge({ score, fontSize = 1 }) {
|
|
3425
3461
|
const rounded = Math.round(score);
|
|
3426
|
-
return /* @__PURE__ */
|
|
3427
|
-
|
|
3462
|
+
return /* @__PURE__ */ jsx19(
|
|
3463
|
+
Badge8,
|
|
3428
3464
|
{
|
|
3429
3465
|
fontSize,
|
|
3430
3466
|
style: { minWidth: 48, textAlign: "center" },
|
|
@@ -3435,18 +3471,18 @@ function ScoreBadge({ score, fontSize = 1 }) {
|
|
|
3435
3471
|
}
|
|
3436
3472
|
|
|
3437
3473
|
// src/components/primitives/StatusBadges.tsx
|
|
3438
|
-
import { Badge as
|
|
3439
|
-
import { jsxs as
|
|
3474
|
+
import { Badge as Badge9, Flex as Flex12 } from "@sanity/ui";
|
|
3475
|
+
import { jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3440
3476
|
function StatusBadges({ regressed, improved }) {
|
|
3441
3477
|
const hasRegressed = regressed && regressed.length > 0;
|
|
3442
3478
|
const hasImproved = improved && improved.length > 0;
|
|
3443
3479
|
if (!hasRegressed && !hasImproved) return null;
|
|
3444
|
-
return /* @__PURE__ */
|
|
3445
|
-
hasRegressed && /* @__PURE__ */
|
|
3480
|
+
return /* @__PURE__ */ jsxs16(Flex12, { gap: 1, children: [
|
|
3481
|
+
hasRegressed && /* @__PURE__ */ jsxs16(Badge9, { fontSize: 0, tone: "critical", children: [
|
|
3446
3482
|
regressed.length,
|
|
3447
3483
|
" regressed"
|
|
3448
3484
|
] }),
|
|
3449
|
-
hasImproved && /* @__PURE__ */
|
|
3485
|
+
hasImproved && /* @__PURE__ */ jsxs16(Badge9, { fontSize: 0, tone: "positive", children: [
|
|
3450
3486
|
improved.length,
|
|
3451
3487
|
" improved"
|
|
3452
3488
|
] })
|
|
@@ -3454,12 +3490,12 @@ function StatusBadges({ regressed, improved }) {
|
|
|
3454
3490
|
}
|
|
3455
3491
|
|
|
3456
3492
|
// src/components/report-card/ReportCard.tsx
|
|
3457
|
-
import { jsx as
|
|
3493
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3458
3494
|
function ReportCard({ data, onSelectReport }) {
|
|
3459
3495
|
const handleClick = useCallback7(() => {
|
|
3460
3496
|
onSelectReport(data.reportId);
|
|
3461
3497
|
}, [data.reportId, onSelectReport]);
|
|
3462
|
-
return /* @__PURE__ */
|
|
3498
|
+
return /* @__PURE__ */ jsx20(
|
|
3463
3499
|
Card9,
|
|
3464
3500
|
{
|
|
3465
3501
|
onClick: handleClick,
|
|
@@ -3467,13 +3503,26 @@ function ReportCard({ data, onSelectReport }) {
|
|
|
3467
3503
|
radius: 2,
|
|
3468
3504
|
shadow: 1,
|
|
3469
3505
|
style: { cursor: "pointer" },
|
|
3470
|
-
children: /* @__PURE__ */
|
|
3471
|
-
/* @__PURE__ */
|
|
3472
|
-
/* @__PURE__ */
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3506
|
+
children: /* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 3, children: [
|
|
3507
|
+
/* @__PURE__ */ jsx20(ScoreBadge, { score: data.overall }),
|
|
3508
|
+
/* @__PURE__ */ jsx20(ReportMeta, { data }),
|
|
3509
|
+
/* @__PURE__ */ jsxs17(Flex13, { align: "flex-end", direction: "column", gap: 2, shrink: 0, children: [
|
|
3510
|
+
/* @__PURE__ */ jsxs17(Flex13, { align: "center", gap: 2, children: [
|
|
3511
|
+
data.comparisonDelta != null && /* @__PURE__ */ jsx20(DeltaIndicator, { delta: data.comparisonDelta }),
|
|
3512
|
+
/* @__PURE__ */ jsx20(StatusBadges, { improved: data.improved, regressed: data.regressed }),
|
|
3513
|
+
/* @__PURE__ */ jsx20(
|
|
3514
|
+
Text17,
|
|
3515
|
+
{
|
|
3516
|
+
muted: true,
|
|
3517
|
+
size: 0,
|
|
3518
|
+
title: new Date(data.completedAt).toISOString(),
|
|
3519
|
+
children: formatRelativeTime(data.completedAt)
|
|
3520
|
+
}
|
|
3521
|
+
),
|
|
3522
|
+
data.trigger && /* @__PURE__ */ jsx20(Badge10, { fontSize: 0, tone: "default", children: data.trigger })
|
|
3523
|
+
] }),
|
|
3524
|
+
data.git && /* @__PURE__ */ jsx20(GitOrigin, { git: data.git })
|
|
3525
|
+
] })
|
|
3477
3526
|
] })
|
|
3478
3527
|
}
|
|
3479
3528
|
);
|
|
@@ -3481,7 +3530,7 @@ function ReportCard({ data, onSelectReport }) {
|
|
|
3481
3530
|
|
|
3482
3531
|
// src/components/search-bar/SearchBar.tsx
|
|
3483
3532
|
import { SearchIcon as SearchIcon4 } from "@sanity/icons";
|
|
3484
|
-
import { Card as Card11, Flex as
|
|
3533
|
+
import { Card as Card11, Flex as Flex16, Text as Text20 } from "@sanity/ui";
|
|
3485
3534
|
import {
|
|
3486
3535
|
useCallback as useCallback10,
|
|
3487
3536
|
useEffect as useEffect5,
|
|
@@ -3626,9 +3675,9 @@ function filterAndExclude(values, query, dim, activeTokens) {
|
|
|
3626
3675
|
|
|
3627
3676
|
// src/components/search-bar/FilterBadge.tsx
|
|
3628
3677
|
import { CloseIcon } from "@sanity/icons";
|
|
3629
|
-
import { Badge as
|
|
3678
|
+
import { Badge as Badge11, Flex as Flex14, Text as Text18 } from "@sanity/ui";
|
|
3630
3679
|
import { useCallback as useCallback8 } from "react";
|
|
3631
|
-
import { jsx as
|
|
3680
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3632
3681
|
function FilterBadge({ token, onRemove }) {
|
|
3633
3682
|
const dim = DIMENSIONS.find((d) => d.key === token.dimension);
|
|
3634
3683
|
const tone = dim?.tone ?? "default";
|
|
@@ -3639,8 +3688,8 @@ function FilterBadge({ token, onRemove }) {
|
|
|
3639
3688
|
},
|
|
3640
3689
|
[onRemove, token.id]
|
|
3641
3690
|
);
|
|
3642
|
-
return /* @__PURE__ */
|
|
3643
|
-
|
|
3691
|
+
return /* @__PURE__ */ jsx21(
|
|
3692
|
+
Badge11,
|
|
3644
3693
|
{
|
|
3645
3694
|
fontSize: 0,
|
|
3646
3695
|
style: {
|
|
@@ -3649,20 +3698,20 @@ function FilterBadge({ token, onRemove }) {
|
|
|
3649
3698
|
userSelect: "none"
|
|
3650
3699
|
},
|
|
3651
3700
|
tone,
|
|
3652
|
-
children: /* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3701
|
+
children: /* @__PURE__ */ jsxs18(Flex14, { align: "center", gap: 1, children: [
|
|
3702
|
+
/* @__PURE__ */ jsxs18(Text18, { size: 0, children: [
|
|
3654
3703
|
token.dimension,
|
|
3655
3704
|
":",
|
|
3656
3705
|
token.label
|
|
3657
3706
|
] }),
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
|
|
3707
|
+
/* @__PURE__ */ jsx21(
|
|
3708
|
+
Text18,
|
|
3660
3709
|
{
|
|
3661
3710
|
muted: true,
|
|
3662
3711
|
onClick: handleRemove,
|
|
3663
3712
|
size: 0,
|
|
3664
3713
|
style: { cursor: "pointer", lineHeight: 1 },
|
|
3665
|
-
children: /* @__PURE__ */
|
|
3714
|
+
children: /* @__PURE__ */ jsx21(CloseIcon, {})
|
|
3666
3715
|
}
|
|
3667
3716
|
)
|
|
3668
3717
|
] })
|
|
@@ -3671,9 +3720,9 @@ function FilterBadge({ token, onRemove }) {
|
|
|
3671
3720
|
}
|
|
3672
3721
|
|
|
3673
3722
|
// src/components/search-bar/SuggestionList.tsx
|
|
3674
|
-
import { Badge as
|
|
3723
|
+
import { Badge as Badge12, Card as Card10, Flex as Flex15, Stack as Stack12, Text as Text19 } from "@sanity/ui";
|
|
3675
3724
|
import { useCallback as useCallback9 } from "react";
|
|
3676
|
-
import { jsx as
|
|
3725
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3677
3726
|
function SuggestionList({
|
|
3678
3727
|
suggestions,
|
|
3679
3728
|
activeIndex,
|
|
@@ -3682,7 +3731,7 @@ function SuggestionList({
|
|
|
3682
3731
|
if (suggestions.length === 0) return null;
|
|
3683
3732
|
const groups = groupByCategory(suggestions);
|
|
3684
3733
|
let globalIndex = -1;
|
|
3685
|
-
return /* @__PURE__ */
|
|
3734
|
+
return /* @__PURE__ */ jsx22(
|
|
3686
3735
|
Card10,
|
|
3687
3736
|
{
|
|
3688
3737
|
overflow: "auto",
|
|
@@ -3696,9 +3745,9 @@ function SuggestionList({
|
|
|
3696
3745
|
top: "100%",
|
|
3697
3746
|
zIndex: 100
|
|
3698
3747
|
},
|
|
3699
|
-
children: /* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
|
|
3748
|
+
children: /* @__PURE__ */ jsx22(Stack12, { padding: 1, space: 1, children: groups.map(([category, items]) => /* @__PURE__ */ jsxs19(Stack12, { space: 0, children: [
|
|
3749
|
+
/* @__PURE__ */ jsx22(
|
|
3750
|
+
Text19,
|
|
3702
3751
|
{
|
|
3703
3752
|
muted: true,
|
|
3704
3753
|
size: 0,
|
|
@@ -3714,7 +3763,7 @@ function SuggestionList({
|
|
|
3714
3763
|
items.map((suggestion) => {
|
|
3715
3764
|
globalIndex++;
|
|
3716
3765
|
const isActive = globalIndex === activeIndex;
|
|
3717
|
-
return /* @__PURE__ */
|
|
3766
|
+
return /* @__PURE__ */ jsx22(
|
|
3718
3767
|
SuggestionItem,
|
|
3719
3768
|
{
|
|
3720
3769
|
active: isActive,
|
|
@@ -3739,7 +3788,7 @@ function SuggestionItem({
|
|
|
3739
3788
|
const handleClick = useCallback9(() => {
|
|
3740
3789
|
onSelect(suggestion);
|
|
3741
3790
|
}, [onSelect, suggestion]);
|
|
3742
|
-
return /* @__PURE__ */
|
|
3791
|
+
return /* @__PURE__ */ jsx22(
|
|
3743
3792
|
Card10,
|
|
3744
3793
|
{
|
|
3745
3794
|
onClick: handleClick,
|
|
@@ -3747,9 +3796,9 @@ function SuggestionItem({
|
|
|
3747
3796
|
radius: 2,
|
|
3748
3797
|
style: { cursor: "pointer" },
|
|
3749
3798
|
tone: active ? "primary" : "default",
|
|
3750
|
-
children: /* @__PURE__ */
|
|
3751
|
-
!isHint && /* @__PURE__ */
|
|
3752
|
-
/* @__PURE__ */
|
|
3799
|
+
children: /* @__PURE__ */ jsxs19(Flex15, { align: "center", gap: 2, children: [
|
|
3800
|
+
!isHint && /* @__PURE__ */ jsx22(Badge12, { fontSize: 0, tone, children: suggestion.dimension }),
|
|
3801
|
+
/* @__PURE__ */ jsx22(Text19, { size: 1, children: suggestion.label })
|
|
3753
3802
|
] })
|
|
3754
3803
|
}
|
|
3755
3804
|
);
|
|
@@ -3764,7 +3813,7 @@ function groupByCategory(suggestions) {
|
|
|
3764
3813
|
}
|
|
3765
3814
|
|
|
3766
3815
|
// src/components/search-bar/SearchBar.tsx
|
|
3767
|
-
import { jsx as
|
|
3816
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3768
3817
|
function SearchBar({
|
|
3769
3818
|
tokens,
|
|
3770
3819
|
query,
|
|
@@ -3868,8 +3917,8 @@ function SearchBar({
|
|
|
3868
3917
|
const handleBarClick = useCallback10(() => {
|
|
3869
3918
|
inputRef.current?.focus();
|
|
3870
3919
|
}, []);
|
|
3871
|
-
return /* @__PURE__ */
|
|
3872
|
-
/* @__PURE__ */
|
|
3920
|
+
return /* @__PURE__ */ jsxs20("div", { style: { position: "relative" }, children: [
|
|
3921
|
+
/* @__PURE__ */ jsx23(
|
|
3873
3922
|
Card11,
|
|
3874
3923
|
{
|
|
3875
3924
|
border: true,
|
|
@@ -3877,9 +3926,9 @@ function SearchBar({
|
|
|
3877
3926
|
padding: 2,
|
|
3878
3927
|
radius: 2,
|
|
3879
3928
|
style: { cursor: "text" },
|
|
3880
|
-
children: /* @__PURE__ */
|
|
3881
|
-
/* @__PURE__ */
|
|
3882
|
-
tokens.map((token) => /* @__PURE__ */
|
|
3929
|
+
children: /* @__PURE__ */ jsxs20(Flex16, { align: "center", gap: 1, wrap: "wrap", children: [
|
|
3930
|
+
/* @__PURE__ */ jsx23(Text20, { muted: true, size: 1, style: { flexShrink: 0, padding: "0 4px" }, children: /* @__PURE__ */ jsx23(SearchIcon4, {}) }),
|
|
3931
|
+
tokens.map((token) => /* @__PURE__ */ jsx23(
|
|
3883
3932
|
FilterBadge,
|
|
3884
3933
|
{
|
|
3885
3934
|
onRemove: handleTokenRemove,
|
|
@@ -3887,7 +3936,7 @@ function SearchBar({
|
|
|
3887
3936
|
},
|
|
3888
3937
|
token.id
|
|
3889
3938
|
)),
|
|
3890
|
-
/* @__PURE__ */
|
|
3939
|
+
/* @__PURE__ */ jsx23(
|
|
3891
3940
|
"input",
|
|
3892
3941
|
{
|
|
3893
3942
|
onBlur: handleBlur,
|
|
@@ -3914,7 +3963,7 @@ function SearchBar({
|
|
|
3914
3963
|
] })
|
|
3915
3964
|
}
|
|
3916
3965
|
),
|
|
3917
|
-
focused && suggestions.length > 0 && /* @__PURE__ */
|
|
3966
|
+
focused && suggestions.length > 0 && /* @__PURE__ */ jsx23(
|
|
3918
3967
|
SuggestionList,
|
|
3919
3968
|
{
|
|
3920
3969
|
activeIndex,
|
|
@@ -3926,7 +3975,7 @@ function SearchBar({
|
|
|
3926
3975
|
}
|
|
3927
3976
|
|
|
3928
3977
|
// src/components/LatestReports.tsx
|
|
3929
|
-
import { jsx as
|
|
3978
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3930
3979
|
var SORT_LABELS = {
|
|
3931
3980
|
date: "Date",
|
|
3932
3981
|
name: "Name",
|
|
@@ -4104,16 +4153,16 @@ function LatestReports({
|
|
|
4104
4153
|
setPerspective("");
|
|
4105
4154
|
}, []);
|
|
4106
4155
|
if (initialLoading) {
|
|
4107
|
-
return /* @__PURE__ */
|
|
4156
|
+
return /* @__PURE__ */ jsx24(Card12, { padding: 4, children: /* @__PURE__ */ jsx24(Text21, { muted: true, children: "Loading reports\u2026" }) });
|
|
4108
4157
|
}
|
|
4109
4158
|
if (reports.length === 0) {
|
|
4110
|
-
return /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ jsx24(Card12, { padding: 4, children: /* @__PURE__ */ jsx24(Text21, { muted: true, children: "No reports found. Run the pipeline with --publish to create reports." }) });
|
|
4111
4160
|
}
|
|
4112
|
-
return /* @__PURE__ */
|
|
4113
|
-
/* @__PURE__ */
|
|
4114
|
-
/* @__PURE__ */
|
|
4115
|
-
/* @__PURE__ */
|
|
4116
|
-
/* @__PURE__ */
|
|
4161
|
+
return /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4162
|
+
/* @__PURE__ */ jsx24(Card12, { padding: 3, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4163
|
+
/* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4164
|
+
/* @__PURE__ */ jsx24(Text21, { muted: true, size: 0, children: "Search & filter" }),
|
|
4165
|
+
/* @__PURE__ */ jsx24(
|
|
4117
4166
|
SearchBar,
|
|
4118
4167
|
{
|
|
4119
4168
|
areas: availableAreas,
|
|
@@ -4126,10 +4175,10 @@ function LatestReports({
|
|
|
4126
4175
|
}
|
|
4127
4176
|
)
|
|
4128
4177
|
] }),
|
|
4129
|
-
/* @__PURE__ */
|
|
4130
|
-
/* @__PURE__ */
|
|
4131
|
-
/* @__PURE__ */
|
|
4132
|
-
/* @__PURE__ */
|
|
4178
|
+
/* @__PURE__ */ jsxs21(Flex17, { gap: 2, children: [
|
|
4179
|
+
/* @__PURE__ */ jsx24(Box8, { flex: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4180
|
+
/* @__PURE__ */ jsx24(Text21, { muted: true, size: 0, children: "Document" }),
|
|
4181
|
+
/* @__PURE__ */ jsx24(
|
|
4133
4182
|
DocumentFilter,
|
|
4134
4183
|
{
|
|
4135
4184
|
onChange: setDocumentSlug,
|
|
@@ -4138,9 +4187,9 @@ function LatestReports({
|
|
|
4138
4187
|
}
|
|
4139
4188
|
)
|
|
4140
4189
|
] }) }),
|
|
4141
|
-
/* @__PURE__ */
|
|
4142
|
-
/* @__PURE__ */
|
|
4143
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ jsx24(Box8, { flex: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 1, children: [
|
|
4191
|
+
/* @__PURE__ */ jsx24(Text21, { muted: true, size: 0, children: "Content release" }),
|
|
4192
|
+
/* @__PURE__ */ jsx24(
|
|
4144
4193
|
PerspectiveFilter,
|
|
4145
4194
|
{
|
|
4146
4195
|
onChange: setPerspective,
|
|
@@ -4149,20 +4198,20 @@ function LatestReports({
|
|
|
4149
4198
|
)
|
|
4150
4199
|
] }) })
|
|
4151
4200
|
] }),
|
|
4152
|
-
(documentSlug.trim() || perspective.trim()) && /* @__PURE__ */
|
|
4153
|
-
documentSlug.trim() && /* @__PURE__ */
|
|
4201
|
+
(documentSlug.trim() || perspective.trim()) && /* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 1, children: [
|
|
4202
|
+
documentSlug.trim() && /* @__PURE__ */ jsxs21(Badge13, { fontSize: 0, tone: "primary", children: [
|
|
4154
4203
|
"Document: ",
|
|
4155
4204
|
documentSlug.trim()
|
|
4156
4205
|
] }),
|
|
4157
|
-
perspective.trim() && /* @__PURE__ */
|
|
4206
|
+
perspective.trim() && /* @__PURE__ */ jsxs21(Badge13, { fontSize: 0, tone: "primary", children: [
|
|
4158
4207
|
"Perspective: ",
|
|
4159
4208
|
perspective.trim()
|
|
4160
4209
|
] })
|
|
4161
4210
|
] })
|
|
4162
4211
|
] }) }),
|
|
4163
|
-
/* @__PURE__ */
|
|
4164
|
-
/* @__PURE__ */
|
|
4165
|
-
hasActiveFilters && /* @__PURE__ */
|
|
4212
|
+
/* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 2, paddingX: 1, wrap: "wrap", children: [
|
|
4213
|
+
/* @__PURE__ */ jsx24(Text21, { muted: true, size: 1, children: filteredReports.length === reports.length ? `${reports.length} reports` : `${filteredReports.length} of ${reports.length} reports` }),
|
|
4214
|
+
hasActiveFilters && /* @__PURE__ */ jsx24(
|
|
4166
4215
|
Button,
|
|
4167
4216
|
{
|
|
4168
4217
|
fontSize: 0,
|
|
@@ -4172,11 +4221,11 @@ function LatestReports({
|
|
|
4172
4221
|
tone: "critical"
|
|
4173
4222
|
}
|
|
4174
4223
|
),
|
|
4175
|
-
/* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4224
|
+
/* @__PURE__ */ jsxs21(Flex17, { align: "center", gap: 1, style: { marginLeft: "auto" }, children: [
|
|
4225
|
+
/* @__PURE__ */ jsx24(
|
|
4177
4226
|
MenuButton,
|
|
4178
4227
|
{
|
|
4179
|
-
button: /* @__PURE__ */
|
|
4228
|
+
button: /* @__PURE__ */ jsx24(
|
|
4180
4229
|
Button,
|
|
4181
4230
|
{
|
|
4182
4231
|
fontSize: 1,
|
|
@@ -4186,8 +4235,8 @@ function LatestReports({
|
|
|
4186
4235
|
}
|
|
4187
4236
|
),
|
|
4188
4237
|
id: "sort-menu",
|
|
4189
|
-
menu: /* @__PURE__ */
|
|
4190
|
-
/* @__PURE__ */
|
|
4238
|
+
menu: /* @__PURE__ */ jsxs21(Menu, { children: [
|
|
4239
|
+
/* @__PURE__ */ jsx24(
|
|
4191
4240
|
MenuItem,
|
|
4192
4241
|
{
|
|
4193
4242
|
onClick: () => handleSortFieldChange("date"),
|
|
@@ -4195,7 +4244,7 @@ function LatestReports({
|
|
|
4195
4244
|
text: "Date"
|
|
4196
4245
|
}
|
|
4197
4246
|
),
|
|
4198
|
-
/* @__PURE__ */
|
|
4247
|
+
/* @__PURE__ */ jsx24(
|
|
4199
4248
|
MenuItem,
|
|
4200
4249
|
{
|
|
4201
4250
|
onClick: () => handleSortFieldChange("score"),
|
|
@@ -4203,7 +4252,7 @@ function LatestReports({
|
|
|
4203
4252
|
text: "Score"
|
|
4204
4253
|
}
|
|
4205
4254
|
),
|
|
4206
|
-
/* @__PURE__ */
|
|
4255
|
+
/* @__PURE__ */ jsx24(
|
|
4207
4256
|
MenuItem,
|
|
4208
4257
|
{
|
|
4209
4258
|
onClick: () => handleSortFieldChange("name"),
|
|
@@ -4215,7 +4264,7 @@ function LatestReports({
|
|
|
4215
4264
|
popover: { portal: true }
|
|
4216
4265
|
}
|
|
4217
4266
|
),
|
|
4218
|
-
/* @__PURE__ */
|
|
4267
|
+
/* @__PURE__ */ jsx24(
|
|
4219
4268
|
Button,
|
|
4220
4269
|
{
|
|
4221
4270
|
fontSize: 1,
|
|
@@ -4227,9 +4276,9 @@ function LatestReports({
|
|
|
4227
4276
|
)
|
|
4228
4277
|
] })
|
|
4229
4278
|
] }),
|
|
4230
|
-
filteredReports.length === 0 ? /* @__PURE__ */
|
|
4231
|
-
/* @__PURE__ */
|
|
4232
|
-
/* @__PURE__ */
|
|
4279
|
+
filteredReports.length === 0 ? /* @__PURE__ */ jsx24(Card12, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs21(Stack13, { space: 3, children: [
|
|
4280
|
+
/* @__PURE__ */ jsx24(Text21, { align: "center", muted: true, size: 2, children: "No reports match the current filters." }),
|
|
4281
|
+
/* @__PURE__ */ jsx24(Flex17, { justify: "center", children: /* @__PURE__ */ jsx24(
|
|
4233
4282
|
Button,
|
|
4234
4283
|
{
|
|
4235
4284
|
fontSize: 1,
|
|
@@ -4238,7 +4287,7 @@ function LatestReports({
|
|
|
4238
4287
|
text: "Clear all filters"
|
|
4239
4288
|
}
|
|
4240
4289
|
) })
|
|
4241
|
-
] }) }) : /* @__PURE__ */
|
|
4290
|
+
] }) }) : /* @__PURE__ */ jsx24(Stack13, { space: 2, children: filteredReports.map((report) => /* @__PURE__ */ jsx24(
|
|
4242
4291
|
ReportCard,
|
|
4243
4292
|
{
|
|
4244
4293
|
data: fromReportListItem(report),
|
|
@@ -4246,7 +4295,7 @@ function LatestReports({
|
|
|
4246
4295
|
},
|
|
4247
4296
|
report._id
|
|
4248
4297
|
)) }),
|
|
4249
|
-
hasMore && /* @__PURE__ */
|
|
4298
|
+
hasMore && /* @__PURE__ */ jsx24(Flex17, { justify: "center", paddingY: 3, children: /* @__PURE__ */ jsx24(
|
|
4250
4299
|
Button,
|
|
4251
4300
|
{
|
|
4252
4301
|
disabled: loadingMore,
|
|
@@ -4294,28 +4343,28 @@ function getDateThreshold(preset) {
|
|
|
4294
4343
|
|
|
4295
4344
|
// src/components/report-detail/ReportDetail.tsx
|
|
4296
4345
|
import { ArrowLeftIcon as ArrowLeftIcon2 } from "@sanity/icons";
|
|
4297
|
-
import { Box as Box14, Button as Button3, Stack as Stack22, Text as
|
|
4346
|
+
import { Box as Box14, Button as Button3, Stack as Stack22, Text as Text31, useToast } from "@sanity/ui";
|
|
4298
4347
|
import { useCallback as useCallback12, useEffect as useEffect7, useState as useState8 } from "react";
|
|
4299
4348
|
import { useClient as useClient6 } from "sanity";
|
|
4300
4349
|
|
|
4301
4350
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
4302
4351
|
import React from "react";
|
|
4303
|
-
import { Card as Card14, Stack as Stack14, Text as
|
|
4352
|
+
import { Card as Card14, Stack as Stack14, Text as Text23 } from "@sanity/ui";
|
|
4304
4353
|
|
|
4305
4354
|
// src/components/primitives/ScoreCell.tsx
|
|
4306
|
-
import { Card as Card13, Text as
|
|
4307
|
-
import { jsx as
|
|
4355
|
+
import { Card as Card13, Text as Text22 } from "@sanity/ui";
|
|
4356
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4308
4357
|
function ScoreCell({ score, size = 1 }) {
|
|
4309
4358
|
const rounded = Math.round(score);
|
|
4310
|
-
return /* @__PURE__ */
|
|
4359
|
+
return /* @__PURE__ */ jsx25(Card13, { padding: 1, radius: 2, tone: scoreTone(rounded), children: /* @__PURE__ */ jsx25(Text22, { align: "center", size, weight: "medium", children: rounded }) });
|
|
4311
4360
|
}
|
|
4312
4361
|
|
|
4313
4362
|
// src/components/report-detail/AreaScoreTable.tsx
|
|
4314
|
-
import { jsx as
|
|
4363
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4315
4364
|
function AreaScoreTable({ scores }) {
|
|
4316
|
-
return /* @__PURE__ */
|
|
4317
|
-
/* @__PURE__ */
|
|
4318
|
-
/* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ jsx26(Card14, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs22(Stack14, { space: 4, children: [
|
|
4366
|
+
/* @__PURE__ */ jsx26(Text23, { size: 2, weight: "semibold", children: "Per-Area Scores" }),
|
|
4367
|
+
/* @__PURE__ */ jsxs22(
|
|
4319
4368
|
"div",
|
|
4320
4369
|
{
|
|
4321
4370
|
style: {
|
|
@@ -4324,9 +4373,9 @@ function AreaScoreTable({ scores }) {
|
|
|
4324
4373
|
gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr 1fr"
|
|
4325
4374
|
},
|
|
4326
4375
|
children: [
|
|
4327
|
-
/* @__PURE__ */
|
|
4328
|
-
/* @__PURE__ */
|
|
4329
|
-
/* @__PURE__ */
|
|
4376
|
+
/* @__PURE__ */ jsx26(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
4377
|
+
/* @__PURE__ */ jsx26(ColumnHeader, { borderBottom: true, label: "Score", tooltip: GLOSSARY.score }),
|
|
4378
|
+
/* @__PURE__ */ jsx26(
|
|
4330
4379
|
ColumnHeader,
|
|
4331
4380
|
{
|
|
4332
4381
|
borderBottom: true,
|
|
@@ -4334,7 +4383,7 @@ function AreaScoreTable({ scores }) {
|
|
|
4334
4383
|
tooltip: GLOSSARY.taskCompletion
|
|
4335
4384
|
}
|
|
4336
4385
|
),
|
|
4337
|
-
/* @__PURE__ */
|
|
4386
|
+
/* @__PURE__ */ jsx26(
|
|
4338
4387
|
ColumnHeader,
|
|
4339
4388
|
{
|
|
4340
4389
|
borderBottom: true,
|
|
@@ -4342,7 +4391,7 @@ function AreaScoreTable({ scores }) {
|
|
|
4342
4391
|
tooltip: GLOSSARY.codeCorrectness
|
|
4343
4392
|
}
|
|
4344
4393
|
),
|
|
4345
|
-
/* @__PURE__ */
|
|
4394
|
+
/* @__PURE__ */ jsx26(
|
|
4346
4395
|
ColumnHeader,
|
|
4347
4396
|
{
|
|
4348
4397
|
borderBottom: true,
|
|
@@ -4350,10 +4399,10 @@ function AreaScoreTable({ scores }) {
|
|
|
4350
4399
|
tooltip: GLOSSARY.docCoverage
|
|
4351
4400
|
}
|
|
4352
4401
|
),
|
|
4353
|
-
/* @__PURE__ */
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
scores.map((score, i) => /* @__PURE__ */
|
|
4356
|
-
/* @__PURE__ */
|
|
4402
|
+
/* @__PURE__ */ jsx26(ColumnHeader, { borderBottom: true, label: "Lift", tooltip: GLOSSARY.docLift }),
|
|
4403
|
+
/* @__PURE__ */ jsx26(ColumnHeader, { borderBottom: true, label: "Tests", tooltip: GLOSSARY.tests }),
|
|
4404
|
+
scores.map((score, i) => /* @__PURE__ */ jsxs22(React.Fragment, { children: [
|
|
4405
|
+
/* @__PURE__ */ jsx26(
|
|
4357
4406
|
"div",
|
|
4358
4407
|
{
|
|
4359
4408
|
style: {
|
|
@@ -4361,14 +4410,14 @@ function AreaScoreTable({ scores }) {
|
|
|
4361
4410
|
borderRadius: 4,
|
|
4362
4411
|
padding: "8px 0 8px 4px"
|
|
4363
4412
|
},
|
|
4364
|
-
children: /* @__PURE__ */
|
|
4413
|
+
children: /* @__PURE__ */ jsx26(Text23, { size: 1, weight: "medium", children: score.feature })
|
|
4365
4414
|
}
|
|
4366
4415
|
),
|
|
4367
|
-
/* @__PURE__ */
|
|
4368
|
-
/* @__PURE__ */
|
|
4369
|
-
/* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4416
|
+
/* @__PURE__ */ jsx26("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx26(ScoreCell, { score: score.totalScore }) }),
|
|
4417
|
+
/* @__PURE__ */ jsx26("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx26(ScoreCell, { score: score.taskCompletion }) }),
|
|
4418
|
+
/* @__PURE__ */ jsx26("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx26(ScoreCell, { score: score.codeCorrectness }) }),
|
|
4419
|
+
/* @__PURE__ */ jsx26("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx26(ScoreCell, { score: score.docCoverage }) }),
|
|
4420
|
+
/* @__PURE__ */ jsx26(
|
|
4372
4421
|
"div",
|
|
4373
4422
|
{
|
|
4374
4423
|
style: {
|
|
@@ -4376,10 +4425,10 @@ function AreaScoreTable({ scores }) {
|
|
|
4376
4425
|
background: rowBackground(i),
|
|
4377
4426
|
display: "flex"
|
|
4378
4427
|
},
|
|
4379
|
-
children: /* @__PURE__ */
|
|
4428
|
+
children: /* @__PURE__ */ jsx26(Text23, { size: 1, children: formatDelta(score.docLift) })
|
|
4380
4429
|
}
|
|
4381
4430
|
),
|
|
4382
|
-
/* @__PURE__ */
|
|
4431
|
+
/* @__PURE__ */ jsx26(
|
|
4383
4432
|
"div",
|
|
4384
4433
|
{
|
|
4385
4434
|
style: {
|
|
@@ -4387,7 +4436,7 @@ function AreaScoreTable({ scores }) {
|
|
|
4387
4436
|
background: rowBackground(i),
|
|
4388
4437
|
display: "flex"
|
|
4389
4438
|
},
|
|
4390
|
-
children: /* @__PURE__ */
|
|
4439
|
+
children: /* @__PURE__ */ jsx26(Text23, { muted: true, size: 1, children: score.testCount })
|
|
4391
4440
|
}
|
|
4392
4441
|
)
|
|
4393
4442
|
] }, score.feature))
|
|
@@ -4398,13 +4447,13 @@ function AreaScoreTable({ scores }) {
|
|
|
4398
4447
|
}
|
|
4399
4448
|
|
|
4400
4449
|
// src/components/report-detail/ComparisonSummary.tsx
|
|
4401
|
-
import { Badge as
|
|
4402
|
-
import { jsx as
|
|
4450
|
+
import { Badge as Badge14, Box as Box9, Card as Card15, Flex as Flex18, Grid as Grid2, Stack as Stack15, Text as Text24, Tooltip as Tooltip3 } from "@sanity/ui";
|
|
4451
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4403
4452
|
function ComparisonSummary({ comparison }) {
|
|
4404
|
-
return /* @__PURE__ */
|
|
4405
|
-
/* @__PURE__ */
|
|
4406
|
-
/* @__PURE__ */
|
|
4407
|
-
/* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ jsx27(Card15, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs23(Stack15, { space: 4, children: [
|
|
4454
|
+
/* @__PURE__ */ jsxs23(Flex18, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4455
|
+
/* @__PURE__ */ jsx27(Text24, { size: 2, weight: "semibold", children: "Comparison" }),
|
|
4456
|
+
/* @__PURE__ */ jsx27(
|
|
4408
4457
|
DeltaCard,
|
|
4409
4458
|
{
|
|
4410
4459
|
delta: comparison.deltas.overall,
|
|
@@ -4412,7 +4461,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
4412
4461
|
tooltip: GLOSSARY.overallDelta
|
|
4413
4462
|
}
|
|
4414
4463
|
),
|
|
4415
|
-
comparison.deltas.actualDelta != null && /* @__PURE__ */
|
|
4464
|
+
comparison.deltas.actualDelta != null && /* @__PURE__ */ jsx27(
|
|
4416
4465
|
DeltaCard,
|
|
4417
4466
|
{
|
|
4418
4467
|
delta: comparison.deltas.actualDelta,
|
|
@@ -4420,7 +4469,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
4420
4469
|
tooltip: GLOSSARY.actualDelta
|
|
4421
4470
|
}
|
|
4422
4471
|
),
|
|
4423
|
-
comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */
|
|
4472
|
+
comparison.deltas.retrievalGapDelta != null && /* @__PURE__ */ jsx27(
|
|
4424
4473
|
DeltaCard,
|
|
4425
4474
|
{
|
|
4426
4475
|
delta: comparison.deltas.retrievalGapDelta,
|
|
@@ -4430,8 +4479,8 @@ function ComparisonSummary({ comparison }) {
|
|
|
4430
4479
|
}
|
|
4431
4480
|
)
|
|
4432
4481
|
] }),
|
|
4433
|
-
/* @__PURE__ */
|
|
4434
|
-
comparison.improved.length > 0 && /* @__PURE__ */
|
|
4482
|
+
/* @__PURE__ */ jsxs23(Grid2, { columns: [1, 1, 3], gap: 3, children: [
|
|
4483
|
+
comparison.improved.length > 0 && /* @__PURE__ */ jsx27(
|
|
4435
4484
|
AreaBadgeGroup,
|
|
4436
4485
|
{
|
|
4437
4486
|
areas: comparison.improved,
|
|
@@ -4439,7 +4488,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
4439
4488
|
tone: "positive"
|
|
4440
4489
|
}
|
|
4441
4490
|
),
|
|
4442
|
-
comparison.regressed.length > 0 && /* @__PURE__ */
|
|
4491
|
+
comparison.regressed.length > 0 && /* @__PURE__ */ jsx27(
|
|
4443
4492
|
AreaBadgeGroup,
|
|
4444
4493
|
{
|
|
4445
4494
|
areas: comparison.regressed,
|
|
@@ -4447,7 +4496,7 @@ function ComparisonSummary({ comparison }) {
|
|
|
4447
4496
|
tone: "critical"
|
|
4448
4497
|
}
|
|
4449
4498
|
),
|
|
4450
|
-
comparison.unchanged.length > 0 && /* @__PURE__ */
|
|
4499
|
+
comparison.unchanged.length > 0 && /* @__PURE__ */ jsx27(
|
|
4451
4500
|
AreaBadgeGroup,
|
|
4452
4501
|
{
|
|
4453
4502
|
areas: comparison.unchanged,
|
|
@@ -4466,19 +4515,19 @@ function DeltaCard({
|
|
|
4466
4515
|
}) {
|
|
4467
4516
|
const isPositive = invertedPolarity ? delta < 0 : delta > 0;
|
|
4468
4517
|
const isNegative = invertedPolarity ? delta > 0 : delta < 0;
|
|
4469
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsx27(
|
|
4470
4519
|
Tooltip3,
|
|
4471
4520
|
{
|
|
4472
|
-
content: /* @__PURE__ */
|
|
4521
|
+
content: /* @__PURE__ */ jsx27(Box9, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx27(Text24, { size: 1, children: tooltip }) }),
|
|
4473
4522
|
placement: "bottom",
|
|
4474
4523
|
portal: true,
|
|
4475
|
-
children: /* @__PURE__ */
|
|
4524
|
+
children: /* @__PURE__ */ jsx27(
|
|
4476
4525
|
Card15,
|
|
4477
4526
|
{
|
|
4478
4527
|
padding: 2,
|
|
4479
4528
|
radius: 2,
|
|
4480
4529
|
tone: isPositive ? "positive" : isNegative ? "critical" : "default",
|
|
4481
|
-
children: /* @__PURE__ */
|
|
4530
|
+
children: /* @__PURE__ */ jsxs23(Text24, { size: 1, weight: "bold", children: [
|
|
4482
4531
|
formatDelta(delta),
|
|
4483
4532
|
" ",
|
|
4484
4533
|
label
|
|
@@ -4493,9 +4542,9 @@ function AreaBadgeGroup({
|
|
|
4493
4542
|
label,
|
|
4494
4543
|
tone
|
|
4495
4544
|
}) {
|
|
4496
|
-
return /* @__PURE__ */
|
|
4497
|
-
/* @__PURE__ */
|
|
4498
|
-
|
|
4545
|
+
return /* @__PURE__ */ jsxs23(Stack15, { space: 2, children: [
|
|
4546
|
+
/* @__PURE__ */ jsx27(
|
|
4547
|
+
Text24,
|
|
4499
4548
|
{
|
|
4500
4549
|
muted: true,
|
|
4501
4550
|
size: 0,
|
|
@@ -4504,21 +4553,21 @@ function AreaBadgeGroup({
|
|
|
4504
4553
|
children: label
|
|
4505
4554
|
}
|
|
4506
4555
|
),
|
|
4507
|
-
/* @__PURE__ */
|
|
4556
|
+
/* @__PURE__ */ jsx27(Flex18, { gap: 1, wrap: "wrap", children: areas.map((a) => /* @__PURE__ */ jsx27(Badge14, { tone, children: a }, a)) })
|
|
4508
4557
|
] });
|
|
4509
4558
|
}
|
|
4510
4559
|
|
|
4511
4560
|
// src/components/report-detail/JudgmentList.tsx
|
|
4512
4561
|
import { useState as useState7 } from "react";
|
|
4513
4562
|
import { HelpCircleIcon as HelpCircleIcon4 } from "@sanity/icons";
|
|
4514
|
-
import { Badge as
|
|
4563
|
+
import { Badge as Badge15, Box as Box10, Card as Card16, Flex as Flex19, Stack as Stack16, Text as Text25, Tooltip as Tooltip4 } from "@sanity/ui";
|
|
4515
4564
|
|
|
4516
4565
|
// src/components/primitives/InlineCode.tsx
|
|
4517
|
-
import { Fragment as Fragment4, jsx as
|
|
4566
|
+
import { Fragment as Fragment4, jsx as jsx28 } from "react/jsx-runtime";
|
|
4518
4567
|
function InlineCode({ text }) {
|
|
4519
4568
|
const parts = text.split(/`([^`]+)`/);
|
|
4520
|
-
return /* @__PURE__ */
|
|
4521
|
-
(part, i) => i % 2 === 1 ? /* @__PURE__ */
|
|
4569
|
+
return /* @__PURE__ */ jsx28(Fragment4, { children: parts.map(
|
|
4570
|
+
(part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx28(
|
|
4522
4571
|
"code",
|
|
4523
4572
|
{
|
|
4524
4573
|
style: {
|
|
@@ -4530,12 +4579,12 @@ function InlineCode({ text }) {
|
|
|
4530
4579
|
children: part
|
|
4531
4580
|
},
|
|
4532
4581
|
i
|
|
4533
|
-
) : /* @__PURE__ */
|
|
4582
|
+
) : /* @__PURE__ */ jsx28("span", { children: part }, i)
|
|
4534
4583
|
) });
|
|
4535
4584
|
}
|
|
4536
4585
|
|
|
4537
4586
|
// src/components/report-detail/JudgmentList.tsx
|
|
4538
|
-
import { jsx as
|
|
4587
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4539
4588
|
function groupByArea(judgments) {
|
|
4540
4589
|
const byArea = /* @__PURE__ */ new Map();
|
|
4541
4590
|
for (const j of judgments) {
|
|
@@ -4550,36 +4599,36 @@ var DIMENSION_LABELS = DIMENSION_LABELS_KEBAB;
|
|
|
4550
4599
|
function JudgmentList({ judgments }) {
|
|
4551
4600
|
if (judgments.length === 0) return null;
|
|
4552
4601
|
const grouped = groupByArea(judgments);
|
|
4553
|
-
return /* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4602
|
+
return /* @__PURE__ */ jsx29(Card16, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs24(Stack16, { space: 4, children: [
|
|
4603
|
+
/* @__PURE__ */ jsxs24(Flex19, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4604
|
+
/* @__PURE__ */ jsx29(Text25, { size: 2, weight: "semibold", children: "Low-Scoring Judgments" }),
|
|
4605
|
+
/* @__PURE__ */ jsx29(
|
|
4557
4606
|
Tooltip4,
|
|
4558
4607
|
{
|
|
4559
|
-
content: /* @__PURE__ */
|
|
4608
|
+
content: /* @__PURE__ */ jsx29(Box10, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx29(Text25, { size: 1, children: GLOSSARY.lowScoringJudgments }) }),
|
|
4560
4609
|
placement: "bottom",
|
|
4561
4610
|
portal: true,
|
|
4562
|
-
children: /* @__PURE__ */
|
|
4611
|
+
children: /* @__PURE__ */ jsx29(Text25, { muted: true, size: 0, children: /* @__PURE__ */ jsx29(HelpCircleIcon4, {}) })
|
|
4563
4612
|
}
|
|
4564
4613
|
),
|
|
4565
|
-
/* @__PURE__ */
|
|
4614
|
+
/* @__PURE__ */ jsx29(Card16, { padding: 2, radius: 2, tone: "critical", children: /* @__PURE__ */ jsxs24(Text25, { size: 1, weight: "bold", children: [
|
|
4566
4615
|
judgments.length,
|
|
4567
4616
|
" judgment",
|
|
4568
4617
|
judgments.length === 1 ? "" : "s",
|
|
4569
4618
|
" below 70"
|
|
4570
4619
|
] }) })
|
|
4571
4620
|
] }),
|
|
4572
|
-
grouped.map(([area, areaJudgments]) => /* @__PURE__ */
|
|
4573
|
-
/* @__PURE__ */
|
|
4621
|
+
grouped.map(([area, areaJudgments]) => /* @__PURE__ */ jsx29(Card16, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs24(Stack16, { space: 3, children: [
|
|
4622
|
+
/* @__PURE__ */ jsxs24(Text25, { size: 1, weight: "semibold", children: [
|
|
4574
4623
|
area,
|
|
4575
4624
|
" ",
|
|
4576
|
-
/* @__PURE__ */
|
|
4625
|
+
/* @__PURE__ */ jsxs24(Text25, { muted: true, size: 1, weight: "regular", as: "span", children: [
|
|
4577
4626
|
"(",
|
|
4578
4627
|
areaJudgments.length,
|
|
4579
4628
|
")"
|
|
4580
4629
|
] })
|
|
4581
4630
|
] }),
|
|
4582
|
-
areaJudgments.map((j, i) => /* @__PURE__ */
|
|
4631
|
+
areaJudgments.map((j, i) => /* @__PURE__ */ jsx29(JudgmentCard, { judgment: j }, `${area}-${i}`))
|
|
4583
4632
|
] }) }, area))
|
|
4584
4633
|
] }) });
|
|
4585
4634
|
}
|
|
@@ -4588,7 +4637,7 @@ function JudgmentCard({ judgment }) {
|
|
|
4588
4637
|
const dimLabel = DIMENSION_LABELS[judgment.dimension] ?? judgment.dimension;
|
|
4589
4638
|
const sep = judgment.taskId.indexOf(" - ");
|
|
4590
4639
|
const taskName = sep > 0 ? judgment.taskId.substring(sep + 3) : judgment.taskId;
|
|
4591
|
-
return /* @__PURE__ */
|
|
4640
|
+
return /* @__PURE__ */ jsx29(
|
|
4592
4641
|
Card16,
|
|
4593
4642
|
{
|
|
4594
4643
|
padding: 3,
|
|
@@ -4596,10 +4645,10 @@ function JudgmentCard({ judgment }) {
|
|
|
4596
4645
|
shadow: 1,
|
|
4597
4646
|
style: { cursor: "pointer" },
|
|
4598
4647
|
onClick: () => setExpanded(!expanded),
|
|
4599
|
-
children: /* @__PURE__ */
|
|
4600
|
-
/* @__PURE__ */
|
|
4601
|
-
/* @__PURE__ */
|
|
4602
|
-
|
|
4648
|
+
children: /* @__PURE__ */ jsxs24(Stack16, { space: 3, children: [
|
|
4649
|
+
/* @__PURE__ */ jsxs24(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
4650
|
+
/* @__PURE__ */ jsx29(Card16, { padding: 2, radius: 2, tone: scoreTone(judgment.score), children: /* @__PURE__ */ jsx29(
|
|
4651
|
+
Text25,
|
|
4603
4652
|
{
|
|
4604
4653
|
align: "center",
|
|
4605
4654
|
size: 1,
|
|
@@ -4608,32 +4657,32 @@ function JudgmentCard({ judgment }) {
|
|
|
4608
4657
|
children: judgment.score
|
|
4609
4658
|
}
|
|
4610
4659
|
) }),
|
|
4611
|
-
/* @__PURE__ */
|
|
4612
|
-
/* @__PURE__ */
|
|
4613
|
-
/* @__PURE__ */
|
|
4614
|
-
/* @__PURE__ */
|
|
4660
|
+
/* @__PURE__ */ jsx29(Badge15, { tone: "default", children: dimLabel }),
|
|
4661
|
+
/* @__PURE__ */ jsx29(Text25, { size: 1, weight: "medium", children: taskName }),
|
|
4662
|
+
/* @__PURE__ */ jsx29(Text25, { muted: true, size: 0, children: judgment.modelId }),
|
|
4663
|
+
/* @__PURE__ */ jsx29(Text25, { muted: true, size: 0, style: { marginLeft: "auto" }, children: expanded ? "\u25B2" : "\u25BC" })
|
|
4615
4664
|
] }),
|
|
4616
|
-
expanded && /* @__PURE__ */
|
|
4617
|
-
/* @__PURE__ */
|
|
4618
|
-
|
|
4665
|
+
expanded && /* @__PURE__ */ jsxs24(Stack16, { space: 3, children: [
|
|
4666
|
+
/* @__PURE__ */ jsx29(Card16, { padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsx29(
|
|
4667
|
+
Text25,
|
|
4619
4668
|
{
|
|
4620
4669
|
muted: true,
|
|
4621
4670
|
size: 1,
|
|
4622
4671
|
style: { lineHeight: 1.6, whiteSpace: "pre-wrap" },
|
|
4623
|
-
children: /* @__PURE__ */
|
|
4672
|
+
children: /* @__PURE__ */ jsx29(InlineCode, { text: judgment.reason })
|
|
4624
4673
|
}
|
|
4625
4674
|
) }),
|
|
4626
|
-
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */
|
|
4627
|
-
/* @__PURE__ */
|
|
4675
|
+
judgment.canonicalDocs && judgment.canonicalDocs.length > 0 && /* @__PURE__ */ jsxs24(Flex19, { align: "center", gap: 2, wrap: "wrap", children: [
|
|
4676
|
+
/* @__PURE__ */ jsx29(Text25, { muted: true, size: 0, children: "Docs:" }),
|
|
4628
4677
|
judgment.canonicalDocs.map((doc) => {
|
|
4629
|
-
const badge = /* @__PURE__ */
|
|
4630
|
-
return /* @__PURE__ */
|
|
4678
|
+
const badge = /* @__PURE__ */ jsx29(Badge15, { mode: "outline", tone: "primary", children: doc.slug });
|
|
4679
|
+
return /* @__PURE__ */ jsx29(
|
|
4631
4680
|
Tooltip4,
|
|
4632
4681
|
{
|
|
4633
|
-
content: /* @__PURE__ */
|
|
4682
|
+
content: /* @__PURE__ */ jsx29(Box10, { padding: 2, children: /* @__PURE__ */ jsx29(Text25, { size: 1, children: doc.title || doc.slug }) }),
|
|
4634
4683
|
placement: "bottom",
|
|
4635
4684
|
portal: true,
|
|
4636
|
-
children: doc.documentId ? /* @__PURE__ */
|
|
4685
|
+
children: doc.documentId ? /* @__PURE__ */ jsx29(
|
|
4637
4686
|
"a",
|
|
4638
4687
|
{
|
|
4639
4688
|
href: `/intent/edit/id=${doc.documentId}`,
|
|
@@ -4658,8 +4707,8 @@ import { Grid as Grid3 } from "@sanity/ui";
|
|
|
4658
4707
|
|
|
4659
4708
|
// src/components/primitives/StatCard.tsx
|
|
4660
4709
|
import { HelpCircleIcon as HelpCircleIcon5 } from "@sanity/icons";
|
|
4661
|
-
import { Box as Box11, Card as Card17, Stack as Stack17, Text as
|
|
4662
|
-
import { Fragment as Fragment5, jsx as
|
|
4710
|
+
import { Box as Box11, Card as Card17, Stack as Stack17, Text as Text26, Tooltip as Tooltip5 } from "@sanity/ui";
|
|
4711
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4663
4712
|
function StatCard({
|
|
4664
4713
|
label,
|
|
4665
4714
|
value,
|
|
@@ -4667,24 +4716,24 @@ function StatCard({
|
|
|
4667
4716
|
suffix,
|
|
4668
4717
|
tone = "default"
|
|
4669
4718
|
}) {
|
|
4670
|
-
return /* @__PURE__ */
|
|
4671
|
-
/* @__PURE__ */
|
|
4719
|
+
return /* @__PURE__ */ jsx30(Card17, { padding: 3, radius: 2, shadow: 1, tone, children: /* @__PURE__ */ jsxs25(Stack17, { space: 2, children: [
|
|
4720
|
+
/* @__PURE__ */ jsxs25(Text26, { muted: true, size: 1, children: [
|
|
4672
4721
|
label,
|
|
4673
|
-
tooltip && /* @__PURE__ */
|
|
4722
|
+
tooltip && /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
4674
4723
|
" ",
|
|
4675
|
-
/* @__PURE__ */
|
|
4724
|
+
/* @__PURE__ */ jsx30(
|
|
4676
4725
|
Tooltip5,
|
|
4677
4726
|
{
|
|
4678
|
-
content: /* @__PURE__ */
|
|
4727
|
+
content: /* @__PURE__ */ jsx30(Box11, { padding: 2, children: /* @__PURE__ */ jsx30(Text26, { size: 1, children: tooltip }) }),
|
|
4679
4728
|
portal: true,
|
|
4680
|
-
children: /* @__PURE__ */
|
|
4729
|
+
children: /* @__PURE__ */ jsx30("span", { style: { cursor: "help" }, children: /* @__PURE__ */ jsx30(HelpCircleIcon5, {}) })
|
|
4681
4730
|
}
|
|
4682
4731
|
)
|
|
4683
4732
|
] })
|
|
4684
4733
|
] }),
|
|
4685
|
-
/* @__PURE__ */
|
|
4734
|
+
/* @__PURE__ */ jsxs25(Text26, { size: 3, weight: "bold", children: [
|
|
4686
4735
|
value,
|
|
4687
|
-
suffix && /* @__PURE__ */
|
|
4736
|
+
suffix && /* @__PURE__ */ jsxs25("span", { style: { fontSize: "0.6em", fontWeight: 400 }, children: [
|
|
4688
4737
|
" ",
|
|
4689
4738
|
suffix
|
|
4690
4739
|
] })
|
|
@@ -4693,7 +4742,7 @@ function StatCard({
|
|
|
4693
4742
|
}
|
|
4694
4743
|
|
|
4695
4744
|
// src/components/report-detail/OverviewStats.tsx
|
|
4696
|
-
import { jsx as
|
|
4745
|
+
import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4697
4746
|
function OverviewStats({
|
|
4698
4747
|
overall,
|
|
4699
4748
|
durationMs,
|
|
@@ -4701,8 +4750,8 @@ function OverviewStats({
|
|
|
4701
4750
|
isFullMode
|
|
4702
4751
|
}) {
|
|
4703
4752
|
const overallTone = scoreTone(overall.avgScore);
|
|
4704
|
-
return /* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ jsxs26(Grid3, { columns: [1, 1, 2, isFullMode ? 4 : 4], gap: 3, children: [
|
|
4754
|
+
/* @__PURE__ */ jsx31(
|
|
4706
4755
|
StatCard,
|
|
4707
4756
|
{
|
|
4708
4757
|
label: "Overall Score",
|
|
@@ -4711,7 +4760,7 @@ function OverviewStats({
|
|
|
4711
4760
|
value: overall.avgScore.toFixed(1)
|
|
4712
4761
|
}
|
|
4713
4762
|
),
|
|
4714
|
-
/* @__PURE__ */
|
|
4763
|
+
/* @__PURE__ */ jsx31(
|
|
4715
4764
|
StatCard,
|
|
4716
4765
|
{
|
|
4717
4766
|
label: "Doc Lift",
|
|
@@ -4720,7 +4769,7 @@ function OverviewStats({
|
|
|
4720
4769
|
value: overall.avgDocLift.toFixed(1)
|
|
4721
4770
|
}
|
|
4722
4771
|
),
|
|
4723
|
-
isFullMode && overall.avgActualScore != null && /* @__PURE__ */
|
|
4772
|
+
isFullMode && overall.avgActualScore != null && /* @__PURE__ */ jsx31(
|
|
4724
4773
|
StatCard,
|
|
4725
4774
|
{
|
|
4726
4775
|
label: "Actual Score",
|
|
@@ -4729,7 +4778,7 @@ function OverviewStats({
|
|
|
4729
4778
|
value: overall.avgActualScore.toFixed(1)
|
|
4730
4779
|
}
|
|
4731
4780
|
),
|
|
4732
|
-
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */
|
|
4781
|
+
isFullMode && overall.avgRetrievalGap != null && /* @__PURE__ */ jsx31(
|
|
4733
4782
|
StatCard,
|
|
4734
4783
|
{
|
|
4735
4784
|
label: "Retrieval Gap",
|
|
@@ -4739,7 +4788,7 @@ function OverviewStats({
|
|
|
4739
4788
|
value: overall.avgRetrievalGap.toFixed(1)
|
|
4740
4789
|
}
|
|
4741
4790
|
),
|
|
4742
|
-
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */
|
|
4791
|
+
isFullMode && overall.avgInfrastructureEfficiency != null && /* @__PURE__ */ jsx31(
|
|
4743
4792
|
StatCard,
|
|
4744
4793
|
{
|
|
4745
4794
|
label: "Infra Efficiency",
|
|
@@ -4747,8 +4796,8 @@ function OverviewStats({
|
|
|
4747
4796
|
value: formatPercent(overall.avgInfrastructureEfficiency)
|
|
4748
4797
|
}
|
|
4749
4798
|
),
|
|
4750
|
-
/* @__PURE__ */
|
|
4751
|
-
/* @__PURE__ */
|
|
4799
|
+
/* @__PURE__ */ jsx31(StatCard, { label: "Duration", value: formatDuration(durationMs) }),
|
|
4800
|
+
/* @__PURE__ */ jsx31(
|
|
4752
4801
|
StatCard,
|
|
4753
4802
|
{
|
|
4754
4803
|
label: "Tests",
|
|
@@ -4760,31 +4809,31 @@ function OverviewStats({
|
|
|
4760
4809
|
}
|
|
4761
4810
|
|
|
4762
4811
|
// src/components/report-detail/ProvenanceCard.tsx
|
|
4763
|
-
import { Card as Card18, Flex as
|
|
4764
|
-
import { jsx as
|
|
4812
|
+
import { Card as Card18, Flex as Flex20, Grid as Grid4, Stack as Stack18, Text as Text27 } from "@sanity/ui";
|
|
4813
|
+
import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4765
4814
|
var VIEWABLE_PROMPTFOO_MODES = /* @__PURE__ */ new Set(["agentic", "observed"]);
|
|
4766
4815
|
function ProvenanceCard({ provenance }) {
|
|
4767
|
-
return /* @__PURE__ */
|
|
4768
|
-
/* @__PURE__ */
|
|
4769
|
-
/* @__PURE__ */
|
|
4770
|
-
/* @__PURE__ */
|
|
4771
|
-
/* @__PURE__ */
|
|
4772
|
-
/* @__PURE__ */
|
|
4816
|
+
return /* @__PURE__ */ jsx32(Card18, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs27(Stack18, { space: 4, children: [
|
|
4817
|
+
/* @__PURE__ */ jsx32(Text27, { size: 2, weight: "semibold", children: "Provenance" }),
|
|
4818
|
+
/* @__PURE__ */ jsxs27(Grid4, { columns: [1, 2, 3], gap: 4, children: [
|
|
4819
|
+
/* @__PURE__ */ jsx32(Field, { label: "Mode", value: provenance.mode }),
|
|
4820
|
+
/* @__PURE__ */ jsx32(Field, { label: "Source", value: provenance.source.name }),
|
|
4821
|
+
/* @__PURE__ */ jsx32(
|
|
4773
4822
|
Field,
|
|
4774
4823
|
{
|
|
4775
4824
|
label: "Trigger",
|
|
4776
4825
|
value: provenance.trigger.type + (provenance.trigger.workflow ? ` (${provenance.trigger.workflow})` : "")
|
|
4777
4826
|
}
|
|
4778
4827
|
),
|
|
4779
|
-
/* @__PURE__ */
|
|
4828
|
+
/* @__PURE__ */ jsx32(
|
|
4780
4829
|
Field,
|
|
4781
4830
|
{
|
|
4782
4831
|
label: "Models",
|
|
4783
4832
|
value: provenance.models.map((m) => m.label).join(", ")
|
|
4784
4833
|
}
|
|
4785
4834
|
),
|
|
4786
|
-
/* @__PURE__ */
|
|
4787
|
-
provenance.contextHash && /* @__PURE__ */
|
|
4835
|
+
/* @__PURE__ */ jsx32(Field, { label: "Grader Model", mono: true, value: provenance.graderModel }),
|
|
4836
|
+
provenance.contextHash && /* @__PURE__ */ jsx32(
|
|
4788
4837
|
Field,
|
|
4789
4838
|
{
|
|
4790
4839
|
label: "Context Hash",
|
|
@@ -4793,8 +4842,8 @@ function ProvenanceCard({ provenance }) {
|
|
|
4793
4842
|
}
|
|
4794
4843
|
)
|
|
4795
4844
|
] }),
|
|
4796
|
-
provenance.git && /* @__PURE__ */
|
|
4797
|
-
/* @__PURE__ */
|
|
4845
|
+
provenance.git && /* @__PURE__ */ jsx32(GitInfo, { git: provenance.git }),
|
|
4846
|
+
/* @__PURE__ */ jsx32(PromptfooLinks, { provenance })
|
|
4798
4847
|
] }) });
|
|
4799
4848
|
}
|
|
4800
4849
|
function Field({
|
|
@@ -4802,9 +4851,9 @@ function Field({
|
|
|
4802
4851
|
mono,
|
|
4803
4852
|
value
|
|
4804
4853
|
}) {
|
|
4805
|
-
return /* @__PURE__ */
|
|
4806
|
-
/* @__PURE__ */
|
|
4807
|
-
|
|
4854
|
+
return /* @__PURE__ */ jsxs27(Stack18, { space: 1, children: [
|
|
4855
|
+
/* @__PURE__ */ jsx32(
|
|
4856
|
+
Text27,
|
|
4808
4857
|
{
|
|
4809
4858
|
muted: true,
|
|
4810
4859
|
size: 0,
|
|
@@ -4813,31 +4862,27 @@ function Field({
|
|
|
4813
4862
|
children: label
|
|
4814
4863
|
}
|
|
4815
4864
|
),
|
|
4816
|
-
/* @__PURE__ */
|
|
4865
|
+
/* @__PURE__ */ jsx32(Text27, { size: 1, style: mono ? { fontFamily: "monospace" } : void 0, children: value })
|
|
4817
4866
|
] });
|
|
4818
4867
|
}
|
|
4819
4868
|
function GitInfo({ git }) {
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4869
|
+
const repoUrl = `https://github.com/${git.repo}`;
|
|
4870
|
+
const branchUrl = `${repoUrl}/tree/${git.branch}`;
|
|
4871
|
+
const commitUrl = `${repoUrl}/commit/${git.sha}`;
|
|
4872
|
+
const prUrl = git.prNumber ? `${repoUrl}/pull/${git.prNumber}` : null;
|
|
4873
|
+
return /* @__PURE__ */ jsx32(Card18, { border: true, padding: 3, radius: 2, tone: "transparent", children: /* @__PURE__ */ jsxs27(Flex20, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4874
|
+
/* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, weight: "semibold", children: "Git" }),
|
|
4875
|
+
/* @__PURE__ */ jsxs27(Text27, { size: 1, children: [
|
|
4876
|
+
/* @__PURE__ */ jsx32("a", { href: repoUrl, rel: "noopener noreferrer", target: "_blank", children: git.repo }),
|
|
4824
4877
|
" / ",
|
|
4825
|
-
git.branch
|
|
4878
|
+
/* @__PURE__ */ jsx32("a", { href: branchUrl, rel: "noopener noreferrer", target: "_blank", children: git.branch })
|
|
4826
4879
|
] }),
|
|
4827
|
-
/* @__PURE__ */
|
|
4828
|
-
|
|
4829
|
-
"
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
target: "_blank",
|
|
4834
|
-
children: [
|
|
4835
|
-
"PR #",
|
|
4836
|
-
git.prNumber,
|
|
4837
|
-
" \u2192"
|
|
4838
|
-
]
|
|
4839
|
-
}
|
|
4840
|
-
) })
|
|
4880
|
+
/* @__PURE__ */ jsx32(Text27, { muted: true, size: 1, style: { fontFamily: "monospace" }, children: /* @__PURE__ */ jsx32("a", { href: commitUrl, rel: "noopener noreferrer", target: "_blank", children: git.sha.slice(0, 12) }) }),
|
|
4881
|
+
prUrl && /* @__PURE__ */ jsx32(Text27, { size: 1, children: /* @__PURE__ */ jsxs27("a", { href: prUrl, rel: "noopener noreferrer", target: "_blank", children: [
|
|
4882
|
+
"PR #",
|
|
4883
|
+
git.prNumber,
|
|
4884
|
+
" \u2192"
|
|
4885
|
+
] }) })
|
|
4841
4886
|
] }) });
|
|
4842
4887
|
}
|
|
4843
4888
|
function PromptfooLinks({
|
|
@@ -4848,14 +4893,14 @@ function PromptfooLinks({
|
|
|
4848
4893
|
(e) => VIEWABLE_PROMPTFOO_MODES.has(e.mode)
|
|
4849
4894
|
);
|
|
4850
4895
|
if (viewable.length === 0) return null;
|
|
4851
|
-
return /* @__PURE__ */
|
|
4896
|
+
return /* @__PURE__ */ jsx32(Flex20, { gap: 3, wrap: "wrap", children: viewable.map((entry) => /* @__PURE__ */ jsx32(Text27, { size: 1, children: /* @__PURE__ */ jsxs27("a", { href: entry.url, rel: "noopener noreferrer", target: "_blank", children: [
|
|
4852
4897
|
"View in Promptfoo (",
|
|
4853
4898
|
entry.mode,
|
|
4854
4899
|
") \u2192"
|
|
4855
4900
|
] }) }, entry.mode)) });
|
|
4856
4901
|
}
|
|
4857
4902
|
if (provenance.promptfooUrl && VIEWABLE_PROMPTFOO_MODES.has(provenance.mode)) {
|
|
4858
|
-
return /* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ jsx32(Text27, { size: 1, children: /* @__PURE__ */ jsx32(
|
|
4859
4904
|
"a",
|
|
4860
4905
|
{
|
|
4861
4906
|
href: provenance.promptfooUrl,
|
|
@@ -4870,32 +4915,32 @@ function PromptfooLinks({
|
|
|
4870
4915
|
|
|
4871
4916
|
// src/components/report-detail/RecommendationsSection.tsx
|
|
4872
4917
|
import React3 from "react";
|
|
4873
|
-
import { Badge as
|
|
4918
|
+
import { Badge as Badge16, Box as Box12, Card as Card19, Flex as Flex21, Stack as Stack19, Text as Text28, Tooltip as Tooltip6 } from "@sanity/ui";
|
|
4874
4919
|
import { HelpCircleIcon as HelpCircleIcon6 } from "@sanity/icons";
|
|
4875
|
-
import { jsx as
|
|
4920
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4876
4921
|
function RecommendationsSection({
|
|
4877
4922
|
recommendations
|
|
4878
4923
|
}) {
|
|
4879
4924
|
if (recommendations.gaps.length === 0) return null;
|
|
4880
|
-
return /* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
4882
|
-
/* @__PURE__ */
|
|
4883
|
-
/* @__PURE__ */
|
|
4925
|
+
return /* @__PURE__ */ jsx33(Card19, { padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs28(Stack19, { space: 4, children: [
|
|
4926
|
+
/* @__PURE__ */ jsxs28(Flex21, { align: "center", gap: 3, wrap: "wrap", children: [
|
|
4927
|
+
/* @__PURE__ */ jsx33(Text28, { size: 2, weight: "semibold", children: "Recommendations" }),
|
|
4928
|
+
/* @__PURE__ */ jsx33(
|
|
4884
4929
|
Tooltip6,
|
|
4885
4930
|
{
|
|
4886
|
-
content: /* @__PURE__ */
|
|
4931
|
+
content: /* @__PURE__ */ jsx33(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx33(Text28, { size: 1, children: GLOSSARY.recommendations }) }),
|
|
4887
4932
|
placement: "bottom",
|
|
4888
4933
|
portal: true,
|
|
4889
|
-
children: /* @__PURE__ */
|
|
4934
|
+
children: /* @__PURE__ */ jsx33(Text28, { muted: true, size: 0, children: /* @__PURE__ */ jsx33(HelpCircleIcon6, {}) })
|
|
4890
4935
|
}
|
|
4891
4936
|
),
|
|
4892
|
-
/* @__PURE__ */
|
|
4937
|
+
/* @__PURE__ */ jsx33(
|
|
4893
4938
|
Tooltip6,
|
|
4894
4939
|
{
|
|
4895
|
-
content: /* @__PURE__ */
|
|
4940
|
+
content: /* @__PURE__ */ jsx33(Box12, { padding: 2, style: { maxWidth: 260 }, children: /* @__PURE__ */ jsx33(Text28, { size: 1, children: GLOSSARY.totalPotentialLift }) }),
|
|
4896
4941
|
placement: "bottom",
|
|
4897
4942
|
portal: true,
|
|
4898
|
-
children: /* @__PURE__ */
|
|
4943
|
+
children: /* @__PURE__ */ jsx33(Card19, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs28(Text28, { size: 1, weight: "bold", children: [
|
|
4899
4944
|
"+",
|
|
4900
4945
|
recommendations.totalPotentialLift.toFixed(1),
|
|
4901
4946
|
" pts potential lift"
|
|
@@ -4903,7 +4948,7 @@ function RecommendationsSection({
|
|
|
4903
4948
|
}
|
|
4904
4949
|
)
|
|
4905
4950
|
] }),
|
|
4906
|
-
/* @__PURE__ */
|
|
4951
|
+
/* @__PURE__ */ jsxs28(
|
|
4907
4952
|
"div",
|
|
4908
4953
|
{
|
|
4909
4954
|
style: {
|
|
@@ -4912,9 +4957,9 @@ function RecommendationsSection({
|
|
|
4912
4957
|
gridTemplateColumns: "auto 2fr 2fr 1fr 1fr 1fr"
|
|
4913
4958
|
},
|
|
4914
4959
|
children: [
|
|
4915
|
-
/* @__PURE__ */
|
|
4916
|
-
/* @__PURE__ */
|
|
4917
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ jsx33(ColumnHeader, { borderBottom: true, label: "#" }),
|
|
4961
|
+
/* @__PURE__ */ jsx33(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
4962
|
+
/* @__PURE__ */ jsx33(
|
|
4918
4963
|
ColumnHeader,
|
|
4919
4964
|
{
|
|
4920
4965
|
borderBottom: true,
|
|
@@ -4922,8 +4967,8 @@ function RecommendationsSection({
|
|
|
4922
4967
|
tooltip: GLOSSARY.failureMode
|
|
4923
4968
|
}
|
|
4924
4969
|
),
|
|
4925
|
-
/* @__PURE__ */
|
|
4926
|
-
/* @__PURE__ */
|
|
4970
|
+
/* @__PURE__ */ jsx33(ColumnHeader, { borderBottom: true, label: "Action" }),
|
|
4971
|
+
/* @__PURE__ */ jsx33(
|
|
4927
4972
|
ColumnHeader,
|
|
4928
4973
|
{
|
|
4929
4974
|
borderBottom: true,
|
|
@@ -4931,7 +4976,7 @@ function RecommendationsSection({
|
|
|
4931
4976
|
tooltip: GLOSSARY.estimatedLift
|
|
4932
4977
|
}
|
|
4933
4978
|
),
|
|
4934
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ jsx33(
|
|
4935
4980
|
ColumnHeader,
|
|
4936
4981
|
{
|
|
4937
4982
|
borderBottom: true,
|
|
@@ -4939,7 +4984,7 @@ function RecommendationsSection({
|
|
|
4939
4984
|
tooltip: GLOSSARY.confidence
|
|
4940
4985
|
}
|
|
4941
4986
|
),
|
|
4942
|
-
recommendations.gaps.map((gap, i) => /* @__PURE__ */
|
|
4987
|
+
recommendations.gaps.map((gap, i) => /* @__PURE__ */ jsx33(RecommendationRow, { gap, index: i }, `gap-${i}`))
|
|
4943
4988
|
]
|
|
4944
4989
|
}
|
|
4945
4990
|
)
|
|
@@ -4951,8 +4996,8 @@ function RecommendationRow({
|
|
|
4951
4996
|
}) {
|
|
4952
4997
|
const confIcon = gap.confidence === "high" ? "\u{1F7E2}" : gap.confidence === "medium" ? "\u{1F7E1}" : "\u{1F534}";
|
|
4953
4998
|
const bg = rowBackground(index);
|
|
4954
|
-
return /* @__PURE__ */
|
|
4955
|
-
/* @__PURE__ */
|
|
4999
|
+
return /* @__PURE__ */ jsxs28(React3.Fragment, { children: [
|
|
5000
|
+
/* @__PURE__ */ jsx33(
|
|
4956
5001
|
"div",
|
|
4957
5002
|
{
|
|
4958
5003
|
style: {
|
|
@@ -4962,10 +5007,10 @@ function RecommendationRow({
|
|
|
4962
5007
|
display: "flex",
|
|
4963
5008
|
padding: "8px 4px"
|
|
4964
5009
|
},
|
|
4965
|
-
children: /* @__PURE__ */
|
|
5010
|
+
children: /* @__PURE__ */ jsx33(Text28, { muted: true, size: 1, children: index + 1 })
|
|
4966
5011
|
}
|
|
4967
5012
|
),
|
|
4968
|
-
/* @__PURE__ */
|
|
5013
|
+
/* @__PURE__ */ jsx33(
|
|
4969
5014
|
"div",
|
|
4970
5015
|
{
|
|
4971
5016
|
style: {
|
|
@@ -4974,10 +5019,10 @@ function RecommendationRow({
|
|
|
4974
5019
|
display: "flex",
|
|
4975
5020
|
padding: "8px 0"
|
|
4976
5021
|
},
|
|
4977
|
-
children: /* @__PURE__ */
|
|
5022
|
+
children: /* @__PURE__ */ jsx33(Text28, { size: 1, weight: "medium", children: gap.area })
|
|
4978
5023
|
}
|
|
4979
5024
|
),
|
|
4980
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsx33(
|
|
4981
5026
|
"div",
|
|
4982
5027
|
{
|
|
4983
5028
|
style: {
|
|
@@ -4986,8 +5031,8 @@ function RecommendationRow({
|
|
|
4986
5031
|
display: "flex",
|
|
4987
5032
|
padding: "8px 0"
|
|
4988
5033
|
},
|
|
4989
|
-
children: /* @__PURE__ */
|
|
4990
|
-
|
|
5034
|
+
children: /* @__PURE__ */ jsx33(
|
|
5035
|
+
Badge16,
|
|
4991
5036
|
{
|
|
4992
5037
|
tone: gap.failureMode === "missing-docs" ? "critical" : gap.failureMode === "incorrect-docs" ? "critical" : gap.failureMode === "outdated-docs" ? "caution" : "default",
|
|
4993
5038
|
children: gap.failureMode
|
|
@@ -4995,7 +5040,7 @@ function RecommendationRow({
|
|
|
4995
5040
|
)
|
|
4996
5041
|
}
|
|
4997
5042
|
),
|
|
4998
|
-
/* @__PURE__ */
|
|
5043
|
+
/* @__PURE__ */ jsx33(
|
|
4999
5044
|
"div",
|
|
5000
5045
|
{
|
|
5001
5046
|
style: {
|
|
@@ -5004,10 +5049,10 @@ function RecommendationRow({
|
|
|
5004
5049
|
display: "flex",
|
|
5005
5050
|
padding: "8px 0"
|
|
5006
5051
|
},
|
|
5007
|
-
children: /* @__PURE__ */
|
|
5052
|
+
children: /* @__PURE__ */ jsx33(Text28, { muted: true, size: 1, children: gap.remediation })
|
|
5008
5053
|
}
|
|
5009
5054
|
),
|
|
5010
|
-
/* @__PURE__ */
|
|
5055
|
+
/* @__PURE__ */ jsx33(
|
|
5011
5056
|
"div",
|
|
5012
5057
|
{
|
|
5013
5058
|
style: {
|
|
@@ -5016,13 +5061,13 @@ function RecommendationRow({
|
|
|
5016
5061
|
display: "flex",
|
|
5017
5062
|
padding: "8px 0"
|
|
5018
5063
|
},
|
|
5019
|
-
children: /* @__PURE__ */
|
|
5064
|
+
children: /* @__PURE__ */ jsx33(Card19, { padding: 2, radius: 2, tone: "positive", children: /* @__PURE__ */ jsxs28(Text28, { align: "center", size: 1, weight: "medium", children: [
|
|
5020
5065
|
"+",
|
|
5021
5066
|
gap.estimatedLift.toFixed(1)
|
|
5022
5067
|
] }) })
|
|
5023
5068
|
}
|
|
5024
5069
|
),
|
|
5025
|
-
/* @__PURE__ */
|
|
5070
|
+
/* @__PURE__ */ jsx33(
|
|
5026
5071
|
"div",
|
|
5027
5072
|
{
|
|
5028
5073
|
style: {
|
|
@@ -5031,7 +5076,7 @@ function RecommendationRow({
|
|
|
5031
5076
|
display: "flex",
|
|
5032
5077
|
padding: "8px 0"
|
|
5033
5078
|
},
|
|
5034
|
-
children: /* @__PURE__ */
|
|
5079
|
+
children: /* @__PURE__ */ jsxs28(Text28, { size: 1, children: [
|
|
5035
5080
|
confIcon,
|
|
5036
5081
|
" ",
|
|
5037
5082
|
gap.confidence
|
|
@@ -5044,16 +5089,16 @@ function RecommendationRow({
|
|
|
5044
5089
|
// src/components/report-detail/ReportHeader.tsx
|
|
5045
5090
|
import { ArrowLeftIcon, ClipboardIcon } from "@sanity/icons";
|
|
5046
5091
|
import {
|
|
5047
|
-
Badge as
|
|
5092
|
+
Badge as Badge17,
|
|
5048
5093
|
Box as Box13,
|
|
5049
5094
|
Button as Button2,
|
|
5050
5095
|
Card as Card20,
|
|
5051
|
-
Flex as
|
|
5096
|
+
Flex as Flex22,
|
|
5052
5097
|
Stack as Stack20,
|
|
5053
|
-
Text as
|
|
5098
|
+
Text as Text29,
|
|
5054
5099
|
Tooltip as Tooltip7
|
|
5055
5100
|
} from "@sanity/ui";
|
|
5056
|
-
import { Fragment as Fragment6, jsx as
|
|
5101
|
+
import { Fragment as Fragment6, jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5057
5102
|
function ReportHeader({
|
|
5058
5103
|
completedAt,
|
|
5059
5104
|
mode,
|
|
@@ -5066,9 +5111,9 @@ function ReportHeader({
|
|
|
5066
5111
|
const dateLabel = formatCardDate(completedAt);
|
|
5067
5112
|
const title = tag ?? dateLabel;
|
|
5068
5113
|
const hasTag = Boolean(tag);
|
|
5069
|
-
return /* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5071
|
-
/* @__PURE__ */
|
|
5114
|
+
return /* @__PURE__ */ jsxs29(Fragment6, { children: [
|
|
5115
|
+
/* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, children: [
|
|
5116
|
+
/* @__PURE__ */ jsx34(
|
|
5072
5117
|
Button2,
|
|
5073
5118
|
{
|
|
5074
5119
|
icon: ArrowLeftIcon,
|
|
@@ -5077,22 +5122,22 @@ function ReportHeader({
|
|
|
5077
5122
|
text: "Back"
|
|
5078
5123
|
}
|
|
5079
5124
|
),
|
|
5080
|
-
/* @__PURE__ */
|
|
5081
|
-
/* @__PURE__ */
|
|
5082
|
-
hasTag && /* @__PURE__ */
|
|
5125
|
+
/* @__PURE__ */ jsxs29(Stack20, { flex: 1, space: 1, children: [
|
|
5126
|
+
/* @__PURE__ */ jsx34(Text29, { size: 3, weight: "bold", children: title }),
|
|
5127
|
+
hasTag && /* @__PURE__ */ jsx34(Text29, { muted: true, size: 1, children: dateLabel })
|
|
5083
5128
|
] }),
|
|
5084
|
-
/* @__PURE__ */
|
|
5085
|
-
/* @__PURE__ */
|
|
5086
|
-
/* @__PURE__ */
|
|
5129
|
+
/* @__PURE__ */ jsxs29(Flex22, { gap: 2, children: [
|
|
5130
|
+
/* @__PURE__ */ jsx34(Badge17, { mode: "outline", tone: "default", children: sourceName }),
|
|
5131
|
+
/* @__PURE__ */ jsx34(Badge17, { tone: "primary", children: mode })
|
|
5087
5132
|
] })
|
|
5088
5133
|
] }),
|
|
5089
|
-
/* @__PURE__ */
|
|
5134
|
+
/* @__PURE__ */ jsx34(
|
|
5090
5135
|
Tooltip7,
|
|
5091
5136
|
{
|
|
5092
|
-
content: /* @__PURE__ */
|
|
5137
|
+
content: /* @__PURE__ */ jsx34(Box13, { padding: 2, children: /* @__PURE__ */ jsx34(Text29, { size: 1, children: "Click to copy report ID" }) }),
|
|
5093
5138
|
placement: "bottom",
|
|
5094
5139
|
portal: true,
|
|
5095
|
-
children: /* @__PURE__ */
|
|
5140
|
+
children: /* @__PURE__ */ jsx34(
|
|
5096
5141
|
Card20,
|
|
5097
5142
|
{
|
|
5098
5143
|
border: true,
|
|
@@ -5101,9 +5146,9 @@ function ReportHeader({
|
|
|
5101
5146
|
radius: 2,
|
|
5102
5147
|
style: { cursor: "pointer" },
|
|
5103
5148
|
tone: "transparent",
|
|
5104
|
-
children: /* @__PURE__ */
|
|
5105
|
-
/* @__PURE__ */
|
|
5106
|
-
|
|
5149
|
+
children: /* @__PURE__ */ jsxs29(Flex22, { align: "center", gap: 3, children: [
|
|
5150
|
+
/* @__PURE__ */ jsx34(
|
|
5151
|
+
Text29,
|
|
5107
5152
|
{
|
|
5108
5153
|
muted: true,
|
|
5109
5154
|
size: 0,
|
|
@@ -5115,8 +5160,8 @@ function ReportHeader({
|
|
|
5115
5160
|
children: "Report ID"
|
|
5116
5161
|
}
|
|
5117
5162
|
),
|
|
5118
|
-
/* @__PURE__ */
|
|
5119
|
-
|
|
5163
|
+
/* @__PURE__ */ jsx34(
|
|
5164
|
+
Text29,
|
|
5120
5165
|
{
|
|
5121
5166
|
size: 1,
|
|
5122
5167
|
style: {
|
|
@@ -5126,7 +5171,7 @@ function ReportHeader({
|
|
|
5126
5171
|
children: reportId
|
|
5127
5172
|
}
|
|
5128
5173
|
),
|
|
5129
|
-
/* @__PURE__ */
|
|
5174
|
+
/* @__PURE__ */ jsx34(Box13, { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx34(Text29, { muted: true, size: 1, children: /* @__PURE__ */ jsx34(ClipboardIcon, {}) }) })
|
|
5130
5175
|
] })
|
|
5131
5176
|
}
|
|
5132
5177
|
)
|
|
@@ -5137,18 +5182,18 @@ function ReportHeader({
|
|
|
5137
5182
|
|
|
5138
5183
|
// src/components/report-detail/ThreeLayerTable.tsx
|
|
5139
5184
|
import React4 from "react";
|
|
5140
|
-
import { Badge as
|
|
5141
|
-
import { jsx as
|
|
5185
|
+
import { Badge as Badge18, Card as Card21, Flex as Flex23, Stack as Stack21, Text as Text30 } from "@sanity/ui";
|
|
5186
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5142
5187
|
function ThreeLayerTable({ scores }) {
|
|
5143
5188
|
const filtered = scores.filter((s) => s.actualScore != null);
|
|
5144
5189
|
if (filtered.length === 0) return null;
|
|
5145
5190
|
const hasInverted = filtered.some((s) => s.invertedRetrievalGap);
|
|
5146
|
-
return /* @__PURE__ */
|
|
5147
|
-
/* @__PURE__ */
|
|
5148
|
-
/* @__PURE__ */
|
|
5149
|
-
/* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ jsx35(Card21, { overflow: "auto", padding: 4, radius: 2, shadow: 1, children: /* @__PURE__ */ jsxs30(Stack21, { space: 4, children: [
|
|
5192
|
+
/* @__PURE__ */ jsxs30(Flex23, { align: "center", gap: 3, children: [
|
|
5193
|
+
/* @__PURE__ */ jsx35(Text30, { size: 2, weight: "semibold", children: "Three-Layer Decomposition" }),
|
|
5194
|
+
/* @__PURE__ */ jsx35(Badge18, { tone: "primary", children: "full mode" })
|
|
5150
5195
|
] }),
|
|
5151
|
-
/* @__PURE__ */
|
|
5196
|
+
/* @__PURE__ */ jsxs30(
|
|
5152
5197
|
"div",
|
|
5153
5198
|
{
|
|
5154
5199
|
style: {
|
|
@@ -5157,9 +5202,9 @@ function ThreeLayerTable({ scores }) {
|
|
|
5157
5202
|
gridTemplateColumns: "2fr 1fr 1fr 1fr 1fr 1fr"
|
|
5158
5203
|
},
|
|
5159
5204
|
children: [
|
|
5160
|
-
/* @__PURE__ */
|
|
5161
|
-
/* @__PURE__ */
|
|
5162
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsx35(ColumnHeader, { borderBottom: true, label: "Area" }),
|
|
5206
|
+
/* @__PURE__ */ jsx35(ColumnHeader, { borderBottom: true, label: "Floor", tooltip: GLOSSARY.floor }),
|
|
5207
|
+
/* @__PURE__ */ jsx35(
|
|
5163
5208
|
ColumnHeader,
|
|
5164
5209
|
{
|
|
5165
5210
|
borderBottom: true,
|
|
@@ -5167,8 +5212,8 @@ function ThreeLayerTable({ scores }) {
|
|
|
5167
5212
|
tooltip: GLOSSARY.ceiling
|
|
5168
5213
|
}
|
|
5169
5214
|
),
|
|
5170
|
-
/* @__PURE__ */
|
|
5171
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ jsx35(ColumnHeader, { borderBottom: true, label: "Actual", tooltip: GLOSSARY.actual }),
|
|
5216
|
+
/* @__PURE__ */ jsx35(
|
|
5172
5217
|
ColumnHeader,
|
|
5173
5218
|
{
|
|
5174
5219
|
borderBottom: true,
|
|
@@ -5176,7 +5221,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
5176
5221
|
tooltip: GLOSSARY.retGap
|
|
5177
5222
|
}
|
|
5178
5223
|
),
|
|
5179
|
-
/* @__PURE__ */
|
|
5224
|
+
/* @__PURE__ */ jsx35(
|
|
5180
5225
|
ColumnHeader,
|
|
5181
5226
|
{
|
|
5182
5227
|
borderBottom: true,
|
|
@@ -5184,8 +5229,8 @@ function ThreeLayerTable({ scores }) {
|
|
|
5184
5229
|
tooltip: GLOSSARY.efficiency
|
|
5185
5230
|
}
|
|
5186
5231
|
),
|
|
5187
|
-
filtered.map((score, i) => /* @__PURE__ */
|
|
5188
|
-
/* @__PURE__ */
|
|
5232
|
+
filtered.map((score, i) => /* @__PURE__ */ jsxs30(React4.Fragment, { children: [
|
|
5233
|
+
/* @__PURE__ */ jsx35(
|
|
5189
5234
|
"div",
|
|
5190
5235
|
{
|
|
5191
5236
|
style: {
|
|
@@ -5193,13 +5238,13 @@ function ThreeLayerTable({ scores }) {
|
|
|
5193
5238
|
borderRadius: 4,
|
|
5194
5239
|
padding: "8px 0 8px 4px"
|
|
5195
5240
|
},
|
|
5196
|
-
children: /* @__PURE__ */
|
|
5241
|
+
children: /* @__PURE__ */ jsx35(Text30, { size: 1, weight: "medium", children: score.feature })
|
|
5197
5242
|
}
|
|
5198
5243
|
),
|
|
5199
|
-
/* @__PURE__ */
|
|
5200
|
-
/* @__PURE__ */
|
|
5201
|
-
/* @__PURE__ */
|
|
5202
|
-
/* @__PURE__ */
|
|
5244
|
+
/* @__PURE__ */ jsx35("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx35(ScoreCell, { score: score.floorScore ?? 0 }) }),
|
|
5245
|
+
/* @__PURE__ */ jsx35("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx35(ScoreCell, { score: score.ceilingScore ?? score.totalScore }) }),
|
|
5246
|
+
/* @__PURE__ */ jsx35("div", { style: { background: rowBackground(i), padding: "6px 0" }, children: /* @__PURE__ */ jsx35(ScoreCell, { score: score.actualScore ?? 0 }) }),
|
|
5247
|
+
/* @__PURE__ */ jsx35(
|
|
5203
5248
|
"div",
|
|
5204
5249
|
{
|
|
5205
5250
|
style: {
|
|
@@ -5208,10 +5253,10 @@ function ThreeLayerTable({ scores }) {
|
|
|
5208
5253
|
display: "flex",
|
|
5209
5254
|
padding: "6px 0"
|
|
5210
5255
|
},
|
|
5211
|
-
children: /* @__PURE__ */
|
|
5256
|
+
children: /* @__PURE__ */ jsx35(Text30, { size: 1, children: score.retrievalGap != null ? score.retrievalGap.toFixed(1) : "\u2014" })
|
|
5212
5257
|
}
|
|
5213
5258
|
),
|
|
5214
|
-
/* @__PURE__ */
|
|
5259
|
+
/* @__PURE__ */ jsx35(
|
|
5215
5260
|
"div",
|
|
5216
5261
|
{
|
|
5217
5262
|
style: {
|
|
@@ -5220,7 +5265,7 @@ function ThreeLayerTable({ scores }) {
|
|
|
5220
5265
|
display: "flex",
|
|
5221
5266
|
padding: "6px 0"
|
|
5222
5267
|
},
|
|
5223
|
-
children: /* @__PURE__ */
|
|
5268
|
+
children: /* @__PURE__ */ jsxs30(Text30, { size: 1, children: [
|
|
5224
5269
|
formatPercent(score.infrastructureEfficiency),
|
|
5225
5270
|
score.invertedRetrievalGap && " \u26A0\uFE0F"
|
|
5226
5271
|
] })
|
|
@@ -5230,12 +5275,12 @@ function ThreeLayerTable({ scores }) {
|
|
|
5230
5275
|
]
|
|
5231
5276
|
}
|
|
5232
5277
|
),
|
|
5233
|
-
hasInverted && /* @__PURE__ */
|
|
5278
|
+
hasInverted && /* @__PURE__ */ jsx35(Text30, { muted: true, size: 0, children: GLOSSARY.invertedRetGap })
|
|
5234
5279
|
] }) });
|
|
5235
5280
|
}
|
|
5236
5281
|
|
|
5237
5282
|
// src/components/report-detail/ReportDetail.tsx
|
|
5238
|
-
import { jsx as
|
|
5283
|
+
import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5239
5284
|
function ReportDetail({ onBack, reportId }) {
|
|
5240
5285
|
const client = useClient6({ apiVersion: API_VERSION });
|
|
5241
5286
|
const toast = useToast();
|
|
@@ -5273,11 +5318,11 @@ function ReportDetail({ onBack, reportId }) {
|
|
|
5273
5318
|
});
|
|
5274
5319
|
}, [report, toast]);
|
|
5275
5320
|
if (loading) {
|
|
5276
|
-
return /* @__PURE__ */
|
|
5321
|
+
return /* @__PURE__ */ jsx36(LoadingState, { message: "Loading report\u2026" });
|
|
5277
5322
|
}
|
|
5278
5323
|
if (!report) {
|
|
5279
|
-
return /* @__PURE__ */
|
|
5280
|
-
/* @__PURE__ */
|
|
5324
|
+
return /* @__PURE__ */ jsx36(Box14, { padding: 5, children: /* @__PURE__ */ jsxs31(Stack22, { space: 4, children: [
|
|
5325
|
+
/* @__PURE__ */ jsx36(
|
|
5281
5326
|
Button3,
|
|
5282
5327
|
{
|
|
5283
5328
|
icon: ArrowLeftIcon2,
|
|
@@ -5286,14 +5331,14 @@ function ReportDetail({ onBack, reportId }) {
|
|
|
5286
5331
|
text: "Back"
|
|
5287
5332
|
}
|
|
5288
5333
|
),
|
|
5289
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx36(Text31, { align: "center", muted: true, size: 2, children: "Report not found" })
|
|
5290
5335
|
] }) });
|
|
5291
5336
|
}
|
|
5292
5337
|
const { comparison, provenance, summary } = report;
|
|
5293
5338
|
const totalTests = summary.scores.reduce((n, s) => n + s.testCount, 0);
|
|
5294
5339
|
const isFullMode = summary.evaluationMode === "full" || summary.scores.some((s) => s.actualScore != null);
|
|
5295
|
-
return /* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ jsx36(Box14, { padding: 4, children: /* @__PURE__ */ jsxs31(Stack22, { space: 5, children: [
|
|
5341
|
+
/* @__PURE__ */ jsx36(
|
|
5297
5342
|
ReportHeader,
|
|
5298
5343
|
{
|
|
5299
5344
|
completedAt: report.completedAt,
|
|
@@ -5305,7 +5350,7 @@ function ReportDetail({ onBack, reportId }) {
|
|
|
5305
5350
|
tag: report.tag
|
|
5306
5351
|
}
|
|
5307
5352
|
),
|
|
5308
|
-
/* @__PURE__ */
|
|
5353
|
+
/* @__PURE__ */ jsx36(
|
|
5309
5354
|
OverviewStats,
|
|
5310
5355
|
{
|
|
5311
5356
|
durationMs: report.durationMs,
|
|
@@ -5314,20 +5359,20 @@ function ReportDetail({ onBack, reportId }) {
|
|
|
5314
5359
|
totalTests
|
|
5315
5360
|
}
|
|
5316
5361
|
),
|
|
5317
|
-
isFullMode && /* @__PURE__ */
|
|
5318
|
-
/* @__PURE__ */
|
|
5319
|
-
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */
|
|
5320
|
-
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */
|
|
5321
|
-
comparison && /* @__PURE__ */
|
|
5322
|
-
/* @__PURE__ */
|
|
5362
|
+
isFullMode && /* @__PURE__ */ jsx36(ThreeLayerTable, { scores: summary.scores }),
|
|
5363
|
+
/* @__PURE__ */ jsx36(AreaScoreTable, { scores: summary.scores }),
|
|
5364
|
+
summary.recommendations && summary.recommendations.gaps.length > 0 && /* @__PURE__ */ jsx36(RecommendationsSection, { recommendations: summary.recommendations }),
|
|
5365
|
+
summary.lowScoringJudgments && summary.lowScoringJudgments.length > 0 && /* @__PURE__ */ jsx36(JudgmentList, { judgments: summary.lowScoringJudgments }),
|
|
5366
|
+
comparison && /* @__PURE__ */ jsx36(ComparisonSummary, { comparison }),
|
|
5367
|
+
/* @__PURE__ */ jsx36(ProvenanceCard, { provenance })
|
|
5323
5368
|
] }) });
|
|
5324
5369
|
}
|
|
5325
5370
|
|
|
5326
5371
|
// src/components/ScoreTimeline.tsx
|
|
5327
|
-
import { Card as Card22, Flex as
|
|
5372
|
+
import { Card as Card22, Flex as Flex24, Select as Select2, Stack as Stack23, Text as Text32 } from "@sanity/ui";
|
|
5328
5373
|
import { useCallback as useCallback13, useEffect as useEffect8, useMemo as useMemo6, useState as useState9 } from "react";
|
|
5329
5374
|
import { useClient as useClient7 } from "sanity";
|
|
5330
|
-
import { jsx as
|
|
5375
|
+
import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5331
5376
|
var CHART_HEIGHT = 220;
|
|
5332
5377
|
var CHART_WIDTH = 800;
|
|
5333
5378
|
var PAD_BOTTOM = 30;
|
|
@@ -5426,22 +5471,22 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5426
5471
|
[]
|
|
5427
5472
|
);
|
|
5428
5473
|
const polylinePoints = chartPoints.map((p) => `${p.x},${p.y}`).join(" ");
|
|
5429
|
-
return /* @__PURE__ */
|
|
5430
|
-
/* @__PURE__ */
|
|
5431
|
-
/* @__PURE__ */
|
|
5474
|
+
return /* @__PURE__ */ jsxs32(Stack23, { space: 4, children: [
|
|
5475
|
+
/* @__PURE__ */ jsxs32(Flex24, { gap: 3, children: [
|
|
5476
|
+
/* @__PURE__ */ jsx37(
|
|
5432
5477
|
Select2,
|
|
5433
5478
|
{
|
|
5434
5479
|
onChange: handleRangeChange,
|
|
5435
5480
|
value: rangeDays?.toString() ?? "all",
|
|
5436
|
-
children: TIME_RANGES.map((r) => /* @__PURE__ */
|
|
5481
|
+
children: TIME_RANGES.map((r) => /* @__PURE__ */ jsx37("option", { value: r.days?.toString() ?? "all", children: r.label }, r.label))
|
|
5437
5482
|
}
|
|
5438
5483
|
),
|
|
5439
|
-
/* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
areaNames.map((name) => /* @__PURE__ */
|
|
5484
|
+
/* @__PURE__ */ jsxs32(Select2, { onChange: handleAreaChange, value: selectedArea ?? "", children: [
|
|
5485
|
+
/* @__PURE__ */ jsx37("option", { value: "", children: "Overall" }),
|
|
5486
|
+
areaNames.map((name) => /* @__PURE__ */ jsx37("option", { value: name, children: name }, name))
|
|
5442
5487
|
] })
|
|
5443
5488
|
] }),
|
|
5444
|
-
/* @__PURE__ */
|
|
5489
|
+
/* @__PURE__ */ jsx37(Card22, { padding: 3, radius: 2, shadow: 1, children: loading ? /* @__PURE__ */ jsx37(Flex24, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx37(Text32, { muted: true, size: 1, children: "Loading\u2026" }) }) : chartPoints.length === 0 ? /* @__PURE__ */ jsx37(Flex24, { align: "center", justify: "center", style: { height: 200 }, children: /* @__PURE__ */ jsx37(Text32, { muted: true, size: 1, children: "No reports found for this time range" }) }) : /* @__PURE__ */ jsxs32(
|
|
5445
5490
|
"svg",
|
|
5446
5491
|
{
|
|
5447
5492
|
style: { display: "block", width: "100%" },
|
|
@@ -5449,8 +5494,8 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5449
5494
|
children: [
|
|
5450
5495
|
Y_TICKS.map((tick) => {
|
|
5451
5496
|
const y = PAD_TOP + PLOT_HEIGHT - tick / Y_MAX * PLOT_HEIGHT;
|
|
5452
|
-
return /* @__PURE__ */
|
|
5453
|
-
/* @__PURE__ */
|
|
5497
|
+
return /* @__PURE__ */ jsxs32("g", { children: [
|
|
5498
|
+
/* @__PURE__ */ jsx37(
|
|
5454
5499
|
"line",
|
|
5455
5500
|
{
|
|
5456
5501
|
stroke: "#ccc",
|
|
@@ -5461,7 +5506,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5461
5506
|
y2: y
|
|
5462
5507
|
}
|
|
5463
5508
|
),
|
|
5464
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsx37(
|
|
5465
5510
|
"text",
|
|
5466
5511
|
{
|
|
5467
5512
|
dominantBaseline: "middle",
|
|
@@ -5481,7 +5526,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5481
5526
|
chartPoints.length - 1
|
|
5482
5527
|
].map((idx) => {
|
|
5483
5528
|
const p = chartPoints[idx];
|
|
5484
|
-
return /* @__PURE__ */
|
|
5529
|
+
return /* @__PURE__ */ jsx37(
|
|
5485
5530
|
"text",
|
|
5486
5531
|
{
|
|
5487
5532
|
fill: "#999",
|
|
@@ -5493,7 +5538,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5493
5538
|
},
|
|
5494
5539
|
idx
|
|
5495
5540
|
);
|
|
5496
|
-
}) : chartPoints.map((p, idx) => /* @__PURE__ */
|
|
5541
|
+
}) : chartPoints.map((p, idx) => /* @__PURE__ */ jsx37(
|
|
5497
5542
|
"text",
|
|
5498
5543
|
{
|
|
5499
5544
|
fill: "#999",
|
|
@@ -5505,7 +5550,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5505
5550
|
},
|
|
5506
5551
|
idx
|
|
5507
5552
|
)),
|
|
5508
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ jsx37(
|
|
5509
5554
|
"polyline",
|
|
5510
5555
|
{
|
|
5511
5556
|
fill: "none",
|
|
@@ -5515,7 +5560,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5515
5560
|
strokeWidth: 2.5
|
|
5516
5561
|
}
|
|
5517
5562
|
),
|
|
5518
|
-
chartPoints.map((p, idx) => /* @__PURE__ */
|
|
5563
|
+
chartPoints.map((p, idx) => /* @__PURE__ */ jsx37(
|
|
5519
5564
|
"circle",
|
|
5520
5565
|
{
|
|
5521
5566
|
cx: p.x,
|
|
@@ -5524,7 +5569,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5524
5569
|
r: 4,
|
|
5525
5570
|
stroke: "#fff",
|
|
5526
5571
|
strokeWidth: 1.5,
|
|
5527
|
-
children: /* @__PURE__ */
|
|
5572
|
+
children: /* @__PURE__ */ jsxs32("title", { children: [
|
|
5528
5573
|
formatDate2(p.date),
|
|
5529
5574
|
": ",
|
|
5530
5575
|
Math.round(p.score)
|
|
@@ -5535,7 +5580,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5535
5580
|
]
|
|
5536
5581
|
}
|
|
5537
5582
|
) }),
|
|
5538
|
-
/* @__PURE__ */
|
|
5583
|
+
/* @__PURE__ */ jsxs32(Text32, { muted: true, size: 1, children: [
|
|
5539
5584
|
chartPoints.length,
|
|
5540
5585
|
" data point",
|
|
5541
5586
|
chartPoints.length !== 1 ? "s" : ""
|
|
@@ -5545,7 +5590,7 @@ function ScoreTimeline({ mode = null, source = null }) {
|
|
|
5545
5590
|
var ScoreTimeline_default = ScoreTimeline;
|
|
5546
5591
|
|
|
5547
5592
|
// src/components/Dashboard.tsx
|
|
5548
|
-
import { jsx as
|
|
5593
|
+
import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5549
5594
|
var VIEW_PARAM_MAP = {
|
|
5550
5595
|
compare: "compare",
|
|
5551
5596
|
timeline: "timeline"
|
|
@@ -5584,41 +5629,41 @@ function Dashboard() {
|
|
|
5584
5629
|
client.fetch(distinctSourcesQuery).then((data) => setSources(data ?? [])).catch(() => setSources([]));
|
|
5585
5630
|
client.fetch(distinctModesQuery).then((data) => setModes(data ?? [])).catch(() => setModes([]));
|
|
5586
5631
|
}, [client]);
|
|
5587
|
-
return /* @__PURE__ */
|
|
5588
|
-
/* @__PURE__ */
|
|
5589
|
-
/* @__PURE__ */
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
-
/* @__PURE__ */
|
|
5632
|
+
return /* @__PURE__ */ jsx38(Container, { width: 2, children: /* @__PURE__ */ jsxs33(Stack24, { padding: 4, space: 4, children: [
|
|
5633
|
+
/* @__PURE__ */ jsxs33(Flex25, { align: "center", gap: 3, children: [
|
|
5634
|
+
/* @__PURE__ */ jsxs33(Stack24, { flex: 1, space: 1, children: [
|
|
5635
|
+
/* @__PURE__ */ jsx38(Text33, { size: 3, weight: "bold", children: "AI Literacy Framework" }),
|
|
5636
|
+
/* @__PURE__ */ jsx38(Text33, { muted: true, size: 1, children: "Evaluation reports and score trends" })
|
|
5592
5637
|
] }),
|
|
5593
|
-
!isDetail && /* @__PURE__ */
|
|
5594
|
-
/* @__PURE__ */
|
|
5638
|
+
!isDetail && /* @__PURE__ */ jsxs33(Flex25, { gap: 2, children: [
|
|
5639
|
+
/* @__PURE__ */ jsxs33(
|
|
5595
5640
|
Select3,
|
|
5596
5641
|
{
|
|
5597
5642
|
fontSize: 1,
|
|
5598
5643
|
onChange: (e) => setSource(e.currentTarget.value || null),
|
|
5599
5644
|
value: source ?? "",
|
|
5600
5645
|
children: [
|
|
5601
|
-
/* @__PURE__ */
|
|
5602
|
-
sources.map((s) => /* @__PURE__ */
|
|
5646
|
+
/* @__PURE__ */ jsx38("option", { value: "", children: "All sources" }),
|
|
5647
|
+
sources.map((s) => /* @__PURE__ */ jsx38("option", { value: s, children: s }, s))
|
|
5603
5648
|
]
|
|
5604
5649
|
}
|
|
5605
5650
|
),
|
|
5606
|
-
/* @__PURE__ */
|
|
5651
|
+
/* @__PURE__ */ jsxs33(
|
|
5607
5652
|
Select3,
|
|
5608
5653
|
{
|
|
5609
5654
|
fontSize: 1,
|
|
5610
5655
|
onChange: (e) => setMode(e.currentTarget.value || null),
|
|
5611
5656
|
value: mode ?? "",
|
|
5612
5657
|
children: [
|
|
5613
|
-
/* @__PURE__ */
|
|
5614
|
-
modes.map((m) => /* @__PURE__ */
|
|
5658
|
+
/* @__PURE__ */ jsx38("option", { value: "", children: "All modes" }),
|
|
5659
|
+
modes.map((m) => /* @__PURE__ */ jsx38("option", { value: m, children: m }, m))
|
|
5615
5660
|
]
|
|
5616
5661
|
}
|
|
5617
5662
|
)
|
|
5618
5663
|
] })
|
|
5619
5664
|
] }),
|
|
5620
|
-
!isDetail && /* @__PURE__ */
|
|
5621
|
-
/* @__PURE__ */
|
|
5665
|
+
!isDetail && /* @__PURE__ */ jsxs33(TabList, { space: 1, children: [
|
|
5666
|
+
/* @__PURE__ */ jsx38(
|
|
5622
5667
|
Tab,
|
|
5623
5668
|
{
|
|
5624
5669
|
"aria-controls": "latest-panel",
|
|
@@ -5628,7 +5673,7 @@ function Dashboard() {
|
|
|
5628
5673
|
selected: activeTab === "latest"
|
|
5629
5674
|
}
|
|
5630
5675
|
),
|
|
5631
|
-
/* @__PURE__ */
|
|
5676
|
+
/* @__PURE__ */ jsx38(
|
|
5632
5677
|
Tab,
|
|
5633
5678
|
{
|
|
5634
5679
|
"aria-controls": "timeline-panel",
|
|
@@ -5638,7 +5683,7 @@ function Dashboard() {
|
|
|
5638
5683
|
selected: activeTab === "timeline"
|
|
5639
5684
|
}
|
|
5640
5685
|
),
|
|
5641
|
-
/* @__PURE__ */
|
|
5686
|
+
/* @__PURE__ */ jsx38(
|
|
5642
5687
|
Tab,
|
|
5643
5688
|
{
|
|
5644
5689
|
"aria-controls": "compare-panel",
|
|
@@ -5649,7 +5694,7 @@ function Dashboard() {
|
|
|
5649
5694
|
}
|
|
5650
5695
|
)
|
|
5651
5696
|
] }),
|
|
5652
|
-
!isDetail && activeTab === "latest" && /* @__PURE__ */
|
|
5697
|
+
!isDetail && activeTab === "latest" && /* @__PURE__ */ jsx38(TabPanel, { "aria-labelledby": "latest-tab", id: "latest-panel", children: /* @__PURE__ */ jsx38(
|
|
5653
5698
|
LatestReports,
|
|
5654
5699
|
{
|
|
5655
5700
|
mode,
|
|
@@ -5657,9 +5702,9 @@ function Dashboard() {
|
|
|
5657
5702
|
source
|
|
5658
5703
|
}
|
|
5659
5704
|
) }),
|
|
5660
|
-
!isDetail && activeTab === "timeline" && /* @__PURE__ */
|
|
5661
|
-
!isDetail && activeTab === "compare" && /* @__PURE__ */
|
|
5662
|
-
isDetail && reportId && /* @__PURE__ */
|
|
5705
|
+
!isDetail && activeTab === "timeline" && /* @__PURE__ */ jsx38(TabPanel, { "aria-labelledby": "timeline-tab", id: "timeline-panel", children: /* @__PURE__ */ jsx38(ScoreTimeline_default, { mode, source }) }),
|
|
5706
|
+
!isDetail && activeTab === "compare" && /* @__PURE__ */ jsx38(TabPanel, { "aria-labelledby": "compare-tab", id: "compare-panel", children: /* @__PURE__ */ jsx38(ComparisonView, {}) }),
|
|
5707
|
+
isDetail && reportId && /* @__PURE__ */ jsx38(ReportDetail, { onBack: handleBack, reportId })
|
|
5663
5708
|
] }) });
|
|
5664
5709
|
}
|
|
5665
5710
|
|
|
@@ -5672,9 +5717,9 @@ function ailfTool(options = {}) {
|
|
|
5672
5717
|
return {
|
|
5673
5718
|
component: Dashboard,
|
|
5674
5719
|
icon: BarChartIcon,
|
|
5675
|
-
name: options.name ?? "
|
|
5720
|
+
name: options.name ?? "ailf",
|
|
5676
5721
|
router: toolRouter,
|
|
5677
|
-
title: options.title ?? "AI Literacy"
|
|
5722
|
+
title: options.title ?? "AI Literacy Framework"
|
|
5678
5723
|
};
|
|
5679
5724
|
}
|
|
5680
5725
|
|