@validation-os/dashboard 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +53 -5
- package/dist/index.js +848 -559
- package/dist/index.js.map +1 -1
- package/dist/styles.css +120 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -56,7 +56,55 @@ var WORKFLOW_NAV = [
|
|
|
56
56
|
import {
|
|
57
57
|
isConcluded
|
|
58
58
|
} from "@validation-os/core/derivation";
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
// src/derived-views.ts
|
|
61
|
+
var KILL_ZONE = -50;
|
|
62
|
+
function readingBeliefs(r) {
|
|
63
|
+
return Array.isArray(r.beliefs) ? r.beliefs : [];
|
|
64
|
+
}
|
|
65
|
+
function readingBeliefFor(r, assumptionId) {
|
|
66
|
+
return readingBeliefs(r).find((b) => b.assumptionId === assumptionId);
|
|
67
|
+
}
|
|
68
|
+
function readingGrades(r, assumptionId) {
|
|
69
|
+
return readingBeliefFor(r, assumptionId) !== void 0;
|
|
70
|
+
}
|
|
71
|
+
function isArchivedExperiment(e) {
|
|
72
|
+
return str(e.Status) === "Archived";
|
|
73
|
+
}
|
|
74
|
+
function liveExperiments(experiments) {
|
|
75
|
+
return experiments.filter((e) => !isArchivedExperiment(e));
|
|
76
|
+
}
|
|
77
|
+
function str(v) {
|
|
78
|
+
return typeof v === "string" && v !== "" ? v : null;
|
|
79
|
+
}
|
|
80
|
+
function derivedNum(r, key) {
|
|
81
|
+
const v = r.derived?.[key];
|
|
82
|
+
return typeof v === "number" ? v : null;
|
|
83
|
+
}
|
|
84
|
+
function strList(v) {
|
|
85
|
+
return Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
|
|
86
|
+
}
|
|
87
|
+
function testsAssumption(exp, assumptionId) {
|
|
88
|
+
const bars = exp.barLines;
|
|
89
|
+
if (bars?.some((b) => b.assumptionId === assumptionId)) return true;
|
|
90
|
+
return strList(exp.barLineAssumptionIds).includes(assumptionId);
|
|
91
|
+
}
|
|
92
|
+
function hasOpenBarOn(exp, assumptionId) {
|
|
93
|
+
const bars = exp.barLines;
|
|
94
|
+
return bars?.some((b) => b.assumptionId === assumptionId && b.barVerdict == null) ?? false;
|
|
95
|
+
}
|
|
96
|
+
function inKillLane(a) {
|
|
97
|
+
return str(a.Status) === "Live" && (derivedNum(a, "confidence") ?? 0) <= KILL_ZONE;
|
|
98
|
+
}
|
|
99
|
+
function isTesting(a, experiments) {
|
|
100
|
+
if (str(a.Status) !== "Live") return false;
|
|
101
|
+
return experiments.some(
|
|
102
|
+
(e) => str(e.Status) === "Running" && hasOpenBarOn(e, a.id)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// src/next-move.ts
|
|
107
|
+
function str2(record, key) {
|
|
60
108
|
const v = record[key];
|
|
61
109
|
return typeof v === "string" ? v : null;
|
|
62
110
|
}
|
|
@@ -71,13 +119,11 @@ function idList(record, key) {
|
|
|
71
119
|
function toNextMoveInput(records) {
|
|
72
120
|
const concludedByAssumption = /* @__PURE__ */ new Map();
|
|
73
121
|
for (const r of records.readings) {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const result = str(r, "Result");
|
|
77
|
-
if (result && isConcluded(result)) {
|
|
122
|
+
for (const b of readingBeliefs(r)) {
|
|
123
|
+
if (!b.assumptionId || !isConcluded(b.Result)) continue;
|
|
78
124
|
concludedByAssumption.set(
|
|
79
|
-
assumptionId,
|
|
80
|
-
(concludedByAssumption.get(assumptionId) ?? 0) + 1
|
|
125
|
+
b.assumptionId,
|
|
126
|
+
(concludedByAssumption.get(b.assumptionId) ?? 0) + 1
|
|
81
127
|
);
|
|
82
128
|
}
|
|
83
129
|
}
|
|
@@ -86,8 +132,8 @@ function toNextMoveInput(records) {
|
|
|
86
132
|
const derived = a.derived && typeof a.derived === "object" ? a.derived : {};
|
|
87
133
|
return {
|
|
88
134
|
id: a.id,
|
|
89
|
-
title:
|
|
90
|
-
status:
|
|
135
|
+
title: str2(a, "Title") ?? a.id,
|
|
136
|
+
status: str2(a, "Status") ?? "",
|
|
91
137
|
impact: numOrNull(a, "Impact"),
|
|
92
138
|
moot: a.moot === true,
|
|
93
139
|
risk: typeof derived.risk === "number" ? derived.risk : 0,
|
|
@@ -96,12 +142,12 @@ function toNextMoveInput(records) {
|
|
|
96
142
|
};
|
|
97
143
|
}),
|
|
98
144
|
experiments: records.experiments.map((e) => ({
|
|
99
|
-
status:
|
|
100
|
-
feasibility:
|
|
145
|
+
status: str2(e, "Status") ?? "",
|
|
146
|
+
feasibility: str2(e, "Feasibility") ?? null,
|
|
101
147
|
assumptionIds: idList(e, "barLineAssumptionIds")
|
|
102
148
|
})),
|
|
103
149
|
decisions: records.decisions.map((d) => ({
|
|
104
|
-
status:
|
|
150
|
+
status: str2(d, "Status") ?? "",
|
|
105
151
|
assumptionIds: [...idList(d, "basedOnIds"), ...idList(d, "resolvesIds")]
|
|
106
152
|
}))
|
|
107
153
|
};
|
|
@@ -292,7 +338,7 @@ function sparklineY(value, height, lo, hi) {
|
|
|
292
338
|
// src/pipeline.ts
|
|
293
339
|
import {
|
|
294
340
|
assumptionCompleteness,
|
|
295
|
-
|
|
341
|
+
readingBeliefInputs
|
|
296
342
|
} from "@validation-os/core";
|
|
297
343
|
import {
|
|
298
344
|
beliefRisk,
|
|
@@ -306,7 +352,7 @@ function num(v) {
|
|
|
306
352
|
const n = Number(v);
|
|
307
353
|
return Number.isFinite(n) ? n : 0;
|
|
308
354
|
}
|
|
309
|
-
function
|
|
355
|
+
function str3(v) {
|
|
310
356
|
return typeof v === "string" ? v : "";
|
|
311
357
|
}
|
|
312
358
|
function derivedOf(rec) {
|
|
@@ -346,7 +392,9 @@ function nextMove(stage, killZone) {
|
|
|
346
392
|
}
|
|
347
393
|
}
|
|
348
394
|
function buildPipeline(assumptions, experiments) {
|
|
349
|
-
const tests = beliefTestMeters(
|
|
395
|
+
const tests = beliefTestMeters(
|
|
396
|
+
liveExperiments(experiments).map(toStageExperimentInput)
|
|
397
|
+
);
|
|
350
398
|
const rows = [];
|
|
351
399
|
const resolved = [];
|
|
352
400
|
const portfolioInput = [];
|
|
@@ -367,7 +415,7 @@ function buildPipeline(assumptions, experiments) {
|
|
|
367
415
|
resolvedRetired += retired;
|
|
368
416
|
resolved.push({
|
|
369
417
|
id: a.id,
|
|
370
|
-
statement:
|
|
418
|
+
statement: str3(a.Title),
|
|
371
419
|
kind,
|
|
372
420
|
retired
|
|
373
421
|
});
|
|
@@ -382,7 +430,7 @@ function buildPipeline(assumptions, experiments) {
|
|
|
382
430
|
const stage = deriveBeliefStage({ framed, confidence: d.confidence, test });
|
|
383
431
|
rows.push({
|
|
384
432
|
id: a.id,
|
|
385
|
-
statement:
|
|
433
|
+
statement: str3(a.Title),
|
|
386
434
|
impact: d.derivedImpact,
|
|
387
435
|
risk: d.risk,
|
|
388
436
|
riskTone: riskLevel(d.risk),
|
|
@@ -407,28 +455,27 @@ function buildPipeline(assumptions, experiments) {
|
|
|
407
455
|
}
|
|
408
456
|
function weekOverWeekDelta(assumptions, readings, now) {
|
|
409
457
|
const anyDated = readings.some((r) => {
|
|
410
|
-
const t2 = Date.parse(
|
|
458
|
+
const t2 = Date.parse(str3(r.Date));
|
|
411
459
|
return !Number.isNaN(t2);
|
|
412
460
|
});
|
|
413
461
|
if (!anyDated) return null;
|
|
414
462
|
const cutoff = now.getTime() - 7 * 24 * 60 * 60 * 1e3;
|
|
415
463
|
const byAssumption = /* @__PURE__ */ new Map();
|
|
416
|
-
for (const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
else byAssumption.set(id, [r]);
|
|
464
|
+
for (const input of readings.flatMap(readingBeliefInputs)) {
|
|
465
|
+
if (!input.assumptionId) continue;
|
|
466
|
+
const arr = byAssumption.get(input.assumptionId);
|
|
467
|
+
if (arr) arr.push(input);
|
|
468
|
+
else byAssumption.set(input.assumptionId, [input]);
|
|
422
469
|
}
|
|
423
470
|
const percentAsOf = (limit) => {
|
|
424
471
|
const inputs = assumptions.map((a) => {
|
|
425
472
|
const d = derivedOf(a);
|
|
426
|
-
const mine = (byAssumption.get(a.id) ?? []).filter((
|
|
473
|
+
const mine = (byAssumption.get(a.id) ?? []).filter((i) => {
|
|
427
474
|
if (limit === null) return true;
|
|
428
|
-
const t2 = Date.parse(
|
|
475
|
+
const t2 = Date.parse(i.date ?? "");
|
|
429
476
|
return !Number.isNaN(t2) && t2 <= limit;
|
|
430
477
|
});
|
|
431
|
-
const conf = confidence(mine
|
|
478
|
+
const conf = confidence(mine);
|
|
432
479
|
return {
|
|
433
480
|
id: a.id,
|
|
434
481
|
derivedImpact: d.derivedImpact,
|
|
@@ -514,16 +561,6 @@ var num2 = (key, label, range = {}) => ({
|
|
|
514
561
|
...range
|
|
515
562
|
});
|
|
516
563
|
var sel = (key, label, options, nullable = false) => ({ key, label, kind: "select", options, nullable });
|
|
517
|
-
var READING_RUNGS = [
|
|
518
|
-
"Opinion",
|
|
519
|
-
"Pitch-deck reaction",
|
|
520
|
-
"Anecdotal",
|
|
521
|
-
"Desk research",
|
|
522
|
-
"Survey at scale",
|
|
523
|
-
"Prototype usage",
|
|
524
|
-
"Signed intent",
|
|
525
|
-
"Paying users"
|
|
526
|
-
];
|
|
527
564
|
var SOURCE_QUALITY = ["1", "0.7", "0.5"];
|
|
528
565
|
var EDITORS = {
|
|
529
566
|
assumptions: [
|
|
@@ -562,12 +599,14 @@ var EDITORS = {
|
|
|
562
599
|
readings: [
|
|
563
600
|
t("Title", "Reading"),
|
|
564
601
|
t("Source", "Source"),
|
|
565
|
-
|
|
566
|
-
|
|
602
|
+
// Rung / Result / Magnitude band / Grading justification are PER BELIEF now
|
|
603
|
+
// (OPS-1305) — they live in each entry of `beliefs[]`, not on the row, so
|
|
604
|
+
// they are deliberately absent here rather than writing dead row-level
|
|
605
|
+
// fields. Editing a reading's per-belief scores is a deferred follow-up (a
|
|
606
|
+
// `beliefs[]` editor); this form edits only the row-level fields that remain.
|
|
567
607
|
sel("Representativeness", "Representativeness", SOURCE_QUALITY),
|
|
568
608
|
sel("Credibility", "Credibility", SOURCE_QUALITY),
|
|
569
|
-
|
|
570
|
-
area("Grading justification", "Grading justification"),
|
|
609
|
+
area("body", "Quote"),
|
|
571
610
|
t("Date", "Date")
|
|
572
611
|
],
|
|
573
612
|
decisions: [
|
|
@@ -1062,14 +1101,16 @@ var COLUMNS = {
|
|
|
1062
1101
|
],
|
|
1063
1102
|
readings: [
|
|
1064
1103
|
{ key: "Title", header: "Reading" },
|
|
1065
|
-
{ key: "
|
|
1066
|
-
{ key: "
|
|
1104
|
+
{ key: "Source", header: "Source" },
|
|
1105
|
+
{ key: "Date", header: "Date" },
|
|
1106
|
+
// The row's per-belief Result / Rung / Strength are gone (OPS-1305) — they
|
|
1107
|
+
// live in the reading detail's per-belief verdict list. The table instead
|
|
1108
|
+
// previews the quote (`body`) so a row is legible at a glance; assumption
|
|
1109
|
+
// chips (see `readingAssumptionChips`) disambiguate same-titled readings.
|
|
1067
1110
|
{
|
|
1068
|
-
key: "
|
|
1069
|
-
header: "
|
|
1070
|
-
|
|
1071
|
-
derived: true,
|
|
1072
|
-
accessor: derivedField("strength")
|
|
1111
|
+
key: "body",
|
|
1112
|
+
header: "Quote",
|
|
1113
|
+
accessor: (r) => bodyPreview(r.body)
|
|
1073
1114
|
}
|
|
1074
1115
|
],
|
|
1075
1116
|
decisions: [
|
|
@@ -1084,6 +1125,16 @@ var COLUMNS = {
|
|
|
1084
1125
|
function columnsFor(register) {
|
|
1085
1126
|
return COLUMNS[register];
|
|
1086
1127
|
}
|
|
1128
|
+
function bodyPreview(value, max = 80) {
|
|
1129
|
+
if (typeof value !== "string") return "";
|
|
1130
|
+
const oneLine = value.replace(/\s+/g, " ").trim();
|
|
1131
|
+
if (oneLine.length <= max) return oneLine;
|
|
1132
|
+
return `${oneLine.slice(0, max - 1).trimEnd()}\u2026`;
|
|
1133
|
+
}
|
|
1134
|
+
function readingAssumptionChips(record, titleById = /* @__PURE__ */ new Map()) {
|
|
1135
|
+
const ids = Array.isArray(record.assumptionIds) ? record.assumptionIds.filter((x) => typeof x === "string") : [];
|
|
1136
|
+
return ids.map((id) => titleById.get(id) ?? id);
|
|
1137
|
+
}
|
|
1087
1138
|
function cellValue(column, record) {
|
|
1088
1139
|
return column.accessor ? column.accessor(record) : record[column.key];
|
|
1089
1140
|
}
|
|
@@ -1120,7 +1171,9 @@ var FIELD_LABEL = {
|
|
|
1120
1171
|
contradictsIds: "Contradicts",
|
|
1121
1172
|
readingIds: "Readings",
|
|
1122
1173
|
assumptionId: "Assumption",
|
|
1123
|
-
|
|
1174
|
+
assumptionIds: "Beliefs",
|
|
1175
|
+
experimentId: "Evidence plan",
|
|
1176
|
+
body: "Quote",
|
|
1124
1177
|
contextLinks: "Context links",
|
|
1125
1178
|
basedOnIds: "Based on",
|
|
1126
1179
|
resolvesIds: "Resolves",
|
|
@@ -1148,13 +1201,22 @@ var META_FIELDS = /* @__PURE__ */ new Set([
|
|
|
1148
1201
|
"updatedAt",
|
|
1149
1202
|
"derived"
|
|
1150
1203
|
]);
|
|
1151
|
-
var SUPPRESSED_FIELDS = /* @__PURE__ */ new Set([
|
|
1204
|
+
var SUPPRESSED_FIELDS = /* @__PURE__ */ new Set([
|
|
1205
|
+
"barLineAssumptionIds",
|
|
1206
|
+
// A reading's `beliefs[]` is rendered as the richer per-belief verdict list
|
|
1207
|
+
// (OPS-1305), never as raw JSON in the generic row list.
|
|
1208
|
+
"beliefs",
|
|
1209
|
+
// `body` (a reading's quote / an experiment's narrative) renders as Markdown
|
|
1210
|
+
// in its own block, not as a raw-text row.
|
|
1211
|
+
"body"
|
|
1212
|
+
]);
|
|
1152
1213
|
var RELATION_TARGET = {
|
|
1153
1214
|
dependsOnIds: "assumptions",
|
|
1154
1215
|
enablesIds: "assumptions",
|
|
1155
1216
|
contradictsIds: "assumptions",
|
|
1156
1217
|
readingIds: "readings",
|
|
1157
1218
|
assumptionId: "assumptions",
|
|
1219
|
+
assumptionIds: "assumptions",
|
|
1158
1220
|
experimentId: "experiments",
|
|
1159
1221
|
basedOnIds: "assumptions",
|
|
1160
1222
|
resolvesIds: "assumptions"
|
|
@@ -1203,7 +1265,13 @@ function detailRows(register, record, related = {}) {
|
|
|
1203
1265
|
const label = fieldLabel(key);
|
|
1204
1266
|
const target = RELATION_TARGET[key];
|
|
1205
1267
|
if (target) {
|
|
1206
|
-
|
|
1268
|
+
let items = idsOf(value).map((id) => resolveItem(related, target, id));
|
|
1269
|
+
if (target === "experiments") {
|
|
1270
|
+
const archived = new Set(
|
|
1271
|
+
(related.experiments ?? []).filter((e) => isArchivedExperiment(e)).map((e) => e.id)
|
|
1272
|
+
);
|
|
1273
|
+
items = items.filter((it) => !archived.has(it.id));
|
|
1274
|
+
}
|
|
1207
1275
|
return { key, label, kind: "relation", items };
|
|
1208
1276
|
}
|
|
1209
1277
|
if (OWNER_FIELDS.has(key)) {
|
|
@@ -1436,7 +1504,7 @@ function TermLink({
|
|
|
1436
1504
|
// src/journey.ts
|
|
1437
1505
|
import {
|
|
1438
1506
|
assumptionCompleteness as assumptionCompleteness2,
|
|
1439
|
-
|
|
1507
|
+
readingBeliefInputs as readingBeliefInputs3
|
|
1440
1508
|
} from "@validation-os/core";
|
|
1441
1509
|
import {
|
|
1442
1510
|
assembleJourney,
|
|
@@ -1446,51 +1514,20 @@ import {
|
|
|
1446
1514
|
rankNextMoves
|
|
1447
1515
|
} from "@validation-os/core/derivation";
|
|
1448
1516
|
|
|
1449
|
-
// src/derived-views.ts
|
|
1450
|
-
var KILL_ZONE = -50;
|
|
1451
|
-
function str3(v) {
|
|
1452
|
-
return typeof v === "string" && v !== "" ? v : null;
|
|
1453
|
-
}
|
|
1454
|
-
function derivedNum(r, key) {
|
|
1455
|
-
const v = r.derived?.[key];
|
|
1456
|
-
return typeof v === "number" ? v : null;
|
|
1457
|
-
}
|
|
1458
|
-
function strList(v) {
|
|
1459
|
-
return Array.isArray(v) ? v.filter((x) => typeof x === "string") : [];
|
|
1460
|
-
}
|
|
1461
|
-
function testsAssumption(exp, assumptionId) {
|
|
1462
|
-
const bars = exp.barLines;
|
|
1463
|
-
if (bars?.some((b) => b.assumptionId === assumptionId)) return true;
|
|
1464
|
-
return strList(exp.barLineAssumptionIds).includes(assumptionId);
|
|
1465
|
-
}
|
|
1466
|
-
function hasOpenBarOn(exp, assumptionId) {
|
|
1467
|
-
const bars = exp.barLines;
|
|
1468
|
-
return bars?.some((b) => b.assumptionId === assumptionId && b.barVerdict == null) ?? false;
|
|
1469
|
-
}
|
|
1470
|
-
function inKillLane(a) {
|
|
1471
|
-
return str3(a.Status) === "Live" && (derivedNum(a, "confidence") ?? 0) <= KILL_ZONE;
|
|
1472
|
-
}
|
|
1473
|
-
function isTesting(a, experiments) {
|
|
1474
|
-
if (str3(a.Status) !== "Live") return false;
|
|
1475
|
-
return experiments.some(
|
|
1476
|
-
(e) => str3(e.Status) === "Running" && hasOpenBarOn(e, a.id)
|
|
1477
|
-
);
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
1517
|
// src/cycles.ts
|
|
1481
1518
|
import {
|
|
1482
|
-
|
|
1519
|
+
readingBeliefInputs as readingBeliefInputs2
|
|
1483
1520
|
} from "@validation-os/core";
|
|
1484
1521
|
import { confidenceAttribution } from "@validation-os/core/derivation";
|
|
1485
1522
|
var DIRECT_CYCLE_KEY = "direct";
|
|
1486
1523
|
function readingDate(r) {
|
|
1487
|
-
return
|
|
1524
|
+
return str(r.Date);
|
|
1488
1525
|
}
|
|
1489
|
-
function toCycleReading(r) {
|
|
1526
|
+
function toCycleReading(r, assumptionId) {
|
|
1490
1527
|
return {
|
|
1491
1528
|
id: r.id,
|
|
1492
1529
|
date: readingDate(r),
|
|
1493
|
-
result: r
|
|
1530
|
+
result: readingBeliefFor(r, assumptionId)?.Result ?? null
|
|
1494
1531
|
};
|
|
1495
1532
|
}
|
|
1496
1533
|
function sortByDate(readings) {
|
|
@@ -1507,13 +1544,14 @@ function barVerdictFor(exp, assumptionId) {
|
|
|
1507
1544
|
return line?.barVerdict ?? null;
|
|
1508
1545
|
}
|
|
1509
1546
|
function buildCycles(assumptionId, readings, experiments) {
|
|
1510
|
-
const mine = readings.filter((r) => r
|
|
1511
|
-
const
|
|
1547
|
+
const mine = readings.filter((r) => readingGrades(r, assumptionId));
|
|
1548
|
+
const inputs = readings.flatMap(readingBeliefInputs2).filter((i) => i.assumptionId === assumptionId);
|
|
1549
|
+
const { movers } = confidenceAttribution(inputs);
|
|
1512
1550
|
const moverByKey = new Map(movers.map((m) => [m.key, m]));
|
|
1513
1551
|
const byExperiment = /* @__PURE__ */ new Map();
|
|
1514
1552
|
const direct = [];
|
|
1515
1553
|
for (const r of mine) {
|
|
1516
|
-
const expId =
|
|
1554
|
+
const expId = str(r.experimentId);
|
|
1517
1555
|
if (expId) {
|
|
1518
1556
|
const bucket = byExperiment.get(expId) ?? [];
|
|
1519
1557
|
bucket.push(r);
|
|
@@ -1524,19 +1562,24 @@ function buildCycles(assumptionId, readings, experiments) {
|
|
|
1524
1562
|
}
|
|
1525
1563
|
const experimentsById = new Map(experiments.map((e) => [e.id, e]));
|
|
1526
1564
|
const experimentIds = /* @__PURE__ */ new Set([
|
|
1527
|
-
...experiments.filter((e) => testsAssumption(e, assumptionId)).map((e) => e.id),
|
|
1528
|
-
...byExperiment.keys()
|
|
1565
|
+
...liveExperiments(experiments).filter((e) => testsAssumption(e, assumptionId)).map((e) => e.id),
|
|
1566
|
+
...[...byExperiment.keys()].filter((id) => {
|
|
1567
|
+
const e = experimentsById.get(id);
|
|
1568
|
+
return !e || !isArchivedExperiment(e);
|
|
1569
|
+
})
|
|
1529
1570
|
]);
|
|
1530
1571
|
const cycles = [...experimentIds].map((id) => {
|
|
1531
1572
|
const exp = experimentsById.get(id);
|
|
1532
|
-
const readingViews = sortByDate(
|
|
1573
|
+
const readingViews = sortByDate(
|
|
1574
|
+
(byExperiment.get(id) ?? []).map((r) => toCycleReading(r, assumptionId))
|
|
1575
|
+
);
|
|
1533
1576
|
const mover = moverByKey.get(id);
|
|
1534
|
-
const date = (exp ?
|
|
1577
|
+
const date = (exp ? str(exp.Date) : null) ?? readingViews[0]?.date ?? null;
|
|
1535
1578
|
return {
|
|
1536
1579
|
key: id,
|
|
1537
1580
|
kind: "experiment",
|
|
1538
|
-
title: exp ?
|
|
1539
|
-
status: exp ?
|
|
1581
|
+
title: exp ? str(exp.Title) : null,
|
|
1582
|
+
status: exp ? str(exp.Status) : null,
|
|
1540
1583
|
date,
|
|
1541
1584
|
barVerdict: exp ? barVerdictFor(exp, assumptionId) : null,
|
|
1542
1585
|
readings: readingViews,
|
|
@@ -1545,7 +1588,9 @@ function buildCycles(assumptionId, readings, experiments) {
|
|
|
1545
1588
|
};
|
|
1546
1589
|
});
|
|
1547
1590
|
if (direct.length > 0) {
|
|
1548
|
-
const readingViews = sortByDate(
|
|
1591
|
+
const readingViews = sortByDate(
|
|
1592
|
+
direct.map((r) => toCycleReading(r, assumptionId))
|
|
1593
|
+
);
|
|
1549
1594
|
const mover = moverByKey.get(DIRECT_CYCLE_KEY);
|
|
1550
1595
|
cycles.push({
|
|
1551
1596
|
key: DIRECT_CYCLE_KEY,
|
|
@@ -1620,21 +1665,18 @@ function buildJourney(assumptionId, records, now) {
|
|
|
1620
1665
|
if (!belief2) return null;
|
|
1621
1666
|
const derived = belief2.derived && typeof belief2.derived === "object" ? belief2.derived : {};
|
|
1622
1667
|
const confidence2 = typeof derived.confidence === "number" ? derived.confidence : 0;
|
|
1623
|
-
const
|
|
1624
|
-
|
|
1625
|
-
) ?? emptyTestMeter();
|
|
1668
|
+
const live = liveExperiments(records.experiments);
|
|
1669
|
+
const test = beliefTestMeters2(live.map(toStageExperimentInput)).get(assumptionId) ?? emptyTestMeter();
|
|
1626
1670
|
const framed = assumptionCompleteness2(belief2);
|
|
1627
1671
|
const stage = deriveBeliefStage2({ framed, confidence: confidence2, test });
|
|
1628
|
-
const
|
|
1629
|
-
|
|
1630
|
-
);
|
|
1631
|
-
const myExperiments = records.experiments.filter((e) => testsAssumption(e, assumptionId)).map((e) => ({ id: e.id, date: str4(e.Date) || str4(e.createdAt) || null }));
|
|
1672
|
+
const myReadingInputs = records.readings.flatMap(readingBeliefInputs3).filter((i) => i.assumptionId === assumptionId);
|
|
1673
|
+
const myExperiments = live.filter((e) => testsAssumption(e, assumptionId)).map((e) => ({ id: e.id, date: str4(e.Date) || str4(e.createdAt) || null }));
|
|
1632
1674
|
const events = assembleJourney({
|
|
1633
1675
|
belief: {
|
|
1634
1676
|
createdAt: str4(belief2.createdAt) || null,
|
|
1635
1677
|
impactScored: belief2.Impact != null
|
|
1636
1678
|
},
|
|
1637
|
-
readings:
|
|
1679
|
+
readings: myReadingInputs,
|
|
1638
1680
|
experiments: myExperiments,
|
|
1639
1681
|
now
|
|
1640
1682
|
}).map((event) => ({ ...event, label: labelFor(event) }));
|
|
@@ -2221,7 +2263,7 @@ function StatTile({
|
|
|
2221
2263
|
|
|
2222
2264
|
// src/understanding.ts
|
|
2223
2265
|
import {
|
|
2224
|
-
|
|
2266
|
+
readingBeliefInputs as readingBeliefInputs4
|
|
2225
2267
|
} from "@validation-os/core";
|
|
2226
2268
|
import {
|
|
2227
2269
|
confidenceAttribution as confidenceAttribution2,
|
|
@@ -2230,26 +2272,28 @@ import {
|
|
|
2230
2272
|
isConcluded as isConcluded2
|
|
2231
2273
|
} from "@validation-os/core/derivation";
|
|
2232
2274
|
function buildUnderstanding(assumption, readings, experiments) {
|
|
2233
|
-
const
|
|
2234
|
-
const inputs = mine.map(toReadingInput4);
|
|
2275
|
+
const inputs = readings.flatMap(readingBeliefInputs4).filter((i) => i.assumptionId === assumption.id);
|
|
2235
2276
|
const { confidence: confidence2, movers } = confidenceAttribution2(inputs);
|
|
2236
2277
|
const experimentsById = new Map(experiments.map((e) => [e.id, e]));
|
|
2237
2278
|
const moverByExperiment = new Map(
|
|
2238
2279
|
movers.filter((m) => m.kind === "experiment").map((m) => [m.experimentId, m])
|
|
2239
2280
|
);
|
|
2240
2281
|
const experimentIds = /* @__PURE__ */ new Set([
|
|
2241
|
-
...experiments.filter((e) => testsAssumption(e, assumption.id)).map((e) => e.id),
|
|
2242
|
-
...moverByExperiment.keys()
|
|
2282
|
+
...liveExperiments(experiments).filter((e) => testsAssumption(e, assumption.id)).map((e) => e.id),
|
|
2283
|
+
...[...moverByExperiment.keys()].filter((id) => {
|
|
2284
|
+
const e = experimentsById.get(id);
|
|
2285
|
+
return !e || !isArchivedExperiment(e);
|
|
2286
|
+
})
|
|
2243
2287
|
]);
|
|
2244
2288
|
const experimentViews = [...experimentIds].map((id) => {
|
|
2245
2289
|
const exp = experimentsById.get(id);
|
|
2246
2290
|
const mover = moverByExperiment.get(id);
|
|
2247
2291
|
const bars = exp?.barLines ?? [];
|
|
2248
2292
|
const progress = bars.length ? experimentProgress(bars) : null;
|
|
2249
|
-
const status = exp ?
|
|
2293
|
+
const status = exp ? str(exp.Status) : null;
|
|
2250
2294
|
return {
|
|
2251
2295
|
experimentId: id,
|
|
2252
|
-
title: exp ?
|
|
2296
|
+
title: exp ? str(exp.Title) : null,
|
|
2253
2297
|
status,
|
|
2254
2298
|
contribution: mover?.contribution ?? 0,
|
|
2255
2299
|
magnitude: mover?.magnitude ?? 0,
|
|
@@ -2726,42 +2770,43 @@ function JourneyColdCard({
|
|
|
2726
2770
|
}
|
|
2727
2771
|
|
|
2728
2772
|
// src/list-surface.ts
|
|
2773
|
+
function hasConcludedBelief(r) {
|
|
2774
|
+
return readingBeliefs(r).some((b) => b.Result !== "Inconclusive");
|
|
2775
|
+
}
|
|
2729
2776
|
function isProven(a, ctx) {
|
|
2730
|
-
if (
|
|
2731
|
-
const
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
const strongest = mine.reduce(
|
|
2736
|
-
(best, r) => Math.abs(derivedNum(r, "strength") ?? 0) > Math.abs(derivedNum(best, "strength") ?? 0) ? r : best
|
|
2777
|
+
if (str(a.Status) !== "Live") return false;
|
|
2778
|
+
const scores = (ctx.readings ?? []).map((r) => readingBeliefFor(r, a.id)).filter((b) => b != null && b.Result !== "Inconclusive");
|
|
2779
|
+
if (scores.length === 0) return false;
|
|
2780
|
+
const strongest = scores.reduce(
|
|
2781
|
+
(best, b) => Math.abs(b.derived?.strength ?? 0) > Math.abs(best.derived?.strength ?? 0) ? b : best
|
|
2737
2782
|
);
|
|
2738
|
-
return
|
|
2783
|
+
return strongest.Result === "Validated";
|
|
2739
2784
|
}
|
|
2740
2785
|
function isOverdue(e, ctx) {
|
|
2741
|
-
const deadline =
|
|
2742
|
-
if (!ctx.asOf || !deadline ||
|
|
2786
|
+
const deadline = str(e.Deadline);
|
|
2787
|
+
if (!ctx.asOf || !deadline || str(e.Status) !== "Running") return false;
|
|
2743
2788
|
return deadline < ctx.asOf;
|
|
2744
2789
|
}
|
|
2745
2790
|
function inTension(d, ctx) {
|
|
2746
|
-
if (
|
|
2791
|
+
if (str(d.Status) !== "Active") return false;
|
|
2747
2792
|
const based = strList(d.basedOnIds);
|
|
2748
2793
|
if (based.length === 0) return false;
|
|
2749
2794
|
const byId = new Map((ctx.assumptions ?? []).map((a) => [a.id, a]));
|
|
2750
2795
|
return based.some((id) => {
|
|
2751
2796
|
const a = byId.get(id);
|
|
2752
2797
|
if (!a) return false;
|
|
2753
|
-
return
|
|
2798
|
+
return str(a.Status) === "Invalidated" || inKillLane(a);
|
|
2754
2799
|
});
|
|
2755
2800
|
}
|
|
2756
2801
|
var ALWAYS = () => true;
|
|
2757
|
-
var byStatus = (...values) => (r) => values.includes(
|
|
2802
|
+
var byStatus = (...values) => (r) => values.includes(str(r.Status) ?? "");
|
|
2758
2803
|
var TAB_CATALOGUE = {
|
|
2759
2804
|
assumptions: [
|
|
2760
2805
|
{
|
|
2761
2806
|
id: "live",
|
|
2762
2807
|
label: "Live",
|
|
2763
2808
|
isDefault: true,
|
|
2764
|
-
predicate: (r) =>
|
|
2809
|
+
predicate: (r) => str(r.Status) === "Live" && r.moot !== true,
|
|
2765
2810
|
defaultSort: { key: "risk", dir: "desc" }
|
|
2766
2811
|
},
|
|
2767
2812
|
{
|
|
@@ -2814,12 +2859,12 @@ var TAB_CATALOGUE = {
|
|
|
2814
2859
|
{
|
|
2815
2860
|
id: "concluded",
|
|
2816
2861
|
label: "\xB1 Concluded",
|
|
2817
|
-
predicate: (r) =>
|
|
2862
|
+
predicate: (r) => hasConcludedBelief(r)
|
|
2818
2863
|
},
|
|
2819
2864
|
{
|
|
2820
2865
|
id: "inconclusive",
|
|
2821
2866
|
label: "Inconclusive",
|
|
2822
|
-
predicate: (r) =>
|
|
2867
|
+
predicate: (r) => !hasConcludedBelief(r)
|
|
2823
2868
|
}
|
|
2824
2869
|
],
|
|
2825
2870
|
decisions: [
|
|
@@ -2908,7 +2953,7 @@ function groupRecords(records, axis) {
|
|
|
2908
2953
|
if (values.length === 0) push(emptyLabel, r);
|
|
2909
2954
|
else for (const v of values) push(v, r);
|
|
2910
2955
|
} else {
|
|
2911
|
-
push(
|
|
2956
|
+
push(str(r[axis]) ?? emptyLabel, r);
|
|
2912
2957
|
}
|
|
2913
2958
|
}
|
|
2914
2959
|
return order.map((key) => ({ key, label: key, records: buckets.get(key) }));
|
|
@@ -2917,7 +2962,7 @@ function filterRecords(records, query) {
|
|
|
2917
2962
|
const q = query.trim().toLowerCase();
|
|
2918
2963
|
if (!q) return records;
|
|
2919
2964
|
return records.filter((r) => {
|
|
2920
|
-
const hay = `${
|
|
2965
|
+
const hay = `${str(r.Title) ?? ""} ${str(r.Description) ?? ""} ${str(r.Source) ?? ""}`.toLowerCase();
|
|
2921
2966
|
return hay.includes(q);
|
|
2922
2967
|
});
|
|
2923
2968
|
}
|
|
@@ -2943,11 +2988,11 @@ function sortRecords(records, sort) {
|
|
|
2943
2988
|
}).map((x) => x.r);
|
|
2944
2989
|
}
|
|
2945
2990
|
function nestReadingsByPlan(readings, experiments) {
|
|
2946
|
-
const titleById = new Map(experiments.map((e) => [e.id,
|
|
2991
|
+
const titleById = new Map(experiments.map((e) => [e.id, str(e.Title)]));
|
|
2947
2992
|
const order = [];
|
|
2948
2993
|
const groups = /* @__PURE__ */ new Map();
|
|
2949
2994
|
for (const r of readings) {
|
|
2950
|
-
const key =
|
|
2995
|
+
const key = str(r.experimentId);
|
|
2951
2996
|
if (!groups.has(key)) {
|
|
2952
2997
|
groups.set(key, []);
|
|
2953
2998
|
order.push(key);
|
|
@@ -2991,6 +3036,149 @@ function needsHumanCounts(ctx) {
|
|
|
2991
3036
|
};
|
|
2992
3037
|
}
|
|
2993
3038
|
|
|
3039
|
+
// src/markdown.tsx
|
|
3040
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3041
|
+
function Markdown({ text }) {
|
|
3042
|
+
const trimmed = (text ?? "").trim();
|
|
3043
|
+
if (!trimmed) return null;
|
|
3044
|
+
return /* @__PURE__ */ jsx9("div", { className: "vos-md", children: renderBlocks(trimmed) });
|
|
3045
|
+
}
|
|
3046
|
+
function renderBlocks(text) {
|
|
3047
|
+
const lines = text.replace(/\r\n?/g, "\n").split("\n");
|
|
3048
|
+
const out = [];
|
|
3049
|
+
let i = 0;
|
|
3050
|
+
let key = 0;
|
|
3051
|
+
while (i < lines.length) {
|
|
3052
|
+
const line = lines[i];
|
|
3053
|
+
if (line.trim() === "") {
|
|
3054
|
+
i += 1;
|
|
3055
|
+
continue;
|
|
3056
|
+
}
|
|
3057
|
+
const fence = line.match(/^```/);
|
|
3058
|
+
if (fence) {
|
|
3059
|
+
const body = [];
|
|
3060
|
+
i += 1;
|
|
3061
|
+
while (i < lines.length && !/^```/.test(lines[i])) {
|
|
3062
|
+
body.push(lines[i]);
|
|
3063
|
+
i += 1;
|
|
3064
|
+
}
|
|
3065
|
+
i += 1;
|
|
3066
|
+
out.push(
|
|
3067
|
+
/* @__PURE__ */ jsx9("pre", { className: "vos-md-pre", children: /* @__PURE__ */ jsx9("code", { children: body.join("\n") }) }, key++)
|
|
3068
|
+
);
|
|
3069
|
+
continue;
|
|
3070
|
+
}
|
|
3071
|
+
const heading = line.match(/^(#{1,6})\s+(.*)$/);
|
|
3072
|
+
if (heading) {
|
|
3073
|
+
const level = heading[1].length;
|
|
3074
|
+
const Tag = `h${Math.min(level + 2, 6)}`;
|
|
3075
|
+
out.push(/* @__PURE__ */ jsx9(Tag, { children: renderInline(heading[2]) }, key++));
|
|
3076
|
+
i += 1;
|
|
3077
|
+
continue;
|
|
3078
|
+
}
|
|
3079
|
+
if (/^>\s?/.test(line)) {
|
|
3080
|
+
const quote = [];
|
|
3081
|
+
while (i < lines.length && /^>\s?/.test(lines[i])) {
|
|
3082
|
+
quote.push(lines[i].replace(/^>\s?/, ""));
|
|
3083
|
+
i += 1;
|
|
3084
|
+
}
|
|
3085
|
+
out.push(
|
|
3086
|
+
/* @__PURE__ */ jsx9("blockquote", { className: "vos-md-quote", children: renderBlocks(quote.join("\n")) }, key++)
|
|
3087
|
+
);
|
|
3088
|
+
continue;
|
|
3089
|
+
}
|
|
3090
|
+
if (/^[-*+]\s+/.test(line)) {
|
|
3091
|
+
const items = [];
|
|
3092
|
+
while (i < lines.length && /^[-*+]\s+/.test(lines[i])) {
|
|
3093
|
+
items.push(lines[i].replace(/^[-*+]\s+/, ""));
|
|
3094
|
+
i += 1;
|
|
3095
|
+
}
|
|
3096
|
+
out.push(
|
|
3097
|
+
/* @__PURE__ */ jsx9("ul", { className: "vos-md-ul", children: items.map((it, n) => /* @__PURE__ */ jsx9("li", { children: renderInline(it) }, n)) }, key++)
|
|
3098
|
+
);
|
|
3099
|
+
continue;
|
|
3100
|
+
}
|
|
3101
|
+
if (/^\d+\.\s+/.test(line)) {
|
|
3102
|
+
const items = [];
|
|
3103
|
+
while (i < lines.length && /^\d+\.\s+/.test(lines[i])) {
|
|
3104
|
+
items.push(lines[i].replace(/^\d+\.\s+/, ""));
|
|
3105
|
+
i += 1;
|
|
3106
|
+
}
|
|
3107
|
+
out.push(
|
|
3108
|
+
/* @__PURE__ */ jsx9("ol", { className: "vos-md-ol", children: items.map((it, n) => /* @__PURE__ */ jsx9("li", { children: renderInline(it) }, n)) }, key++)
|
|
3109
|
+
);
|
|
3110
|
+
continue;
|
|
3111
|
+
}
|
|
3112
|
+
const para = [];
|
|
3113
|
+
while (i < lines.length && lines[i].trim() !== "" && !/^```|^#{1,6}\s|^>\s?|^[-*+]\s+|^\d+\.\s+/.test(lines[i])) {
|
|
3114
|
+
para.push(lines[i]);
|
|
3115
|
+
i += 1;
|
|
3116
|
+
}
|
|
3117
|
+
out.push(/* @__PURE__ */ jsx9("p", { children: renderInline(para.join(" ")) }, key++));
|
|
3118
|
+
}
|
|
3119
|
+
return out;
|
|
3120
|
+
}
|
|
3121
|
+
function safeHref(href) {
|
|
3122
|
+
if (/^(https?:\/\/|mailto:)/i.test(href)) return href;
|
|
3123
|
+
if (/^[#/]/.test(href)) return href;
|
|
3124
|
+
return null;
|
|
3125
|
+
}
|
|
3126
|
+
var INLINE_RULES = [
|
|
3127
|
+
// Inline code first — its contents are literal.
|
|
3128
|
+
{
|
|
3129
|
+
re: /`([^`]+)`/,
|
|
3130
|
+
render: (m, key) => /* @__PURE__ */ jsx9("code", { className: "vos-md-code", children: m[1] }, key),
|
|
3131
|
+
recurse: false
|
|
3132
|
+
},
|
|
3133
|
+
// Links: [text](href)
|
|
3134
|
+
{
|
|
3135
|
+
re: /\[([^\]]+)\]\(([^)\s]+)\)/,
|
|
3136
|
+
render: (m, key) => {
|
|
3137
|
+
const href = safeHref(m[2]);
|
|
3138
|
+
if (!href) return /* @__PURE__ */ jsx9("span", { children: m[1] }, key);
|
|
3139
|
+
return /* @__PURE__ */ jsx9("a", { href, target: "_blank", rel: "noopener noreferrer", children: m[1] }, key);
|
|
3140
|
+
},
|
|
3141
|
+
recurse: false
|
|
3142
|
+
},
|
|
3143
|
+
// Bold: **text** or __text__
|
|
3144
|
+
{
|
|
3145
|
+
re: /\*\*([^*]+)\*\*|__([^_]+)__/,
|
|
3146
|
+
render: (m, key) => /* @__PURE__ */ jsx9("strong", { children: renderInline(m[1] ?? m[2] ?? "") }, key),
|
|
3147
|
+
recurse: true,
|
|
3148
|
+
inner: (m) => m[1] ?? m[2] ?? ""
|
|
3149
|
+
},
|
|
3150
|
+
// Italic: *text* or _text_
|
|
3151
|
+
{
|
|
3152
|
+
re: /\*([^*]+)\*|_([^_]+)_/,
|
|
3153
|
+
render: (m, key) => /* @__PURE__ */ jsx9("em", { children: renderInline(m[1] ?? m[2] ?? "") }, key),
|
|
3154
|
+
recurse: true,
|
|
3155
|
+
inner: (m) => m[1] ?? m[2] ?? ""
|
|
3156
|
+
}
|
|
3157
|
+
];
|
|
3158
|
+
function renderInline(text) {
|
|
3159
|
+
const nodes = [];
|
|
3160
|
+
let rest = text;
|
|
3161
|
+
let key = 0;
|
|
3162
|
+
while (rest.length > 0) {
|
|
3163
|
+
let best = null;
|
|
3164
|
+
for (const rule2 of INLINE_RULES) {
|
|
3165
|
+
const m2 = new RegExp(rule2.re).exec(rest);
|
|
3166
|
+
if (m2 && (best === null || m2.index < best.m.index)) {
|
|
3167
|
+
best = { rule: rule2, m: m2 };
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
if (!best) {
|
|
3171
|
+
nodes.push(rest);
|
|
3172
|
+
break;
|
|
3173
|
+
}
|
|
3174
|
+
const { rule, m } = best;
|
|
3175
|
+
if (m.index > 0) nodes.push(rest.slice(0, m.index));
|
|
3176
|
+
nodes.push(rule.render(m, key++));
|
|
3177
|
+
rest = rest.slice(m.index + m[0].length);
|
|
3178
|
+
}
|
|
3179
|
+
return nodes;
|
|
3180
|
+
}
|
|
3181
|
+
|
|
2994
3182
|
// src/record-view.ts
|
|
2995
3183
|
import { experimentProgress as experimentProgress2 } from "@validation-os/core/derivation";
|
|
2996
3184
|
function byIds(records, ids) {
|
|
@@ -2999,7 +3187,7 @@ function byIds(records, ids) {
|
|
|
2999
3187
|
}
|
|
3000
3188
|
function headerPills(register, record, related = {}, options = {}) {
|
|
3001
3189
|
const pills = [];
|
|
3002
|
-
const status =
|
|
3190
|
+
const status = str(record.Status);
|
|
3003
3191
|
if (status) pills.push({ label: status, tone: statusTone(status) });
|
|
3004
3192
|
if (register === "assumptions") {
|
|
3005
3193
|
if (record.moot === true) pills.push({ label: "Moot", tone: "neutral" });
|
|
@@ -3009,7 +3197,7 @@ function headerPills(register, record, related = {}, options = {}) {
|
|
|
3009
3197
|
} else if (register === "experiments") {
|
|
3010
3198
|
if (status === "Draft") pills.push({ label: "Test-next", tone: "accent" });
|
|
3011
3199
|
if (status === "Closed") pills.push({ label: "Concluded", tone: "good" });
|
|
3012
|
-
const deadline =
|
|
3200
|
+
const deadline = str(record.Deadline);
|
|
3013
3201
|
if (options.asOf && deadline && status === "Running" && deadline < options.asOf)
|
|
3014
3202
|
pills.push({ label: "Overdue", tone: "crit" });
|
|
3015
3203
|
} else if (register === "decisions") {
|
|
@@ -3050,15 +3238,6 @@ function leadingMeters(register, record) {
|
|
|
3050
3238
|
];
|
|
3051
3239
|
case "readings":
|
|
3052
3240
|
return [
|
|
3053
|
-
{
|
|
3054
|
-
key: "strength",
|
|
3055
|
-
label: "Strength",
|
|
3056
|
-
kind: "signed",
|
|
3057
|
-
value: derivedNum(record, "strength"),
|
|
3058
|
-
tone: "neutral",
|
|
3059
|
-
min: -100,
|
|
3060
|
-
max: 100
|
|
3061
|
-
},
|
|
3062
3241
|
{
|
|
3063
3242
|
key: "sourceQuality",
|
|
3064
3243
|
label: "Source quality",
|
|
@@ -3067,13 +3246,6 @@ function leadingMeters(register, record) {
|
|
|
3067
3246
|
value: derivedNum(record, "sourceQuality") === null ? null : Math.round((derivedNum(record, "sourceQuality") ?? 0) * 100),
|
|
3068
3247
|
tone: "neutral",
|
|
3069
3248
|
max: 100
|
|
3070
|
-
},
|
|
3071
|
-
{
|
|
3072
|
-
key: "Result",
|
|
3073
|
-
label: "Result",
|
|
3074
|
-
kind: "pill",
|
|
3075
|
-
value: str3(record.Result),
|
|
3076
|
-
tone: statusTone(str3(record.Result) ?? "")
|
|
3077
3249
|
}
|
|
3078
3250
|
];
|
|
3079
3251
|
case "experiments": {
|
|
@@ -3092,7 +3264,7 @@ function leadingMeters(register, record) {
|
|
|
3092
3264
|
key: "Feasibility",
|
|
3093
3265
|
label: "Feasibility",
|
|
3094
3266
|
kind: "pill",
|
|
3095
|
-
value:
|
|
3267
|
+
value: str(record.Feasibility),
|
|
3096
3268
|
tone: "neutral"
|
|
3097
3269
|
}
|
|
3098
3270
|
];
|
|
@@ -3103,8 +3275,8 @@ function leadingMeters(register, record) {
|
|
|
3103
3275
|
key: "Status",
|
|
3104
3276
|
label: "Status",
|
|
3105
3277
|
kind: "pill",
|
|
3106
|
-
value:
|
|
3107
|
-
tone: statusTone(
|
|
3278
|
+
value: str(record.Status),
|
|
3279
|
+
tone: statusTone(str(record.Status) ?? "")
|
|
3108
3280
|
}
|
|
3109
3281
|
];
|
|
3110
3282
|
case "glossary":
|
|
@@ -3113,8 +3285,8 @@ function leadingMeters(register, record) {
|
|
|
3113
3285
|
key: "Status",
|
|
3114
3286
|
label: "Status",
|
|
3115
3287
|
kind: "pill",
|
|
3116
|
-
value:
|
|
3117
|
-
tone: statusTone(
|
|
3288
|
+
value: str(record.Status),
|
|
3289
|
+
tone: statusTone(str(record.Status) ?? "")
|
|
3118
3290
|
}
|
|
3119
3291
|
];
|
|
3120
3292
|
}
|
|
@@ -3133,7 +3305,24 @@ var HUMAN_FIELDS = {
|
|
|
3133
3305
|
]
|
|
3134
3306
|
};
|
|
3135
3307
|
function humanInputFields(register, record) {
|
|
3136
|
-
return HUMAN_FIELDS[register].map((f) => ({ key: f.key, label: f.label, text:
|
|
3308
|
+
return HUMAN_FIELDS[register].map((f) => ({ key: f.key, label: f.label, text: str(record[f.key]) ?? "" })).filter((f) => f.text !== "");
|
|
3309
|
+
}
|
|
3310
|
+
function readingBeliefVerdicts(reading, assumptions = []) {
|
|
3311
|
+
const byId = new Map(assumptions.map((a) => [a.id, a]));
|
|
3312
|
+
return readingBeliefs(reading).map((b) => {
|
|
3313
|
+
const hit = byId.get(b.assumptionId);
|
|
3314
|
+
const strength = b.derived && typeof b.derived.strength === "number" ? b.derived.strength : null;
|
|
3315
|
+
return {
|
|
3316
|
+
assumptionId: b.assumptionId,
|
|
3317
|
+
title: hit ? primaryLabel(hit) : b.assumptionId,
|
|
3318
|
+
linked: hit != null,
|
|
3319
|
+
rung: b.Rung ?? null,
|
|
3320
|
+
result: b.Result ?? null,
|
|
3321
|
+
strength,
|
|
3322
|
+
magnitudeBand: b.magnitudeBand ?? null,
|
|
3323
|
+
justification: typeof b["Grading justification"] === "string" ? b["Grading justification"] : ""
|
|
3324
|
+
};
|
|
3325
|
+
});
|
|
3137
3326
|
}
|
|
3138
3327
|
function scoreChip(register, record) {
|
|
3139
3328
|
if (register === "assumptions") {
|
|
@@ -3141,14 +3330,14 @@ function scoreChip(register, record) {
|
|
|
3141
3330
|
return { label: "Confidence", value: formatSigned(c), tone: confidenceTone(c) };
|
|
3142
3331
|
}
|
|
3143
3332
|
if (register === "readings") {
|
|
3144
|
-
const
|
|
3333
|
+
const sq = derivedNum(record, "sourceQuality");
|
|
3145
3334
|
return {
|
|
3146
|
-
label: "
|
|
3147
|
-
value:
|
|
3335
|
+
label: "Source quality",
|
|
3336
|
+
value: sq === null ? "\u2014" : String(Math.round(sq * 100)),
|
|
3148
3337
|
tone: "neutral"
|
|
3149
3338
|
};
|
|
3150
3339
|
}
|
|
3151
|
-
const status =
|
|
3340
|
+
const status = str(record.Status) ?? "\u2014";
|
|
3152
3341
|
return { label: "Status", value: status, tone: statusTone(status) };
|
|
3153
3342
|
}
|
|
3154
3343
|
var PANELS = {
|
|
@@ -3157,7 +3346,7 @@ var PANELS = {
|
|
|
3157
3346
|
id: "readings",
|
|
3158
3347
|
label: "Readings",
|
|
3159
3348
|
register: "readings",
|
|
3160
|
-
resolve: (r, rel) => (rel.readings ?? []).filter((x) => x
|
|
3349
|
+
resolve: (r, rel) => (rel.readings ?? []).filter((x) => readingGrades(x, r.id))
|
|
3161
3350
|
},
|
|
3162
3351
|
{
|
|
3163
3352
|
id: "depends-on",
|
|
@@ -3181,7 +3370,10 @@ var PANELS = {
|
|
|
3181
3370
|
id: "tested-by",
|
|
3182
3371
|
label: "Tested by",
|
|
3183
3372
|
register: "experiments",
|
|
3184
|
-
|
|
3373
|
+
// Archived plans never surface as a relation (OPS-1305) — live plans only.
|
|
3374
|
+
resolve: (r, rel) => liveExperiments(rel.experiments ?? []).filter(
|
|
3375
|
+
(e) => testsAssumption(e, r.id)
|
|
3376
|
+
)
|
|
3185
3377
|
},
|
|
3186
3378
|
{
|
|
3187
3379
|
id: "decisions-based",
|
|
@@ -3199,15 +3391,20 @@ var PANELS = {
|
|
|
3199
3391
|
readings: [
|
|
3200
3392
|
{
|
|
3201
3393
|
id: "assumption",
|
|
3202
|
-
label: "
|
|
3394
|
+
label: "Beliefs",
|
|
3203
3395
|
register: "assumptions",
|
|
3204
|
-
|
|
3396
|
+
// A reading grades several beliefs now (OPS-1305) — resolve them all.
|
|
3397
|
+
resolve: (r, rel) => byIds(rel.assumptions, strList(r.assumptionIds))
|
|
3205
3398
|
},
|
|
3206
3399
|
{
|
|
3207
3400
|
id: "experiment",
|
|
3208
3401
|
label: "Evidence plan",
|
|
3209
3402
|
register: "experiments",
|
|
3210
|
-
|
|
3403
|
+
// Only ever surface a NON-archived plan (OPS-1305): an archived origin
|
|
3404
|
+
// reads as no plan at all, never a leaked backlink.
|
|
3405
|
+
resolve: (r, rel) => byIds(rel.experiments, [str(r.experimentId) ?? ""].filter(Boolean)).filter(
|
|
3406
|
+
(e) => !isArchivedExperiment(e)
|
|
3407
|
+
)
|
|
3211
3408
|
}
|
|
3212
3409
|
],
|
|
3213
3410
|
experiments: [
|
|
@@ -3276,8 +3473,49 @@ function buildRecordPage(register, record, related = {}, options = {}) {
|
|
|
3276
3473
|
};
|
|
3277
3474
|
}
|
|
3278
3475
|
|
|
3476
|
+
// src/belief-verdicts.tsx
|
|
3477
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3478
|
+
function resultClass(result) {
|
|
3479
|
+
if (result === "Validated") return "vos-pill vos-pill-good";
|
|
3480
|
+
if (result === "Invalidated") return "vos-pill vos-pill-crit";
|
|
3481
|
+
return "vos-pill vos-pill-neutral";
|
|
3482
|
+
}
|
|
3483
|
+
function BeliefVerdicts({
|
|
3484
|
+
reading,
|
|
3485
|
+
assumptions,
|
|
3486
|
+
onOpenRecord
|
|
3487
|
+
}) {
|
|
3488
|
+
const verdicts = readingBeliefVerdicts(reading, assumptions);
|
|
3489
|
+
if (verdicts.length === 0) {
|
|
3490
|
+
return /* @__PURE__ */ jsx10("p", { className: "vos-hint", children: "This reading grades no beliefs yet." });
|
|
3491
|
+
}
|
|
3492
|
+
return /* @__PURE__ */ jsx10("ul", { className: "vos-verdicts", children: verdicts.map((v) => /* @__PURE__ */ jsxs9("li", { className: "vos-verdict", children: [
|
|
3493
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-verdict-head", children: [
|
|
3494
|
+
v.linked && onOpenRecord ? /* @__PURE__ */ jsx10(
|
|
3495
|
+
"button",
|
|
3496
|
+
{
|
|
3497
|
+
type: "button",
|
|
3498
|
+
className: "vos-inline-link",
|
|
3499
|
+
onClick: () => onOpenRecord(v.assumptionId),
|
|
3500
|
+
children: v.title
|
|
3501
|
+
}
|
|
3502
|
+
) : /* @__PURE__ */ jsx10("span", { className: "vos-verdict-title", children: v.title }),
|
|
3503
|
+
/* @__PURE__ */ jsx10("span", { className: resultClass(v.result), children: v.result ?? "\u2014" })
|
|
3504
|
+
] }),
|
|
3505
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-verdict-meta", children: [
|
|
3506
|
+
v.rung ? /* @__PURE__ */ jsx10("span", { className: "vos-chip vos-pill vos-pill-neutral", children: v.rung }) : null,
|
|
3507
|
+
v.magnitudeBand ? /* @__PURE__ */ jsx10("span", { className: "vos-chip vos-pill vos-pill-neutral", children: v.magnitudeBand }) : null,
|
|
3508
|
+
v.strength !== null ? /* @__PURE__ */ jsxs9("span", { className: "vos-verdict-strength", children: [
|
|
3509
|
+
"Strength ",
|
|
3510
|
+
formatSigned(v.strength)
|
|
3511
|
+
] }) : null
|
|
3512
|
+
] }),
|
|
3513
|
+
v.justification ? /* @__PURE__ */ jsx10("p", { className: "vos-verdict-why", children: v.justification }) : null
|
|
3514
|
+
] }, v.assumptionId)) });
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3279
3517
|
// src/record-page.tsx
|
|
3280
|
-
import { Fragment as Fragment8, jsx as
|
|
3518
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3281
3519
|
var TAB_LABEL = {
|
|
3282
3520
|
overview: "Overview",
|
|
3283
3521
|
evidence: "Evidence",
|
|
@@ -3398,9 +3636,9 @@ function RecordPage({
|
|
|
3398
3636
|
onReload: reloadLatest,
|
|
3399
3637
|
onField: setField
|
|
3400
3638
|
};
|
|
3401
|
-
return /* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3403
|
-
/* @__PURE__ */
|
|
3639
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
3640
|
+
/* @__PURE__ */ jsxs10("nav", { className: "vos-crumbs", "aria-label": "Breadcrumb", children: [
|
|
3641
|
+
/* @__PURE__ */ jsx11(
|
|
3404
3642
|
"button",
|
|
3405
3643
|
{
|
|
3406
3644
|
type: "button",
|
|
@@ -3408,14 +3646,14 @@ function RecordPage({
|
|
|
3408
3646
|
children: REGISTER_LABEL[register ?? backRegister]
|
|
3409
3647
|
}
|
|
3410
3648
|
),
|
|
3411
|
-
/* @__PURE__ */
|
|
3412
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ jsx11("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
3650
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-rid", children: record ? formatValue(record.Title) : recordId })
|
|
3413
3651
|
] }),
|
|
3414
|
-
anyLoading ? /* @__PURE__ */
|
|
3652
|
+
anyLoading ? /* @__PURE__ */ jsx11("p", { className: "vos-muted", children: "Loading record\u2026" }) : !record || !register ? /* @__PURE__ */ jsxs10("div", { className: "vos-empty", children: [
|
|
3415
3653
|
"Couldn't find a record with id ",
|
|
3416
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ jsx11("b", { children: recordId }),
|
|
3417
3655
|
"."
|
|
3418
|
-
] }) : /* @__PURE__ */
|
|
3656
|
+
] }) : /* @__PURE__ */ jsx11(
|
|
3419
3657
|
RecordBody,
|
|
3420
3658
|
{
|
|
3421
3659
|
register,
|
|
@@ -3455,20 +3693,21 @@ function RecordBody({
|
|
|
3455
3693
|
const page = buildRecordPage(register, record, related, { asOf });
|
|
3456
3694
|
const activeTab = page.tabs.includes(tab) ? tab : "overview";
|
|
3457
3695
|
const description = typeof record.Description === "string" ? record.Description : "";
|
|
3696
|
+
const bodyText = typeof record.body === "string" ? record.body : "";
|
|
3458
3697
|
const hasErrors = Object.keys(edit.errors).length > 0;
|
|
3459
|
-
return /* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3698
|
+
return /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3699
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-head vos-record-head", children: [
|
|
3700
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
3701
|
+
/* @__PURE__ */ jsx11("p", { className: "vos-drawer-eyebrow", children: REGISTER_SINGULAR[register] }),
|
|
3702
|
+
/* @__PURE__ */ jsx11("h1", { children: page.title }),
|
|
3703
|
+
/* @__PURE__ */ jsx11("div", { className: "vos-pill-row", children: page.pills.map((p, i) => /* @__PURE__ */ jsx11(PillView, { pill: p }, i)) })
|
|
3465
3704
|
] }),
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3705
|
+
/* @__PURE__ */ jsx11("div", { className: "vos-spacer" }),
|
|
3706
|
+
/* @__PURE__ */ jsxs10("span", { className: "vos-verbadge", children: [
|
|
3468
3707
|
"v",
|
|
3469
3708
|
formatValue(record.version)
|
|
3470
3709
|
] }),
|
|
3471
|
-
!edit.editing ? /* @__PURE__ */
|
|
3710
|
+
!edit.editing ? /* @__PURE__ */ jsx11(
|
|
3472
3711
|
"button",
|
|
3473
3712
|
{
|
|
3474
3713
|
type: "button",
|
|
@@ -3478,7 +3717,7 @@ function RecordBody({
|
|
|
3478
3717
|
}
|
|
3479
3718
|
) : null
|
|
3480
3719
|
] }),
|
|
3481
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ jsx11("div", { className: "vos-tabs", role: "tablist", "aria-label": "Record sections", children: page.tabs.map((t2) => /* @__PURE__ */ jsx11(
|
|
3482
3721
|
"button",
|
|
3483
3722
|
{
|
|
3484
3723
|
type: "button",
|
|
@@ -3490,8 +3729,8 @@ function RecordBody({
|
|
|
3490
3729
|
},
|
|
3491
3730
|
t2
|
|
3492
3731
|
)) }),
|
|
3493
|
-
activeTab === "overview" ? /* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3732
|
+
activeTab === "overview" ? /* @__PURE__ */ jsxs10("div", { className: "vos-record-cols", children: [
|
|
3733
|
+
/* @__PURE__ */ jsx11("section", { className: "vos-meter-grid", children: page.meters.map((m) => /* @__PURE__ */ jsx11(
|
|
3495
3734
|
MeterView,
|
|
3496
3735
|
{
|
|
3497
3736
|
meter: m,
|
|
@@ -3500,11 +3739,11 @@ function RecordBody({
|
|
|
3500
3739
|
},
|
|
3501
3740
|
m.key
|
|
3502
3741
|
)) }),
|
|
3503
|
-
edit.editing ? /* @__PURE__ */
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
edit.conflict ? /* @__PURE__ */
|
|
3506
|
-
edit.saveError ? /* @__PURE__ */
|
|
3507
|
-
/* @__PURE__ */
|
|
3742
|
+
edit.editing ? /* @__PURE__ */ jsxs10("section", { className: "vos-record-editor", children: [
|
|
3743
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Edit" }),
|
|
3744
|
+
edit.conflict ? /* @__PURE__ */ jsx11(ConflictBanner, { message: edit.conflict, onReload: edit.onReload }) : null,
|
|
3745
|
+
edit.saveError ? /* @__PURE__ */ jsx11("p", { role: "alert", className: "vos-error", children: edit.saveError }) : null,
|
|
3746
|
+
/* @__PURE__ */ jsx11(
|
|
3508
3747
|
EditFields,
|
|
3509
3748
|
{
|
|
3510
3749
|
register,
|
|
@@ -3513,8 +3752,8 @@ function RecordBody({
|
|
|
3513
3752
|
onField: edit.onField
|
|
3514
3753
|
}
|
|
3515
3754
|
),
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3755
|
+
/* @__PURE__ */ jsxs10("footer", { className: "vos-drawer-footer", children: [
|
|
3756
|
+
/* @__PURE__ */ jsx11(
|
|
3518
3757
|
"button",
|
|
3519
3758
|
{
|
|
3520
3759
|
type: "button",
|
|
@@ -3524,7 +3763,7 @@ function RecordBody({
|
|
|
3524
3763
|
children: "Cancel"
|
|
3525
3764
|
}
|
|
3526
3765
|
),
|
|
3527
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx11(
|
|
3528
3767
|
"button",
|
|
3529
3768
|
{
|
|
3530
3769
|
type: "button",
|
|
@@ -3536,10 +3775,10 @@ function RecordBody({
|
|
|
3536
3775
|
}
|
|
3537
3776
|
)
|
|
3538
3777
|
] })
|
|
3539
|
-
] }) : /* @__PURE__ */
|
|
3540
|
-
description ? /* @__PURE__ */
|
|
3541
|
-
/* @__PURE__ */
|
|
3542
|
-
/* @__PURE__ */
|
|
3778
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3779
|
+
description ? /* @__PURE__ */ jsxs10("section", { className: "vos-record-prose", children: [
|
|
3780
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Description" }),
|
|
3781
|
+
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3543
3782
|
GlossaryText,
|
|
3544
3783
|
{
|
|
3545
3784
|
text: description,
|
|
@@ -3549,14 +3788,29 @@ function RecordBody({
|
|
|
3549
3788
|
}
|
|
3550
3789
|
) })
|
|
3551
3790
|
] }) : null,
|
|
3552
|
-
|
|
3553
|
-
/* @__PURE__ */
|
|
3791
|
+
bodyText ? /* @__PURE__ */ jsxs10("section", { className: "vos-record-prose", children: [
|
|
3792
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
3793
|
+
/* @__PURE__ */ jsx11(Markdown, { text: bodyText })
|
|
3794
|
+
] }) : null,
|
|
3795
|
+
register === "readings" ? /* @__PURE__ */ jsxs10("section", { className: "vos-record-prose", children: [
|
|
3796
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Per-belief verdicts" }),
|
|
3797
|
+
/* @__PURE__ */ jsx11(
|
|
3798
|
+
BeliefVerdicts,
|
|
3799
|
+
{
|
|
3800
|
+
reading: record,
|
|
3801
|
+
assumptions: related.assumptions ?? [],
|
|
3802
|
+
onOpenRecord
|
|
3803
|
+
}
|
|
3804
|
+
)
|
|
3805
|
+
] }) : null,
|
|
3806
|
+
page.humanText.length ? /* @__PURE__ */ jsxs10("section", { className: "vos-record-prose", children: [
|
|
3807
|
+
/* @__PURE__ */ jsxs10("h3", { className: "vos-section-title", children: [
|
|
3554
3808
|
"From a human ",
|
|
3555
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-hint", children: "\u2014 not computed" })
|
|
3556
3810
|
] }),
|
|
3557
|
-
page.humanText.map((h) => /* @__PURE__ */
|
|
3558
|
-
/* @__PURE__ */
|
|
3559
|
-
/* @__PURE__ */
|
|
3811
|
+
page.humanText.map((h) => /* @__PURE__ */ jsxs10("div", { className: "vos-human-field", children: [
|
|
3812
|
+
/* @__PURE__ */ jsx11("div", { className: "vos-detail-k", children: h.label }),
|
|
3813
|
+
/* @__PURE__ */ jsx11("p", { children: /* @__PURE__ */ jsx11(
|
|
3560
3814
|
GlossaryText,
|
|
3561
3815
|
{
|
|
3562
3816
|
text: h.text,
|
|
@@ -3569,7 +3823,7 @@ function RecordBody({
|
|
|
3569
3823
|
] }) : null
|
|
3570
3824
|
] })
|
|
3571
3825
|
] }) : null,
|
|
3572
|
-
activeTab === "evidence" ? /* @__PURE__ */
|
|
3826
|
+
activeTab === "evidence" ? /* @__PURE__ */ jsx11(
|
|
3573
3827
|
EvidenceTab,
|
|
3574
3828
|
{
|
|
3575
3829
|
register,
|
|
@@ -3579,25 +3833,25 @@ function RecordBody({
|
|
|
3579
3833
|
basePath
|
|
3580
3834
|
}
|
|
3581
3835
|
) : null,
|
|
3582
|
-
activeTab === "connections" ? /* @__PURE__ */
|
|
3583
|
-
activeTab === "history" ? /* @__PURE__ */
|
|
3584
|
-
/* @__PURE__ */
|
|
3585
|
-
/* @__PURE__ */
|
|
3586
|
-
/* @__PURE__ */
|
|
3836
|
+
activeTab === "connections" ? /* @__PURE__ */ jsx11("div", { className: "vos-panels", children: page.panels.map((panel) => /* @__PURE__ */ jsx11(PanelView, { panel, onOpenRecord }, panel.id)) }) : null,
|
|
3837
|
+
activeTab === "history" ? /* @__PURE__ */ jsxs10("section", { className: "vos-detail-list", children: [
|
|
3838
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-detail-row", children: [
|
|
3839
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Created" }),
|
|
3840
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.createdAt) })
|
|
3587
3841
|
] }),
|
|
3588
|
-
/* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3842
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-detail-row", children: [
|
|
3843
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Last updated" }),
|
|
3844
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.updatedAt) })
|
|
3591
3845
|
] }),
|
|
3592
|
-
/* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3846
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-detail-row", children: [
|
|
3847
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-k", children: "Version" }),
|
|
3848
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-detail-v", children: formatValue(record.version) })
|
|
3595
3849
|
] }),
|
|
3596
|
-
/* @__PURE__ */
|
|
3850
|
+
/* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "The full change trail lands here as the API exposes version history; this absorbs the retired provenance prose." })
|
|
3597
3851
|
] }) : null,
|
|
3598
|
-
page.hasJourney && journey ? /* @__PURE__ */
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3852
|
+
page.hasJourney && journey ? /* @__PURE__ */ jsxs10("section", { className: "vos-journey-host", children: [
|
|
3853
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3854
|
+
/* @__PURE__ */ jsx11(
|
|
3601
3855
|
BeliefJourney,
|
|
3602
3856
|
{
|
|
3603
3857
|
journey,
|
|
@@ -3607,22 +3861,22 @@ function RecordBody({
|
|
|
3607
3861
|
onChanged: onJourneyChanged
|
|
3608
3862
|
}
|
|
3609
3863
|
)
|
|
3610
|
-
] }) : page.hasJourney ? /* @__PURE__ */
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3864
|
+
] }) : page.hasJourney ? /* @__PURE__ */ jsxs10("section", { className: "vos-journey-host", children: [
|
|
3865
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
3866
|
+
/* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "The per-belief journey (Framed \u2192 Planned \u2192 Tested \u2192 Known) mounts here \u2014 built by the workflow-first map (OPS-1289). This page is its host." })
|
|
3613
3867
|
] }) : null
|
|
3614
3868
|
] });
|
|
3615
3869
|
}
|
|
3616
3870
|
function PillView({ pill }) {
|
|
3617
|
-
return /* @__PURE__ */
|
|
3871
|
+
return /* @__PURE__ */ jsx11("span", { className: PILL_CLASS3[pill.tone], children: pill.label });
|
|
3618
3872
|
}
|
|
3619
3873
|
function ConflictBanner({
|
|
3620
3874
|
message,
|
|
3621
3875
|
onReload
|
|
3622
3876
|
}) {
|
|
3623
|
-
return /* @__PURE__ */
|
|
3624
|
-
/* @__PURE__ */
|
|
3625
|
-
/* @__PURE__ */
|
|
3877
|
+
return /* @__PURE__ */ jsxs10("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
3878
|
+
/* @__PURE__ */ jsx11("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx11("span", { children: message }) }),
|
|
3879
|
+
/* @__PURE__ */ jsx11("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
3626
3880
|
] });
|
|
3627
3881
|
}
|
|
3628
3882
|
function MeterView({
|
|
@@ -3632,10 +3886,10 @@ function MeterView({
|
|
|
3632
3886
|
}) {
|
|
3633
3887
|
const [why, setWhy] = useState5(false);
|
|
3634
3888
|
const textTone = meter.tone === "crit" ? "vos-text-crit" : meter.tone === "warn" ? "vos-text-warn" : "";
|
|
3635
|
-
return /* @__PURE__ */
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
meter.hasWhy && assumption ? /* @__PURE__ */
|
|
3889
|
+
return /* @__PURE__ */ jsxs10("div", { className: "vos-meter", children: [
|
|
3890
|
+
/* @__PURE__ */ jsxs10("div", { className: "vos-meter-head", children: [
|
|
3891
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-meter-label", children: meter.label }),
|
|
3892
|
+
meter.hasWhy && assumption ? /* @__PURE__ */ jsxs10(
|
|
3639
3893
|
"button",
|
|
3640
3894
|
{
|
|
3641
3895
|
type: "button",
|
|
@@ -3649,12 +3903,12 @@ function MeterView({
|
|
|
3649
3903
|
}
|
|
3650
3904
|
) : null
|
|
3651
3905
|
] }),
|
|
3652
|
-
meter.value === null ? /* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
] }) : /* @__PURE__ */
|
|
3656
|
-
/* @__PURE__ */
|
|
3657
|
-
/* @__PURE__ */
|
|
3906
|
+
meter.value === null ? /* @__PURE__ */ jsx11("div", { className: "vos-meter-val vos-muted", children: "\u2014" }) : meter.kind === "pill" ? /* @__PURE__ */ jsx11("span", { className: PILL_CLASS3[meter.tone], children: meter.value }) : meter.kind === "signed" ? /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3907
|
+
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: formatSigned(Number(meter.value)) }),
|
|
3908
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-track vos-signed", children: /* @__PURE__ */ jsx11(SignedFill, { value: Number(meter.value), min: meter.min ?? -100, max: meter.max ?? 100 }) })
|
|
3909
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3910
|
+
/* @__PURE__ */ jsx11("div", { className: `vos-meter-val ${textTone}`, children: Math.round(Number(meter.value)) }),
|
|
3911
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-risk-bar", children: /* @__PURE__ */ jsx11(
|
|
3658
3912
|
"i",
|
|
3659
3913
|
{
|
|
3660
3914
|
className: meter.tone === "crit" ? "vos-fill-crit" : meter.tone === "warn" ? "vos-fill-warn" : "vos-fill-good",
|
|
@@ -3662,7 +3916,7 @@ function MeterView({
|
|
|
3662
3916
|
}
|
|
3663
3917
|
) })
|
|
3664
3918
|
] }),
|
|
3665
|
-
why && assumption ? /* @__PURE__ */
|
|
3919
|
+
why && assumption ? /* @__PURE__ */ jsx11("div", { className: "vos-why-panel", children: /* @__PURE__ */ jsx11(UnderstandingPanel, { assumption, basePath }) }) : null
|
|
3666
3920
|
] });
|
|
3667
3921
|
}
|
|
3668
3922
|
function SignedFill({ value, min, max }) {
|
|
@@ -3670,34 +3924,34 @@ function SignedFill({ value, min, max }) {
|
|
|
3670
3924
|
const width = Math.round(Math.min(Math.abs(value), span) / span * 50);
|
|
3671
3925
|
const up = value >= 0;
|
|
3672
3926
|
const style = up ? { left: "50%", width: `${width}%`, background: "var(--vos-good)" } : { right: "50%", width: `${width}%`, background: "var(--vos-crit)" };
|
|
3673
|
-
return width > 0 ? /* @__PURE__ */
|
|
3927
|
+
return width > 0 ? /* @__PURE__ */ jsx11("i", { style }) : null;
|
|
3674
3928
|
}
|
|
3675
3929
|
function PanelView({
|
|
3676
3930
|
panel,
|
|
3677
3931
|
onOpenRecord
|
|
3678
3932
|
}) {
|
|
3679
|
-
return /* @__PURE__ */
|
|
3680
|
-
/* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ jsxs10("section", { className: "vos-panel", children: [
|
|
3934
|
+
/* @__PURE__ */ jsxs10("h3", { className: "vos-panel-head", children: [
|
|
3681
3935
|
panel.label,
|
|
3682
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-group-n", children: panel.items.length })
|
|
3683
3937
|
] }),
|
|
3684
|
-
panel.items.length === 0 ? /* @__PURE__ */
|
|
3938
|
+
panel.items.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "None yet." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-backlinks", children: panel.items.map((item) => /* @__PURE__ */ jsx11(BacklinkRow, { item, onOpenRecord }, item.id)) })
|
|
3685
3939
|
] });
|
|
3686
3940
|
}
|
|
3687
3941
|
function BacklinkRow({
|
|
3688
3942
|
item,
|
|
3689
3943
|
onOpenRecord
|
|
3690
3944
|
}) {
|
|
3691
|
-
return /* @__PURE__ */
|
|
3945
|
+
return /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs10(
|
|
3692
3946
|
"button",
|
|
3693
3947
|
{
|
|
3694
3948
|
type: "button",
|
|
3695
3949
|
className: "vos-backlink",
|
|
3696
3950
|
onClick: () => onOpenRecord(item.id),
|
|
3697
3951
|
children: [
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3952
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: item.title }),
|
|
3953
|
+
/* @__PURE__ */ jsxs10("span", { className: `vos-chip ${PILL_CLASS3[item.chip.tone]}`, children: [
|
|
3954
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-chip-k", children: item.chip.label }),
|
|
3701
3955
|
item.chip.value
|
|
3702
3956
|
] })
|
|
3703
3957
|
]
|
|
@@ -3712,7 +3966,7 @@ function EvidenceTab({
|
|
|
3712
3966
|
basePath
|
|
3713
3967
|
}) {
|
|
3714
3968
|
if (register === "assumptions") {
|
|
3715
|
-
return /* @__PURE__ */
|
|
3969
|
+
return /* @__PURE__ */ jsx11("section", { className: "vos-why-panel", children: /* @__PURE__ */ jsx11(UnderstandingPanel, { assumption: record, basePath }) });
|
|
3716
3970
|
}
|
|
3717
3971
|
const bars = resolveBarLines(
|
|
3718
3972
|
record.barLines ?? [],
|
|
@@ -3720,12 +3974,12 @@ function EvidenceTab({
|
|
|
3720
3974
|
);
|
|
3721
3975
|
const mine = (related.readings ?? []).filter((r) => r.experimentId === record.id);
|
|
3722
3976
|
const nested = nestReadingsByPlan(mine, [record]);
|
|
3723
|
-
return /* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */
|
|
3725
|
-
/* @__PURE__ */
|
|
3726
|
-
bars.length === 0 ? /* @__PURE__ */
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
b.assumption ? /* @__PURE__ */
|
|
3977
|
+
return /* @__PURE__ */ jsxs10("div", { className: "vos-record-cols", children: [
|
|
3978
|
+
/* @__PURE__ */ jsxs10("section", { children: [
|
|
3979
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Bar lines" }),
|
|
3980
|
+
bars.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No pre-registered bars." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-bars", children: bars.map((b, i) => /* @__PURE__ */ jsxs10("li", { className: "vos-bar-line", children: [
|
|
3981
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
3982
|
+
b.assumption ? /* @__PURE__ */ jsx11(
|
|
3729
3983
|
"button",
|
|
3730
3984
|
{
|
|
3731
3985
|
type: "button",
|
|
@@ -3734,7 +3988,7 @@ function EvidenceTab({
|
|
|
3734
3988
|
children: b.assumption.title
|
|
3735
3989
|
}
|
|
3736
3990
|
) : null,
|
|
3737
|
-
/* @__PURE__ */
|
|
3991
|
+
/* @__PURE__ */ jsx11(
|
|
3738
3992
|
"span",
|
|
3739
3993
|
{
|
|
3740
3994
|
className: b.barVerdict ? "vos-pill vos-pill-good" : "vos-pill vos-pill-neutral",
|
|
@@ -3743,17 +3997,21 @@ function EvidenceTab({
|
|
|
3743
3997
|
)
|
|
3744
3998
|
] }, i)) })
|
|
3745
3999
|
] }),
|
|
3746
|
-
/* @__PURE__ */
|
|
3747
|
-
/* @__PURE__ */
|
|
3748
|
-
nested.length === 0 ? /* @__PURE__ */
|
|
4000
|
+
/* @__PURE__ */ jsxs10("section", { children: [
|
|
4001
|
+
/* @__PURE__ */ jsx11("h3", { className: "vos-section-title", children: "Readings" }),
|
|
4002
|
+
nested.length === 0 ? /* @__PURE__ */ jsx11("p", { className: "vos-hint", children: "No readings logged yet." }) : /* @__PURE__ */ jsx11("ul", { className: "vos-backlinks", children: nested[0].readings.map((r) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsxs10(
|
|
3749
4003
|
"button",
|
|
3750
4004
|
{
|
|
3751
4005
|
type: "button",
|
|
3752
4006
|
className: "vos-backlink",
|
|
3753
4007
|
onClick: () => onOpenRecord(r.id),
|
|
3754
4008
|
children: [
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ jsx11("span", { className: "vos-backlink-title", children: formatValue(r.Title) }),
|
|
4010
|
+
/* @__PURE__ */ jsxs10("span", { className: "vos-chip vos-pill vos-pill-neutral", children: [
|
|
4011
|
+
readingBeliefs(r).length,
|
|
4012
|
+
" belief",
|
|
4013
|
+
readingBeliefs(r).length === 1 ? "" : "s"
|
|
4014
|
+
] })
|
|
3757
4015
|
]
|
|
3758
4016
|
}
|
|
3759
4017
|
) }, r.id)) })
|
|
@@ -3765,19 +4023,20 @@ function EvidenceTab({
|
|
|
3765
4023
|
import { useMemo as useMemo4, useState as useState10 } from "react";
|
|
3766
4024
|
|
|
3767
4025
|
// src/register-table.tsx
|
|
3768
|
-
import { jsx as
|
|
4026
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3769
4027
|
function RegisterTable({
|
|
3770
4028
|
register,
|
|
3771
4029
|
records,
|
|
3772
4030
|
onRowClick,
|
|
3773
|
-
selectedId
|
|
4031
|
+
selectedId,
|
|
4032
|
+
assumptionTitles
|
|
3774
4033
|
}) {
|
|
3775
4034
|
const columns = columnsFor(register);
|
|
3776
4035
|
if (records.length === 0) {
|
|
3777
|
-
return /* @__PURE__ */
|
|
4036
|
+
return /* @__PURE__ */ jsx12("p", { className: "vos-empty", children: "No records yet." });
|
|
3778
4037
|
}
|
|
3779
|
-
return /* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
4038
|
+
return /* @__PURE__ */ jsx12("div", { className: "vos-card vos-table-scroll", children: /* @__PURE__ */ jsxs11("table", { className: "vos-table", children: [
|
|
4039
|
+
/* @__PURE__ */ jsx12("thead", { children: /* @__PURE__ */ jsx12("tr", { children: columns.map((c) => /* @__PURE__ */ jsx12(
|
|
3781
4040
|
"th",
|
|
3782
4041
|
{
|
|
3783
4042
|
scope: "col",
|
|
@@ -3786,9 +4045,9 @@ function RegisterTable({
|
|
|
3786
4045
|
},
|
|
3787
4046
|
c.key
|
|
3788
4047
|
)) }) }),
|
|
3789
|
-
/* @__PURE__ */
|
|
4048
|
+
/* @__PURE__ */ jsx12("tbody", { children: records.map((record) => {
|
|
3790
4049
|
const isSelected = record.id === selectedId;
|
|
3791
|
-
return /* @__PURE__ */
|
|
4050
|
+
return /* @__PURE__ */ jsx12(
|
|
3792
4051
|
"tr",
|
|
3793
4052
|
{
|
|
3794
4053
|
onClick: () => onRowClick?.(record.id),
|
|
@@ -3801,11 +4060,19 @@ function RegisterTable({
|
|
|
3801
4060
|
tabIndex: onRowClick ? 0 : void 0,
|
|
3802
4061
|
"aria-selected": isSelected,
|
|
3803
4062
|
className: isSelected ? "is-selected" : void 0,
|
|
3804
|
-
children: columns.map((c, i) => /* @__PURE__ */
|
|
4063
|
+
children: columns.map((c, i) => /* @__PURE__ */ jsx12(
|
|
3805
4064
|
"td",
|
|
3806
4065
|
{
|
|
3807
4066
|
className: c.align === "right" ? "vos-r" : void 0,
|
|
3808
|
-
children: /* @__PURE__ */
|
|
4067
|
+
children: /* @__PURE__ */ jsx12(
|
|
4068
|
+
Cell,
|
|
4069
|
+
{
|
|
4070
|
+
column: c,
|
|
4071
|
+
record,
|
|
4072
|
+
headline: i === 0,
|
|
4073
|
+
chips: i === 0 && register === "readings" ? readingAssumptionChips(record, assumptionTitles) : void 0
|
|
4074
|
+
}
|
|
4075
|
+
)
|
|
3809
4076
|
},
|
|
3810
4077
|
c.key
|
|
3811
4078
|
))
|
|
@@ -3818,25 +4085,32 @@ function RegisterTable({
|
|
|
3818
4085
|
function Cell({
|
|
3819
4086
|
column,
|
|
3820
4087
|
record,
|
|
3821
|
-
headline
|
|
4088
|
+
headline,
|
|
4089
|
+
chips
|
|
3822
4090
|
}) {
|
|
3823
4091
|
const raw = cellValue(column, record);
|
|
3824
4092
|
if (column.kind === "status") {
|
|
3825
|
-
return /* @__PURE__ */
|
|
4093
|
+
return /* @__PURE__ */ jsx12(StatusPill, { status: raw == null ? null : String(raw) });
|
|
3826
4094
|
}
|
|
3827
4095
|
if (column.kind === "risk") {
|
|
3828
|
-
return typeof raw === "number" ? /* @__PURE__ */
|
|
4096
|
+
return typeof raw === "number" ? /* @__PURE__ */ jsx12(RiskBar, { risk: raw }) : /* @__PURE__ */ jsx12("span", { className: "vos-muted", children: "\u2014" });
|
|
3829
4097
|
}
|
|
3830
4098
|
if (column.kind === "confidence") {
|
|
3831
|
-
return typeof raw === "number" ? /* @__PURE__ */
|
|
4099
|
+
return typeof raw === "number" ? /* @__PURE__ */ jsx12(ConfidenceCell, { confidence: raw }) : /* @__PURE__ */ jsx12("span", { className: "vos-muted", children: "\u2014" });
|
|
3832
4100
|
}
|
|
3833
4101
|
const text = headline && (raw === null || raw === void 0 || raw === "") ? primaryLabel(record) : formatValue(raw);
|
|
3834
|
-
|
|
4102
|
+
if (headline && chips && chips.length > 0) {
|
|
4103
|
+
return /* @__PURE__ */ jsxs11("span", { className: "vos-ttl-wrap", children: [
|
|
4104
|
+
/* @__PURE__ */ jsx12("span", { className: "vos-ttl", children: text }),
|
|
4105
|
+
/* @__PURE__ */ jsx12("span", { className: "vos-reading-chips", children: chips.map((chip, n) => /* @__PURE__ */ jsx12("span", { className: "vos-chip vos-pill vos-pill-neutral", children: chip }, n)) })
|
|
4106
|
+
] });
|
|
4107
|
+
}
|
|
4108
|
+
return /* @__PURE__ */ jsx12("span", { className: headline ? "vos-ttl" : void 0, children: text });
|
|
3835
4109
|
}
|
|
3836
4110
|
|
|
3837
4111
|
// src/record-drawer.tsx
|
|
3838
4112
|
import { useEffect as useEffect3, useState as useState6 } from "react";
|
|
3839
|
-
import { Fragment as Fragment9, jsx as
|
|
4113
|
+
import { Fragment as Fragment9, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3840
4114
|
var DERIVED_SUB = {
|
|
3841
4115
|
confidence: "Signed average of concluded readings",
|
|
3842
4116
|
risk: "Impact \xD7 (1 \u2212 Confidence\u207A/100)",
|
|
@@ -3909,23 +4183,23 @@ function RecordDrawer({
|
|
|
3909
4183
|
const setField = (key, value) => setDraft((d) => ({ ...d, [key]: value }));
|
|
3910
4184
|
const errors = editing ? draftErrors(register, draft) : {};
|
|
3911
4185
|
const hasErrors = Object.keys(errors).length > 0;
|
|
3912
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ jsxs12(
|
|
3913
4187
|
DrawerShell,
|
|
3914
4188
|
{
|
|
3915
4189
|
open,
|
|
3916
4190
|
onClose,
|
|
3917
4191
|
ariaLabel: `${REGISTER_LABEL[register]} record`,
|
|
3918
4192
|
children: [
|
|
3919
|
-
/* @__PURE__ */
|
|
3920
|
-
/* @__PURE__ */
|
|
3921
|
-
/* @__PURE__ */
|
|
3922
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsxs12("header", { className: "vos-drawer-header", children: [
|
|
4194
|
+
/* @__PURE__ */ jsxs12("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4195
|
+
/* @__PURE__ */ jsx13("p", { className: "vos-drawer-eyebrow", children: REGISTER_LABEL[register] }),
|
|
4196
|
+
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: record ? primaryLabel(record) : loading ? "Loading\u2026" : "\u2014" })
|
|
3923
4197
|
] }),
|
|
3924
|
-
record ? /* @__PURE__ */
|
|
4198
|
+
record ? /* @__PURE__ */ jsxs12("span", { className: "vos-verbadge", children: [
|
|
3925
4199
|
"v",
|
|
3926
4200
|
formatValue(record.version)
|
|
3927
4201
|
] }) : null,
|
|
3928
|
-
record && !editing && onOpenFull ? /* @__PURE__ */
|
|
4202
|
+
record && !editing && onOpenFull ? /* @__PURE__ */ jsx13(
|
|
3929
4203
|
"button",
|
|
3930
4204
|
{
|
|
3931
4205
|
type: "button",
|
|
@@ -3934,7 +4208,7 @@ function RecordDrawer({
|
|
|
3934
4208
|
children: "Full page \u2197"
|
|
3935
4209
|
}
|
|
3936
4210
|
) : null,
|
|
3937
|
-
record && !editing ? /* @__PURE__ */
|
|
4211
|
+
record && !editing ? /* @__PURE__ */ jsx13(
|
|
3938
4212
|
"button",
|
|
3939
4213
|
{
|
|
3940
4214
|
type: "button",
|
|
@@ -3943,7 +4217,7 @@ function RecordDrawer({
|
|
|
3943
4217
|
children: "Edit"
|
|
3944
4218
|
}
|
|
3945
4219
|
) : null,
|
|
3946
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ jsx13(
|
|
3947
4221
|
"button",
|
|
3948
4222
|
{
|
|
3949
4223
|
type: "button",
|
|
@@ -3954,14 +4228,14 @@ function RecordDrawer({
|
|
|
3954
4228
|
}
|
|
3955
4229
|
)
|
|
3956
4230
|
] }),
|
|
3957
|
-
/* @__PURE__ */
|
|
3958
|
-
derived ? /* @__PURE__ */
|
|
3959
|
-
/* @__PURE__ */
|
|
3960
|
-
/* @__PURE__ */
|
|
4231
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-drawer-body", children: loading ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "Loading record\u2026" }) : error ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: error }) : !record ? /* @__PURE__ */ jsx13("p", { className: "vos-muted", children: "No record." }) : /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
4232
|
+
derived ? /* @__PURE__ */ jsxs12("div", { children: [
|
|
4233
|
+
/* @__PURE__ */ jsxs12("div", { className: "vos-derived", children: [
|
|
4234
|
+
/* @__PURE__ */ jsxs12("div", { className: "vos-derived-head", children: [
|
|
3961
4235
|
"Derived",
|
|
3962
|
-
/* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-lock", children: "\u{1F512} computed on write \u2014 not editable" })
|
|
3963
4237
|
] }),
|
|
3964
|
-
/* @__PURE__ */
|
|
4238
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-dgrid", children: Object.entries(derived).map(([key, value]) => /* @__PURE__ */ jsx13(
|
|
3965
4239
|
DerivedCell,
|
|
3966
4240
|
{
|
|
3967
4241
|
field: key,
|
|
@@ -3973,11 +4247,11 @@ function RecordDrawer({
|
|
|
3973
4247
|
key
|
|
3974
4248
|
)) })
|
|
3975
4249
|
] }),
|
|
3976
|
-
"confidence" in derived && why ? /* @__PURE__ */
|
|
4250
|
+
"confidence" in derived && why ? /* @__PURE__ */ jsx13("div", { className: "vos-why-panel", children: /* @__PURE__ */ jsx13(UnderstandingPanel, { assumption: record, basePath }) }) : null
|
|
3977
4251
|
] }) : null,
|
|
3978
|
-
conflict ? /* @__PURE__ */
|
|
3979
|
-
saveError ? /* @__PURE__ */
|
|
3980
|
-
editing ? /* @__PURE__ */
|
|
4252
|
+
conflict ? /* @__PURE__ */ jsx13(ConflictBanner2, { message: conflict, onReload: reloadLatest }) : null,
|
|
4253
|
+
saveError ? /* @__PURE__ */ jsx13("p", { role: "alert", className: "vos-banner vos-banner-crit", children: saveError }) : null,
|
|
4254
|
+
editing ? /* @__PURE__ */ jsx13(
|
|
3981
4255
|
EditFields,
|
|
3982
4256
|
{
|
|
3983
4257
|
register,
|
|
@@ -3985,18 +4259,35 @@ function RecordDrawer({
|
|
|
3985
4259
|
errors,
|
|
3986
4260
|
onField: setField
|
|
3987
4261
|
}
|
|
3988
|
-
) : /* @__PURE__ */
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
4262
|
+
) : /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
4263
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-detail-list", children: rows.map((row) => /* @__PURE__ */ jsx13(
|
|
4264
|
+
DetailRowView,
|
|
4265
|
+
{
|
|
4266
|
+
row,
|
|
4267
|
+
onOpenRecord
|
|
4268
|
+
},
|
|
4269
|
+
row.key
|
|
4270
|
+
)) }),
|
|
4271
|
+
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */ jsxs12("section", { className: "vos-record-prose", children: [
|
|
4272
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
4273
|
+
/* @__PURE__ */ jsx13(Markdown, { text: record.body })
|
|
4274
|
+
] }) : null,
|
|
4275
|
+
register === "readings" ? /* @__PURE__ */ jsxs12("section", { className: "vos-record-prose", children: [
|
|
4276
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-detail-k", children: "Per-belief verdicts" }),
|
|
4277
|
+
/* @__PURE__ */ jsx13(
|
|
4278
|
+
BeliefVerdicts,
|
|
4279
|
+
{
|
|
4280
|
+
reading: record,
|
|
4281
|
+
assumptions: related?.assumptions ?? [],
|
|
4282
|
+
onOpenRecord
|
|
4283
|
+
}
|
|
4284
|
+
)
|
|
4285
|
+
] }) : null
|
|
4286
|
+
] })
|
|
3996
4287
|
] }) }),
|
|
3997
4288
|
record && !loading && !error && !editing ? children : null,
|
|
3998
|
-
record && editing ? /* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4289
|
+
record && editing ? /* @__PURE__ */ jsxs12("footer", { className: "vos-drawer-footer", children: [
|
|
4290
|
+
/* @__PURE__ */ jsx13(
|
|
4000
4291
|
"button",
|
|
4001
4292
|
{
|
|
4002
4293
|
type: "button",
|
|
@@ -4006,7 +4297,7 @@ function RecordDrawer({
|
|
|
4006
4297
|
children: "Cancel"
|
|
4007
4298
|
}
|
|
4008
4299
|
),
|
|
4009
|
-
/* @__PURE__ */
|
|
4300
|
+
/* @__PURE__ */ jsx13(
|
|
4010
4301
|
"button",
|
|
4011
4302
|
{
|
|
4012
4303
|
type: "button",
|
|
@@ -4017,7 +4308,7 @@ function RecordDrawer({
|
|
|
4017
4308
|
children: saving ? "Saving\u2026" : "Save"
|
|
4018
4309
|
}
|
|
4019
4310
|
)
|
|
4020
|
-
] }) : record ? /* @__PURE__ */
|
|
4311
|
+
] }) : record ? /* @__PURE__ */ jsxs12("footer", { className: "vos-drawer-footer", children: [
|
|
4021
4312
|
record.id,
|
|
4022
4313
|
" \xB7 updated ",
|
|
4023
4314
|
formatValue(record.updatedAt)
|
|
@@ -4030,11 +4321,11 @@ function DetailRowView({
|
|
|
4030
4321
|
row,
|
|
4031
4322
|
onOpenRecord
|
|
4032
4323
|
}) {
|
|
4033
|
-
return /* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4037
|
-
b.assumption ? /* @__PURE__ */
|
|
4324
|
+
return /* @__PURE__ */ jsxs12("div", { className: "vos-detail-row", children: [
|
|
4325
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-detail-k", children: row.label }),
|
|
4326
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-detail-v", children: row.kind === "relation" ? row.items && row.items.length ? /* @__PURE__ */ jsx13(RelationLinks, { items: row.items, onOpenRecord }) : "\u2014" : row.kind === "owner" ? row.names && row.names.length ? row.names.join(", ") : "\u2014" : row.kind === "bar-lines" ? row.bars && row.bars.length ? /* @__PURE__ */ jsx13("ul", { className: "vos-bars", children: row.bars.map((b, i) => /* @__PURE__ */ jsxs12("li", { className: "vos-bar-line", children: [
|
|
4327
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
4328
|
+
b.assumption ? /* @__PURE__ */ jsx13(
|
|
4038
4329
|
InlineLink,
|
|
4039
4330
|
{
|
|
4040
4331
|
id: b.assumption.id,
|
|
@@ -4042,7 +4333,7 @@ function DetailRowView({
|
|
|
4042
4333
|
onOpenRecord
|
|
4043
4334
|
}
|
|
4044
4335
|
) : null,
|
|
4045
|
-
/* @__PURE__ */
|
|
4336
|
+
/* @__PURE__ */ jsx13(
|
|
4046
4337
|
"span",
|
|
4047
4338
|
{
|
|
4048
4339
|
className: b.barVerdict ? "vos-pill vos-pill-good" : "vos-pill vos-pill-neutral",
|
|
@@ -4056,9 +4347,9 @@ function RelationLinks({
|
|
|
4056
4347
|
items,
|
|
4057
4348
|
onOpenRecord
|
|
4058
4349
|
}) {
|
|
4059
|
-
return /* @__PURE__ */
|
|
4350
|
+
return /* @__PURE__ */ jsx13("span", { className: "vos-detail-links", children: items.map((item, i) => /* @__PURE__ */ jsxs12("span", { children: [
|
|
4060
4351
|
i > 0 ? ", " : null,
|
|
4061
|
-
/* @__PURE__ */
|
|
4352
|
+
/* @__PURE__ */ jsx13(InlineLink, { id: item.id, title: item.title, onOpenRecord })
|
|
4062
4353
|
] }, item.id)) });
|
|
4063
4354
|
}
|
|
4064
4355
|
function InlineLink({
|
|
@@ -4066,7 +4357,7 @@ function InlineLink({
|
|
|
4066
4357
|
title,
|
|
4067
4358
|
onOpenRecord
|
|
4068
4359
|
}) {
|
|
4069
|
-
return onOpenRecord ? /* @__PURE__ */
|
|
4360
|
+
return onOpenRecord ? /* @__PURE__ */ jsx13(
|
|
4070
4361
|
"button",
|
|
4071
4362
|
{
|
|
4072
4363
|
type: "button",
|
|
@@ -4074,7 +4365,7 @@ function InlineLink({
|
|
|
4074
4365
|
onClick: () => onOpenRecord(id),
|
|
4075
4366
|
children: title
|
|
4076
4367
|
}
|
|
4077
|
-
) : /* @__PURE__ */
|
|
4368
|
+
) : /* @__PURE__ */ jsx13("span", { children: title });
|
|
4078
4369
|
}
|
|
4079
4370
|
function DerivedCell({
|
|
4080
4371
|
field,
|
|
@@ -4090,10 +4381,10 @@ function DerivedCell({
|
|
|
4090
4381
|
toneClass = heroToneClass(derivedTone(field, num3));
|
|
4091
4382
|
display = field === "confidence" ? formatSigned(num3) : String(Math.round(num3));
|
|
4092
4383
|
}
|
|
4093
|
-
return /* @__PURE__ */
|
|
4094
|
-
/* @__PURE__ */
|
|
4384
|
+
return /* @__PURE__ */ jsxs12("div", { className: "vos-dcell", children: [
|
|
4385
|
+
/* @__PURE__ */ jsxs12("div", { className: "vos-dcell-k", children: [
|
|
4095
4386
|
derivedLabel(field),
|
|
4096
|
-
showWhy ? /* @__PURE__ */
|
|
4387
|
+
showWhy ? /* @__PURE__ */ jsxs12(
|
|
4097
4388
|
"button",
|
|
4098
4389
|
{
|
|
4099
4390
|
type: "button",
|
|
@@ -4107,17 +4398,17 @@ function DerivedCell({
|
|
|
4107
4398
|
}
|
|
4108
4399
|
) : null
|
|
4109
4400
|
] }),
|
|
4110
|
-
/* @__PURE__ */
|
|
4111
|
-
DERIVED_SUB[field] ? /* @__PURE__ */
|
|
4401
|
+
/* @__PURE__ */ jsx13("div", { className: `vos-dcell-v ${toneClass}`, children: display }),
|
|
4402
|
+
DERIVED_SUB[field] ? /* @__PURE__ */ jsx13("div", { className: "vos-dcell-sub", children: DERIVED_SUB[field] }) : null
|
|
4112
4403
|
] });
|
|
4113
4404
|
}
|
|
4114
4405
|
function ConflictBanner2({
|
|
4115
4406
|
message,
|
|
4116
4407
|
onReload
|
|
4117
4408
|
}) {
|
|
4118
|
-
return /* @__PURE__ */
|
|
4119
|
-
/* @__PURE__ */
|
|
4120
|
-
/* @__PURE__ */
|
|
4409
|
+
return /* @__PURE__ */ jsxs12("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
4410
|
+
/* @__PURE__ */ jsx13("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx13("span", { children: message }) }),
|
|
4411
|
+
/* @__PURE__ */ jsx13("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
4121
4412
|
] });
|
|
4122
4413
|
}
|
|
4123
4414
|
|
|
@@ -4125,20 +4416,13 @@ function ConflictBanner2({
|
|
|
4125
4416
|
import { useMemo as useMemo2, useState as useState7 } from "react";
|
|
4126
4417
|
|
|
4127
4418
|
// src/form-fields.ts
|
|
4128
|
-
import {
|
|
4129
|
-
MARKET_RUNG_VALUES,
|
|
4130
|
-
TESTING_RUNGS
|
|
4131
|
-
} from "@validation-os/core";
|
|
4132
4419
|
var ASSUMPTION_STATUS = ["Draft", "Live", "Invalidated"];
|
|
4133
4420
|
var EXPERIMENT_STATUS = ["Draft", "Running", "Closed"];
|
|
4134
4421
|
var CLOSURE_REASON = ["Completed", "Early-stop", "Kill"];
|
|
4135
4422
|
var EXPERIMENT_OUTCOME = ["Achieved", "Missed", "Dropped"];
|
|
4136
4423
|
var DECISION_STATUS2 = ["Active", "Provisional", "Superseded", "Reversed"];
|
|
4137
4424
|
var GLOSSARY_STATUS = ["Active", "Provisional", "Superseded"];
|
|
4138
|
-
var RESULT = ["Validated", "Invalidated", "Inconclusive"];
|
|
4139
|
-
var MAGNITUDE = ["Low", "Typical", "High"];
|
|
4140
4425
|
var FEASIBILITY = ["High", "Medium", "Low"];
|
|
4141
|
-
var RUNGS = [...TESTING_RUNGS, ...MARKET_RUNG_VALUES];
|
|
4142
4426
|
var QUALITY = ["1", "0.7", "0.5"];
|
|
4143
4427
|
var FIELDS = {
|
|
4144
4428
|
assumptions: [
|
|
@@ -4171,8 +4455,10 @@ var FIELDS = {
|
|
|
4171
4455
|
readings: [
|
|
4172
4456
|
{ key: "Title", label: "Reading", kind: "text", required: true },
|
|
4173
4457
|
{ key: "Source", label: "Source", kind: "text" },
|
|
4174
|
-
|
|
4175
|
-
|
|
4458
|
+
// Rung / Result / Magnitude band / Grading justification are PER BELIEF now
|
|
4459
|
+
// (OPS-1305) — carried in `beliefs[]`, not on the row. They are omitted here
|
|
4460
|
+
// so the create form can never write a dead row-level field; grading a
|
|
4461
|
+
// reading's beliefs is a deferred follow-up (a `beliefs[]` editor).
|
|
4176
4462
|
{
|
|
4177
4463
|
key: "Representativeness",
|
|
4178
4464
|
label: "Representativeness",
|
|
@@ -4187,17 +4473,7 @@ var FIELDS = {
|
|
|
4187
4473
|
options: QUALITY,
|
|
4188
4474
|
coerce: "number"
|
|
4189
4475
|
},
|
|
4190
|
-
{
|
|
4191
|
-
key: "magnitudeBand",
|
|
4192
|
-
label: "Magnitude band",
|
|
4193
|
-
kind: "select",
|
|
4194
|
-
options: MAGNITUDE
|
|
4195
|
-
},
|
|
4196
|
-
{
|
|
4197
|
-
key: "Grading justification",
|
|
4198
|
-
label: "Grading justification",
|
|
4199
|
-
kind: "textarea"
|
|
4200
|
-
},
|
|
4476
|
+
{ key: "body", label: "Quote", kind: "textarea" },
|
|
4201
4477
|
{ key: "Date", label: "Date", kind: "text", placeholder: "YYYY-MM-DD" }
|
|
4202
4478
|
],
|
|
4203
4479
|
decisions: [
|
|
@@ -4239,7 +4515,7 @@ function toCreatePayload(register, draft) {
|
|
|
4239
4515
|
}
|
|
4240
4516
|
|
|
4241
4517
|
// src/record-form.tsx
|
|
4242
|
-
import { jsx as
|
|
4518
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4243
4519
|
function RecordForm({
|
|
4244
4520
|
register,
|
|
4245
4521
|
basePath,
|
|
@@ -4262,9 +4538,9 @@ function RecordForm({
|
|
|
4262
4538
|
} catch {
|
|
4263
4539
|
}
|
|
4264
4540
|
};
|
|
4265
|
-
return /* @__PURE__ */
|
|
4266
|
-
/* @__PURE__ */
|
|
4267
|
-
fields.map((field) => /* @__PURE__ */
|
|
4541
|
+
return /* @__PURE__ */ jsxs13("form", { onSubmit, className: "vos-form", children: [
|
|
4542
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-form-body", children: [
|
|
4543
|
+
fields.map((field) => /* @__PURE__ */ jsx14(
|
|
4268
4544
|
Field,
|
|
4269
4545
|
{
|
|
4270
4546
|
field,
|
|
@@ -4273,11 +4549,11 @@ function RecordForm({
|
|
|
4273
4549
|
},
|
|
4274
4550
|
field.key
|
|
4275
4551
|
)),
|
|
4276
|
-
error ? /* @__PURE__ */
|
|
4552
|
+
error ? /* @__PURE__ */ jsx14("p", { className: "vos-error", children: error }) : null
|
|
4277
4553
|
] }),
|
|
4278
|
-
/* @__PURE__ */
|
|
4279
|
-
/* @__PURE__ */
|
|
4280
|
-
/* @__PURE__ */
|
|
4554
|
+
/* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
4555
|
+
/* @__PURE__ */ jsx14("button", { type: "button", onClick: onCancel, className: "vos-btn vos-btn-ghost vos-btn-sm", children: "Cancel" }),
|
|
4556
|
+
/* @__PURE__ */ jsx14(
|
|
4281
4557
|
"button",
|
|
4282
4558
|
{
|
|
4283
4559
|
type: "submit",
|
|
@@ -4296,12 +4572,12 @@ function Field({
|
|
|
4296
4572
|
onChange
|
|
4297
4573
|
}) {
|
|
4298
4574
|
const id = `field-${field.key}`;
|
|
4299
|
-
return /* @__PURE__ */
|
|
4300
|
-
/* @__PURE__ */
|
|
4575
|
+
return /* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
4576
|
+
/* @__PURE__ */ jsxs13("label", { htmlFor: id, className: FIELD_LABEL_CLASS, children: [
|
|
4301
4577
|
field.label,
|
|
4302
|
-
field.required ? /* @__PURE__ */
|
|
4578
|
+
field.required ? /* @__PURE__ */ jsx14("span", { className: "vos-req", children: " *" }) : null
|
|
4303
4579
|
] }),
|
|
4304
|
-
field.kind === "textarea" ? /* @__PURE__ */
|
|
4580
|
+
field.kind === "textarea" ? /* @__PURE__ */ jsx14(
|
|
4305
4581
|
"textarea",
|
|
4306
4582
|
{
|
|
4307
4583
|
id,
|
|
@@ -4311,7 +4587,7 @@ function Field({
|
|
|
4311
4587
|
onChange: (e) => onChange(e.target.value),
|
|
4312
4588
|
className: FIELD_CONTROL_CLASS
|
|
4313
4589
|
}
|
|
4314
|
-
) : field.kind === "select" ? /* @__PURE__ */
|
|
4590
|
+
) : field.kind === "select" ? /* @__PURE__ */ jsxs13(
|
|
4315
4591
|
"select",
|
|
4316
4592
|
{
|
|
4317
4593
|
id,
|
|
@@ -4319,11 +4595,11 @@ function Field({
|
|
|
4319
4595
|
onChange: (e) => onChange(e.target.value),
|
|
4320
4596
|
className: FIELD_CONTROL_CLASS,
|
|
4321
4597
|
children: [
|
|
4322
|
-
/* @__PURE__ */
|
|
4323
|
-
field.options?.map((opt) => /* @__PURE__ */
|
|
4598
|
+
/* @__PURE__ */ jsx14("option", { value: "", children: "\u2014" }),
|
|
4599
|
+
field.options?.map((opt) => /* @__PURE__ */ jsx14("option", { value: opt, children: opt }, opt))
|
|
4324
4600
|
]
|
|
4325
4601
|
}
|
|
4326
|
-
) : /* @__PURE__ */
|
|
4602
|
+
) : /* @__PURE__ */ jsx14(
|
|
4327
4603
|
"input",
|
|
4328
4604
|
{
|
|
4329
4605
|
id,
|
|
@@ -4359,7 +4635,7 @@ function linkChoicesFrom(register) {
|
|
|
4359
4635
|
}
|
|
4360
4636
|
|
|
4361
4637
|
// src/relation-editor.tsx
|
|
4362
|
-
import { jsx as
|
|
4638
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4363
4639
|
function RelationEditor({
|
|
4364
4640
|
register,
|
|
4365
4641
|
recordId,
|
|
@@ -4393,10 +4669,10 @@ function RelationEditor({
|
|
|
4393
4669
|
} catch {
|
|
4394
4670
|
}
|
|
4395
4671
|
};
|
|
4396
|
-
return /* @__PURE__ */
|
|
4397
|
-
/* @__PURE__ */
|
|
4398
|
-
/* @__PURE__ */
|
|
4399
|
-
/* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsxs14("section", { className: "vos-relation", children: [
|
|
4673
|
+
/* @__PURE__ */ jsx15("h3", { className: "vos-sectitle", children: "Link a record" }),
|
|
4674
|
+
/* @__PURE__ */ jsxs14("div", { className: "vos-field-stack", children: [
|
|
4675
|
+
/* @__PURE__ */ jsxs14(
|
|
4400
4676
|
"select",
|
|
4401
4677
|
{
|
|
4402
4678
|
"aria-label": "Relation",
|
|
@@ -4407,12 +4683,12 @@ function RelationEditor({
|
|
|
4407
4683
|
},
|
|
4408
4684
|
className: FIELD_CONTROL_CLASS,
|
|
4409
4685
|
children: [
|
|
4410
|
-
/* @__PURE__ */
|
|
4411
|
-
choices.map((c) => /* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsx15("option", { value: "", children: "Choose a relation\u2026" }),
|
|
4687
|
+
choices.map((c) => /* @__PURE__ */ jsx15("option", { value: c.relation, children: c.label }, c.relation))
|
|
4412
4688
|
]
|
|
4413
4689
|
}
|
|
4414
4690
|
),
|
|
4415
|
-
active ? /* @__PURE__ */
|
|
4691
|
+
active ? /* @__PURE__ */ jsxs14(
|
|
4416
4692
|
"select",
|
|
4417
4693
|
{
|
|
4418
4694
|
"aria-label": "Target record",
|
|
@@ -4420,13 +4696,13 @@ function RelationEditor({
|
|
|
4420
4696
|
onChange: (e) => setTargetId(e.target.value),
|
|
4421
4697
|
className: FIELD_CONTROL_CLASS,
|
|
4422
4698
|
children: [
|
|
4423
|
-
/* @__PURE__ */
|
|
4424
|
-
targets.map((r) => /* @__PURE__ */
|
|
4699
|
+
/* @__PURE__ */ jsx15("option", { value: "", children: "Choose a record\u2026" }),
|
|
4700
|
+
targets.map((r) => /* @__PURE__ */ jsx15("option", { value: r.id, children: primaryLabel(r) }, r.id))
|
|
4425
4701
|
]
|
|
4426
4702
|
}
|
|
4427
4703
|
) : null,
|
|
4428
|
-
error ? /* @__PURE__ */
|
|
4429
|
-
/* @__PURE__ */
|
|
4704
|
+
error ? /* @__PURE__ */ jsx15("p", { className: "vos-error", children: error }) : null,
|
|
4705
|
+
/* @__PURE__ */ jsx15(
|
|
4430
4706
|
"button",
|
|
4431
4707
|
{
|
|
4432
4708
|
type: "button",
|
|
@@ -4493,7 +4769,7 @@ function useSavedViews(register) {
|
|
|
4493
4769
|
}
|
|
4494
4770
|
|
|
4495
4771
|
// src/register-browser.tsx
|
|
4496
|
-
import { jsx as
|
|
4772
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4497
4773
|
function contextNeeds(register) {
|
|
4498
4774
|
return {
|
|
4499
4775
|
experiments: register === "assumptions" || register === "readings",
|
|
@@ -4557,6 +4833,9 @@ function RegisterBrowser({
|
|
|
4557
4833
|
readings: ctx.readings,
|
|
4558
4834
|
decisions: ctx.decisions
|
|
4559
4835
|
};
|
|
4836
|
+
const assumptionTitles = new Map(
|
|
4837
|
+
(ctx.assumptions ?? []).map((a) => [a.id, primaryLabel(a)])
|
|
4838
|
+
);
|
|
4560
4839
|
const patch = (p) => setDescriptor((d) => ({ ...d, ...p }));
|
|
4561
4840
|
const saveCurrentView = () => {
|
|
4562
4841
|
if (typeof window === "undefined") return;
|
|
@@ -4568,14 +4847,14 @@ function RegisterBrowser({
|
|
|
4568
4847
|
void _name;
|
|
4569
4848
|
setDescriptor(rest);
|
|
4570
4849
|
};
|
|
4571
|
-
return /* @__PURE__ */
|
|
4572
|
-
/* @__PURE__ */
|
|
4573
|
-
/* @__PURE__ */
|
|
4574
|
-
/* @__PURE__ */
|
|
4575
|
-
subtitle ? /* @__PURE__ */
|
|
4850
|
+
return /* @__PURE__ */ jsxs15("div", { children: [
|
|
4851
|
+
/* @__PURE__ */ jsxs15("div", { className: "vos-head", children: [
|
|
4852
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
4853
|
+
/* @__PURE__ */ jsx16("h1", { children: REGISTER_LABEL[register] }),
|
|
4854
|
+
subtitle ? /* @__PURE__ */ jsx16("p", { children: subtitle }) : null
|
|
4576
4855
|
] }),
|
|
4577
|
-
/* @__PURE__ */
|
|
4578
|
-
/* @__PURE__ */
|
|
4856
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-spacer" }),
|
|
4857
|
+
/* @__PURE__ */ jsx16(
|
|
4579
4858
|
"button",
|
|
4580
4859
|
{
|
|
4581
4860
|
type: "button",
|
|
@@ -4584,7 +4863,7 @@ function RegisterBrowser({
|
|
|
4584
4863
|
children: "\u21BB Refresh"
|
|
4585
4864
|
}
|
|
4586
4865
|
),
|
|
4587
|
-
/* @__PURE__ */
|
|
4866
|
+
/* @__PURE__ */ jsxs15(
|
|
4588
4867
|
"button",
|
|
4589
4868
|
{
|
|
4590
4869
|
type: "button",
|
|
@@ -4597,10 +4876,10 @@ function RegisterBrowser({
|
|
|
4597
4876
|
}
|
|
4598
4877
|
)
|
|
4599
4878
|
] }),
|
|
4600
|
-
/* @__PURE__ */
|
|
4879
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-tabs", role: "tablist", "aria-label": "Views", children: shaped.tabs.map((tab) => {
|
|
4601
4880
|
const active = tab.id === shaped.activeTabId;
|
|
4602
4881
|
const badge = badgeFor(tab);
|
|
4603
|
-
return /* @__PURE__ */
|
|
4882
|
+
return /* @__PURE__ */ jsxs15(
|
|
4604
4883
|
"button",
|
|
4605
4884
|
{
|
|
4606
4885
|
type: "button",
|
|
@@ -4610,13 +4889,13 @@ function RegisterBrowser({
|
|
|
4610
4889
|
onClick: () => patch({ tabId: tab.id }),
|
|
4611
4890
|
children: [
|
|
4612
4891
|
tab.label,
|
|
4613
|
-
badge !== null ? /* @__PURE__ */
|
|
4892
|
+
badge !== null ? /* @__PURE__ */ jsx16("span", { className: "vos-tab-badge", children: badge }) : null
|
|
4614
4893
|
]
|
|
4615
4894
|
},
|
|
4616
4895
|
tab.id
|
|
4617
4896
|
);
|
|
4618
4897
|
}) }),
|
|
4619
|
-
/* @__PURE__ */
|
|
4898
|
+
/* @__PURE__ */ jsx16(
|
|
4620
4899
|
ViewControls,
|
|
4621
4900
|
{
|
|
4622
4901
|
register,
|
|
@@ -4627,10 +4906,10 @@ function RegisterBrowser({
|
|
|
4627
4906
|
onQuery: (query) => patch({ query })
|
|
4628
4907
|
}
|
|
4629
4908
|
),
|
|
4630
|
-
/* @__PURE__ */
|
|
4631
|
-
/* @__PURE__ */
|
|
4632
|
-
savedViews.views.length === 0 ? /* @__PURE__ */
|
|
4633
|
-
/* @__PURE__ */
|
|
4909
|
+
/* @__PURE__ */ jsxs15("div", { className: "vos-saved-views", children: [
|
|
4910
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-saved-label", children: "Saved views" }),
|
|
4911
|
+
savedViews.views.length === 0 ? /* @__PURE__ */ jsx16("span", { className: "vos-hint", children: "none yet" }) : savedViews.views.map((v) => /* @__PURE__ */ jsxs15("span", { className: "vos-saved-view", children: [
|
|
4912
|
+
/* @__PURE__ */ jsx16(
|
|
4634
4913
|
"button",
|
|
4635
4914
|
{
|
|
4636
4915
|
type: "button",
|
|
@@ -4639,7 +4918,7 @@ function RegisterBrowser({
|
|
|
4639
4918
|
children: v.name
|
|
4640
4919
|
}
|
|
4641
4920
|
),
|
|
4642
|
-
/* @__PURE__ */
|
|
4921
|
+
/* @__PURE__ */ jsx16(
|
|
4643
4922
|
"button",
|
|
4644
4923
|
{
|
|
4645
4924
|
type: "button",
|
|
@@ -4650,7 +4929,7 @@ function RegisterBrowser({
|
|
|
4650
4929
|
}
|
|
4651
4930
|
)
|
|
4652
4931
|
] }, v.name)),
|
|
4653
|
-
/* @__PURE__ */
|
|
4932
|
+
/* @__PURE__ */ jsx16(
|
|
4654
4933
|
"button",
|
|
4655
4934
|
{
|
|
4656
4935
|
type: "button",
|
|
@@ -4660,20 +4939,21 @@ function RegisterBrowser({
|
|
|
4660
4939
|
}
|
|
4661
4940
|
)
|
|
4662
4941
|
] }),
|
|
4663
|
-
loading && !records ? /* @__PURE__ */
|
|
4942
|
+
loading && !records ? /* @__PURE__ */ jsxs15("p", { className: "vos-muted", children: [
|
|
4664
4943
|
"Loading ",
|
|
4665
4944
|
REGISTER_LABEL[register].toLowerCase(),
|
|
4666
4945
|
"\u2026"
|
|
4667
|
-
] }) : error ? /* @__PURE__ */
|
|
4946
|
+
] }) : error ? /* @__PURE__ */ jsx16("p", { className: "vos-error", children: error }) : /* @__PURE__ */ jsx16(
|
|
4668
4947
|
ShapedBody,
|
|
4669
4948
|
{
|
|
4670
4949
|
register,
|
|
4671
4950
|
shaped,
|
|
4672
4951
|
onRowClick: setOpenId,
|
|
4673
|
-
selectedId: openId
|
|
4952
|
+
selectedId: openId,
|
|
4953
|
+
assumptionTitles
|
|
4674
4954
|
}
|
|
4675
4955
|
),
|
|
4676
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ jsx16(
|
|
4677
4957
|
RecordDrawer,
|
|
4678
4958
|
{
|
|
4679
4959
|
register,
|
|
@@ -4690,7 +4970,7 @@ function RegisterBrowser({
|
|
|
4690
4970
|
refreshRecord();
|
|
4691
4971
|
refreshList();
|
|
4692
4972
|
},
|
|
4693
|
-
children: openId ? /* @__PURE__ */
|
|
4973
|
+
children: openId ? /* @__PURE__ */ jsx16(
|
|
4694
4974
|
RelationEditor,
|
|
4695
4975
|
{
|
|
4696
4976
|
register,
|
|
@@ -4704,18 +4984,18 @@ function RegisterBrowser({
|
|
|
4704
4984
|
) : null
|
|
4705
4985
|
}
|
|
4706
4986
|
),
|
|
4707
|
-
/* @__PURE__ */
|
|
4987
|
+
/* @__PURE__ */ jsxs15(
|
|
4708
4988
|
DrawerShell,
|
|
4709
4989
|
{
|
|
4710
4990
|
open: creating,
|
|
4711
4991
|
onClose: () => setCreating(false),
|
|
4712
4992
|
ariaLabel: `New ${REGISTER_SINGULAR[register]} record`,
|
|
4713
4993
|
children: [
|
|
4714
|
-
/* @__PURE__ */
|
|
4715
|
-
/* @__PURE__ */
|
|
4716
|
-
/* @__PURE__ */
|
|
4994
|
+
/* @__PURE__ */ jsx16("header", { className: "vos-drawer-header", children: /* @__PURE__ */ jsxs15("div", { children: [
|
|
4995
|
+
/* @__PURE__ */ jsx16("p", { className: "vos-drawer-eyebrow", children: "New" }),
|
|
4996
|
+
/* @__PURE__ */ jsx16("h2", { className: "vos-drawer-title", children: REGISTER_SINGULAR[register] })
|
|
4717
4997
|
] }) }),
|
|
4718
|
-
/* @__PURE__ */
|
|
4998
|
+
/* @__PURE__ */ jsx16(
|
|
4719
4999
|
RecordForm,
|
|
4720
5000
|
{
|
|
4721
5001
|
register,
|
|
@@ -4743,8 +5023,8 @@ function ViewControls({
|
|
|
4743
5023
|
}) {
|
|
4744
5024
|
const sortable = columnsFor(register);
|
|
4745
5025
|
const sort = descriptor.sort ?? null;
|
|
4746
|
-
return /* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
5026
|
+
return /* @__PURE__ */ jsxs15("div", { className: "vos-view-controls", children: [
|
|
5027
|
+
/* @__PURE__ */ jsx16(
|
|
4748
5028
|
"input",
|
|
4749
5029
|
{
|
|
4750
5030
|
type: "search",
|
|
@@ -4755,24 +5035,24 @@ function ViewControls({
|
|
|
4755
5035
|
"aria-label": "Filter records"
|
|
4756
5036
|
}
|
|
4757
5037
|
),
|
|
4758
|
-
axes.length ? /* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
5038
|
+
axes.length ? /* @__PURE__ */ jsxs15("label", { className: "vos-control", children: [
|
|
5039
|
+
/* @__PURE__ */ jsx16("span", { children: "Group" }),
|
|
5040
|
+
/* @__PURE__ */ jsxs15(
|
|
4761
5041
|
"select",
|
|
4762
5042
|
{
|
|
4763
5043
|
className: "vos-input",
|
|
4764
5044
|
value: descriptor.groupBy ?? "",
|
|
4765
5045
|
onChange: (e) => onGroupBy(e.target.value || null),
|
|
4766
5046
|
children: [
|
|
4767
|
-
/* @__PURE__ */
|
|
4768
|
-
axes.map((axis) => /* @__PURE__ */
|
|
5047
|
+
/* @__PURE__ */ jsx16("option", { value: "", children: "None" }),
|
|
5048
|
+
axes.map((axis) => /* @__PURE__ */ jsx16("option", { value: axis, children: axis }, axis))
|
|
4769
5049
|
]
|
|
4770
5050
|
}
|
|
4771
5051
|
)
|
|
4772
5052
|
] }) : null,
|
|
4773
|
-
/* @__PURE__ */
|
|
4774
|
-
/* @__PURE__ */
|
|
4775
|
-
/* @__PURE__ */
|
|
5053
|
+
/* @__PURE__ */ jsxs15("label", { className: "vos-control", children: [
|
|
5054
|
+
/* @__PURE__ */ jsx16("span", { children: "Sort" }),
|
|
5055
|
+
/* @__PURE__ */ jsxs15(
|
|
4776
5056
|
"select",
|
|
4777
5057
|
{
|
|
4778
5058
|
className: "vos-input",
|
|
@@ -4781,13 +5061,13 @@ function ViewControls({
|
|
|
4781
5061
|
e.target.value ? { key: e.target.value, dir: sort?.dir ?? "desc" } : null
|
|
4782
5062
|
),
|
|
4783
5063
|
children: [
|
|
4784
|
-
/* @__PURE__ */
|
|
4785
|
-
sortable.map((c) => /* @__PURE__ */
|
|
5064
|
+
/* @__PURE__ */ jsx16("option", { value: "", children: "Default" }),
|
|
5065
|
+
sortable.map((c) => /* @__PURE__ */ jsx16("option", { value: c.key, children: c.header }, c.key))
|
|
4786
5066
|
]
|
|
4787
5067
|
}
|
|
4788
5068
|
)
|
|
4789
5069
|
] }),
|
|
4790
|
-
sort ? /* @__PURE__ */
|
|
5070
|
+
sort ? /* @__PURE__ */ jsx16(
|
|
4791
5071
|
"button",
|
|
4792
5072
|
{
|
|
4793
5073
|
type: "button",
|
|
@@ -4803,53 +5083,57 @@ function ShapedBody({
|
|
|
4803
5083
|
register,
|
|
4804
5084
|
shaped,
|
|
4805
5085
|
onRowClick,
|
|
4806
|
-
selectedId
|
|
5086
|
+
selectedId,
|
|
5087
|
+
assumptionTitles
|
|
4807
5088
|
}) {
|
|
4808
5089
|
if (shaped.nested) {
|
|
4809
5090
|
if (shaped.nested.length === 0)
|
|
4810
|
-
return /* @__PURE__ */
|
|
4811
|
-
return /* @__PURE__ */
|
|
4812
|
-
/* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No readings in this view." });
|
|
5092
|
+
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.nested.map((group) => /* @__PURE__ */ jsxs15("section", { className: "vos-group", children: [
|
|
5093
|
+
/* @__PURE__ */ jsxs15("h3", { className: "vos-group-head", children: [
|
|
4813
5094
|
group.label,
|
|
4814
|
-
/* @__PURE__ */
|
|
5095
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.readings.length })
|
|
4815
5096
|
] }),
|
|
4816
|
-
/* @__PURE__ */
|
|
5097
|
+
/* @__PURE__ */ jsx16(
|
|
4817
5098
|
RegisterTable,
|
|
4818
5099
|
{
|
|
4819
5100
|
register,
|
|
4820
5101
|
records: group.readings,
|
|
4821
5102
|
onRowClick,
|
|
4822
|
-
selectedId
|
|
5103
|
+
selectedId,
|
|
5104
|
+
assumptionTitles
|
|
4823
5105
|
}
|
|
4824
5106
|
)
|
|
4825
5107
|
] }, group.experimentId ?? "__none__")) });
|
|
4826
5108
|
}
|
|
4827
5109
|
if (shaped.groups) {
|
|
4828
5110
|
if (shaped.groups.length === 0)
|
|
4829
|
-
return /* @__PURE__ */
|
|
4830
|
-
return /* @__PURE__ */
|
|
4831
|
-
/* @__PURE__ */
|
|
5111
|
+
return /* @__PURE__ */ jsx16("p", { className: "vos-empty", children: "No records in this view." });
|
|
5112
|
+
return /* @__PURE__ */ jsx16("div", { className: "vos-groups", children: shaped.groups.map((group) => /* @__PURE__ */ jsxs15("section", { className: "vos-group", children: [
|
|
5113
|
+
/* @__PURE__ */ jsxs15("h3", { className: "vos-group-head", children: [
|
|
4832
5114
|
group.label,
|
|
4833
|
-
/* @__PURE__ */
|
|
5115
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-group-n", children: group.records.length })
|
|
4834
5116
|
] }),
|
|
4835
|
-
/* @__PURE__ */
|
|
5117
|
+
/* @__PURE__ */ jsx16(
|
|
4836
5118
|
RegisterTable,
|
|
4837
5119
|
{
|
|
4838
5120
|
register,
|
|
4839
5121
|
records: group.records,
|
|
4840
5122
|
onRowClick,
|
|
4841
|
-
selectedId
|
|
5123
|
+
selectedId,
|
|
5124
|
+
assumptionTitles
|
|
4842
5125
|
}
|
|
4843
5126
|
)
|
|
4844
5127
|
] }, group.key)) });
|
|
4845
5128
|
}
|
|
4846
|
-
return /* @__PURE__ */
|
|
5129
|
+
return /* @__PURE__ */ jsx16(
|
|
4847
5130
|
RegisterTable,
|
|
4848
5131
|
{
|
|
4849
5132
|
register,
|
|
4850
5133
|
records: shaped.rows,
|
|
4851
5134
|
onRowClick,
|
|
4852
|
-
selectedId
|
|
5135
|
+
selectedId,
|
|
5136
|
+
assumptionTitles
|
|
4853
5137
|
}
|
|
4854
5138
|
);
|
|
4855
5139
|
}
|
|
@@ -4857,7 +5141,7 @@ function ShapedBody({
|
|
|
4857
5141
|
// src/next-move-surface.tsx
|
|
4858
5142
|
import { useMemo as useMemo5, useState as useState11 } from "react";
|
|
4859
5143
|
import { rankNextMoves as rankNextMoves2 } from "@validation-os/core/derivation";
|
|
4860
|
-
import { Fragment as Fragment10, jsx as
|
|
5144
|
+
import { Fragment as Fragment10, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4861
5145
|
var STAGES = ["Framed", "Planned", "Tested", "Known"];
|
|
4862
5146
|
var MOVE_STAGE = {
|
|
4863
5147
|
"score-impact": 0,
|
|
@@ -4915,12 +5199,12 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
4915
5199
|
});
|
|
4916
5200
|
};
|
|
4917
5201
|
if (loading) {
|
|
4918
|
-
return /* @__PURE__ */
|
|
5202
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-empty", children: "Reading your beliefs\u2026" }) });
|
|
4919
5203
|
}
|
|
4920
5204
|
if (error) {
|
|
4921
|
-
return /* @__PURE__ */
|
|
4922
|
-
/* @__PURE__ */
|
|
4923
|
-
/* @__PURE__ */
|
|
5205
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsx17("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */ jsxs16("div", { className: "vos-banner-body", children: [
|
|
5206
|
+
/* @__PURE__ */ jsx17("b", { children: "Couldn't load the workflow." }),
|
|
5207
|
+
/* @__PURE__ */ jsx17("span", { children: error })
|
|
4924
5208
|
] }) }) });
|
|
4925
5209
|
}
|
|
4926
5210
|
if (moves.length === 0) {
|
|
@@ -4932,13 +5216,13 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
4932
5216
|
};
|
|
4933
5217
|
const cold = coldStartFor(records);
|
|
4934
5218
|
if (cold.cold) {
|
|
4935
|
-
return /* @__PURE__ */
|
|
4936
|
-
/* @__PURE__ */
|
|
4937
|
-
/* @__PURE__ */
|
|
4938
|
-
/* @__PURE__ */
|
|
4939
|
-
/* @__PURE__ */
|
|
4940
|
-
/* @__PURE__ */
|
|
4941
|
-
/* @__PURE__ */
|
|
5219
|
+
return /* @__PURE__ */ jsxs16(NextMoveFrame, { children: [
|
|
5220
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
5221
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-card vos-cold vos-cold-next", children: [
|
|
5222
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-cold-eyebrow", children: cold.next.eyebrow }),
|
|
5223
|
+
/* @__PURE__ */ jsx17("h2", { className: "vos-cold-headline", children: cold.next.headline }),
|
|
5224
|
+
/* @__PURE__ */ jsx17("p", { className: "vos-cold-body", children: cold.next.body }),
|
|
5225
|
+
/* @__PURE__ */ jsx17(
|
|
4942
5226
|
"button",
|
|
4943
5227
|
{
|
|
4944
5228
|
type: "button",
|
|
@@ -4950,10 +5234,10 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
4950
5234
|
] })
|
|
4951
5235
|
] });
|
|
4952
5236
|
}
|
|
4953
|
-
return /* @__PURE__ */
|
|
5237
|
+
return /* @__PURE__ */ jsx17(NextMoveFrame, { children: /* @__PURE__ */ jsxs16("div", { className: "vos-empty", children: [
|
|
4954
5238
|
"Nothing needs your attention right now \u2014 every belief is either resting on a decision or waiting on a test. Add a new belief from",
|
|
4955
5239
|
" ",
|
|
4956
|
-
/* @__PURE__ */
|
|
5240
|
+
/* @__PURE__ */ jsx17(
|
|
4957
5241
|
"button",
|
|
4958
5242
|
{
|
|
4959
5243
|
type: "button",
|
|
@@ -4971,11 +5255,11 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
4971
5255
|
const onDeck = rest.filter((m) => m.assumptionId !== top.assumptionId).slice(0, 3);
|
|
4972
5256
|
const topPres = movePresentation(top.move);
|
|
4973
5257
|
const topTone = riskLevel(top.risk);
|
|
4974
|
-
return /* @__PURE__ */
|
|
4975
|
-
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */
|
|
4976
|
-
/* @__PURE__ */
|
|
4977
|
-
/* @__PURE__ */
|
|
4978
|
-
/* @__PURE__ */
|
|
5258
|
+
return /* @__PURE__ */ jsxs16(NextMoveFrame, { children: [
|
|
5259
|
+
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */ jsx17(KillBanner, { count: killMoves.length, onReview: () => startStepIn(killMoves[0]) }) : null,
|
|
5260
|
+
/* @__PURE__ */ jsxs16("div", { className: `vos-hero vos-card${top.killLane ? " vos-hero-kill" : ""}`, children: [
|
|
5261
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-hero-eyebrow", children: top.killLane ? "Kill lane \u2014 turning against you" : "Your next move" }),
|
|
5262
|
+
/* @__PURE__ */ jsx17(
|
|
4979
5263
|
"button",
|
|
4980
5264
|
{
|
|
4981
5265
|
type: "button",
|
|
@@ -4985,23 +5269,23 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
4985
5269
|
children: top.title
|
|
4986
5270
|
}
|
|
4987
5271
|
),
|
|
4988
|
-
/* @__PURE__ */
|
|
4989
|
-
/* @__PURE__ */
|
|
5272
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-riskchip", "aria-label": `Risk: ${RISK_PHRASE[topTone]}`, children: [
|
|
5273
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx17(
|
|
4990
5274
|
"i",
|
|
4991
5275
|
{
|
|
4992
5276
|
className: `vos-fill-${topTone}`,
|
|
4993
5277
|
style: { width: `${riskFraction(top.risk) * 100}%` }
|
|
4994
5278
|
}
|
|
4995
5279
|
) }),
|
|
4996
|
-
/* @__PURE__ */
|
|
5280
|
+
/* @__PURE__ */ jsx17("span", { className: `vos-riskchip-label vos-text-${topTone}`, children: top.killLane ? "Confidence has turned negative" : RISK_PHRASE[topTone] })
|
|
4997
5281
|
] }),
|
|
4998
|
-
/* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */
|
|
5282
|
+
/* @__PURE__ */ jsx17(ActButton, { move: top, onStepIn: () => startStepIn(top), onReview: () => openRecord(top.assumptionId) }),
|
|
5283
|
+
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-why", onClick: () => setWhy((w) => !w), children: why ? "Hide details" : "Why this?" })
|
|
5000
5284
|
] }),
|
|
5001
|
-
why ? /* @__PURE__ */
|
|
5002
|
-
onDeck.length > 0 ? /* @__PURE__ */
|
|
5003
|
-
/* @__PURE__ */
|
|
5004
|
-
onDeck.map((m) => /* @__PURE__ */
|
|
5285
|
+
why ? /* @__PURE__ */ jsx17(WhyPanel, { top, ranked: moves }) : null,
|
|
5286
|
+
onDeck.length > 0 ? /* @__PURE__ */ jsxs16("section", { className: "vos-ondeck", children: [
|
|
5287
|
+
/* @__PURE__ */ jsx17("h3", { className: "vos-sectitle", children: "On deck" }),
|
|
5288
|
+
onDeck.map((m) => /* @__PURE__ */ jsx17(
|
|
5005
5289
|
OnDeckRow,
|
|
5006
5290
|
{
|
|
5007
5291
|
move: m,
|
|
@@ -5011,7 +5295,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5011
5295
|
m.assumptionId
|
|
5012
5296
|
))
|
|
5013
5297
|
] }) : null,
|
|
5014
|
-
/* @__PURE__ */
|
|
5298
|
+
/* @__PURE__ */ jsx17(
|
|
5015
5299
|
"button",
|
|
5016
5300
|
{
|
|
5017
5301
|
type: "button",
|
|
@@ -5020,7 +5304,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5020
5304
|
children: "Act on a different belief \u2192"
|
|
5021
5305
|
}
|
|
5022
5306
|
),
|
|
5023
|
-
stepIn?.form === "score-impact" ? /* @__PURE__ */
|
|
5307
|
+
stepIn?.form === "score-impact" ? /* @__PURE__ */ jsx17(
|
|
5024
5308
|
ScoreImpactForm,
|
|
5025
5309
|
{
|
|
5026
5310
|
assumption: stepIn.assumption,
|
|
@@ -5032,7 +5316,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5032
5316
|
onCancel: () => setStepIn(null)
|
|
5033
5317
|
}
|
|
5034
5318
|
) : null,
|
|
5035
|
-
stepIn?.form === "write-decision" ? /* @__PURE__ */
|
|
5319
|
+
stepIn?.form === "write-decision" ? /* @__PURE__ */ jsx17(
|
|
5036
5320
|
WriteDecisionForm,
|
|
5037
5321
|
{
|
|
5038
5322
|
assumption: stepIn.assumption,
|
|
@@ -5048,12 +5332,12 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
5048
5332
|
] });
|
|
5049
5333
|
}
|
|
5050
5334
|
function NextMoveFrame({ children }) {
|
|
5051
|
-
return /* @__PURE__ */
|
|
5052
|
-
/* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5054
|
-
/* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
5336
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-head", children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
5337
|
+
/* @__PURE__ */ jsx17("h1", { children: "Next move" }),
|
|
5338
|
+
/* @__PURE__ */ jsx17("p", { children: "The single next move to make \u2014 and what's on deck." })
|
|
5055
5339
|
] }) }),
|
|
5056
|
-
/* @__PURE__ */
|
|
5340
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-next", children })
|
|
5057
5341
|
] });
|
|
5058
5342
|
}
|
|
5059
5343
|
function ActButton({
|
|
@@ -5063,20 +5347,20 @@ function ActButton({
|
|
|
5063
5347
|
}) {
|
|
5064
5348
|
const pres = movePresentation(move.move);
|
|
5065
5349
|
if (pres.steppable) {
|
|
5066
|
-
return /* @__PURE__ */
|
|
5350
|
+
return /* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-hero-act", onClick: onStepIn, children: pres.cta });
|
|
5067
5351
|
}
|
|
5068
|
-
return /* @__PURE__ */
|
|
5069
|
-
/* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-hero-agent", children: [
|
|
5353
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-agent-note", children: "\u{1F916} Claude Code runs this off the dashboard" }),
|
|
5354
|
+
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-btn vos-btn-ghost vos-hero-act", onClick: onReview, children: "Review on the record \u2192" })
|
|
5071
5355
|
] });
|
|
5072
5356
|
}
|
|
5073
5357
|
function KillBanner({ count, onReview }) {
|
|
5074
|
-
return /* @__PURE__ */
|
|
5075
|
-
/* @__PURE__ */
|
|
5076
|
-
/* @__PURE__ */
|
|
5077
|
-
/* @__PURE__ */
|
|
5358
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-banner vos-banner-crit", children: [
|
|
5359
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-banner-body", children: [
|
|
5360
|
+
/* @__PURE__ */ jsx17("b", { children: count === 1 ? "A belief has fallen into the kill lane" : `${count} beliefs have fallen into the kill lane` }),
|
|
5361
|
+
/* @__PURE__ */ jsx17("span", { children: "Confidence \u2264 \u221250 \u2014 the evidence is against it. Kill it or test it again." })
|
|
5078
5362
|
] }),
|
|
5079
|
-
/* @__PURE__ */
|
|
5363
|
+
/* @__PURE__ */ jsx17("button", { type: "button", onClick: onReview, children: "Review" })
|
|
5080
5364
|
] });
|
|
5081
5365
|
}
|
|
5082
5366
|
function OnDeckRow({
|
|
@@ -5086,47 +5370,47 @@ function OnDeckRow({
|
|
|
5086
5370
|
}) {
|
|
5087
5371
|
const pres = movePresentation(move.move);
|
|
5088
5372
|
const tone = riskLevel(move.risk);
|
|
5089
|
-
return /* @__PURE__ */
|
|
5090
|
-
/* @__PURE__ */
|
|
5091
|
-
/* @__PURE__ */
|
|
5092
|
-
/* @__PURE__ */
|
|
5373
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-ondeck-row", children: [
|
|
5374
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx17("i", { className: `vos-fill-${tone}`, style: { width: `${riskFraction(move.risk) * 100}%` } }) }),
|
|
5375
|
+
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-ondeck-title", onClick: onOpen, children: move.title }),
|
|
5376
|
+
/* @__PURE__ */ jsx17("button", { type: "button", className: "vos-pill vos-pill-accent vos-ondeck-act", onClick: onAct, children: pres.pill })
|
|
5093
5377
|
] });
|
|
5094
5378
|
}
|
|
5095
5379
|
function WhyPanel({ top, ranked }) {
|
|
5096
|
-
return /* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5100
|
-
/* @__PURE__ */
|
|
5380
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-why-panel vos-next-why", children: [
|
|
5381
|
+
/* @__PURE__ */ jsx17("p", { className: "vos-why-reason", children: top.reason }),
|
|
5382
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5383
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Where it sits" }),
|
|
5384
|
+
/* @__PURE__ */ jsx17(StageStepper, { move: top.move })
|
|
5101
5385
|
] }),
|
|
5102
|
-
/* @__PURE__ */
|
|
5103
|
-
/* @__PURE__ */
|
|
5104
|
-
/* @__PURE__ */
|
|
5386
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5387
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "Why it's on top" }),
|
|
5388
|
+
/* @__PURE__ */ jsxs16("p", { className: "vos-why-formula", children: [
|
|
5105
5389
|
"Ranked by ",
|
|
5106
|
-
/* @__PURE__ */
|
|
5390
|
+
/* @__PURE__ */ jsx17("b", { children: "Feasibility \xD7 Risk" }),
|
|
5107
5391
|
" \u2014 Risk ",
|
|
5108
|
-
/* @__PURE__ */
|
|
5109
|
-
top.feasibility ? /* @__PURE__ */
|
|
5392
|
+
/* @__PURE__ */ jsx17("b", { children: Math.round(top.risk) }),
|
|
5393
|
+
top.feasibility ? /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
5110
5394
|
" ",
|
|
5111
5395
|
"\xD7 Feasibility ",
|
|
5112
|
-
/* @__PURE__ */
|
|
5113
|
-
] }) : /* @__PURE__ */
|
|
5396
|
+
/* @__PURE__ */ jsx17("b", { children: top.feasibility })
|
|
5397
|
+
] }) : /* @__PURE__ */ jsx17(Fragment10, { children: " (no test planned yet \u2014 neutral feasibility)" }),
|
|
5114
5398
|
top.killLane ? " \xB7 in the kill lane, so it jumps the queue" : null,
|
|
5115
5399
|
"."
|
|
5116
5400
|
] })
|
|
5117
5401
|
] }),
|
|
5118
|
-
/* @__PURE__ */
|
|
5119
|
-
/* @__PURE__ */
|
|
5120
|
-
/* @__PURE__ */
|
|
5121
|
-
/* @__PURE__ */
|
|
5122
|
-
/* @__PURE__ */
|
|
5402
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
5403
|
+
/* @__PURE__ */ jsx17("div", { className: "vos-why-section-title", children: "The ranking" }),
|
|
5404
|
+
/* @__PURE__ */ jsx17("ol", { className: "vos-why-rank", children: ranked.slice(0, 6).map((m) => /* @__PURE__ */ jsxs16("li", { className: m.assumptionId === top.assumptionId ? "vos-why-rank-top" : "", children: [
|
|
5405
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-title", children: m.title }),
|
|
5406
|
+
/* @__PURE__ */ jsx17("span", { className: "vos-why-rank-score", children: Math.round(m.score) })
|
|
5123
5407
|
] }, m.assumptionId)) })
|
|
5124
5408
|
] })
|
|
5125
5409
|
] });
|
|
5126
5410
|
}
|
|
5127
5411
|
function StageStepper({ move }) {
|
|
5128
5412
|
const at = MOVE_STAGE[move];
|
|
5129
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ jsx17("div", { className: "vos-stepper", "aria-label": `Stage: ${STAGES[at]}`, children: STAGES.map((label, i) => /* @__PURE__ */ jsx17(
|
|
5130
5414
|
"span",
|
|
5131
5415
|
{
|
|
5132
5416
|
className: `vos-step${i === at ? " vos-step-at" : ""}${i < at ? " vos-step-done" : ""}`,
|
|
@@ -5166,7 +5450,7 @@ function formatRoute(route) {
|
|
|
5166
5450
|
}
|
|
5167
5451
|
|
|
5168
5452
|
// src/sidebar-nav.tsx
|
|
5169
|
-
import { jsx as
|
|
5453
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5170
5454
|
function SidebarNav({
|
|
5171
5455
|
route,
|
|
5172
5456
|
onNavigate,
|
|
@@ -5175,12 +5459,12 @@ function SidebarNav({
|
|
|
5175
5459
|
registers
|
|
5176
5460
|
}) {
|
|
5177
5461
|
const activeRegister = route.name === "records" ? route.register : null;
|
|
5178
|
-
return /* @__PURE__ */
|
|
5179
|
-
/* @__PURE__ */
|
|
5180
|
-
/* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsxs17("nav", { className: "vos-nav", "aria-label": "Navigation", children: [
|
|
5463
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5464
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-nav-group", children: "Workflow" }),
|
|
5181
5465
|
WORKFLOW_NAV.map((item) => {
|
|
5182
5466
|
const active = route.name === item.route;
|
|
5183
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ jsxs17(
|
|
5184
5468
|
"button",
|
|
5185
5469
|
{
|
|
5186
5470
|
type: "button",
|
|
@@ -5188,20 +5472,20 @@ function SidebarNav({
|
|
|
5188
5472
|
"aria-current": active ? "page" : void 0,
|
|
5189
5473
|
onClick: () => onNavigate({ name: item.route }),
|
|
5190
5474
|
children: [
|
|
5191
|
-
/* @__PURE__ */
|
|
5475
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-nav-ic", "aria-hidden": "true", children: item.icon }),
|
|
5192
5476
|
item.label,
|
|
5193
|
-
item.isDefault ? /* @__PURE__ */
|
|
5477
|
+
item.isDefault ? /* @__PURE__ */ jsx18("span", { className: "vos-nav-default", children: "home" }) : null
|
|
5194
5478
|
]
|
|
5195
5479
|
},
|
|
5196
5480
|
item.route
|
|
5197
5481
|
);
|
|
5198
5482
|
})
|
|
5199
5483
|
] }),
|
|
5200
|
-
/* @__PURE__ */
|
|
5201
|
-
/* @__PURE__ */
|
|
5484
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
5485
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-nav-group", children: "Records" }),
|
|
5202
5486
|
registers.map((register) => {
|
|
5203
5487
|
const active = register === activeRegister;
|
|
5204
|
-
return /* @__PURE__ */
|
|
5488
|
+
return /* @__PURE__ */ jsxs17(
|
|
5205
5489
|
"button",
|
|
5206
5490
|
{
|
|
5207
5491
|
type: "button",
|
|
@@ -5209,9 +5493,9 @@ function SidebarNav({
|
|
|
5209
5493
|
"aria-current": active ? "page" : void 0,
|
|
5210
5494
|
onClick: () => onNavigate({ name: "records", register }),
|
|
5211
5495
|
children: [
|
|
5212
|
-
/* @__PURE__ */
|
|
5496
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-nav-ic", "aria-hidden": "true", children: REGISTER_ICON[register] }),
|
|
5213
5497
|
REGISTER_LABEL[register],
|
|
5214
|
-
needsHuman?.[register] ? /* @__PURE__ */
|
|
5498
|
+
needsHuman?.[register] ? /* @__PURE__ */ jsx18(
|
|
5215
5499
|
"span",
|
|
5216
5500
|
{
|
|
5217
5501
|
className: "vos-nav-alert",
|
|
@@ -5219,7 +5503,7 @@ function SidebarNav({
|
|
|
5219
5503
|
children: formatCount(needsHuman[register] ?? 0)
|
|
5220
5504
|
}
|
|
5221
5505
|
) : null,
|
|
5222
|
-
/* @__PURE__ */
|
|
5506
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-nav-count vos-num", children: counts?.[register] !== void 0 ? formatCount(counts[register] ?? 0) : "\xB7" })
|
|
5223
5507
|
]
|
|
5224
5508
|
},
|
|
5225
5509
|
register
|
|
@@ -5280,7 +5564,7 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
5280
5564
|
}
|
|
5281
5565
|
|
|
5282
5566
|
// src/dashboard-app.tsx
|
|
5283
|
-
import { jsx as
|
|
5567
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5284
5568
|
function initialsOf(name) {
|
|
5285
5569
|
const parts = name.trim().split(/\s+/);
|
|
5286
5570
|
const first = parts[0]?.[0] ?? "";
|
|
@@ -5322,33 +5606,33 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5322
5606
|
}, []);
|
|
5323
5607
|
const brandName = branding?.name ?? "Validation-OS";
|
|
5324
5608
|
const brandMark = branding?.initials ?? "V";
|
|
5325
|
-
return /* @__PURE__ */
|
|
5326
|
-
/* @__PURE__ */
|
|
5327
|
-
/* @__PURE__ */
|
|
5609
|
+
return /* @__PURE__ */ jsxs18("div", { className: "vos-app", children: [
|
|
5610
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-brand", children: [
|
|
5611
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-brand-dot", children: branding?.logoUrl ? /* @__PURE__ */ jsx19("img", { src: branding.logoUrl, alt: "" }) : brandMark }),
|
|
5328
5612
|
" ",
|
|
5329
5613
|
brandName
|
|
5330
5614
|
] }),
|
|
5331
|
-
/* @__PURE__ */
|
|
5332
|
-
backendLabel ? /* @__PURE__ */
|
|
5333
|
-
/* @__PURE__ */
|
|
5615
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-topbar", children: [
|
|
5616
|
+
backendLabel ? /* @__PURE__ */ jsxs18("div", { className: "vos-backend", children: [
|
|
5617
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-live-dot" }),
|
|
5334
5618
|
" Backend: ",
|
|
5335
|
-
/* @__PURE__ */
|
|
5619
|
+
/* @__PURE__ */ jsx19("b", { children: backendLabel })
|
|
5336
5620
|
] }) : null,
|
|
5337
|
-
agentLabel ? /* @__PURE__ */
|
|
5621
|
+
agentLabel ? /* @__PURE__ */ jsxs18("span", { className: "vos-hint", children: [
|
|
5338
5622
|
"Agent: ",
|
|
5339
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ jsx19("b", { style: { color: "var(--vos-text)" }, children: agentLabel })
|
|
5340
5624
|
] }) : null,
|
|
5341
|
-
/* @__PURE__ */
|
|
5342
|
-
/* @__PURE__ */
|
|
5343
|
-
user?.name ? /* @__PURE__ */
|
|
5344
|
-
/* @__PURE__ */
|
|
5345
|
-
/* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5347
|
-
user.caption ? /* @__PURE__ */
|
|
5625
|
+
/* @__PURE__ */ jsx19("div", { className: "vos-spacer" }),
|
|
5626
|
+
/* @__PURE__ */ jsx19("button", { type: "button", className: "vos-iconbtn", onClick: toggleTheme, children: "\u25D0 Theme" }),
|
|
5627
|
+
user?.name ? /* @__PURE__ */ jsxs18("div", { className: "vos-user", children: [
|
|
5628
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-avatar", children: initialsOf(user.name) }),
|
|
5629
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5630
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-user-name", children: user.name }),
|
|
5631
|
+
user.caption ? /* @__PURE__ */ jsx19("small", { children: user.caption }) : null
|
|
5348
5632
|
] })
|
|
5349
5633
|
] }) : null
|
|
5350
5634
|
] }),
|
|
5351
|
-
/* @__PURE__ */
|
|
5635
|
+
/* @__PURE__ */ jsx19(
|
|
5352
5636
|
SidebarNav,
|
|
5353
5637
|
{
|
|
5354
5638
|
route,
|
|
@@ -5358,7 +5642,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5358
5642
|
registers
|
|
5359
5643
|
}
|
|
5360
5644
|
),
|
|
5361
|
-
/* @__PURE__ */
|
|
5645
|
+
/* @__PURE__ */ jsx19("main", { className: "vos-main", children: route.name === "records" ? /* @__PURE__ */ jsx19(
|
|
5362
5646
|
RegisterBrowser,
|
|
5363
5647
|
{
|
|
5364
5648
|
register: route.register,
|
|
@@ -5367,7 +5651,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5367
5651
|
onOpenRecord: (id) => navigate({ name: "record", id })
|
|
5368
5652
|
},
|
|
5369
5653
|
route.register
|
|
5370
|
-
) : route.name === "record" ? /* @__PURE__ */
|
|
5654
|
+
) : route.name === "record" ? /* @__PURE__ */ jsx19(
|
|
5371
5655
|
RecordPage,
|
|
5372
5656
|
{
|
|
5373
5657
|
recordId: route.id,
|
|
@@ -5376,7 +5660,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
5376
5660
|
basePath
|
|
5377
5661
|
},
|
|
5378
5662
|
route.id
|
|
5379
|
-
) : route.name === "pipeline" ? /* @__PURE__ */
|
|
5663
|
+
) : route.name === "pipeline" ? /* @__PURE__ */ jsx19(PipelineSurface, { basePath, onNavigate: navigate }, "pipeline") : /* @__PURE__ */ jsx19(NextMoveSurface, { basePath, onNavigate: navigate }, "next") })
|
|
5380
5664
|
] });
|
|
5381
5665
|
}
|
|
5382
5666
|
|
|
@@ -5407,7 +5691,7 @@ function composeConnectCommand(input) {
|
|
|
5407
5691
|
|
|
5408
5692
|
// src/connect-claude-code.tsx
|
|
5409
5693
|
import { useState as useState14 } from "react";
|
|
5410
|
-
import { jsx as
|
|
5694
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5411
5695
|
function ConnectClaudeCode({
|
|
5412
5696
|
apiBaseUrl,
|
|
5413
5697
|
tokenEnv,
|
|
@@ -5436,21 +5720,21 @@ function ConnectClaudeCode({
|
|
|
5436
5720
|
} catch {
|
|
5437
5721
|
}
|
|
5438
5722
|
}
|
|
5439
|
-
return /* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
/* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5723
|
+
return /* @__PURE__ */ jsxs19("div", { children: [
|
|
5724
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-head", children: /* @__PURE__ */ jsxs19("div", { children: [
|
|
5725
|
+
/* @__PURE__ */ jsx20("h1", { children: "Connect Claude Code" }),
|
|
5726
|
+
/* @__PURE__ */ jsx20("p", { children: "Run the validation skills against this register from your own Claude Code \u2014 no repo, no keys to hunt down." })
|
|
5443
5727
|
] }) }),
|
|
5444
|
-
/* @__PURE__ */
|
|
5445
|
-
/* @__PURE__ */
|
|
5446
|
-
/* @__PURE__ */
|
|
5447
|
-
/* @__PURE__ */
|
|
5728
|
+
/* @__PURE__ */ jsxs19("ol", { className: "vos-hint", style: { lineHeight: 1.8 }, children: [
|
|
5729
|
+
/* @__PURE__ */ jsx20("li", { children: "Generate your personal connection command below." }),
|
|
5730
|
+
/* @__PURE__ */ jsx20("li", { children: "Paste it into a terminal in the workspace you'll run the skills in." }),
|
|
5731
|
+
/* @__PURE__ */ jsxs19("li", { children: [
|
|
5448
5732
|
"The command carries a token tied to ",
|
|
5449
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx20("strong", { children: "you" }),
|
|
5450
5734
|
" \u2014 anything you write lands under your name. Don't share it."
|
|
5451
5735
|
] })
|
|
5452
5736
|
] }),
|
|
5453
|
-
state.phase !== "ready" ? /* @__PURE__ */
|
|
5737
|
+
state.phase !== "ready" ? /* @__PURE__ */ jsx20(
|
|
5454
5738
|
"button",
|
|
5455
5739
|
{
|
|
5456
5740
|
type: "button",
|
|
@@ -5460,11 +5744,11 @@ function ConnectClaudeCode({
|
|
|
5460
5744
|
children: state.phase === "minting" ? "Generating\u2026" : "Generate connection command"
|
|
5461
5745
|
}
|
|
5462
5746
|
) : null,
|
|
5463
|
-
state.phase === "error" ? /* @__PURE__ */
|
|
5464
|
-
state.phase === "ready" ? /* @__PURE__ */
|
|
5465
|
-
/* @__PURE__ */
|
|
5466
|
-
/* @__PURE__ */
|
|
5467
|
-
/* @__PURE__ */
|
|
5747
|
+
state.phase === "error" ? /* @__PURE__ */ jsx20("p", { className: "vos-hint", role: "alert", children: state.message }) : null,
|
|
5748
|
+
state.phase === "ready" ? /* @__PURE__ */ jsxs19("div", { children: [
|
|
5749
|
+
/* @__PURE__ */ jsx20("pre", { className: "vos-code", "aria-label": "Connection command", children: state.command }),
|
|
5750
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: 8 }, children: [
|
|
5751
|
+
/* @__PURE__ */ jsx20(
|
|
5468
5752
|
"button",
|
|
5469
5753
|
{
|
|
5470
5754
|
type: "button",
|
|
@@ -5473,31 +5757,31 @@ function ConnectClaudeCode({
|
|
|
5473
5757
|
children: copied ? "Copied" : "Copy command"
|
|
5474
5758
|
}
|
|
5475
5759
|
),
|
|
5476
|
-
/* @__PURE__ */
|
|
5760
|
+
/* @__PURE__ */ jsx20("button", { type: "button", className: "vos-btn-ghost", onClick: generate, children: "Regenerate" })
|
|
5477
5761
|
] }),
|
|
5478
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsx20("p", { className: "vos-hint", style: { marginTop: 12 }, children: "Generating again revokes nothing on its own \u2014 remove old keys from your account settings when you rotate." })
|
|
5479
5763
|
] }) : null
|
|
5480
5764
|
] });
|
|
5481
5765
|
}
|
|
5482
5766
|
|
|
5483
5767
|
// src/surface-placeholder.tsx
|
|
5484
|
-
import { jsx as
|
|
5768
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5485
5769
|
function SurfacePlaceholder({
|
|
5486
5770
|
title,
|
|
5487
5771
|
subtitle,
|
|
5488
5772
|
detail
|
|
5489
5773
|
}) {
|
|
5490
|
-
return /* @__PURE__ */
|
|
5491
|
-
/* @__PURE__ */
|
|
5492
|
-
/* @__PURE__ */
|
|
5493
|
-
/* @__PURE__ */
|
|
5774
|
+
return /* @__PURE__ */ jsxs20("div", { children: [
|
|
5775
|
+
/* @__PURE__ */ jsx21("div", { className: "vos-head", children: /* @__PURE__ */ jsxs20("div", { children: [
|
|
5776
|
+
/* @__PURE__ */ jsx21("h1", { children: title }),
|
|
5777
|
+
/* @__PURE__ */ jsx21("p", { children: subtitle })
|
|
5494
5778
|
] }) }),
|
|
5495
|
-
/* @__PURE__ */
|
|
5779
|
+
/* @__PURE__ */ jsx21("div", { className: "vos-empty", children: detail })
|
|
5496
5780
|
] });
|
|
5497
5781
|
}
|
|
5498
5782
|
|
|
5499
5783
|
// src/register-counts.tsx
|
|
5500
|
-
import { jsx as
|
|
5784
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5501
5785
|
function RegisterCounts({
|
|
5502
5786
|
counts,
|
|
5503
5787
|
caption,
|
|
@@ -5507,8 +5791,8 @@ function RegisterCounts({
|
|
|
5507
5791
|
const registers = REGISTER_ORDER.filter(
|
|
5508
5792
|
(r) => counts[r] !== void 0
|
|
5509
5793
|
);
|
|
5510
|
-
return /* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
5794
|
+
return /* @__PURE__ */ jsxs21("section", { "aria-label": "Register counts", children: [
|
|
5795
|
+
/* @__PURE__ */ jsx22("div", { className: "vos-tile-grid", children: registers.map((register) => /* @__PURE__ */ jsx22(
|
|
5512
5796
|
StatTile,
|
|
5513
5797
|
{
|
|
5514
5798
|
label: REGISTER_LABEL[register],
|
|
@@ -5518,11 +5802,12 @@ function RegisterCounts({
|
|
|
5518
5802
|
},
|
|
5519
5803
|
register
|
|
5520
5804
|
)) }),
|
|
5521
|
-
caption ? /* @__PURE__ */
|
|
5805
|
+
caption ? /* @__PURE__ */ jsx22("p", { className: "vos-hint", style: { marginTop: 16 }, children: caption }) : null
|
|
5522
5806
|
] });
|
|
5523
5807
|
}
|
|
5524
5808
|
export {
|
|
5525
5809
|
BeliefJourney,
|
|
5810
|
+
BeliefVerdicts,
|
|
5526
5811
|
CONFLICT_MESSAGE,
|
|
5527
5812
|
ConfidenceCell,
|
|
5528
5813
|
ConnectClaudeCode,
|
|
@@ -5533,6 +5818,7 @@ export {
|
|
|
5533
5818
|
FIRST_RUN_LINE,
|
|
5534
5819
|
FieldInput,
|
|
5535
5820
|
GlossaryText,
|
|
5821
|
+
Markdown,
|
|
5536
5822
|
NextMoveSurface,
|
|
5537
5823
|
PipelineSurface,
|
|
5538
5824
|
REGISTER_GROUPS,
|
|
@@ -5561,6 +5847,7 @@ export {
|
|
|
5561
5847
|
ValidationOSDashboard,
|
|
5562
5848
|
WriteDecisionForm,
|
|
5563
5849
|
backlinkPanels,
|
|
5850
|
+
bodyPreview,
|
|
5564
5851
|
buildCycles,
|
|
5565
5852
|
buildJourney,
|
|
5566
5853
|
buildPatch,
|
|
@@ -5604,6 +5891,8 @@ export {
|
|
|
5604
5891
|
ownerNames,
|
|
5605
5892
|
parseRoute,
|
|
5606
5893
|
primaryLabel,
|
|
5894
|
+
readingAssumptionChips,
|
|
5895
|
+
readingBeliefVerdicts,
|
|
5607
5896
|
resolveBarLines,
|
|
5608
5897
|
riskBand,
|
|
5609
5898
|
riskFraction,
|