@validation-os/dashboard 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1234 -1096
- package/dist/index.js.map +1 -1
- package/dist/styles.css +79 -43
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/dashboard-app.tsx
|
|
4
|
-
import { useCallback as useCallback5, useEffect as useEffect6, useState as
|
|
4
|
+
import { useCallback as useCallback5, useEffect as useEffect6, useState as useState15 } from "react";
|
|
5
5
|
|
|
6
6
|
// src/labels.ts
|
|
7
7
|
var REGISTER_LABEL = {
|
|
@@ -76,6 +76,9 @@ function Breadcrumb({ trail, onNavigate }) {
|
|
|
76
76
|
}) });
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// src/evidence-composition.ts
|
|
80
|
+
import { scoreAndDedupe, w0ForRung } from "@validation-os/core/derivation";
|
|
81
|
+
|
|
79
82
|
// src/derived-views.ts
|
|
80
83
|
var KILL_ZONE = -50;
|
|
81
84
|
function readingBeliefs(r) {
|
|
@@ -140,6 +143,82 @@ function isTesting(a, experiments) {
|
|
|
140
143
|
);
|
|
141
144
|
}
|
|
142
145
|
|
|
146
|
+
// src/evidence-composition.ts
|
|
147
|
+
var LENS_RUNGS = {
|
|
148
|
+
Consumer: ["Talk", "Desk research", "Signed up", "Observed usage"],
|
|
149
|
+
Commercial: ["Talk", "Desk research", "Signed intent", "Paying users"]
|
|
150
|
+
};
|
|
151
|
+
var ALL_RUNGS = [
|
|
152
|
+
"Talk",
|
|
153
|
+
"Desk research",
|
|
154
|
+
"Signed up",
|
|
155
|
+
"Observed usage",
|
|
156
|
+
"Signed intent",
|
|
157
|
+
"Paying users"
|
|
158
|
+
];
|
|
159
|
+
var RUNG_CAPS = {
|
|
160
|
+
Talk: 6,
|
|
161
|
+
"Desk research": 15,
|
|
162
|
+
"Signed up": 50,
|
|
163
|
+
"Observed usage": 50,
|
|
164
|
+
"Signed intent": 50,
|
|
165
|
+
"Paying users": 50
|
|
166
|
+
};
|
|
167
|
+
function rungsForLens(lens) {
|
|
168
|
+
return LENS_RUNGS[lens] ?? ALL_RUNGS;
|
|
169
|
+
}
|
|
170
|
+
function buildEvidenceComposition(assumption, readings) {
|
|
171
|
+
const id = str(assumption.id) ?? "";
|
|
172
|
+
const lens = str(assumption.Lens) ?? "";
|
|
173
|
+
const ladder = rungsForLens(lens);
|
|
174
|
+
const inputs = [];
|
|
175
|
+
for (const r of readings) {
|
|
176
|
+
const belief2 = readingBeliefFor(r, id);
|
|
177
|
+
if (!belief2) continue;
|
|
178
|
+
const result = str(belief2.Result) ?? "Inconclusive";
|
|
179
|
+
if (result === "Inconclusive") continue;
|
|
180
|
+
const rung = str(r.Rung) ?? "Talk";
|
|
181
|
+
inputs.push({
|
|
182
|
+
id: str(r.id) ?? "",
|
|
183
|
+
source: str(r.Source) ?? null,
|
|
184
|
+
rung,
|
|
185
|
+
result,
|
|
186
|
+
representativeness: Number(r.Representativeness) || 1,
|
|
187
|
+
credibility: Number(r.Credibility) || 1,
|
|
188
|
+
date: str(r.Date),
|
|
189
|
+
magnitudeBand: r.magnitudeBand,
|
|
190
|
+
experimentId: str(r.experimentId)
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
const winners = scoreAndDedupe(inputs);
|
|
194
|
+
const rungsPresent = new Set(winners.map((x) => x.input.rung));
|
|
195
|
+
let den = 0;
|
|
196
|
+
for (const rung of rungsPresent) den += w0ForRung(rung);
|
|
197
|
+
for (const x of winners) den += x.weight;
|
|
198
|
+
const perRung = /* @__PURE__ */ new Map();
|
|
199
|
+
for (const x of winners) {
|
|
200
|
+
const rung = x.input.rung;
|
|
201
|
+
const cur = perRung.get(rung) ?? { contribution: 0, count: 0 };
|
|
202
|
+
cur.contribution += x.weight * x.strength / den;
|
|
203
|
+
cur.count += 1;
|
|
204
|
+
perRung.set(rung, cur);
|
|
205
|
+
}
|
|
206
|
+
const rungs = ladder.map((rung) => {
|
|
207
|
+
const e = perRung.get(rung);
|
|
208
|
+
return {
|
|
209
|
+
rung,
|
|
210
|
+
contribution: e ? Math.round((e.contribution + Number.EPSILON) * 100) / 100 : 0,
|
|
211
|
+
cap: RUNG_CAPS[rung] ?? 50,
|
|
212
|
+
count: e?.count ?? 0
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
const total = rungs.reduce((s, r) => s + r.contribution, 0);
|
|
216
|
+
return {
|
|
217
|
+
rungs,
|
|
218
|
+
totalContribution: Math.round((total + Number.EPSILON) * 100) / 100
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
143
222
|
// src/markdown.tsx
|
|
144
223
|
import { useState } from "react";
|
|
145
224
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -1307,7 +1386,7 @@ function AssumptionDetail({
|
|
|
1307
1386
|
const impact = derived.derivedImpact ?? 0;
|
|
1308
1387
|
const framed = derived.completeness ?? 0;
|
|
1309
1388
|
const nextMove2 = nextMoveFor(record, experiments.records ?? []);
|
|
1310
|
-
const linkedExperiments = (experiments.records ?? []).filter((e) => {
|
|
1389
|
+
const linkedExperiments = liveExperiments(experiments.records ?? []).filter((e) => {
|
|
1311
1390
|
const ids = Array.isArray(e.barLineAssumptionIds) ? e.barLineAssumptionIds : [];
|
|
1312
1391
|
return ids.includes(assumptionId);
|
|
1313
1392
|
});
|
|
@@ -1346,7 +1425,7 @@ function AssumptionDetail({
|
|
|
1346
1425
|
/* @__PURE__ */ jsx4(ScoreCard, { label: "Confidence", value: formatSigned(confidence2) }),
|
|
1347
1426
|
/* @__PURE__ */ jsx4(ScoreCard, { label: "Framed", value: `${Math.round(framed)}%` })
|
|
1348
1427
|
] }),
|
|
1349
|
-
/* @__PURE__ */ jsx4(
|
|
1428
|
+
/* @__PURE__ */ jsx4(EvidenceCompositionView, { assumption: record, readings: readings.records ?? [] }),
|
|
1350
1429
|
statement ? /* @__PURE__ */ jsxs4("div", { className: "vos-card vos-detail-section", children: [
|
|
1351
1430
|
/* @__PURE__ */ jsx4("div", { className: "vos-detail-section-label", children: "Body" }),
|
|
1352
1431
|
/* @__PURE__ */ jsx4(GlossaryText, { text: statement, terms: glossaryTerms, selfId: assumptionId })
|
|
@@ -1552,77 +1631,36 @@ function nextMoveFor(assumption, experiments) {
|
|
|
1552
1631
|
if (framed) return "Design an experiment";
|
|
1553
1632
|
return "Frame the belief";
|
|
1554
1633
|
}
|
|
1555
|
-
function
|
|
1634
|
+
function EvidenceCompositionView({
|
|
1556
1635
|
assumption,
|
|
1557
1636
|
readings
|
|
1558
1637
|
}) {
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
});
|
|
1564
|
-
const lens = String(assumption.Lens ?? "");
|
|
1565
|
-
const rungs = rungsForLens(lens);
|
|
1566
|
-
const perRung = /* @__PURE__ */ new Map();
|
|
1567
|
-
for (const r of linked) {
|
|
1568
|
-
const rung = String(r.Rung ?? "");
|
|
1569
|
-
if (!rungs.includes(rung)) continue;
|
|
1570
|
-
const belief2 = readingBeliefs(r).find((b) => b.assumptionId === id);
|
|
1571
|
-
if (!belief2) continue;
|
|
1572
|
-
const result = String(belief2.Result ?? "");
|
|
1573
|
-
if (result === "Inconclusive") continue;
|
|
1574
|
-
const strength = Math.abs(belief2.derived?.strength ?? 0);
|
|
1575
|
-
const cur = perRung.get(rung) ?? { contribution: 0, count: 0 };
|
|
1576
|
-
perRung.set(rung, {
|
|
1577
|
-
contribution: cur.contribution + strength,
|
|
1578
|
-
count: cur.count + 1
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1638
|
+
const comp = useMemo(
|
|
1639
|
+
() => buildEvidenceComposition(assumption, readings),
|
|
1640
|
+
[assumption, readings]
|
|
1641
|
+
);
|
|
1581
1642
|
return /* @__PURE__ */ jsxs4("div", { className: "vos-card vos-detail-section", children: [
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
const pct2 = cap > 0 ? Math.min(100, contribution / cap * 100) : 0;
|
|
1589
|
-
const isEmpty = count === 0;
|
|
1643
|
+
/* @__PURE__ */ jsxs4("div", { className: "vos-detail-section-label", children: [
|
|
1644
|
+
"Evidence composition \xB7 \u03A3 = ",
|
|
1645
|
+
formatSigned(comp.totalContribution),
|
|
1646
|
+
" (adds to Confidence)"
|
|
1647
|
+
] }),
|
|
1648
|
+
comp.rungs.length === 0 ? /* @__PURE__ */ jsx4("div", { className: "vos-muted", children: "No lens set \u2014 evidence composition needs a lens." }) : comp.rungs.map((r) => {
|
|
1649
|
+
const pct2 = r.cap > 0 ? Math.min(100, Math.abs(r.contribution) / r.cap * 100) : 0;
|
|
1650
|
+
const isEmpty = r.count === 0;
|
|
1590
1651
|
return /* @__PURE__ */ jsxs4("div", { className: "vos-comp-row", children: [
|
|
1591
|
-
/* @__PURE__ */ jsx4("span", { className: `vos-comp-rung ${isEmpty ? "is-empty" : ""}`, children: rung }),
|
|
1652
|
+
/* @__PURE__ */ jsx4("span", { className: `vos-comp-rung ${isEmpty ? "is-empty" : ""}`, children: r.rung }),
|
|
1592
1653
|
/* @__PURE__ */ jsx4("div", { className: "vos-comp-bar", children: /* @__PURE__ */ jsx4("i", { className: "vos-comp-fill", style: { width: `${pct2}%`, opacity: isEmpty ? 0.15 : 1 } }) }),
|
|
1593
|
-
/* @__PURE__ */ jsx4("span", { className: "vos-comp-val vos-num", children: isEmpty ? "\u2014" :
|
|
1654
|
+
/* @__PURE__ */ jsx4("span", { className: "vos-comp-val vos-num", children: isEmpty ? "\u2014" : `${formatSigned(r.contribution)}/${r.cap}` }),
|
|
1594
1655
|
/* @__PURE__ */ jsxs4("span", { className: "vos-comp-count vos-num", children: [
|
|
1595
|
-
count,
|
|
1656
|
+
r.count,
|
|
1596
1657
|
" src",
|
|
1597
|
-
count === 1 ? "" : "s"
|
|
1658
|
+
r.count === 1 ? "" : "s"
|
|
1598
1659
|
] })
|
|
1599
|
-
] }, rung);
|
|
1660
|
+
] }, r.rung);
|
|
1600
1661
|
})
|
|
1601
1662
|
] });
|
|
1602
1663
|
}
|
|
1603
|
-
var LENS_RUNGS = {
|
|
1604
|
-
Consumer: ["Talk", "Desk research", "Signed up", "Observed usage"],
|
|
1605
|
-
Commercial: ["Talk", "Desk research", "Signed intent", "Paying users"]
|
|
1606
|
-
};
|
|
1607
|
-
var ALL_RUNGS = [
|
|
1608
|
-
"Talk",
|
|
1609
|
-
"Desk research",
|
|
1610
|
-
"Signed up",
|
|
1611
|
-
"Observed usage",
|
|
1612
|
-
"Signed intent",
|
|
1613
|
-
"Paying users"
|
|
1614
|
-
];
|
|
1615
|
-
function rungsForLens(lens) {
|
|
1616
|
-
return LENS_RUNGS[lens] ?? ALL_RUNGS;
|
|
1617
|
-
}
|
|
1618
|
-
var RUNG_CAPS = {
|
|
1619
|
-
Talk: 6,
|
|
1620
|
-
"Desk research": 15,
|
|
1621
|
-
"Signed up": 50,
|
|
1622
|
-
"Observed usage": 50,
|
|
1623
|
-
"Signed intent": 50,
|
|
1624
|
-
"Paying users": 50
|
|
1625
|
-
};
|
|
1626
1664
|
|
|
1627
1665
|
// src/assumptions-surface.tsx
|
|
1628
1666
|
import { useMemo as useMemo2 } from "react";
|
|
@@ -2213,6 +2251,10 @@ function GridPane({
|
|
|
2213
2251
|
onNavigate
|
|
2214
2252
|
}) {
|
|
2215
2253
|
const view = useMemo2(() => buildStageGrid(assumptions), [assumptions]);
|
|
2254
|
+
const recs = useMemo2(
|
|
2255
|
+
() => buildRecommendedExperiments(assumptions, experiments),
|
|
2256
|
+
[assumptions, experiments]
|
|
2257
|
+
);
|
|
2216
2258
|
const cold = coldStartFor({
|
|
2217
2259
|
assumptions,
|
|
2218
2260
|
experiments,
|
|
@@ -2250,34 +2292,43 @@ function GridPane({
|
|
|
2250
2292
|
});
|
|
2251
2293
|
}
|
|
2252
2294
|
}
|
|
2253
|
-
return /* @__PURE__ */ jsxs5(
|
|
2254
|
-
/* @__PURE__ */
|
|
2255
|
-
/* @__PURE__ */ jsx5("
|
|
2256
|
-
/* @__PURE__ */ jsx5("
|
|
2257
|
-
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
|
|
2260
|
-
|
|
2295
|
+
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
2296
|
+
/* @__PURE__ */ jsxs5("div", { className: "vos-card vos-stage-grid-card", children: [
|
|
2297
|
+
/* @__PURE__ */ jsx5("div", { className: "vos-stage-grid-scroll", children: /* @__PURE__ */ jsxs5("table", { className: "vos-stage-grid", role: "grid", "aria-label": "Lens \xD7 Stage heatmap", children: [
|
|
2298
|
+
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs5("tr", { children: [
|
|
2299
|
+
/* @__PURE__ */ jsx5("th", { scope: "col", className: "vos-stage-grid-corner", children: "Lens \u2193 / Stage \u2192" }),
|
|
2300
|
+
view.stages.map((s) => /* @__PURE__ */ jsxs5("th", { scope: "col", className: "vos-stage-grid-col", children: [
|
|
2301
|
+
/* @__PURE__ */ jsx5("span", { className: "vos-stage-grid-stagename", children: s }),
|
|
2302
|
+
/* @__PURE__ */ jsx5("span", { className: "vos-stage-grid-stagegloss", children: STAGE_GLOSS[s] })
|
|
2303
|
+
] }, s))
|
|
2304
|
+
] }) }),
|
|
2305
|
+
/* @__PURE__ */ jsx5("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */ jsxs5("tr", { children: [
|
|
2306
|
+
/* @__PURE__ */ jsx5("th", { scope: "row", className: "vos-stage-grid-rowhead", children: lens }),
|
|
2307
|
+
view.stages.map((s) => {
|
|
2308
|
+
const cell = cellAt(view, lens, s);
|
|
2309
|
+
return /* @__PURE__ */ jsx5("td", { className: "vos-stage-grid-cell", children: /* @__PURE__ */ jsx5(
|
|
2310
|
+
"button",
|
|
2311
|
+
{
|
|
2312
|
+
type: "button",
|
|
2313
|
+
className: `vos-stage-grid-btn vos-heat-${heatLevel(cell.density)}`,
|
|
2314
|
+
disabled: cell.count === 0,
|
|
2315
|
+
onClick: () => cellClick(cell),
|
|
2316
|
+
"aria-label": `${cell.count} assumptions in ${lens} \xD7 ${s}`,
|
|
2317
|
+
children: cell.count === 0 ? "\xB7" : cell.count === 1 ? "1" : String(cell.count)
|
|
2318
|
+
}
|
|
2319
|
+
) }, s);
|
|
2320
|
+
})
|
|
2321
|
+
] }, lens)) })
|
|
2261
2322
|
] }) }),
|
|
2262
|
-
/* @__PURE__ */ jsx5("
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
disabled: cell.count === 0,
|
|
2272
|
-
onClick: () => cellClick(cell),
|
|
2273
|
-
"aria-label": `${cell.count} assumptions in ${lens} \xD7 ${s}`,
|
|
2274
|
-
children: cell.count === 0 ? "\xB7" : cell.count === 1 ? "1" : String(cell.count)
|
|
2275
|
-
}
|
|
2276
|
-
) }, s);
|
|
2277
|
-
})
|
|
2278
|
-
] }, lens)) })
|
|
2279
|
-
] }) }),
|
|
2280
|
-
/* @__PURE__ */ jsx5("p", { className: "vos-hint vos-stage-grid-foot", children: "The densest cell per row is where that part of the business is. Click a cell to drill into its assumptions, ranked by Risk; a single-assumption cell opens the detail directly." })
|
|
2323
|
+
/* @__PURE__ */ jsx5("p", { className: "vos-hint vos-stage-grid-foot", children: "The densest cell per row is where that part of the business is. Click a cell to drill into its assumptions, ranked by Risk; a single-assumption cell opens the detail directly." })
|
|
2324
|
+
] }),
|
|
2325
|
+
recs.length > 0 ? /* @__PURE__ */ jsx5(
|
|
2326
|
+
RecommendedExperimentsSection,
|
|
2327
|
+
{
|
|
2328
|
+
recs,
|
|
2329
|
+
onOpenAssumption: (id) => onNavigate({ name: "assumption", id })
|
|
2330
|
+
}
|
|
2331
|
+
) : null
|
|
2281
2332
|
] });
|
|
2282
2333
|
}
|
|
2283
2334
|
function heatLevel(density) {
|
|
@@ -2307,10 +2358,6 @@ function PipelineBoard({
|
|
|
2307
2358
|
() => buildPipeline(filtered, experiments),
|
|
2308
2359
|
[filtered, experiments]
|
|
2309
2360
|
);
|
|
2310
|
-
const recs = useMemo2(
|
|
2311
|
-
() => buildRecommendedExperiments(filtered, experiments),
|
|
2312
|
-
[filtered, experiments]
|
|
2313
|
-
);
|
|
2314
2361
|
const { progress, rows } = view;
|
|
2315
2362
|
const crumb = filterLens !== void 0 || filterStage !== void 0 ? /* @__PURE__ */ jsx5(
|
|
2316
2363
|
Breadcrumb2,
|
|
@@ -2366,14 +2413,7 @@ function PipelineBoard({
|
|
|
2366
2413
|
},
|
|
2367
2414
|
row.id
|
|
2368
2415
|
))
|
|
2369
|
-
] })
|
|
2370
|
-
recs.length > 0 ? /* @__PURE__ */ jsx5(
|
|
2371
|
-
RecommendedExperimentsSection,
|
|
2372
|
-
{
|
|
2373
|
-
recs,
|
|
2374
|
-
onOpenAssumption: (id) => onNavigate({ name: "assumption", id })
|
|
2375
|
-
}
|
|
2376
|
-
) : null
|
|
2416
|
+
] })
|
|
2377
2417
|
] });
|
|
2378
2418
|
}
|
|
2379
2419
|
function PipelineRowView({ row, onOpen }) {
|
|
@@ -2463,7 +2503,52 @@ function Breadcrumb2({
|
|
|
2463
2503
|
|
|
2464
2504
|
// src/experiment-detail.tsx
|
|
2465
2505
|
import { useMemo as useMemo3 } from "react";
|
|
2506
|
+
|
|
2507
|
+
// src/confidence-donut.tsx
|
|
2466
2508
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2509
|
+
function ConfidenceDonut({
|
|
2510
|
+
value,
|
|
2511
|
+
size = 56
|
|
2512
|
+
}) {
|
|
2513
|
+
const r = size / 2 - 5;
|
|
2514
|
+
const cx = size / 2;
|
|
2515
|
+
const cy = size / 2;
|
|
2516
|
+
const pct2 = Math.max(0, Math.min(100, value)) / 100;
|
|
2517
|
+
const color = value >= 67 ? "var(--vos-good)" : value >= 33 ? "var(--vos-warn)" : "var(--vos-crit)";
|
|
2518
|
+
const endAngle = -Math.PI / 2 + pct2 * 2 * Math.PI;
|
|
2519
|
+
const x2 = cx + r * Math.cos(endAngle);
|
|
2520
|
+
const y2 = cy + r * Math.sin(endAngle);
|
|
2521
|
+
const largeArc = pct2 > 0.5 ? 1 : 0;
|
|
2522
|
+
return /* @__PURE__ */ jsxs6("div", { className: "vos-donut", style: { width: size, height: size }, children: [
|
|
2523
|
+
/* @__PURE__ */ jsxs6("svg", { width: size, height: size, "aria-hidden": "true", children: [
|
|
2524
|
+
/* @__PURE__ */ jsx6(
|
|
2525
|
+
"circle",
|
|
2526
|
+
{
|
|
2527
|
+
cx,
|
|
2528
|
+
cy,
|
|
2529
|
+
r,
|
|
2530
|
+
fill: "none",
|
|
2531
|
+
stroke: "var(--vos-surface-2)",
|
|
2532
|
+
strokeWidth: 4
|
|
2533
|
+
}
|
|
2534
|
+
),
|
|
2535
|
+
value > 0 ? /* @__PURE__ */ jsx6(
|
|
2536
|
+
"path",
|
|
2537
|
+
{
|
|
2538
|
+
d: `M ${cx} ${cy} L ${cx} ${cy - r} A ${r} ${r} 0 ${largeArc} 1 ${x2} ${y2} Z`,
|
|
2539
|
+
fill: color,
|
|
2540
|
+
opacity: 0.25,
|
|
2541
|
+
stroke: color,
|
|
2542
|
+
strokeWidth: 1.5
|
|
2543
|
+
}
|
|
2544
|
+
) : null
|
|
2545
|
+
] }),
|
|
2546
|
+
/* @__PURE__ */ jsx6("span", { className: "vos-donut-num vos-num", style: { fontSize: size > 60 ? 18 : 14 }, children: Math.round(value) })
|
|
2547
|
+
] });
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
// src/experiment-detail.tsx
|
|
2551
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2467
2552
|
function ExperimentDetail({
|
|
2468
2553
|
experimentId,
|
|
2469
2554
|
basePath,
|
|
@@ -2478,15 +2563,15 @@ function ExperimentDetail({
|
|
|
2478
2563
|
[experiments.records, experimentId]
|
|
2479
2564
|
);
|
|
2480
2565
|
if (loading) {
|
|
2481
|
-
return /* @__PURE__ */
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
/* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
2567
|
+
/* @__PURE__ */ jsx7(Breadcrumb, { trail: [{ label: "Experiments", route: { name: "experiments" } }], onNavigate }),
|
|
2568
|
+
/* @__PURE__ */ jsx7("p", { className: "vos-muted", children: "Loading experiment\u2026" })
|
|
2484
2569
|
] });
|
|
2485
2570
|
}
|
|
2486
2571
|
if (!experiment) {
|
|
2487
|
-
return /* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2489
|
-
/* @__PURE__ */
|
|
2572
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
2573
|
+
/* @__PURE__ */ jsx7(Breadcrumb, { trail: [{ label: "Experiments", route: { name: "experiments" } }], onNavigate }),
|
|
2574
|
+
/* @__PURE__ */ jsxs7("p", { className: "vos-error", children: [
|
|
2490
2575
|
"Experiment not found: ",
|
|
2491
2576
|
experimentId
|
|
2492
2577
|
] })
|
|
@@ -2498,21 +2583,35 @@ function ExperimentDetail({
|
|
|
2498
2583
|
const barLines = Array.isArray(experiment.barLines) ? experiment.barLines : [];
|
|
2499
2584
|
const expConf = experiment.derived?.experimentConfidence ?? 50;
|
|
2500
2585
|
const expReadings = (readings.records ?? []).filter((r) => String(r.experimentId ?? "") === experimentId).sort((a, b) => String(b.Date ?? "").localeCompare(String(a.Date ?? "")));
|
|
2501
|
-
const
|
|
2502
|
-
|
|
2503
|
-
|
|
2586
|
+
const validatedBars = barLines.filter(
|
|
2587
|
+
(b) => expReadings.some(
|
|
2588
|
+
(r) => readingBeliefs(r).some(
|
|
2589
|
+
(bl) => bl.assumptionId === b.assumptionId && bl.Result === "Validated"
|
|
2590
|
+
)
|
|
2591
|
+
)
|
|
2592
|
+
);
|
|
2593
|
+
const invalidatedBars = barLines.filter(
|
|
2594
|
+
(b) => expReadings.some(
|
|
2595
|
+
(r) => readingBeliefs(r).some(
|
|
2596
|
+
(bl) => bl.assumptionId === b.assumptionId && bl.Result === "Invalidated"
|
|
2597
|
+
)
|
|
2598
|
+
)
|
|
2599
|
+
);
|
|
2504
2600
|
const readingAssumptionIds = /* @__PURE__ */ new Set();
|
|
2505
2601
|
for (const r of expReadings) {
|
|
2506
2602
|
for (const b of readingBeliefs(r)) readingAssumptionIds.add(b.assumptionId);
|
|
2507
2603
|
}
|
|
2508
2604
|
const inProgressBars = barLines.filter(
|
|
2509
|
-
(b) => !b.
|
|
2605
|
+
(b) => !validatedBars.includes(b) && !invalidatedBars.includes(b) && readingAssumptionIds.has(b.assumptionId)
|
|
2510
2606
|
);
|
|
2511
2607
|
const unstartedBars = barLines.filter(
|
|
2512
|
-
(b) => !
|
|
2608
|
+
(b) => !readingAssumptionIds.has(b.assumptionId)
|
|
2513
2609
|
);
|
|
2514
|
-
|
|
2515
|
-
|
|
2610
|
+
const settledBars = [...validatedBars, ...invalidatedBars];
|
|
2611
|
+
const validatedCount = validatedBars.length;
|
|
2612
|
+
const invalidatedCount = invalidatedBars.length;
|
|
2613
|
+
return /* @__PURE__ */ jsxs7("div", { children: [
|
|
2614
|
+
/* @__PURE__ */ jsx7(
|
|
2516
2615
|
Breadcrumb,
|
|
2517
2616
|
{
|
|
2518
2617
|
trail: [
|
|
@@ -2522,51 +2621,51 @@ function ExperimentDetail({
|
|
|
2522
2621
|
onNavigate
|
|
2523
2622
|
}
|
|
2524
2623
|
),
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2527
|
-
/* @__PURE__ */
|
|
2624
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-detail-head", children: [
|
|
2625
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-detail-id vos-num", children: experimentId }),
|
|
2626
|
+
/* @__PURE__ */ jsx7("span", { className: `vos-pill ${status === "Running" ? "vos-pill-good" : "vos-pill-neutral"}`, children: status })
|
|
2528
2627
|
] }),
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
2533
|
-
/* @__PURE__ */
|
|
2628
|
+
/* @__PURE__ */ jsx7("div", { className: "vos-detail-title", children: title }),
|
|
2629
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-card vos-exp-head", children: [
|
|
2630
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-exp-gauge", children: [
|
|
2631
|
+
/* @__PURE__ */ jsx7(ConfidenceDonut, { value: expConf, size: 80 }),
|
|
2632
|
+
/* @__PURE__ */ jsx7("div", { className: "vos-gauge-label", children: "exp confidence (50 = neutral)" })
|
|
2534
2633
|
] }),
|
|
2535
|
-
/* @__PURE__ */
|
|
2536
|
-
/* @__PURE__ */
|
|
2634
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-exp-coverage", children: [
|
|
2635
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-coverage-label", children: [
|
|
2537
2636
|
"COVERAGE \xB7 ",
|
|
2538
2637
|
settledBars.length,
|
|
2539
2638
|
"/",
|
|
2540
2639
|
barLines.length,
|
|
2541
2640
|
" bars settled"
|
|
2542
2641
|
] }),
|
|
2543
|
-
/* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2547
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-coverage-bar", children: [
|
|
2643
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-coverage-good", style: { width: `${pct(validatedCount, barLines.length)}%` } }),
|
|
2644
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-coverage-crit", style: { width: `${pct(invalidatedCount, barLines.length)}%` } }),
|
|
2645
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-coverage-warn", style: { width: `${pct(inProgressBars.length, barLines.length)}%` } }),
|
|
2646
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-coverage-empty", style: { width: `${pct(unstartedBars.length, barLines.length)}%` } })
|
|
2548
2647
|
] }),
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2551
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-coverage-legend", children: [
|
|
2649
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
2650
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-dot-good" }),
|
|
2552
2651
|
" ",
|
|
2553
2652
|
validatedCount,
|
|
2554
2653
|
" validated"
|
|
2555
2654
|
] }),
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
/* @__PURE__ */
|
|
2655
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
2656
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-dot-crit" }),
|
|
2558
2657
|
" ",
|
|
2559
2658
|
invalidatedCount,
|
|
2560
2659
|
" invalidated"
|
|
2561
2660
|
] }),
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
2662
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-dot-warn" }),
|
|
2564
2663
|
" ",
|
|
2565
2664
|
inProgressBars.length,
|
|
2566
2665
|
" in progress"
|
|
2567
2666
|
] }),
|
|
2568
|
-
/* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2667
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
2668
|
+
/* @__PURE__ */ jsx7("i", { className: "vos-dot-empty" }),
|
|
2570
2669
|
" ",
|
|
2571
2670
|
unstartedBars.length,
|
|
2572
2671
|
" unstarted"
|
|
@@ -2574,99 +2673,117 @@ function ExperimentDetail({
|
|
|
2574
2673
|
] })
|
|
2575
2674
|
] })
|
|
2576
2675
|
] }),
|
|
2577
|
-
body ? /* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
-
/* @__PURE__ */
|
|
2676
|
+
body ? /* @__PURE__ */ jsxs7("div", { className: "vos-card vos-detail-section", children: [
|
|
2677
|
+
/* @__PURE__ */ jsx7("div", { className: "vos-detail-section-label", children: "Plan body" }),
|
|
2678
|
+
/* @__PURE__ */ jsx7(EvidenceBody, { text: body })
|
|
2580
2679
|
] }) : null,
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-card vos-detail-section", children: [
|
|
2681
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-detail-section-label", children: [
|
|
2583
2682
|
"Evidence \xB7 ",
|
|
2584
2683
|
expReadings.length,
|
|
2585
2684
|
" reading",
|
|
2586
2685
|
expReadings.length === 1 ? "" : "s",
|
|
2587
2686
|
" from this experiment"
|
|
2588
2687
|
] }),
|
|
2589
|
-
expReadings.length === 0 ? /* @__PURE__ */
|
|
2688
|
+
expReadings.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "vos-muted vos-empty", children: "No readings yet \u2014 experiment is running." }) : expReadings.map((r) => {
|
|
2590
2689
|
const beliefs = readingBeliefs(r);
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
)
|
|
2603
|
-
/* @__PURE__ */ jsx6("span", { className: "vos-reading-source", children: String(r.Source ?? "") })
|
|
2604
|
-
] }),
|
|
2605
|
-
beliefs.length > 0 ? /* @__PURE__ */ jsx6("div", { className: "vos-reading-quotes", children: beliefs.map((b) => /* @__PURE__ */ jsxs6(
|
|
2606
|
-
"div",
|
|
2607
|
-
{
|
|
2608
|
-
className: `vos-reading-quote vos-verdict-border-${verdictTone2(b.Result)}`,
|
|
2609
|
-
children: [
|
|
2610
|
-
/* @__PURE__ */ jsxs6("span", { className: "vos-reading-quote-id vos-num", children: [
|
|
2611
|
-
b.assumptionId,
|
|
2612
|
-
" \xB7"
|
|
2613
|
-
] }),
|
|
2614
|
-
'"',
|
|
2615
|
-
String(b["Grading justification"] ?? ""),
|
|
2616
|
-
'"'
|
|
2617
|
-
]
|
|
2618
|
-
},
|
|
2619
|
-
b.assumptionId
|
|
2620
|
-
)) }) : null,
|
|
2621
|
-
/* @__PURE__ */ jsxs6("div", { className: "vos-reading-beliefs-label", children: [
|
|
2622
|
-
"ADDRESSES ",
|
|
2623
|
-
beliefs.length,
|
|
2624
|
-
" BELIEF",
|
|
2625
|
-
beliefs.length === 1 ? "" : "S",
|
|
2626
|
-
":"
|
|
2690
|
+
const rDate = String(r.Date ?? "");
|
|
2691
|
+
const rTitle = String(r.Title ?? r.id);
|
|
2692
|
+
const rId = String(r.id);
|
|
2693
|
+
return /* @__PURE__ */ jsxs7("details", { className: "vos-reading-card vos-reading-collapse", children: [
|
|
2694
|
+
/* @__PURE__ */ jsxs7("summary", { className: "vos-reading-card-summary", children: [
|
|
2695
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-reading-date vos-num", children: rDate }),
|
|
2696
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-reading-title", children: rTitle }),
|
|
2697
|
+
/* @__PURE__ */ jsxs7("span", { className: "vos-reading-beliefs-count vos-num", children: [
|
|
2698
|
+
beliefs.length,
|
|
2699
|
+
" belief",
|
|
2700
|
+
beliefs.length === 1 ? "" : "s"
|
|
2701
|
+
] })
|
|
2627
2702
|
] }),
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
"button",
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2703
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-reading-card-body", children: [
|
|
2704
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-reading-head", children: [
|
|
2705
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-reading-source", children: String(r.Source ?? "") }),
|
|
2706
|
+
/* @__PURE__ */ jsx7(
|
|
2707
|
+
"button",
|
|
2708
|
+
{
|
|
2709
|
+
type: "button",
|
|
2710
|
+
className: "vos-link",
|
|
2711
|
+
onClick: () => onNavigate({ name: "reading", id: rId }),
|
|
2712
|
+
children: "open reading \u2192"
|
|
2713
|
+
}
|
|
2714
|
+
)
|
|
2715
|
+
] }),
|
|
2716
|
+
beliefs.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "vos-reading-quotes", children: beliefs.map((b) => {
|
|
2717
|
+
const justification = String(b["Grading justification"] ?? "");
|
|
2718
|
+
const excerpt = justification || truncate(String(r.body ?? ""), 120);
|
|
2719
|
+
if (!excerpt) return null;
|
|
2720
|
+
return /* @__PURE__ */ jsxs7(
|
|
2721
|
+
"div",
|
|
2722
|
+
{
|
|
2723
|
+
className: `vos-reading-quote vos-verdict-border-${verdictTone2(b.Result)}`,
|
|
2724
|
+
children: [
|
|
2725
|
+
/* @__PURE__ */ jsxs7("span", { className: "vos-reading-quote-id vos-num", children: [
|
|
2726
|
+
b.assumptionId,
|
|
2727
|
+
" \xB7"
|
|
2728
|
+
] }),
|
|
2729
|
+
'"',
|
|
2730
|
+
excerpt,
|
|
2731
|
+
'"'
|
|
2732
|
+
]
|
|
2733
|
+
},
|
|
2734
|
+
b.assumptionId
|
|
2735
|
+
);
|
|
2736
|
+
}) }) : null,
|
|
2737
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-reading-beliefs-label", children: [
|
|
2738
|
+
"ADDRESSES ",
|
|
2739
|
+
beliefs.length,
|
|
2740
|
+
" BELIEF",
|
|
2741
|
+
beliefs.length === 1 ? "" : "S",
|
|
2742
|
+
":"
|
|
2743
|
+
] }),
|
|
2744
|
+
beliefs.map((b) => {
|
|
2745
|
+
const bl = barLines.find((x) => x.assumptionId === b.assumptionId);
|
|
2746
|
+
const a = (assumptions.records ?? []).find((x) => String(x.id) === b.assumptionId);
|
|
2747
|
+
return /* @__PURE__ */ jsxs7("div", { className: `vos-belief-card vos-verdict-border-${verdictTone2(b.Result)}`, children: [
|
|
2748
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-belief-head", children: [
|
|
2749
|
+
/* @__PURE__ */ jsx7(
|
|
2750
|
+
"button",
|
|
2751
|
+
{
|
|
2752
|
+
type: "button",
|
|
2753
|
+
className: "vos-belief-id",
|
|
2754
|
+
onClick: () => onNavigate({ name: "assumption", id: b.assumptionId }),
|
|
2755
|
+
children: b.assumptionId
|
|
2756
|
+
}
|
|
2757
|
+
),
|
|
2758
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-belief-title", children: String(a?.Title ?? b.assumptionId) }),
|
|
2759
|
+
/* @__PURE__ */ jsx7("span", { className: `vos-pill vos-pill-${verdictTone2(b.Result)}`, children: b.Result }),
|
|
2760
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-rung-tag", children: String(r.Rung ?? "") })
|
|
2651
2761
|
] }),
|
|
2652
|
-
bl
|
|
2653
|
-
/* @__PURE__ */
|
|
2654
|
-
|
|
2655
|
-
|
|
2762
|
+
bl ? /* @__PURE__ */ jsxs7("div", { className: "vos-belief-bar", children: [
|
|
2763
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
2764
|
+
/* @__PURE__ */ jsx7("strong", { children: "Right if:" }),
|
|
2765
|
+
" ",
|
|
2766
|
+
String(bl.rightIf ?? "")
|
|
2767
|
+
] }),
|
|
2768
|
+
bl.wrongIf ? /* @__PURE__ */ jsxs7("div", { children: [
|
|
2769
|
+
/* @__PURE__ */ jsx7("strong", { children: "Wrong if:" }),
|
|
2770
|
+
" ",
|
|
2771
|
+
String(bl.wrongIf)
|
|
2772
|
+
] }) : null,
|
|
2773
|
+
bl.barVerdict ? /* @__PURE__ */ jsxs7("div", { className: `vos-text-${verdictTone2(bl.barVerdict)}`, children: [
|
|
2774
|
+
"Bar verdict: ",
|
|
2775
|
+
/* @__PURE__ */ jsx7("strong", { children: bl.barVerdict })
|
|
2776
|
+
] }) : null
|
|
2656
2777
|
] }) : null,
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
/* @__PURE__ */ jsx6("div", { className: "vos-belief-why", children: String(b["Grading justification"] ?? "") })
|
|
2663
|
-
] }, b.assumptionId);
|
|
2664
|
-
})
|
|
2665
|
-
] }, String(r.id));
|
|
2778
|
+
/* @__PURE__ */ jsx7("div", { className: "vos-belief-why", children: String(b["Grading justification"] ?? "") })
|
|
2779
|
+
] }, b.assumptionId);
|
|
2780
|
+
})
|
|
2781
|
+
] })
|
|
2782
|
+
] }, rId);
|
|
2666
2783
|
})
|
|
2667
2784
|
] }),
|
|
2668
|
-
unstartedBars.length > 0 ? /* @__PURE__ */
|
|
2669
|
-
/* @__PURE__ */
|
|
2785
|
+
unstartedBars.length > 0 ? /* @__PURE__ */ jsxs7("div", { className: "vos-card vos-detail-section vos-unstarted", children: [
|
|
2786
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-detail-section-label", children: [
|
|
2670
2787
|
"Not yet tested \xB7 ",
|
|
2671
2788
|
unstartedBars.length,
|
|
2672
2789
|
" bar",
|
|
@@ -2675,9 +2792,9 @@ function ExperimentDetail({
|
|
|
2675
2792
|
] }),
|
|
2676
2793
|
unstartedBars.map((bl) => {
|
|
2677
2794
|
const a = (assumptions.records ?? []).find((x) => String(x.id) === bl.assumptionId);
|
|
2678
|
-
return /* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2795
|
+
return /* @__PURE__ */ jsxs7("div", { className: "vos-unstarted-bar", children: [
|
|
2796
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-belief-head", children: [
|
|
2797
|
+
/* @__PURE__ */ jsx7(
|
|
2681
2798
|
"button",
|
|
2682
2799
|
{
|
|
2683
2800
|
type: "button",
|
|
@@ -2686,18 +2803,18 @@ function ExperimentDetail({
|
|
|
2686
2803
|
children: bl.assumptionId
|
|
2687
2804
|
}
|
|
2688
2805
|
),
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
2691
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-belief-title", children: String(a?.Title ?? bl.assumptionId) }),
|
|
2807
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-rung-tag", children: String(bl.plannedRung ?? "") }),
|
|
2808
|
+
/* @__PURE__ */ jsx7("span", { className: "vos-muted", children: "\u25CC no reading" })
|
|
2692
2809
|
] }),
|
|
2693
|
-
/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsxs7("div", { className: "vos-belief-bar", children: [
|
|
2811
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
2812
|
+
/* @__PURE__ */ jsx7("strong", { children: "Right if:" }),
|
|
2696
2813
|
" ",
|
|
2697
2814
|
String(bl.rightIf ?? "")
|
|
2698
2815
|
] }),
|
|
2699
|
-
bl.wrongIf ? /* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2816
|
+
bl.wrongIf ? /* @__PURE__ */ jsxs7("div", { children: [
|
|
2817
|
+
/* @__PURE__ */ jsx7("strong", { children: "Wrong if:" }),
|
|
2701
2818
|
" ",
|
|
2702
2819
|
String(bl.wrongIf)
|
|
2703
2820
|
] }) : null
|
|
@@ -2710,6 +2827,10 @@ function ExperimentDetail({
|
|
|
2710
2827
|
function pct(n, total) {
|
|
2711
2828
|
return total === 0 ? 0 : n / total * 100;
|
|
2712
2829
|
}
|
|
2830
|
+
function truncate(s, max) {
|
|
2831
|
+
if (s.length <= max) return s;
|
|
2832
|
+
return s.slice(0, max - 1) + "\u2026";
|
|
2833
|
+
}
|
|
2713
2834
|
function verdictTone2(verdict) {
|
|
2714
2835
|
if (verdict === "Validated") return "good";
|
|
2715
2836
|
if (verdict === "Invalidated") return "crit";
|
|
@@ -2717,57 +2838,70 @@ function verdictTone2(verdict) {
|
|
|
2717
2838
|
}
|
|
2718
2839
|
|
|
2719
2840
|
// src/experiments-surface.tsx
|
|
2720
|
-
import { jsx as
|
|
2841
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2721
2842
|
function ExperimentsSurface({
|
|
2722
2843
|
basePath,
|
|
2723
2844
|
onNavigate
|
|
2724
2845
|
}) {
|
|
2725
2846
|
const experiments = useList("experiments", basePath);
|
|
2726
2847
|
if (experiments.loading && !experiments.records) {
|
|
2727
|
-
return /* @__PURE__ */
|
|
2728
|
-
/* @__PURE__ */
|
|
2729
|
-
/* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ jsxs8("div", { children: [
|
|
2849
|
+
/* @__PURE__ */ jsx8(Breadcrumb, { trail: [{ label: "Experiments", route: { name: "experiments" } }] }),
|
|
2850
|
+
/* @__PURE__ */ jsx8("p", { className: "vos-muted", children: "Loading experiments\u2026" })
|
|
2730
2851
|
] });
|
|
2731
2852
|
}
|
|
2732
2853
|
if (experiments.error) {
|
|
2733
|
-
return /* @__PURE__ */
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
-
/* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ jsxs8("div", { children: [
|
|
2855
|
+
/* @__PURE__ */ jsx8(Breadcrumb, { trail: [{ label: "Experiments", route: { name: "experiments" } }] }),
|
|
2856
|
+
/* @__PURE__ */ jsx8("p", { className: "vos-error", children: experiments.error })
|
|
2736
2857
|
] });
|
|
2737
2858
|
}
|
|
2738
2859
|
const live = liveExperiments(experiments.records ?? []);
|
|
2739
|
-
return /* @__PURE__ */
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
/* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ jsxs8("div", { children: [
|
|
2861
|
+
/* @__PURE__ */ jsx8(Breadcrumb, { trail: [{ label: "Experiments", route: { name: "experiments" } }] }),
|
|
2862
|
+
/* @__PURE__ */ jsx8("div", { className: "vos-head", children: /* @__PURE__ */ jsxs8("div", { children: [
|
|
2863
|
+
/* @__PURE__ */ jsx8("h1", { children: "Experiments \u2014 the live evidence plans" }),
|
|
2864
|
+
/* @__PURE__ */ jsxs8("p", { children: [
|
|
2744
2865
|
live.length,
|
|
2745
2866
|
" running ",
|
|
2746
2867
|
live.length === 1 ? "plan" : "plans",
|
|
2747
2868
|
" \xB7 click to open the evidence-first view."
|
|
2748
2869
|
] })
|
|
2749
2870
|
] }) }),
|
|
2750
|
-
live.length === 0 ? /* @__PURE__ */
|
|
2871
|
+
live.length === 0 ? /* @__PURE__ */ jsx8("div", { className: "vos-card vos-empty", children: "No running experiments. Design one from a belief's next move." }) : /* @__PURE__ */ jsx8("div", { className: "vos-card vos-exp-list", children: live.map((e) => {
|
|
2751
2872
|
const id = String(e.id ?? "");
|
|
2752
2873
|
const title = String(e.Title ?? id);
|
|
2753
2874
|
const bars = Array.isArray(e.barLines) ? e.barLines.length : 0;
|
|
2754
2875
|
const settled = Array.isArray(e.barLines) ? e.barLines.filter((b) => b?.barVerdict).length : 0;
|
|
2755
2876
|
const status = String(e.Status ?? "");
|
|
2756
|
-
|
|
2877
|
+
const expConf = e.derived?.experimentConfidence ?? 50;
|
|
2878
|
+
const instrument = String(e.Instrument ?? "");
|
|
2879
|
+
return /* @__PURE__ */ jsxs8(
|
|
2757
2880
|
"button",
|
|
2758
2881
|
{
|
|
2759
2882
|
type: "button",
|
|
2760
|
-
className: "vos-
|
|
2883
|
+
className: "vos-exp-row",
|
|
2761
2884
|
onClick: () => onNavigate({ name: "experiment", id }),
|
|
2762
2885
|
children: [
|
|
2763
|
-
/* @__PURE__ */
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
|
|
2766
|
-
"
|
|
2767
|
-
|
|
2768
|
-
|
|
2886
|
+
/* @__PURE__ */ jsx8(ConfidenceDonut, { value: expConf, size: 56 }),
|
|
2887
|
+
/* @__PURE__ */ jsxs8("div", { className: "vos-exp-row-body", children: [
|
|
2888
|
+
/* @__PURE__ */ jsx8("div", { className: "vos-exp-row-title", children: title }),
|
|
2889
|
+
/* @__PURE__ */ jsxs8("div", { className: "vos-exp-row-meta vos-num", children: [
|
|
2890
|
+
instrument && /* @__PURE__ */ jsxs8("span", { children: [
|
|
2891
|
+
instrument,
|
|
2892
|
+
" \xB7 "
|
|
2893
|
+
] }),
|
|
2894
|
+
bars,
|
|
2895
|
+
" bars \xB7 ",
|
|
2896
|
+
settled,
|
|
2897
|
+
" settled",
|
|
2898
|
+
e.Deadline ? /* @__PURE__ */ jsxs8("span", { children: [
|
|
2899
|
+
" \xB7 deadline ",
|
|
2900
|
+
String(e.Deadline)
|
|
2901
|
+
] }) : null
|
|
2902
|
+
] })
|
|
2769
2903
|
] }),
|
|
2770
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ jsx8("span", { className: `vos-pill ${status === "Running" ? "vos-pill-good" : "vos-pill-neutral"}`, children: status })
|
|
2771
2905
|
]
|
|
2772
2906
|
},
|
|
2773
2907
|
id
|
|
@@ -2778,7 +2912,7 @@ function ExperimentsSurface({
|
|
|
2778
2912
|
|
|
2779
2913
|
// src/reading-detail.tsx
|
|
2780
2914
|
import { useMemo as useMemo4 } from "react";
|
|
2781
|
-
import { jsx as
|
|
2915
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2782
2916
|
function ReadingDetail({
|
|
2783
2917
|
readingId,
|
|
2784
2918
|
basePath,
|
|
@@ -2793,15 +2927,15 @@ function ReadingDetail({
|
|
|
2793
2927
|
[readings.records, readingId]
|
|
2794
2928
|
);
|
|
2795
2929
|
if (loading) {
|
|
2796
|
-
return /* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2798
|
-
/* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
2931
|
+
/* @__PURE__ */ jsx9(Breadcrumb, { trail: [{ label: "Readings", route: { name: "readings" } }], onNavigate }),
|
|
2932
|
+
/* @__PURE__ */ jsx9("p", { className: "vos-muted", children: "Loading reading\u2026" })
|
|
2799
2933
|
] });
|
|
2800
2934
|
}
|
|
2801
2935
|
if (!reading) {
|
|
2802
|
-
return /* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
2936
|
+
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
2937
|
+
/* @__PURE__ */ jsx9(Breadcrumb, { trail: [{ label: "Readings", route: { name: "readings" } }], onNavigate }),
|
|
2938
|
+
/* @__PURE__ */ jsxs9("p", { className: "vos-error", children: [
|
|
2805
2939
|
"Reading not found: ",
|
|
2806
2940
|
readingId
|
|
2807
2941
|
] })
|
|
@@ -2814,8 +2948,8 @@ function ReadingDetail({
|
|
|
2814
2948
|
const experiment = expId ? (experiments.records ?? []).find((e) => String(e.id) === expId) ?? null : null;
|
|
2815
2949
|
const beliefs = readingBeliefs(reading);
|
|
2816
2950
|
const rung = String(reading.Rung ?? "");
|
|
2817
|
-
return /* @__PURE__ */
|
|
2818
|
-
/* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsxs9("div", { children: [
|
|
2952
|
+
/* @__PURE__ */ jsx9(
|
|
2819
2953
|
Breadcrumb,
|
|
2820
2954
|
{
|
|
2821
2955
|
trail: [
|
|
@@ -2825,32 +2959,33 @@ function ReadingDetail({
|
|
|
2825
2959
|
onNavigate
|
|
2826
2960
|
}
|
|
2827
2961
|
),
|
|
2828
|
-
/* @__PURE__ */
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
expId ? /* @__PURE__ */
|
|
2962
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-detail-head", children: [
|
|
2963
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-detail-id vos-num", children: readingId }),
|
|
2964
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-reading-source", children: source }),
|
|
2965
|
+
expId ? /* @__PURE__ */ jsx9("span", { className: "vos-pill vos-pill-accent", children: "from experiment" }) : /* @__PURE__ */ jsx9("span", { className: "vos-pill vos-pill-neutral", children: "found evidence" })
|
|
2832
2966
|
] }),
|
|
2833
|
-
/* @__PURE__ */
|
|
2834
|
-
/* @__PURE__ */
|
|
2835
|
-
/* @__PURE__ */
|
|
2836
|
-
body ? /* @__PURE__ */
|
|
2967
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-detail-title", children: title }),
|
|
2968
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-card vos-detail-section", children: [
|
|
2969
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-detail-section-label", children: "Context" }),
|
|
2970
|
+
body ? /* @__PURE__ */ jsx9(EvidenceBody, { text: body }) : /* @__PURE__ */ jsx9("div", { className: "vos-muted", children: "No context recorded." })
|
|
2837
2971
|
] }),
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-card vos-detail-section", children: [
|
|
2973
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-detail-section-label", children: [
|
|
2840
2974
|
"What this evidence says \xB7 ",
|
|
2841
2975
|
beliefs.length,
|
|
2842
2976
|
" belief",
|
|
2843
2977
|
beliefs.length === 1 ? "" : "s",
|
|
2844
2978
|
" \xB7 each with its own quote"
|
|
2845
2979
|
] }),
|
|
2846
|
-
beliefs.length === 0 ? /* @__PURE__ */
|
|
2980
|
+
beliefs.length === 0 ? /* @__PURE__ */ jsx9("div", { className: "vos-muted", children: "No beliefs scored in this reading." }) : beliefs.map((b) => {
|
|
2847
2981
|
const a = (assumptions.records ?? []).find((x) => String(x.id) === b.assumptionId);
|
|
2848
2982
|
const bl = experiment && Array.isArray(experiment.barLines) ? experiment.barLines.find((x) => x?.assumptionId === b.assumptionId) : null;
|
|
2849
2983
|
const result = String(b.Result ?? "Inconclusive");
|
|
2850
2984
|
const justification = String(b["Grading justification"] ?? "");
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2985
|
+
const excerpt = justification || truncate2(body, 120);
|
|
2986
|
+
return /* @__PURE__ */ jsxs9("div", { className: `vos-belief-card vos-verdict-border-${verdictTone3(result)}`, children: [
|
|
2987
|
+
/* @__PURE__ */ jsxs9("div", { className: "vos-belief-head", children: [
|
|
2988
|
+
/* @__PURE__ */ jsx9(
|
|
2854
2989
|
"button",
|
|
2855
2990
|
{
|
|
2856
2991
|
type: "button",
|
|
@@ -2859,54 +2994,53 @@ function ReadingDetail({
|
|
|
2859
2994
|
children: b.assumptionId
|
|
2860
2995
|
}
|
|
2861
2996
|
),
|
|
2862
|
-
/* @__PURE__ */
|
|
2863
|
-
/* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-belief-title", children: String(a?.Title ?? b.assumptionId) }),
|
|
2998
|
+
/* @__PURE__ */ jsx9("span", { className: `vos-pill vos-pill-${verdictTone3(result)}`, children: result }),
|
|
2999
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-rung-tag", children: rung })
|
|
2865
3000
|
] }),
|
|
2866
|
-
/* @__PURE__ */
|
|
3001
|
+
excerpt ? /* @__PURE__ */ jsxs9("div", { className: `vos-belief-excerpt vos-verdict-border-${verdictTone3(result)}`, children: [
|
|
2867
3002
|
'"',
|
|
2868
|
-
|
|
3003
|
+
excerpt,
|
|
2869
3004
|
'"'
|
|
2870
|
-
] }),
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
/* @__PURE__ */
|
|
2874
|
-
|
|
2875
|
-
/* @__PURE__ */ jsx8("strong", { children: "Right if:" }),
|
|
3005
|
+
] }) : null,
|
|
3006
|
+
bl ? /* @__PURE__ */ jsxs9("div", { className: "vos-belief-bar", children: [
|
|
3007
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-belief-bar-label", children: "Pre-registered bar" }),
|
|
3008
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
3009
|
+
/* @__PURE__ */ jsx9("strong", { children: "Right if:" }),
|
|
2876
3010
|
" ",
|
|
2877
3011
|
String(bl.rightIf ?? "")
|
|
2878
3012
|
] }),
|
|
2879
|
-
bl.wrongIf ? /* @__PURE__ */
|
|
2880
|
-
/* @__PURE__ */
|
|
3013
|
+
bl.wrongIf ? /* @__PURE__ */ jsxs9("div", { children: [
|
|
3014
|
+
/* @__PURE__ */ jsx9("strong", { children: "Wrong if:" }),
|
|
2881
3015
|
" ",
|
|
2882
3016
|
String(bl.wrongIf)
|
|
2883
3017
|
] }) : null,
|
|
2884
|
-
bl.barVerdict ? /* @__PURE__ */
|
|
3018
|
+
bl.barVerdict ? /* @__PURE__ */ jsxs9("div", { className: `vos-text-${verdictTone3(bl.barVerdict)}`, children: [
|
|
2885
3019
|
"Bar verdict: ",
|
|
2886
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx9("strong", { children: String(bl.barVerdict) })
|
|
2887
3021
|
] }) : null
|
|
2888
3022
|
] }) : null
|
|
2889
3023
|
] }, b.assumptionId);
|
|
2890
3024
|
})
|
|
2891
3025
|
] }),
|
|
2892
|
-
experiment ? /* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
2894
|
-
/* @__PURE__ */
|
|
3026
|
+
experiment ? /* @__PURE__ */ jsxs9("div", { className: "vos-card vos-detail-section", children: [
|
|
3027
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-detail-section-label", children: "From experiment" }),
|
|
3028
|
+
/* @__PURE__ */ jsxs9(
|
|
2895
3029
|
"button",
|
|
2896
3030
|
{
|
|
2897
3031
|
type: "button",
|
|
2898
3032
|
className: "vos-linked-row",
|
|
2899
3033
|
onClick: () => onNavigate({ name: "experiment", id: String(experiment.id) }),
|
|
2900
3034
|
children: [
|
|
2901
|
-
/* @__PURE__ */
|
|
2902
|
-
/* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-linked-gauge vos-num", children: Math.round(experiment.derived?.experimentConfidence ?? 50) }),
|
|
3036
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-linked-title", children: String(experiment.Title ?? experiment.id) }),
|
|
3037
|
+
/* @__PURE__ */ jsx9("span", { className: "vos-link", children: "\u2192 experiment" })
|
|
2904
3038
|
]
|
|
2905
3039
|
}
|
|
2906
3040
|
)
|
|
2907
|
-
] }) : /* @__PURE__ */
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */
|
|
3041
|
+
] }) : /* @__PURE__ */ jsxs9("div", { className: "vos-card vos-detail-section", children: [
|
|
3042
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-detail-section-label", children: "Provenance" }),
|
|
3043
|
+
/* @__PURE__ */ jsx9("div", { className: "vos-muted", children: "Found evidence \u2014 not linked to an experiment. This was logged directly (desk research, found interview, observation)." })
|
|
2910
3044
|
] })
|
|
2911
3045
|
] });
|
|
2912
3046
|
}
|
|
@@ -2915,24 +3049,28 @@ function verdictTone3(verdict) {
|
|
|
2915
3049
|
if (verdict === "Invalidated") return "crit";
|
|
2916
3050
|
return "neutral";
|
|
2917
3051
|
}
|
|
3052
|
+
function truncate2(s, max) {
|
|
3053
|
+
if (s.length <= max) return s;
|
|
3054
|
+
return s.slice(0, max - 1) + "\u2026";
|
|
3055
|
+
}
|
|
2918
3056
|
|
|
2919
3057
|
// src/readings-surface.tsx
|
|
2920
|
-
import { jsx as
|
|
3058
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2921
3059
|
function ReadingsSurface({
|
|
2922
3060
|
basePath,
|
|
2923
3061
|
onNavigate
|
|
2924
3062
|
}) {
|
|
2925
3063
|
const readings = useList("readings", basePath);
|
|
2926
3064
|
if (readings.loading && !readings.records) {
|
|
2927
|
-
return /* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
3066
|
+
/* @__PURE__ */ jsx10(Breadcrumb, { trail: [{ label: "Readings", route: { name: "readings" } }] }),
|
|
3067
|
+
/* @__PURE__ */ jsx10("p", { className: "vos-muted", children: "Loading readings\u2026" })
|
|
2930
3068
|
] });
|
|
2931
3069
|
}
|
|
2932
3070
|
if (readings.error) {
|
|
2933
|
-
return /* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
3071
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
3072
|
+
/* @__PURE__ */ jsx10(Breadcrumb, { trail: [{ label: "Readings", route: { name: "readings" } }] }),
|
|
3073
|
+
/* @__PURE__ */ jsx10("p", { className: "vos-error", children: readings.error })
|
|
2936
3074
|
] });
|
|
2937
3075
|
}
|
|
2938
3076
|
const sorted = [...readings.records ?? []].sort((a, b) => {
|
|
@@ -2940,34 +3078,34 @@ function ReadingsSurface({
|
|
|
2940
3078
|
const db = String(b.Date ?? "");
|
|
2941
3079
|
return db.localeCompare(da);
|
|
2942
3080
|
});
|
|
2943
|
-
return /* @__PURE__ */
|
|
2944
|
-
/* @__PURE__ */
|
|
2945
|
-
/* @__PURE__ */
|
|
2946
|
-
/* @__PURE__ */
|
|
2947
|
-
/* @__PURE__ */
|
|
3081
|
+
return /* @__PURE__ */ jsxs10("div", { children: [
|
|
3082
|
+
/* @__PURE__ */ jsx10(Breadcrumb, { trail: [{ label: "Readings", route: { name: "readings" } }] }),
|
|
3083
|
+
/* @__PURE__ */ jsx10("div", { className: "vos-head", children: /* @__PURE__ */ jsxs10("div", { children: [
|
|
3084
|
+
/* @__PURE__ */ jsx10("h1", { children: "Readings \u2014 the evidence log" }),
|
|
3085
|
+
/* @__PURE__ */ jsxs10("p", { children: [
|
|
2948
3086
|
sorted.length,
|
|
2949
3087
|
" ",
|
|
2950
3088
|
sorted.length === 1 ? "reading" : "readings",
|
|
2951
3089
|
" \xB7 click to open the per-belief view."
|
|
2952
3090
|
] })
|
|
2953
3091
|
] }) }),
|
|
2954
|
-
sorted.length === 0 ? /* @__PURE__ */
|
|
3092
|
+
sorted.length === 0 ? /* @__PURE__ */ jsx10("div", { className: "vos-card vos-empty", children: "No readings logged yet." }) : /* @__PURE__ */ jsx10("div", { className: "vos-card vos-list-card", children: sorted.map((r) => {
|
|
2955
3093
|
const id = String(r.id ?? "");
|
|
2956
3094
|
const title = String(r.Title ?? id);
|
|
2957
3095
|
const date = String(r.Date ?? "");
|
|
2958
3096
|
const hasExperiment = Boolean(r.experimentId);
|
|
2959
3097
|
const beliefCount = Array.isArray(r.beliefs) ? r.beliefs.length : 0;
|
|
2960
|
-
return /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsxs10(
|
|
2961
3099
|
"button",
|
|
2962
3100
|
{
|
|
2963
3101
|
type: "button",
|
|
2964
3102
|
className: "vos-list-row",
|
|
2965
3103
|
onClick: () => onNavigate({ name: "reading", id }),
|
|
2966
3104
|
children: [
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ jsx10("span", { className: "vos-list-row-date vos-num", children: date }),
|
|
3106
|
+
/* @__PURE__ */ jsx10("span", { className: "vos-list-row-title", children: title }),
|
|
3107
|
+
/* @__PURE__ */ jsx10("span", { className: `vos-pill ${hasExperiment ? "vos-pill-accent" : "vos-pill-neutral"}`, children: hasExperiment ? "exp" : "found" }),
|
|
3108
|
+
/* @__PURE__ */ jsxs10("span", { className: "vos-list-row-meta vos-num", children: [
|
|
2971
3109
|
beliefCount,
|
|
2972
3110
|
" belief",
|
|
2973
3111
|
beliefCount === 1 ? "" : "s"
|
|
@@ -2981,7 +3119,7 @@ function ReadingsSurface({
|
|
|
2981
3119
|
}
|
|
2982
3120
|
|
|
2983
3121
|
// src/record-page.tsx
|
|
2984
|
-
import { useMemo as useMemo5, useState as
|
|
3122
|
+
import { useMemo as useMemo5, useState as useState8 } from "react";
|
|
2985
3123
|
import { REGISTERS } from "@validation-os/core";
|
|
2986
3124
|
|
|
2987
3125
|
// src/detail-fields.ts
|
|
@@ -3081,14 +3219,14 @@ function detailRows(register, record, related = {}) {
|
|
|
3081
3219
|
}
|
|
3082
3220
|
|
|
3083
3221
|
// src/edit-fields.tsx
|
|
3084
|
-
import { jsx as
|
|
3222
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3085
3223
|
function EditFields({
|
|
3086
3224
|
register,
|
|
3087
3225
|
draft,
|
|
3088
3226
|
errors,
|
|
3089
3227
|
onField
|
|
3090
3228
|
}) {
|
|
3091
|
-
return /* @__PURE__ */
|
|
3229
|
+
return /* @__PURE__ */ jsx11("div", { className: "vos-field-stack", children: editableFields(register).map((field) => /* @__PURE__ */ jsx11(
|
|
3092
3230
|
FieldInput,
|
|
3093
3231
|
{
|
|
3094
3232
|
field,
|
|
@@ -3106,9 +3244,9 @@ function FieldInput({
|
|
|
3106
3244
|
onChange
|
|
3107
3245
|
}) {
|
|
3108
3246
|
const id = `field-${field.key.replace(/\s+/g, "-")}`;
|
|
3109
|
-
return /* @__PURE__ */
|
|
3110
|
-
/* @__PURE__ */
|
|
3111
|
-
field.kind === "textarea" ? /* @__PURE__ */
|
|
3247
|
+
return /* @__PURE__ */ jsxs11("div", { className: "vos-field", children: [
|
|
3248
|
+
/* @__PURE__ */ jsx11("label", { htmlFor: id, children: field.label }),
|
|
3249
|
+
field.kind === "textarea" ? /* @__PURE__ */ jsx11(
|
|
3112
3250
|
"textarea",
|
|
3113
3251
|
{
|
|
3114
3252
|
id,
|
|
@@ -3118,7 +3256,7 @@ function FieldInput({
|
|
|
3118
3256
|
className: "vos-input",
|
|
3119
3257
|
"aria-invalid": error ? true : void 0
|
|
3120
3258
|
}
|
|
3121
|
-
) : field.kind === "select" ? /* @__PURE__ */
|
|
3259
|
+
) : field.kind === "select" ? /* @__PURE__ */ jsxs11(
|
|
3122
3260
|
"select",
|
|
3123
3261
|
{
|
|
3124
3262
|
id,
|
|
@@ -3126,11 +3264,11 @@ function FieldInput({
|
|
|
3126
3264
|
onChange: (e) => onChange(e.target.value),
|
|
3127
3265
|
className: "vos-input",
|
|
3128
3266
|
children: [
|
|
3129
|
-
field.nullable ? /* @__PURE__ */
|
|
3130
|
-
field.options?.map((opt) => /* @__PURE__ */
|
|
3267
|
+
field.nullable ? /* @__PURE__ */ jsx11("option", { value: "", children: "\u2014" }) : null,
|
|
3268
|
+
field.options?.map((opt) => /* @__PURE__ */ jsx11("option", { value: opt, children: opt }, opt))
|
|
3131
3269
|
]
|
|
3132
3270
|
}
|
|
3133
|
-
) : /* @__PURE__ */
|
|
3271
|
+
) : /* @__PURE__ */ jsx11(
|
|
3134
3272
|
"input",
|
|
3135
3273
|
{
|
|
3136
3274
|
id,
|
|
@@ -3143,7 +3281,7 @@ function FieldInput({
|
|
|
3143
3281
|
"aria-invalid": error ? true : void 0
|
|
3144
3282
|
}
|
|
3145
3283
|
),
|
|
3146
|
-
error ? /* @__PURE__ */
|
|
3284
|
+
error ? /* @__PURE__ */ jsx11("p", { role: "alert", className: "vos-field-error", children: error }) : null
|
|
3147
3285
|
] });
|
|
3148
3286
|
}
|
|
3149
3287
|
|
|
@@ -3342,14 +3480,14 @@ function buildJourney(assumptionId, records, now) {
|
|
|
3342
3480
|
}
|
|
3343
3481
|
|
|
3344
3482
|
// src/journey-surface.tsx
|
|
3345
|
-
import { useState as
|
|
3483
|
+
import { useState as useState7 } from "react";
|
|
3346
3484
|
|
|
3347
3485
|
// src/step-in-forms.tsx
|
|
3348
|
-
import { useState as
|
|
3486
|
+
import { useState as useState6 } from "react";
|
|
3349
3487
|
|
|
3350
3488
|
// src/drawer-shell.tsx
|
|
3351
3489
|
import { useEffect as useEffect2, useRef } from "react";
|
|
3352
|
-
import { Fragment as Fragment5, jsx as
|
|
3490
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3353
3491
|
function DrawerShell({
|
|
3354
3492
|
open,
|
|
3355
3493
|
onClose,
|
|
@@ -3367,8 +3505,8 @@ function DrawerShell({
|
|
|
3367
3505
|
return () => document.removeEventListener("keydown", onKey);
|
|
3368
3506
|
}, [open, onClose]);
|
|
3369
3507
|
if (!open) return null;
|
|
3370
|
-
return /* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
3509
|
+
/* @__PURE__ */ jsx12(
|
|
3372
3510
|
"button",
|
|
3373
3511
|
{
|
|
3374
3512
|
type: "button",
|
|
@@ -3377,7 +3515,7 @@ function DrawerShell({
|
|
|
3377
3515
|
className: "vos-scrim"
|
|
3378
3516
|
}
|
|
3379
3517
|
),
|
|
3380
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ jsx12(
|
|
3381
3519
|
"aside",
|
|
3382
3520
|
{
|
|
3383
3521
|
ref: panelRef,
|
|
@@ -3397,7 +3535,7 @@ var FIELD_LABEL_CLASS = "vos-field-label";
|
|
|
3397
3535
|
var FIELD_CONTROL_CLASS = "vos-input";
|
|
3398
3536
|
|
|
3399
3537
|
// src/use-mutations.ts
|
|
3400
|
-
import { useCallback as useCallback2, useState as
|
|
3538
|
+
import { useCallback as useCallback2, useState as useState5 } from "react";
|
|
3401
3539
|
async function postJson(url, body) {
|
|
3402
3540
|
const res = await fetch(url, {
|
|
3403
3541
|
method: "POST",
|
|
@@ -3412,8 +3550,8 @@ async function postJson(url, body) {
|
|
|
3412
3550
|
return payload.data;
|
|
3413
3551
|
}
|
|
3414
3552
|
function useCreate(register, basePath = "/api") {
|
|
3415
|
-
const [saving, setSaving] =
|
|
3416
|
-
const [error, setError] =
|
|
3553
|
+
const [saving, setSaving] = useState5(false);
|
|
3554
|
+
const [error, setError] = useState5(null);
|
|
3417
3555
|
const create = useCallback2(
|
|
3418
3556
|
async (data) => {
|
|
3419
3557
|
setSaving(true);
|
|
@@ -3433,8 +3571,8 @@ function useCreate(register, basePath = "/api") {
|
|
|
3433
3571
|
return { create, saving, error };
|
|
3434
3572
|
}
|
|
3435
3573
|
function useLink(basePath = "/api") {
|
|
3436
|
-
const [linking, setLinking] =
|
|
3437
|
-
const [error, setError] =
|
|
3574
|
+
const [linking, setLinking] = useState5(false);
|
|
3575
|
+
const [error, setError] = useState5(null);
|
|
3438
3576
|
const link = useCallback2(
|
|
3439
3577
|
async (args) => {
|
|
3440
3578
|
setLinking(true);
|
|
@@ -3455,7 +3593,7 @@ function useLink(basePath = "/api") {
|
|
|
3455
3593
|
}
|
|
3456
3594
|
|
|
3457
3595
|
// src/step-in-forms.tsx
|
|
3458
|
-
import { jsx as
|
|
3596
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3459
3597
|
function belief(record) {
|
|
3460
3598
|
const title = record["Title"];
|
|
3461
3599
|
return typeof title === "string" && title.trim() ? title : record.id;
|
|
@@ -3467,11 +3605,11 @@ function ScoreImpactForm({
|
|
|
3467
3605
|
onCancel
|
|
3468
3606
|
}) {
|
|
3469
3607
|
const current = assumption["Impact"];
|
|
3470
|
-
const [impact, setImpact] =
|
|
3608
|
+
const [impact, setImpact] = useState6(
|
|
3471
3609
|
typeof current === "number" ? current : 50
|
|
3472
3610
|
);
|
|
3473
3611
|
const justificationCurrent = assumption["Scoring justification"];
|
|
3474
|
-
const [justification, setJustification] =
|
|
3612
|
+
const [justification, setJustification] = useState6(
|
|
3475
3613
|
typeof justificationCurrent === "string" ? justificationCurrent : ""
|
|
3476
3614
|
);
|
|
3477
3615
|
const { save, saving, conflict, error } = useUpdate("assumptions", basePath);
|
|
@@ -3489,17 +3627,17 @@ function ScoreImpactForm({
|
|
|
3489
3627
|
const result = await save(assumption.id, patch);
|
|
3490
3628
|
if (result.ok) onDone();
|
|
3491
3629
|
};
|
|
3492
|
-
return /* @__PURE__ */
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3495
|
-
/* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ jsxs13(DrawerShell, { open: true, onClose: onCancel, ariaLabel: "Score impact", children: [
|
|
3631
|
+
/* @__PURE__ */ jsxs13("header", { className: "vos-drawer-header", children: [
|
|
3632
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-drawer-eyebrow", children: "Score impact" }),
|
|
3633
|
+
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: belief(assumption) })
|
|
3496
3634
|
] }),
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3501
|
-
/* @__PURE__ */
|
|
3502
|
-
/* @__PURE__ */
|
|
3635
|
+
/* @__PURE__ */ jsxs13("form", { onSubmit, className: "vos-form", children: [
|
|
3636
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-form-body", children: [
|
|
3637
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
3638
|
+
/* @__PURE__ */ jsx13("label", { htmlFor: "score-impact-range", className: FIELD_LABEL_CLASS, children: "Impact if wrong \u2014 how much of the plan rests on this?" }),
|
|
3639
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-slider-row", children: [
|
|
3640
|
+
/* @__PURE__ */ jsx13(
|
|
3503
3641
|
"input",
|
|
3504
3642
|
{
|
|
3505
3643
|
id: "score-impact-range",
|
|
@@ -3511,7 +3649,7 @@ function ScoreImpactForm({
|
|
|
3511
3649
|
className: "vos-slider"
|
|
3512
3650
|
}
|
|
3513
3651
|
),
|
|
3514
|
-
/* @__PURE__ */
|
|
3652
|
+
/* @__PURE__ */ jsx13(
|
|
3515
3653
|
"input",
|
|
3516
3654
|
{
|
|
3517
3655
|
type: "number",
|
|
@@ -3527,14 +3665,14 @@ function ScoreImpactForm({
|
|
|
3527
3665
|
}
|
|
3528
3666
|
)
|
|
3529
3667
|
] }),
|
|
3530
|
-
/* @__PURE__ */
|
|
3668
|
+
/* @__PURE__ */ jsx13("p", { className: "vos-field-hint", children: "0 = wouldn't matter \xB7 100 = the plan can't survive it being wrong. Risk follows Impact until evidence lands." })
|
|
3531
3669
|
] }),
|
|
3532
|
-
/* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
3671
|
+
/* @__PURE__ */ jsxs13("label", { htmlFor: "score-impact-why", className: FIELD_LABEL_CLASS, children: [
|
|
3534
3672
|
"Why this weight? ",
|
|
3535
|
-
/* @__PURE__ */
|
|
3673
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-muted", children: "(optional)" })
|
|
3536
3674
|
] }),
|
|
3537
|
-
/* @__PURE__ */
|
|
3675
|
+
/* @__PURE__ */ jsx13(
|
|
3538
3676
|
"textarea",
|
|
3539
3677
|
{
|
|
3540
3678
|
id: "score-impact-why",
|
|
@@ -3546,11 +3684,11 @@ function ScoreImpactForm({
|
|
|
3546
3684
|
}
|
|
3547
3685
|
)
|
|
3548
3686
|
] }),
|
|
3549
|
-
conflict ? /* @__PURE__ */
|
|
3550
|
-
error ? /* @__PURE__ */
|
|
3687
|
+
conflict ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: conflict }) : null,
|
|
3688
|
+
error ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: error }) : null
|
|
3551
3689
|
] }),
|
|
3552
|
-
/* @__PURE__ */
|
|
3553
|
-
/* @__PURE__ */
|
|
3690
|
+
/* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
3691
|
+
/* @__PURE__ */ jsx13(
|
|
3554
3692
|
"button",
|
|
3555
3693
|
{
|
|
3556
3694
|
type: "button",
|
|
@@ -3559,7 +3697,7 @@ function ScoreImpactForm({
|
|
|
3559
3697
|
children: "Cancel"
|
|
3560
3698
|
}
|
|
3561
3699
|
),
|
|
3562
|
-
/* @__PURE__ */
|
|
3700
|
+
/* @__PURE__ */ jsx13("button", { type: "submit", disabled: saving, className: "vos-btn vos-btn-sm", children: saving ? "Saving\u2026" : "Save impact" })
|
|
3563
3701
|
] })
|
|
3564
3702
|
] })
|
|
3565
3703
|
] });
|
|
@@ -3570,7 +3708,7 @@ function EditBeliefForm({
|
|
|
3570
3708
|
onDone,
|
|
3571
3709
|
onCancel
|
|
3572
3710
|
}) {
|
|
3573
|
-
const [draft, setDraft] =
|
|
3711
|
+
const [draft, setDraft] = useState6(
|
|
3574
3712
|
() => draftFrom("assumptions", assumption)
|
|
3575
3713
|
);
|
|
3576
3714
|
const { save, saving, conflict, error } = useUpdate("assumptions", basePath);
|
|
@@ -3586,14 +3724,14 @@ function EditBeliefForm({
|
|
|
3586
3724
|
const result = await save(assumption.id, patch);
|
|
3587
3725
|
if (result.ok) onDone();
|
|
3588
3726
|
};
|
|
3589
|
-
return /* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
/* @__PURE__ */
|
|
3592
|
-
/* @__PURE__ */
|
|
3727
|
+
return /* @__PURE__ */ jsxs13(DrawerShell, { open: true, onClose: onCancel, ariaLabel: "Edit the bet", children: [
|
|
3728
|
+
/* @__PURE__ */ jsxs13("header", { className: "vos-drawer-header", children: [
|
|
3729
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-drawer-eyebrow", children: "Edit the bet" }),
|
|
3730
|
+
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: belief(assumption) })
|
|
3593
3731
|
] }),
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3596
|
-
/* @__PURE__ */
|
|
3732
|
+
/* @__PURE__ */ jsxs13("form", { onSubmit, className: "vos-form", children: [
|
|
3733
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-form-body", children: [
|
|
3734
|
+
/* @__PURE__ */ jsx13(
|
|
3597
3735
|
EditFields,
|
|
3598
3736
|
{
|
|
3599
3737
|
register: "assumptions",
|
|
@@ -3601,11 +3739,11 @@ function EditBeliefForm({
|
|
|
3601
3739
|
onField: (key, value) => setDraft((d) => ({ ...d, [key]: value }))
|
|
3602
3740
|
}
|
|
3603
3741
|
),
|
|
3604
|
-
conflict ? /* @__PURE__ */
|
|
3605
|
-
error ? /* @__PURE__ */
|
|
3742
|
+
conflict ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: conflict }) : null,
|
|
3743
|
+
error ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: error }) : null
|
|
3606
3744
|
] }),
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3745
|
+
/* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
3746
|
+
/* @__PURE__ */ jsx13(
|
|
3609
3747
|
"button",
|
|
3610
3748
|
{
|
|
3611
3749
|
type: "button",
|
|
@@ -3614,7 +3752,7 @@ function EditBeliefForm({
|
|
|
3614
3752
|
children: "Cancel"
|
|
3615
3753
|
}
|
|
3616
3754
|
),
|
|
3617
|
-
/* @__PURE__ */
|
|
3755
|
+
/* @__PURE__ */ jsx13("button", { type: "submit", disabled: saving, className: "vos-btn vos-btn-sm", children: saving ? "Saving\u2026" : "Save the bet" })
|
|
3618
3756
|
] })
|
|
3619
3757
|
] })
|
|
3620
3758
|
] });
|
|
@@ -3627,9 +3765,9 @@ function WriteDecisionForm({
|
|
|
3627
3765
|
onDone,
|
|
3628
3766
|
onCancel
|
|
3629
3767
|
}) {
|
|
3630
|
-
const [title, setTitle] =
|
|
3631
|
-
const [status, setStatus] =
|
|
3632
|
-
const [relation, setRelation] =
|
|
3768
|
+
const [title, setTitle] = useState6("");
|
|
3769
|
+
const [status, setStatus] = useState6("Provisional");
|
|
3770
|
+
const [relation, setRelation] = useState6(
|
|
3633
3771
|
kill ? "resolves" : "based-on"
|
|
3634
3772
|
);
|
|
3635
3773
|
const { create, saving: creating, error: createError } = useCreate(
|
|
@@ -3637,7 +3775,7 @@ function WriteDecisionForm({
|
|
|
3637
3775
|
basePath
|
|
3638
3776
|
);
|
|
3639
3777
|
const { link, linking, error: linkError } = useLink(basePath);
|
|
3640
|
-
const [failed, setFailed] =
|
|
3778
|
+
const [failed, setFailed] = useState6(null);
|
|
3641
3779
|
const busy = creating || linking;
|
|
3642
3780
|
const missing = title.trim() === "";
|
|
3643
3781
|
const onSubmit = async (e) => {
|
|
@@ -3656,19 +3794,19 @@ function WriteDecisionForm({
|
|
|
3656
3794
|
setFailed("Couldn't write the decision \u2014 please try again.");
|
|
3657
3795
|
}
|
|
3658
3796
|
};
|
|
3659
|
-
return /* @__PURE__ */
|
|
3660
|
-
/* @__PURE__ */
|
|
3661
|
-
/* @__PURE__ */
|
|
3662
|
-
/* @__PURE__ */
|
|
3797
|
+
return /* @__PURE__ */ jsxs13(DrawerShell, { open: true, onClose: onCancel, ariaLabel: "Write decision", children: [
|
|
3798
|
+
/* @__PURE__ */ jsxs13("header", { className: "vos-drawer-header", children: [
|
|
3799
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-drawer-eyebrow", children: kill ? "Kill or re-test" : "Write a decision" }),
|
|
3800
|
+
/* @__PURE__ */ jsx13("h2", { className: "vos-drawer-title", children: belief(assumption) })
|
|
3663
3801
|
] }),
|
|
3664
|
-
/* @__PURE__ */
|
|
3665
|
-
/* @__PURE__ */
|
|
3666
|
-
/* @__PURE__ */
|
|
3667
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ jsxs13("form", { onSubmit, className: "vos-form", children: [
|
|
3803
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-form-body", children: [
|
|
3804
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
3805
|
+
/* @__PURE__ */ jsxs13("label", { htmlFor: "decision-title", className: FIELD_LABEL_CLASS, children: [
|
|
3668
3806
|
"The decision ",
|
|
3669
|
-
/* @__PURE__ */
|
|
3807
|
+
/* @__PURE__ */ jsx13("span", { className: "vos-req", children: "*" })
|
|
3670
3808
|
] }),
|
|
3671
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsx13(
|
|
3672
3810
|
"input",
|
|
3673
3811
|
{
|
|
3674
3812
|
id: "decision-title",
|
|
@@ -3680,10 +3818,10 @@ function WriteDecisionForm({
|
|
|
3680
3818
|
}
|
|
3681
3819
|
)
|
|
3682
3820
|
] }),
|
|
3683
|
-
/* @__PURE__ */
|
|
3684
|
-
/* @__PURE__ */
|
|
3685
|
-
/* @__PURE__ */
|
|
3686
|
-
/* @__PURE__ */
|
|
3821
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
3822
|
+
/* @__PURE__ */ jsx13("span", { className: FIELD_LABEL_CLASS, children: "How does it relate?" }),
|
|
3823
|
+
/* @__PURE__ */ jsxs13("label", { className: "vos-radio", children: [
|
|
3824
|
+
/* @__PURE__ */ jsx13(
|
|
3687
3825
|
"input",
|
|
3688
3826
|
{
|
|
3689
3827
|
type: "radio",
|
|
@@ -3692,13 +3830,13 @@ function WriteDecisionForm({
|
|
|
3692
3830
|
onChange: () => setRelation("based-on")
|
|
3693
3831
|
}
|
|
3694
3832
|
),
|
|
3695
|
-
/* @__PURE__ */
|
|
3696
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3834
|
+
/* @__PURE__ */ jsx13("b", { children: "Rests on" }),
|
|
3697
3835
|
" this belief \u2014 the question stays open (rationale)."
|
|
3698
3836
|
] })
|
|
3699
3837
|
] }),
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ jsxs13("label", { className: "vos-radio", children: [
|
|
3839
|
+
/* @__PURE__ */ jsx13(
|
|
3702
3840
|
"input",
|
|
3703
3841
|
{
|
|
3704
3842
|
type: "radio",
|
|
@@ -3707,29 +3845,29 @@ function WriteDecisionForm({
|
|
|
3707
3845
|
onChange: () => setRelation("resolves")
|
|
3708
3846
|
}
|
|
3709
3847
|
),
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3849
|
+
/* @__PURE__ */ jsx13("b", { children: "Resolves" }),
|
|
3712
3850
|
" this belief \u2014 retires the question without a test (it goes moot)."
|
|
3713
3851
|
] })
|
|
3714
3852
|
] })
|
|
3715
3853
|
] }),
|
|
3716
|
-
/* @__PURE__ */
|
|
3717
|
-
/* @__PURE__ */
|
|
3718
|
-
/* @__PURE__ */
|
|
3854
|
+
/* @__PURE__ */ jsxs13("div", { className: "vos-field", children: [
|
|
3855
|
+
/* @__PURE__ */ jsx13("label", { htmlFor: "decision-status", className: FIELD_LABEL_CLASS, children: "Status" }),
|
|
3856
|
+
/* @__PURE__ */ jsx13(
|
|
3719
3857
|
"select",
|
|
3720
3858
|
{
|
|
3721
3859
|
id: "decision-status",
|
|
3722
3860
|
value: status,
|
|
3723
3861
|
onChange: (e) => setStatus(e.target.value),
|
|
3724
3862
|
className: FIELD_CONTROL_CLASS,
|
|
3725
|
-
children: DECISION_STATUS.map((s) => /* @__PURE__ */
|
|
3863
|
+
children: DECISION_STATUS.map((s) => /* @__PURE__ */ jsx13("option", { value: s, children: s }, s))
|
|
3726
3864
|
}
|
|
3727
3865
|
)
|
|
3728
3866
|
] }),
|
|
3729
|
-
failed || createError || linkError ? /* @__PURE__ */
|
|
3867
|
+
failed || createError || linkError ? /* @__PURE__ */ jsx13("p", { className: "vos-error", children: failed || createError || linkError }) : null
|
|
3730
3868
|
] }),
|
|
3731
|
-
/* @__PURE__ */
|
|
3732
|
-
/* @__PURE__ */
|
|
3869
|
+
/* @__PURE__ */ jsxs13("footer", { className: "vos-drawer-footer", children: [
|
|
3870
|
+
/* @__PURE__ */ jsx13(
|
|
3733
3871
|
"button",
|
|
3734
3872
|
{
|
|
3735
3873
|
type: "button",
|
|
@@ -3738,7 +3876,7 @@ function WriteDecisionForm({
|
|
|
3738
3876
|
children: "Cancel"
|
|
3739
3877
|
}
|
|
3740
3878
|
),
|
|
3741
|
-
/* @__PURE__ */
|
|
3879
|
+
/* @__PURE__ */ jsx13(
|
|
3742
3880
|
"button",
|
|
3743
3881
|
{
|
|
3744
3882
|
type: "submit",
|
|
@@ -3754,7 +3892,7 @@ function WriteDecisionForm({
|
|
|
3754
3892
|
}
|
|
3755
3893
|
|
|
3756
3894
|
// src/primitives-view.tsx
|
|
3757
|
-
import { Fragment as Fragment6, jsx as
|
|
3895
|
+
import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3758
3896
|
var PILL_CLASS2 = {
|
|
3759
3897
|
good: "vos-pill vos-pill-good",
|
|
3760
3898
|
warn: "vos-pill vos-pill-warn",
|
|
@@ -3763,8 +3901,8 @@ var PILL_CLASS2 = {
|
|
|
3763
3901
|
neutral: "vos-pill vos-pill-neutral"
|
|
3764
3902
|
};
|
|
3765
3903
|
function StatusPill({ status }) {
|
|
3766
|
-
if (!status) return /* @__PURE__ */
|
|
3767
|
-
return /* @__PURE__ */
|
|
3904
|
+
if (!status) return /* @__PURE__ */ jsx14("span", { className: "vos-muted", children: "\u2014" });
|
|
3905
|
+
return /* @__PURE__ */ jsx14("span", { className: PILL_CLASS2[statusTone(status)], children: status });
|
|
3768
3906
|
}
|
|
3769
3907
|
var FILL_CLASS = {
|
|
3770
3908
|
good: "vos-fill-good",
|
|
@@ -3783,17 +3921,17 @@ var TEXT_CLASS = {
|
|
|
3783
3921
|
function RiskBar({ risk }) {
|
|
3784
3922
|
const level = riskLevel(risk);
|
|
3785
3923
|
const pct2 = Math.round(riskFraction(risk) * 100);
|
|
3786
|
-
return /* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */
|
|
3924
|
+
return /* @__PURE__ */ jsxs14("span", { className: "vos-metric-cell", children: [
|
|
3925
|
+
/* @__PURE__ */ jsx14(
|
|
3788
3926
|
"span",
|
|
3789
3927
|
{
|
|
3790
3928
|
className: "vos-risk-bar",
|
|
3791
3929
|
role: "img",
|
|
3792
3930
|
"aria-label": `Risk ${Math.round(risk)} of 100`,
|
|
3793
|
-
children: /* @__PURE__ */
|
|
3931
|
+
children: /* @__PURE__ */ jsx14("i", { className: FILL_CLASS[level], style: { width: `${pct2}%` } })
|
|
3794
3932
|
}
|
|
3795
3933
|
),
|
|
3796
|
-
/* @__PURE__ */
|
|
3934
|
+
/* @__PURE__ */ jsx14("b", { className: `vos-metric-num ${TEXT_CLASS[level]}`, children: Math.round(risk) })
|
|
3797
3935
|
] });
|
|
3798
3936
|
}
|
|
3799
3937
|
function ConfidenceCell({
|
|
@@ -3801,8 +3939,8 @@ function ConfidenceCell({
|
|
|
3801
3939
|
history
|
|
3802
3940
|
}) {
|
|
3803
3941
|
const tone = confidenceTone(confidence2);
|
|
3804
|
-
return /* @__PURE__ */
|
|
3805
|
-
history && history.length >= 2 ? /* @__PURE__ */
|
|
3942
|
+
return /* @__PURE__ */ jsxs14("span", { className: "vos-metric-cell", children: [
|
|
3943
|
+
history && history.length >= 2 ? /* @__PURE__ */ jsx14(
|
|
3806
3944
|
Sparkline,
|
|
3807
3945
|
{
|
|
3808
3946
|
values: history,
|
|
@@ -3813,7 +3951,7 @@ function ConfidenceCell({
|
|
|
3813
3951
|
tone
|
|
3814
3952
|
}
|
|
3815
3953
|
) : null,
|
|
3816
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ jsx14("b", { className: `vos-metric-num ${TEXT_CLASS[tone]}`, children: formatSigned(confidence2) })
|
|
3817
3955
|
] });
|
|
3818
3956
|
}
|
|
3819
3957
|
var STROKE_VAR = {
|
|
@@ -3843,7 +3981,7 @@ function Sparkline({
|
|
|
3843
3981
|
const lastY = sparklineY(last, height, lo, hi);
|
|
3844
3982
|
const zeroY = sparklineY(0, height, lo, hi);
|
|
3845
3983
|
const showBaseline = lo < 0 && hi > 0;
|
|
3846
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ jsxs14(
|
|
3847
3985
|
"svg",
|
|
3848
3986
|
{
|
|
3849
3987
|
className: "vos-spark",
|
|
@@ -3854,7 +3992,7 @@ function Sparkline({
|
|
|
3854
3992
|
role: "img",
|
|
3855
3993
|
"aria-label": ariaLabel ?? `Trend, now ${formatSigned(last)}`,
|
|
3856
3994
|
children: [
|
|
3857
|
-
fill ? /* @__PURE__ */
|
|
3995
|
+
fill ? /* @__PURE__ */ jsx14(
|
|
3858
3996
|
"path",
|
|
3859
3997
|
{
|
|
3860
3998
|
d: `${d} L ${width - 2} ${height} L 2 ${height} Z`,
|
|
@@ -3862,7 +4000,7 @@ function Sparkline({
|
|
|
3862
4000
|
opacity: "0.13"
|
|
3863
4001
|
}
|
|
3864
4002
|
) : null,
|
|
3865
|
-
showBaseline ? /* @__PURE__ */
|
|
4003
|
+
showBaseline ? /* @__PURE__ */ jsx14(
|
|
3866
4004
|
"line",
|
|
3867
4005
|
{
|
|
3868
4006
|
x1: 2,
|
|
@@ -3874,8 +4012,8 @@ function Sparkline({
|
|
|
3874
4012
|
strokeDasharray: "3 3"
|
|
3875
4013
|
}
|
|
3876
4014
|
) : null,
|
|
3877
|
-
/* @__PURE__ */
|
|
3878
|
-
/* @__PURE__ */
|
|
4015
|
+
/* @__PURE__ */ jsx14("path", { d, fill: "none", stroke, strokeWidth: 2 }),
|
|
4016
|
+
/* @__PURE__ */ jsx14("circle", { cx: lastX, cy: lastY, r: 3, fill: stroke })
|
|
3879
4017
|
]
|
|
3880
4018
|
}
|
|
3881
4019
|
);
|
|
@@ -3887,13 +4025,13 @@ function StatTile({
|
|
|
3887
4025
|
onClick,
|
|
3888
4026
|
active
|
|
3889
4027
|
}) {
|
|
3890
|
-
const body = /* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
3893
|
-
sub ? /* @__PURE__ */
|
|
4028
|
+
const body = /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4029
|
+
/* @__PURE__ */ jsx14("div", { className: "vos-tile-label", children: label }),
|
|
4030
|
+
/* @__PURE__ */ jsx14("div", { className: "vos-tile-value", children: formatCount(value) }),
|
|
4031
|
+
sub ? /* @__PURE__ */ jsx14("div", { className: "vos-tile-sub", children: sub }) : null
|
|
3894
4032
|
] });
|
|
3895
4033
|
if (onClick) {
|
|
3896
|
-
return /* @__PURE__ */
|
|
4034
|
+
return /* @__PURE__ */ jsx14(
|
|
3897
4035
|
"button",
|
|
3898
4036
|
{
|
|
3899
4037
|
type: "button",
|
|
@@ -3904,7 +4042,7 @@ function StatTile({
|
|
|
3904
4042
|
}
|
|
3905
4043
|
);
|
|
3906
4044
|
}
|
|
3907
|
-
return /* @__PURE__ */
|
|
4045
|
+
return /* @__PURE__ */ jsx14("div", { className: "vos-tile", children: body });
|
|
3908
4046
|
}
|
|
3909
4047
|
|
|
3910
4048
|
// src/understanding.ts
|
|
@@ -3968,7 +4106,7 @@ function buildUnderstanding(assumption, readings, experiments) {
|
|
|
3968
4106
|
}
|
|
3969
4107
|
|
|
3970
4108
|
// src/understanding-panel.tsx
|
|
3971
|
-
import { Fragment as Fragment7, jsx as
|
|
4109
|
+
import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3972
4110
|
function UnderstandingPanel({
|
|
3973
4111
|
assumption,
|
|
3974
4112
|
basePath
|
|
@@ -3976,10 +4114,10 @@ function UnderstandingPanel({
|
|
|
3976
4114
|
const readings = useList("readings", basePath);
|
|
3977
4115
|
const experiments = useList("experiments", basePath);
|
|
3978
4116
|
if (readings.loading || experiments.loading) {
|
|
3979
|
-
return /* @__PURE__ */
|
|
4117
|
+
return /* @__PURE__ */ jsx15(Muted, { children: "Working out what moved the number\u2026" });
|
|
3980
4118
|
}
|
|
3981
4119
|
if (readings.error || experiments.error) {
|
|
3982
|
-
return /* @__PURE__ */
|
|
4120
|
+
return /* @__PURE__ */ jsx15(Muted, { children: "Couldn't load the evidence behind this number." });
|
|
3983
4121
|
}
|
|
3984
4122
|
const u = buildUnderstanding(
|
|
3985
4123
|
assumption,
|
|
@@ -3987,17 +4125,17 @@ function UnderstandingPanel({
|
|
|
3987
4125
|
experiments.records ?? []
|
|
3988
4126
|
);
|
|
3989
4127
|
if (u.experiments.length === 0 && u.otherMovers.length === 0) {
|
|
3990
|
-
return /* @__PURE__ */
|
|
4128
|
+
return /* @__PURE__ */ jsx15(Muted, { children: "No experiments or concluded readings yet \u2014 Confidence rests on the neutral prior alone." });
|
|
3991
4129
|
}
|
|
3992
4130
|
const maxMagnitude = Math.max(
|
|
3993
4131
|
...u.experiments.map((e) => e.magnitude),
|
|
3994
4132
|
...u.otherMovers.map((m) => m.magnitude),
|
|
3995
4133
|
0.01
|
|
3996
4134
|
);
|
|
3997
|
-
return /* @__PURE__ */
|
|
3998
|
-
u.experiments.length ? /* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4000
|
-
u.experiments.map((e) => /* @__PURE__ */
|
|
4135
|
+
return /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
4136
|
+
u.experiments.length ? /* @__PURE__ */ jsxs15("section", { children: [
|
|
4137
|
+
/* @__PURE__ */ jsx15("div", { className: "vos-why-section-title", children: "What's moving Confidence" }),
|
|
4138
|
+
u.experiments.map((e) => /* @__PURE__ */ jsx15(
|
|
4001
4139
|
PushRow,
|
|
4002
4140
|
{
|
|
4003
4141
|
label: e.title ?? `Experiment ${e.experimentId}`,
|
|
@@ -4010,9 +4148,9 @@ function UnderstandingPanel({
|
|
|
4010
4148
|
e.experimentId
|
|
4011
4149
|
))
|
|
4012
4150
|
] }) : null,
|
|
4013
|
-
u.otherMovers.length ? /* @__PURE__ */
|
|
4014
|
-
/* @__PURE__ */
|
|
4015
|
-
u.otherMovers.map((m) => /* @__PURE__ */
|
|
4151
|
+
u.otherMovers.length ? /* @__PURE__ */ jsxs15("section", { children: [
|
|
4152
|
+
/* @__PURE__ */ jsx15("div", { className: "vos-why-section-title", children: "Other evidence" }),
|
|
4153
|
+
u.otherMovers.map((m) => /* @__PURE__ */ jsx15(
|
|
4016
4154
|
PushRow,
|
|
4017
4155
|
{
|
|
4018
4156
|
label: otherMoverLabel(m),
|
|
@@ -4023,7 +4161,7 @@ function UnderstandingPanel({
|
|
|
4023
4161
|
m.key
|
|
4024
4162
|
))
|
|
4025
4163
|
] }) : null,
|
|
4026
|
-
/* @__PURE__ */
|
|
4164
|
+
/* @__PURE__ */ jsx15(Trajectory, { points: u.trajectory })
|
|
4027
4165
|
] });
|
|
4028
4166
|
}
|
|
4029
4167
|
function PushRow({
|
|
@@ -4038,11 +4176,11 @@ function PushRow({
|
|
|
4038
4176
|
const moving = magnitude > 0;
|
|
4039
4177
|
const width = Math.round(magnitude / max * 50);
|
|
4040
4178
|
const fill = up ? { left: "50%", width: `${width}%`, background: "var(--vos-good)" } : { right: "50%", width: `${width}%`, background: "var(--vos-crit)" };
|
|
4041
|
-
return /* @__PURE__ */
|
|
4042
|
-
/* @__PURE__ */
|
|
4043
|
-
note ? /* @__PURE__ */
|
|
4044
|
-
/* @__PURE__ */
|
|
4045
|
-
/* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsxs15("div", { className: "vos-mover", children: [
|
|
4180
|
+
/* @__PURE__ */ jsx15("span", { className: "vos-mover-name", children: label }),
|
|
4181
|
+
note ? /* @__PURE__ */ jsx15("span", { className: `vos-mover-note ${done ? "vos-text-good" : "vos-text-warn"}`, children: note }) : null,
|
|
4182
|
+
/* @__PURE__ */ jsx15("span", { className: "vos-track vos-signed", children: moving ? /* @__PURE__ */ jsx15("i", { style: fill }) : null }),
|
|
4183
|
+
/* @__PURE__ */ jsx15(
|
|
4046
4184
|
"span",
|
|
4047
4185
|
{
|
|
4048
4186
|
className: "vos-mover-val",
|
|
@@ -4054,14 +4192,14 @@ function PushRow({
|
|
|
4054
4192
|
}
|
|
4055
4193
|
function Trajectory({ points }) {
|
|
4056
4194
|
if (points.length < 2) {
|
|
4057
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx15("p", { className: "vos-hint", children: points.length === 1 ? `One dated reading so far \u2014 Confidence ${formatSigned(points[0].confidence)} on ${points[0].date}.` : "No dated readings yet to chart a trajectory." });
|
|
4058
4196
|
}
|
|
4059
4197
|
const first = points[0];
|
|
4060
4198
|
const last = points[points.length - 1];
|
|
4061
4199
|
const values = points.map((p) => p.confidence);
|
|
4062
|
-
return /* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4064
|
-
/* @__PURE__ */
|
|
4200
|
+
return /* @__PURE__ */ jsxs15("div", { className: "vos-traj", children: [
|
|
4201
|
+
/* @__PURE__ */ jsx15("div", { className: "vos-traj-head", children: /* @__PURE__ */ jsx15("span", { className: "vos-lbl", children: "Confidence over time" }) }),
|
|
4202
|
+
/* @__PURE__ */ jsx15(
|
|
4065
4203
|
Sparkline,
|
|
4066
4204
|
{
|
|
4067
4205
|
values,
|
|
@@ -4074,9 +4212,9 @@ function Trajectory({ points }) {
|
|
|
4074
4212
|
ariaLabel: `Confidence moved from ${formatSigned(first.confidence)} to ${formatSigned(last.confidence)}`
|
|
4075
4213
|
}
|
|
4076
4214
|
),
|
|
4077
|
-
/* @__PURE__ */
|
|
4078
|
-
/* @__PURE__ */
|
|
4079
|
-
/* @__PURE__ */
|
|
4215
|
+
/* @__PURE__ */ jsxs15("div", { className: "vos-traj-foot", children: [
|
|
4216
|
+
/* @__PURE__ */ jsx15("span", { children: first.date }),
|
|
4217
|
+
/* @__PURE__ */ jsxs15("span", { className: "vos-num", children: [
|
|
4080
4218
|
"now ",
|
|
4081
4219
|
formatSigned(last.confidence)
|
|
4082
4220
|
] })
|
|
@@ -4096,11 +4234,11 @@ function otherMoverLabel(m) {
|
|
|
4096
4234
|
return m.readingCount === 1 ? "A direct reading" : "Direct readings";
|
|
4097
4235
|
}
|
|
4098
4236
|
function Muted({ children }) {
|
|
4099
|
-
return /* @__PURE__ */
|
|
4237
|
+
return /* @__PURE__ */ jsx15("p", { className: "vos-hint", children });
|
|
4100
4238
|
}
|
|
4101
4239
|
|
|
4102
4240
|
// src/journey-surface.tsx
|
|
4103
|
-
import { Fragment as Fragment8, jsx as
|
|
4241
|
+
import { Fragment as Fragment8, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4104
4242
|
var STAGE_SENTENCE = {
|
|
4105
4243
|
framed: "Still being framed \u2014 the bet isn't complete yet.",
|
|
4106
4244
|
planned: "Framed, and waiting on a test to move it.",
|
|
@@ -4121,8 +4259,8 @@ function BeliefJourney({
|
|
|
4121
4259
|
onNavigate,
|
|
4122
4260
|
onChanged
|
|
4123
4261
|
}) {
|
|
4124
|
-
const [open, setOpen] =
|
|
4125
|
-
const [stepIn, setStepIn] =
|
|
4262
|
+
const [open, setOpen] = useState7(false);
|
|
4263
|
+
const [stepIn, setStepIn] = useState7(null);
|
|
4126
4264
|
const closeForm = () => setStepIn(null);
|
|
4127
4265
|
const afterWrite = () => {
|
|
4128
4266
|
setStepIn(null);
|
|
@@ -4130,22 +4268,22 @@ function BeliefJourney({
|
|
|
4130
4268
|
};
|
|
4131
4269
|
const { stage, resolved } = journey;
|
|
4132
4270
|
const coldState = journeyColdState(journey);
|
|
4133
|
-
return /* @__PURE__ */
|
|
4134
|
-
/* @__PURE__ */
|
|
4135
|
-
/* @__PURE__ */
|
|
4136
|
-
/* @__PURE__ */
|
|
4137
|
-
/* @__PURE__ */
|
|
4271
|
+
return /* @__PURE__ */ jsxs16("section", { className: "vos-jny vos-card", children: [
|
|
4272
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-jny-head", children: [
|
|
4273
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
4274
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-eyebrow", children: "The journey" }),
|
|
4275
|
+
/* @__PURE__ */ jsx16("p", { className: "vos-jny-at", children: resolved ? resolved === "killed" ? "Killed \u2014 the evidence went against it." : "Moot \u2014 a decision retired the question." : STAGE_SENTENCE[stage.stage] })
|
|
4138
4276
|
] }),
|
|
4139
|
-
resolved ? /* @__PURE__ */
|
|
4277
|
+
resolved ? /* @__PURE__ */ jsx16(
|
|
4140
4278
|
"span",
|
|
4141
4279
|
{
|
|
4142
4280
|
className: `vos-pill ${resolved === "killed" ? "vos-pill-crit" : "vos-pill-neutral"}`,
|
|
4143
4281
|
children: resolved === "killed" ? "Killed" : "Moot"
|
|
4144
4282
|
}
|
|
4145
|
-
) : stage.killZone ? /* @__PURE__ */
|
|
4283
|
+
) : stage.killZone ? /* @__PURE__ */ jsx16("span", { className: "vos-pill vos-pill-crit", children: "Kill lane" }) : null
|
|
4146
4284
|
] }),
|
|
4147
|
-
/* @__PURE__ */
|
|
4148
|
-
/* @__PURE__ */
|
|
4285
|
+
/* @__PURE__ */ jsx16(StageRail, { stage }),
|
|
4286
|
+
/* @__PURE__ */ jsx16(
|
|
4149
4287
|
"button",
|
|
4150
4288
|
{
|
|
4151
4289
|
type: "button",
|
|
@@ -4155,10 +4293,10 @@ function BeliefJourney({
|
|
|
4155
4293
|
children: open ? "Hide the story \u25B4" : "How did it get here? \u25BE"
|
|
4156
4294
|
}
|
|
4157
4295
|
),
|
|
4158
|
-
open ? /* @__PURE__ */
|
|
4159
|
-
/* @__PURE__ */
|
|
4160
|
-
/* @__PURE__ */
|
|
4161
|
-
coldState.cold ? /* @__PURE__ */
|
|
4296
|
+
open ? /* @__PURE__ */ jsxs16("div", { className: "vos-why-panel vos-jny-story", children: [
|
|
4297
|
+
/* @__PURE__ */ jsxs16("section", { children: [
|
|
4298
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-why-section-title", children: "The story so far" }),
|
|
4299
|
+
coldState.cold ? /* @__PURE__ */ jsx16(JourneyColdCard, { body: coldState.body, eyebrow: coldState.eyebrow }) : /* @__PURE__ */ jsx16("ol", { className: "vos-jny-events", children: journey.events.map((event, i) => /* @__PURE__ */ jsx16(
|
|
4162
4300
|
EventRow,
|
|
4163
4301
|
{
|
|
4164
4302
|
event,
|
|
@@ -4167,15 +4305,15 @@ function BeliefJourney({
|
|
|
4167
4305
|
`${event.kind}-${event.refId ?? i}`
|
|
4168
4306
|
)) })
|
|
4169
4307
|
] }),
|
|
4170
|
-
journey.cycles.length > 0 ? /* @__PURE__ */
|
|
4171
|
-
/* @__PURE__ */
|
|
4172
|
-
/* @__PURE__ */
|
|
4308
|
+
journey.cycles.length > 0 ? /* @__PURE__ */ jsxs16("section", { children: [
|
|
4309
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-why-section-title", children: "Round by round" }),
|
|
4310
|
+
/* @__PURE__ */ jsx16(CycleTimeline, { cycles: journey.cycles })
|
|
4173
4311
|
] }) : null,
|
|
4174
|
-
/* @__PURE__ */
|
|
4175
|
-
/* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsxs16("section", { children: [
|
|
4313
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-why-section-title", children: "What moved the number" }),
|
|
4314
|
+
/* @__PURE__ */ jsx16(UnderstandingPanel, { assumption, basePath })
|
|
4177
4315
|
] }),
|
|
4178
|
-
/* @__PURE__ */
|
|
4316
|
+
/* @__PURE__ */ jsx16(
|
|
4179
4317
|
NextMoveCard,
|
|
4180
4318
|
{
|
|
4181
4319
|
move: journey.nextMove,
|
|
@@ -4183,7 +4321,7 @@ function BeliefJourney({
|
|
|
4183
4321
|
onAct: setStepIn
|
|
4184
4322
|
}
|
|
4185
4323
|
),
|
|
4186
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ jsx16(
|
|
4187
4325
|
"button",
|
|
4188
4326
|
{
|
|
4189
4327
|
type: "button",
|
|
@@ -4193,7 +4331,7 @@ function BeliefJourney({
|
|
|
4193
4331
|
}
|
|
4194
4332
|
)
|
|
4195
4333
|
] }) : null,
|
|
4196
|
-
stepIn === "edit-belief" ? /* @__PURE__ */
|
|
4334
|
+
stepIn === "edit-belief" ? /* @__PURE__ */ jsx16(
|
|
4197
4335
|
EditBeliefForm,
|
|
4198
4336
|
{
|
|
4199
4337
|
assumption,
|
|
@@ -4202,7 +4340,7 @@ function BeliefJourney({
|
|
|
4202
4340
|
onCancel: closeForm
|
|
4203
4341
|
}
|
|
4204
4342
|
) : null,
|
|
4205
|
-
stepIn === "score-impact" ? /* @__PURE__ */
|
|
4343
|
+
stepIn === "score-impact" ? /* @__PURE__ */ jsx16(
|
|
4206
4344
|
ScoreImpactForm,
|
|
4207
4345
|
{
|
|
4208
4346
|
assumption,
|
|
@@ -4211,7 +4349,7 @@ function BeliefJourney({
|
|
|
4211
4349
|
onCancel: closeForm
|
|
4212
4350
|
}
|
|
4213
4351
|
) : null,
|
|
4214
|
-
stepIn === "write-decision" ? /* @__PURE__ */
|
|
4352
|
+
stepIn === "write-decision" ? /* @__PURE__ */ jsx16(
|
|
4215
4353
|
WriteDecisionForm,
|
|
4216
4354
|
{
|
|
4217
4355
|
assumption,
|
|
@@ -4227,13 +4365,13 @@ var SPINE = ["framed", "planned", "tested", "known"];
|
|
|
4227
4365
|
function StageRail({ stage }) {
|
|
4228
4366
|
const meters = stageMeters(stage);
|
|
4229
4367
|
const at = SPINE.indexOf(stage.stage);
|
|
4230
|
-
return /* @__PURE__ */
|
|
4368
|
+
return /* @__PURE__ */ jsx16(
|
|
4231
4369
|
"div",
|
|
4232
4370
|
{
|
|
4233
4371
|
className: "vos-jny-rail",
|
|
4234
4372
|
role: "img",
|
|
4235
4373
|
"aria-label": `Stage ${at + 1} of 4 \u2014 ${STAGE_SENTENCE[stage.stage]}`,
|
|
4236
|
-
children: meters.map((meter, i) => /* @__PURE__ */
|
|
4374
|
+
children: meters.map((meter, i) => /* @__PURE__ */ jsx16(
|
|
4237
4375
|
RailStop,
|
|
4238
4376
|
{
|
|
4239
4377
|
meter,
|
|
@@ -4252,37 +4390,37 @@ function RailStop({
|
|
|
4252
4390
|
done,
|
|
4253
4391
|
last
|
|
4254
4392
|
}) {
|
|
4255
|
-
return /* @__PURE__ */
|
|
4256
|
-
/* @__PURE__ */
|
|
4393
|
+
return /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
4394
|
+
/* @__PURE__ */ jsxs16(
|
|
4257
4395
|
"div",
|
|
4258
4396
|
{
|
|
4259
4397
|
className: `vos-jny-stop${at ? " vos-jny-stop-at" : ""}${done ? " vos-jny-stop-done" : ""}`,
|
|
4260
4398
|
children: [
|
|
4261
|
-
/* @__PURE__ */
|
|
4262
|
-
/* @__PURE__ */
|
|
4399
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-jny-stopname", children: [
|
|
4400
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-stopn", children: meter.n }),
|
|
4263
4401
|
meter.name
|
|
4264
4402
|
] }),
|
|
4265
|
-
/* @__PURE__ */
|
|
4403
|
+
/* @__PURE__ */ jsx16(
|
|
4266
4404
|
"div",
|
|
4267
4405
|
{
|
|
4268
4406
|
className: `vos-jny-track${meter.kind === "signed" ? " vos-jny-known" : ""}`,
|
|
4269
|
-
children: meter.kind === "signed" ? /* @__PURE__ */
|
|
4270
|
-
/* @__PURE__ */
|
|
4271
|
-
meter.sign !== "zero" ? /* @__PURE__ */
|
|
4407
|
+
children: meter.kind === "signed" ? /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
4408
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-mid" }),
|
|
4409
|
+
meter.sign !== "zero" ? /* @__PURE__ */ jsx16(
|
|
4272
4410
|
"i",
|
|
4273
4411
|
{
|
|
4274
4412
|
className: meter.sign === "pos" ? "vos-jny-pos" : "vos-jny-neg",
|
|
4275
4413
|
style: { width: `${meter.pct}%` }
|
|
4276
4414
|
}
|
|
4277
4415
|
) : null
|
|
4278
|
-
] }) : /* @__PURE__ */
|
|
4416
|
+
] }) : /* @__PURE__ */ jsx16("i", { className: "vos-jny-fill", style: { width: `${meter.pct}%` } })
|
|
4279
4417
|
}
|
|
4280
4418
|
),
|
|
4281
|
-
/* @__PURE__ */
|
|
4419
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-jny-cap", children: meter.flag ? /* @__PURE__ */ jsx16("span", { className: "vos-jny-flag", children: meter.flag }) : /* @__PURE__ */ jsx16("span", { className: meter.muted ? "vos-muted" : "", children: meter.label }) })
|
|
4282
4420
|
]
|
|
4283
4421
|
}
|
|
4284
4422
|
),
|
|
4285
|
-
last ? null : /* @__PURE__ */
|
|
4423
|
+
last ? null : /* @__PURE__ */ jsx16("span", { className: "vos-jny-arrow", "aria-hidden": "true", children: "\u2192" })
|
|
4286
4424
|
] });
|
|
4287
4425
|
}
|
|
4288
4426
|
function EventRow({
|
|
@@ -4291,11 +4429,11 @@ function EventRow({
|
|
|
4291
4429
|
}) {
|
|
4292
4430
|
const act = eventStepIn(event.kind);
|
|
4293
4431
|
const conf = event.confidence;
|
|
4294
|
-
return /* @__PURE__ */
|
|
4295
|
-
/* @__PURE__ */
|
|
4296
|
-
/* @__PURE__ */
|
|
4297
|
-
/* @__PURE__ */
|
|
4298
|
-
conf !== null ? /* @__PURE__ */
|
|
4432
|
+
return /* @__PURE__ */ jsxs16("li", { className: `vos-jny-ev${event.kind === "now" ? " vos-jny-ev-now" : ""}`, children: [
|
|
4433
|
+
/* @__PURE__ */ jsx16("span", { className: `vos-jny-dot ${DOT_CLASS[eventTone(event)]}` }),
|
|
4434
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-date", children: event.date ?? "\u2014" }),
|
|
4435
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-label", children: event.label }),
|
|
4436
|
+
conf !== null ? /* @__PURE__ */ jsxs16(
|
|
4299
4437
|
"span",
|
|
4300
4438
|
{
|
|
4301
4439
|
className: `vos-pill ${conf < 0 ? "vos-pill-crit" : "vos-pill-good"} vos-jny-conf`,
|
|
@@ -4305,7 +4443,7 @@ function EventRow({
|
|
|
4305
4443
|
]
|
|
4306
4444
|
}
|
|
4307
4445
|
) : null,
|
|
4308
|
-
act ? /* @__PURE__ */
|
|
4446
|
+
act ? /* @__PURE__ */ jsx16(
|
|
4309
4447
|
"button",
|
|
4310
4448
|
{
|
|
4311
4449
|
type: "button",
|
|
@@ -4328,7 +4466,7 @@ var BAR_VERDICT_PILL = {
|
|
|
4328
4466
|
};
|
|
4329
4467
|
function CycleTimeline({ cycles }) {
|
|
4330
4468
|
const maxMagnitude = Math.max(...cycles.map((c) => c.magnitude), 0.01);
|
|
4331
|
-
return /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ jsx16("ol", { className: "vos-cyc-list", children: cycles.map((cycle, i) => /* @__PURE__ */ jsx16(CycleCard, { cycle, n: i + 1, max: maxMagnitude }, cycle.key)) });
|
|
4332
4470
|
}
|
|
4333
4471
|
function CycleCard({
|
|
4334
4472
|
cycle,
|
|
@@ -4339,22 +4477,22 @@ function CycleCard({
|
|
|
4339
4477
|
const moving = cycle.magnitude > 0;
|
|
4340
4478
|
const width = Math.round(cycle.magnitude / max * 50);
|
|
4341
4479
|
const fill = up ? { left: "50%", width: `${width}%`, background: "var(--vos-good)" } : { right: "50%", width: `${width}%`, background: "var(--vos-crit)" };
|
|
4342
|
-
return /* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4344
|
-
/* @__PURE__ */
|
|
4480
|
+
return /* @__PURE__ */ jsxs16("li", { className: "vos-cyc-card", children: [
|
|
4481
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-cyc-head", children: [
|
|
4482
|
+
/* @__PURE__ */ jsxs16("span", { className: "vos-cyc-num", children: [
|
|
4345
4483
|
"Round ",
|
|
4346
4484
|
n
|
|
4347
4485
|
] }),
|
|
4348
|
-
cycle.date ? /* @__PURE__ */
|
|
4486
|
+
cycle.date ? /* @__PURE__ */ jsx16("span", { className: "vos-cyc-date", children: cycle.date }) : null
|
|
4349
4487
|
] }),
|
|
4350
|
-
/* @__PURE__ */
|
|
4351
|
-
cycle.readings.length > 0 ? /* @__PURE__ */
|
|
4488
|
+
/* @__PURE__ */ jsx16("div", { className: "vos-cyc-title", children: cycle.kind === "direct" ? "Direct evidence" : cycle.title ?? "Untitled experiment" }),
|
|
4489
|
+
cycle.readings.length > 0 ? /* @__PURE__ */ jsx16(
|
|
4352
4490
|
"div",
|
|
4353
4491
|
{
|
|
4354
4492
|
className: "vos-cyc-dots",
|
|
4355
4493
|
role: "img",
|
|
4356
4494
|
"aria-label": `${cycle.readings.length} reading${cycle.readings.length === 1 ? "" : "s"}`,
|
|
4357
|
-
children: cycle.readings.map((r) => /* @__PURE__ */
|
|
4495
|
+
children: cycle.readings.map((r) => /* @__PURE__ */ jsx16(
|
|
4358
4496
|
"span",
|
|
4359
4497
|
{
|
|
4360
4498
|
className: `vos-jny-dot ${DOT_CLASS[readingDotTone(r.result)]}`
|
|
@@ -4362,12 +4500,12 @@ function CycleCard({
|
|
|
4362
4500
|
r.id
|
|
4363
4501
|
))
|
|
4364
4502
|
}
|
|
4365
|
-
) : /* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
cycle.barVerdict ? /* @__PURE__ */
|
|
4368
|
-
moving ? /* @__PURE__ */
|
|
4369
|
-
/* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4503
|
+
) : /* @__PURE__ */ jsx16("span", { className: "vos-hint", children: "No readings yet" }),
|
|
4504
|
+
/* @__PURE__ */ jsxs16("div", { className: "vos-cyc-foot", children: [
|
|
4505
|
+
cycle.barVerdict ? /* @__PURE__ */ jsx16("span", { className: BAR_VERDICT_PILL[cycle.barVerdict], children: cycle.barVerdict }) : cycle.kind === "experiment" ? /* @__PURE__ */ jsx16("span", { className: "vos-hint", children: cycle.status === "Closed" ? "No bar line" : "Bar pending" }) : null,
|
|
4506
|
+
moving ? /* @__PURE__ */ jsxs16("span", { className: "vos-cyc-push", children: [
|
|
4507
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-track vos-signed vos-cyc-track", children: /* @__PURE__ */ jsx16("i", { style: fill }) }),
|
|
4508
|
+
/* @__PURE__ */ jsx16("span", { className: up ? "vos-text-good" : "vos-text-crit", children: formatSigned(cycle.contribution) })
|
|
4371
4509
|
] }) : null
|
|
4372
4510
|
] })
|
|
4373
4511
|
] });
|
|
@@ -4378,21 +4516,21 @@ function NextMoveCard({
|
|
|
4378
4516
|
onAct
|
|
4379
4517
|
}) {
|
|
4380
4518
|
if (resolved) {
|
|
4381
|
-
return /* @__PURE__ */
|
|
4382
|
-
/* @__PURE__ */
|
|
4383
|
-
/* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-jny-card vos-jny-card-done", children: [
|
|
4520
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-card-eyebrow", children: "The end of the road" }),
|
|
4521
|
+
/* @__PURE__ */ jsx16("p", { className: "vos-jny-card-reason", children: resolved === "killed" ? "This belief is killed \u2014 the evidence went against it. It retired its risk; nothing more to test." : "This belief is moot \u2014 a decision retired the question without a test. It carries no risk now." })
|
|
4384
4522
|
] });
|
|
4385
4523
|
}
|
|
4386
4524
|
if (!move) return null;
|
|
4387
4525
|
const pres = movePresentation(move.move);
|
|
4388
|
-
return /* @__PURE__ */
|
|
4526
|
+
return /* @__PURE__ */ jsxs16(
|
|
4389
4527
|
"div",
|
|
4390
4528
|
{
|
|
4391
4529
|
className: `vos-jny-card${move.killLane ? " vos-jny-card-kill" : ""}`,
|
|
4392
4530
|
children: [
|
|
4393
|
-
/* @__PURE__ */
|
|
4394
|
-
/* @__PURE__ */
|
|
4395
|
-
pres.steppable && pres.form ? /* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-card-eyebrow", children: move.killLane ? "Kill lane \u2014 the evidence has turned" : "The next move" }),
|
|
4532
|
+
/* @__PURE__ */ jsx16("p", { className: "vos-jny-card-reason", children: move.reason }),
|
|
4533
|
+
pres.steppable && pres.form ? /* @__PURE__ */ jsx16(
|
|
4396
4534
|
"button",
|
|
4397
4535
|
{
|
|
4398
4536
|
type: "button",
|
|
@@ -4400,7 +4538,7 @@ function NextMoveCard({
|
|
|
4400
4538
|
onClick: () => onAct(pres.form),
|
|
4401
4539
|
children: pres.cta
|
|
4402
4540
|
}
|
|
4403
|
-
) : /* @__PURE__ */
|
|
4541
|
+
) : /* @__PURE__ */ jsx16("span", { className: "vos-agent-note", children: "\u{1F916} Claude Code runs this off the dashboard \u2014 it'll show up here when it lands." })
|
|
4404
4542
|
]
|
|
4405
4543
|
}
|
|
4406
4544
|
);
|
|
@@ -4409,9 +4547,9 @@ function JourneyColdCard({
|
|
|
4409
4547
|
eyebrow,
|
|
4410
4548
|
body
|
|
4411
4549
|
}) {
|
|
4412
|
-
return /* @__PURE__ */
|
|
4413
|
-
/* @__PURE__ */
|
|
4414
|
-
/* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ jsxs16("div", { className: "vos-jny-cold vos-card", children: [
|
|
4551
|
+
/* @__PURE__ */ jsx16("span", { className: "vos-jny-card-eyebrow", children: eyebrow }),
|
|
4552
|
+
/* @__PURE__ */ jsx16("p", { className: "vos-jny-card-reason", children: body })
|
|
4415
4553
|
] });
|
|
4416
4554
|
}
|
|
4417
4555
|
|
|
@@ -4683,7 +4821,7 @@ function needsHumanCounts(ctx) {
|
|
|
4683
4821
|
}
|
|
4684
4822
|
|
|
4685
4823
|
// src/belief-verdicts.tsx
|
|
4686
|
-
import { jsx as
|
|
4824
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4687
4825
|
function resultClass(result) {
|
|
4688
4826
|
if (result === "Validated") return "vos-pill vos-pill-good";
|
|
4689
4827
|
if (result === "Invalidated") return "vos-pill vos-pill-crit";
|
|
@@ -4700,13 +4838,13 @@ function VerdictTally({ summary }) {
|
|
|
4700
4838
|
{ n: summary.inconclusive, label: "inconclusive", cls: "vos-tally-neutral" },
|
|
4701
4839
|
{ n: summary.invalidated, label: "invalidated", cls: "vos-tally-crit" }
|
|
4702
4840
|
].filter((p) => p.n > 0);
|
|
4703
|
-
return /* @__PURE__ */
|
|
4704
|
-
/* @__PURE__ */
|
|
4841
|
+
return /* @__PURE__ */ jsxs17("p", { className: "vos-verdict-tally", children: [
|
|
4842
|
+
/* @__PURE__ */ jsxs17("span", { className: "vos-tally-total", children: [
|
|
4705
4843
|
summary.total,
|
|
4706
4844
|
" belief",
|
|
4707
4845
|
summary.total === 1 ? "" : "s"
|
|
4708
4846
|
] }),
|
|
4709
|
-
parts.map((p) => /* @__PURE__ */
|
|
4847
|
+
parts.map((p) => /* @__PURE__ */ jsxs17("span", { className: `vos-tally-part ${p.cls}`, children: [
|
|
4710
4848
|
p.n,
|
|
4711
4849
|
" ",
|
|
4712
4850
|
p.label
|
|
@@ -4720,18 +4858,18 @@ function BeliefVerdicts({
|
|
|
4720
4858
|
}) {
|
|
4721
4859
|
const verdicts = readingBeliefVerdicts(reading, assumptions);
|
|
4722
4860
|
if (verdicts.length === 0) {
|
|
4723
|
-
return /* @__PURE__ */
|
|
4861
|
+
return /* @__PURE__ */ jsx17("p", { className: "vos-hint", children: "This reading grades no beliefs yet." });
|
|
4724
4862
|
}
|
|
4725
4863
|
const summary = readingBeliefSummary(reading, assumptions);
|
|
4726
|
-
return /* @__PURE__ */
|
|
4727
|
-
/* @__PURE__ */
|
|
4728
|
-
/* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsxs17("div", { className: "vos-verdicts-wrap", children: [
|
|
4865
|
+
/* @__PURE__ */ jsx17(VerdictTally, { summary }),
|
|
4866
|
+
/* @__PURE__ */ jsx17("ul", { className: "vos-verdicts", children: verdicts.map((v) => /* @__PURE__ */ jsxs17(
|
|
4729
4867
|
"li",
|
|
4730
4868
|
{
|
|
4731
4869
|
className: `vos-verdict ${verdictTone4(v.result)}`,
|
|
4732
4870
|
children: [
|
|
4733
|
-
/* @__PURE__ */
|
|
4734
|
-
v.linked && onOpenRecord ? /* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsxs17("div", { className: "vos-verdict-head", children: [
|
|
4872
|
+
v.linked && onOpenRecord ? /* @__PURE__ */ jsx17(
|
|
4735
4873
|
"button",
|
|
4736
4874
|
{
|
|
4737
4875
|
type: "button",
|
|
@@ -4739,14 +4877,14 @@ function BeliefVerdicts({
|
|
|
4739
4877
|
onClick: () => onOpenRecord(v.assumptionId),
|
|
4740
4878
|
children: v.title
|
|
4741
4879
|
}
|
|
4742
|
-
) : /* @__PURE__ */
|
|
4743
|
-
/* @__PURE__ */
|
|
4880
|
+
) : /* @__PURE__ */ jsx17("span", { className: "vos-verdict-title", children: v.title }),
|
|
4881
|
+
/* @__PURE__ */ jsx17("span", { className: resultClass(v.result), children: v.result ?? "Ungraded" })
|
|
4744
4882
|
] }),
|
|
4745
|
-
v.strength !== null ? /* @__PURE__ */
|
|
4883
|
+
v.strength !== null ? /* @__PURE__ */ jsx17("div", { className: "vos-verdict-meta", children: /* @__PURE__ */ jsxs17("span", { className: "vos-verdict-strength", children: [
|
|
4746
4884
|
"Strength ",
|
|
4747
4885
|
formatSigned(v.strength)
|
|
4748
4886
|
] }) }) : null,
|
|
4749
|
-
v.justification ? /* @__PURE__ */
|
|
4887
|
+
v.justification ? /* @__PURE__ */ jsx17("p", { className: "vos-verdict-why", children: v.justification }) : null
|
|
4750
4888
|
]
|
|
4751
4889
|
},
|
|
4752
4890
|
v.assumptionId
|
|
@@ -4755,7 +4893,7 @@ function BeliefVerdicts({
|
|
|
4755
4893
|
}
|
|
4756
4894
|
|
|
4757
4895
|
// src/record-page.tsx
|
|
4758
|
-
import { Fragment as Fragment9, jsx as
|
|
4896
|
+
import { Fragment as Fragment9, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4759
4897
|
var TAB_LABEL = {
|
|
4760
4898
|
overview: "Overview",
|
|
4761
4899
|
evidence: "Evidence",
|
|
@@ -4782,8 +4920,8 @@ function RecordPage({
|
|
|
4782
4920
|
decisions: useList("decisions", basePath),
|
|
4783
4921
|
glossary: useList("glossary", basePath)
|
|
4784
4922
|
};
|
|
4785
|
-
const [tab, setTab] =
|
|
4786
|
-
const [asOf] =
|
|
4923
|
+
const [tab, setTab] = useState8("overview");
|
|
4924
|
+
const [asOf] = useState8(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
4787
4925
|
const anyLoading = REGISTERS.some((r) => lists[r].loading && !lists[r].records);
|
|
4788
4926
|
const related = {
|
|
4789
4927
|
assumptions: lists.assumptions.records ?? [],
|
|
@@ -4824,9 +4962,9 @@ function RecordPage({
|
|
|
4824
4962
|
};
|
|
4825
4963
|
const terms = toGlossaryTerms(related.glossary ?? []);
|
|
4826
4964
|
const openTerm = (id) => onNavigate({ name: "record", id });
|
|
4827
|
-
const [editing, setEditing] =
|
|
4828
|
-
const [draft, setDraft] =
|
|
4829
|
-
const [baseline, setBaseline] =
|
|
4965
|
+
const [editing, setEditing] = useState8(false);
|
|
4966
|
+
const [draft, setDraft] = useState8({});
|
|
4967
|
+
const [baseline, setBaseline] = useState8(null);
|
|
4830
4968
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
4831
4969
|
register ?? backRegister,
|
|
4832
4970
|
basePath
|
|
@@ -4876,9 +5014,9 @@ function RecordPage({
|
|
|
4876
5014
|
onReload: reloadLatest,
|
|
4877
5015
|
onField: setField
|
|
4878
5016
|
};
|
|
4879
|
-
return /* @__PURE__ */
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
5017
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
5018
|
+
/* @__PURE__ */ jsxs18("nav", { className: "vos-crumbs", "aria-label": "Breadcrumb", children: [
|
|
5019
|
+
/* @__PURE__ */ jsx18(
|
|
4882
5020
|
"button",
|
|
4883
5021
|
{
|
|
4884
5022
|
type: "button",
|
|
@@ -4886,14 +5024,14 @@ function RecordPage({
|
|
|
4886
5024
|
children: REGISTER_LABEL[register ?? backRegister]
|
|
4887
5025
|
}
|
|
4888
5026
|
),
|
|
4889
|
-
/* @__PURE__ */
|
|
4890
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ jsx18("span", { "aria-hidden": "true", children: "\u203A" }),
|
|
5028
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-rid", children: record ? formatValue(record.Title) : recordId })
|
|
4891
5029
|
] }),
|
|
4892
|
-
anyLoading ? /* @__PURE__ */
|
|
5030
|
+
anyLoading ? /* @__PURE__ */ jsx18("p", { className: "vos-muted", children: "Loading record\u2026" }) : !record || !register ? /* @__PURE__ */ jsxs18("div", { className: "vos-empty", children: [
|
|
4893
5031
|
"Couldn't find a record with id ",
|
|
4894
|
-
/* @__PURE__ */
|
|
5032
|
+
/* @__PURE__ */ jsx18("b", { children: recordId }),
|
|
4895
5033
|
"."
|
|
4896
|
-
] }) : /* @__PURE__ */
|
|
5034
|
+
] }) : /* @__PURE__ */ jsx18(
|
|
4897
5035
|
RecordBody,
|
|
4898
5036
|
{
|
|
4899
5037
|
register,
|
|
@@ -4935,19 +5073,19 @@ function RecordBody({
|
|
|
4935
5073
|
const description = typeof record.Description === "string" ? record.Description : "";
|
|
4936
5074
|
const bodyText = typeof record.body === "string" ? record.body : "";
|
|
4937
5075
|
const hasErrors = Object.keys(edit.errors).length > 0;
|
|
4938
|
-
return /* @__PURE__ */
|
|
4939
|
-
/* @__PURE__ */
|
|
4940
|
-
/* @__PURE__ */
|
|
4941
|
-
/* @__PURE__ */
|
|
4942
|
-
/* @__PURE__ */
|
|
4943
|
-
/* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
5077
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-head vos-record-head", children: [
|
|
5078
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
5079
|
+
/* @__PURE__ */ jsx18("p", { className: "vos-drawer-eyebrow", children: REGISTER_SINGULAR[register] }),
|
|
5080
|
+
/* @__PURE__ */ jsx18("h1", { children: page.title }),
|
|
5081
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-pill-row", children: page.pills.map((p, i) => /* @__PURE__ */ jsx18(PillView, { pill: p }, i)) })
|
|
4944
5082
|
] }),
|
|
4945
|
-
/* @__PURE__ */
|
|
4946
|
-
/* @__PURE__ */
|
|
5083
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-spacer" }),
|
|
5084
|
+
/* @__PURE__ */ jsxs18("span", { className: "vos-verbadge", children: [
|
|
4947
5085
|
"v",
|
|
4948
5086
|
formatValue(record.version)
|
|
4949
5087
|
] }),
|
|
4950
|
-
!edit.editing ? /* @__PURE__ */
|
|
5088
|
+
!edit.editing ? /* @__PURE__ */ jsx18(
|
|
4951
5089
|
"button",
|
|
4952
5090
|
{
|
|
4953
5091
|
type: "button",
|
|
@@ -4957,7 +5095,7 @@ function RecordBody({
|
|
|
4957
5095
|
}
|
|
4958
5096
|
) : null
|
|
4959
5097
|
] }),
|
|
4960
|
-
/* @__PURE__ */
|
|
5098
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-tabs", role: "tablist", "aria-label": "Record sections", children: page.tabs.map((t2) => /* @__PURE__ */ jsx18(
|
|
4961
5099
|
"button",
|
|
4962
5100
|
{
|
|
4963
5101
|
type: "button",
|
|
@@ -4969,8 +5107,8 @@ function RecordBody({
|
|
|
4969
5107
|
},
|
|
4970
5108
|
t2
|
|
4971
5109
|
)) }),
|
|
4972
|
-
activeTab === "overview" ? /* @__PURE__ */
|
|
4973
|
-
/* @__PURE__ */
|
|
5110
|
+
activeTab === "overview" ? /* @__PURE__ */ jsxs18("div", { className: "vos-record-cols", children: [
|
|
5111
|
+
/* @__PURE__ */ jsx18("section", { className: "vos-meter-grid", children: page.meters.map((m) => /* @__PURE__ */ jsx18(
|
|
4974
5112
|
MeterView,
|
|
4975
5113
|
{
|
|
4976
5114
|
meter: m,
|
|
@@ -4979,11 +5117,11 @@ function RecordBody({
|
|
|
4979
5117
|
},
|
|
4980
5118
|
m.key
|
|
4981
5119
|
)) }),
|
|
4982
|
-
edit.editing ? /* @__PURE__ */
|
|
4983
|
-
/* @__PURE__ */
|
|
4984
|
-
edit.conflict ? /* @__PURE__ */
|
|
4985
|
-
edit.saveError ? /* @__PURE__ */
|
|
4986
|
-
/* @__PURE__ */
|
|
5120
|
+
edit.editing ? /* @__PURE__ */ jsxs18("section", { className: "vos-record-editor", children: [
|
|
5121
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Edit" }),
|
|
5122
|
+
edit.conflict ? /* @__PURE__ */ jsx18(ConflictBanner, { message: edit.conflict, onReload: edit.onReload }) : null,
|
|
5123
|
+
edit.saveError ? /* @__PURE__ */ jsx18("p", { role: "alert", className: "vos-error", children: edit.saveError }) : null,
|
|
5124
|
+
/* @__PURE__ */ jsx18(
|
|
4987
5125
|
EditFields,
|
|
4988
5126
|
{
|
|
4989
5127
|
register,
|
|
@@ -4992,8 +5130,8 @@ function RecordBody({
|
|
|
4992
5130
|
onField: edit.onField
|
|
4993
5131
|
}
|
|
4994
5132
|
),
|
|
4995
|
-
/* @__PURE__ */
|
|
4996
|
-
/* @__PURE__ */
|
|
5133
|
+
/* @__PURE__ */ jsxs18("footer", { className: "vos-drawer-footer", children: [
|
|
5134
|
+
/* @__PURE__ */ jsx18(
|
|
4997
5135
|
"button",
|
|
4998
5136
|
{
|
|
4999
5137
|
type: "button",
|
|
@@ -5003,7 +5141,7 @@ function RecordBody({
|
|
|
5003
5141
|
children: "Cancel"
|
|
5004
5142
|
}
|
|
5005
5143
|
),
|
|
5006
|
-
/* @__PURE__ */
|
|
5144
|
+
/* @__PURE__ */ jsx18(
|
|
5007
5145
|
"button",
|
|
5008
5146
|
{
|
|
5009
5147
|
type: "button",
|
|
@@ -5015,10 +5153,10 @@ function RecordBody({
|
|
|
5015
5153
|
}
|
|
5016
5154
|
)
|
|
5017
5155
|
] })
|
|
5018
|
-
] }) : /* @__PURE__ */
|
|
5019
|
-
description ? /* @__PURE__ */
|
|
5020
|
-
/* @__PURE__ */
|
|
5021
|
-
/* @__PURE__ */
|
|
5156
|
+
] }) : /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
5157
|
+
description ? /* @__PURE__ */ jsxs18("section", { className: "vos-record-prose", children: [
|
|
5158
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Description" }),
|
|
5159
|
+
/* @__PURE__ */ jsx18("p", { children: /* @__PURE__ */ jsx18(
|
|
5022
5160
|
GlossaryText,
|
|
5023
5161
|
{
|
|
5024
5162
|
text: description,
|
|
@@ -5028,9 +5166,9 @@ function RecordBody({
|
|
|
5028
5166
|
}
|
|
5029
5167
|
) })
|
|
5030
5168
|
] }) : null,
|
|
5031
|
-
bodyText ? /* @__PURE__ */
|
|
5032
|
-
/* @__PURE__ */
|
|
5033
|
-
/* @__PURE__ */
|
|
5169
|
+
bodyText ? /* @__PURE__ */ jsxs18("section", { className: "vos-record-prose", children: [
|
|
5170
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
5171
|
+
/* @__PURE__ */ jsx18(
|
|
5034
5172
|
EvidenceBody,
|
|
5035
5173
|
{
|
|
5036
5174
|
text: bodyText,
|
|
@@ -5038,9 +5176,9 @@ function RecordBody({
|
|
|
5038
5176
|
}
|
|
5039
5177
|
)
|
|
5040
5178
|
] }) : null,
|
|
5041
|
-
register === "readings" ? /* @__PURE__ */
|
|
5042
|
-
/* @__PURE__ */
|
|
5043
|
-
/* @__PURE__ */
|
|
5179
|
+
register === "readings" ? /* @__PURE__ */ jsxs18("section", { className: "vos-record-prose vos-verdicts-section", children: [
|
|
5180
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Per-belief verdicts" }),
|
|
5181
|
+
/* @__PURE__ */ jsx18(
|
|
5044
5182
|
BeliefVerdicts,
|
|
5045
5183
|
{
|
|
5046
5184
|
reading: record,
|
|
@@ -5049,14 +5187,14 @@ function RecordBody({
|
|
|
5049
5187
|
}
|
|
5050
5188
|
)
|
|
5051
5189
|
] }) : null,
|
|
5052
|
-
page.humanText.length ? /* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5190
|
+
page.humanText.length ? /* @__PURE__ */ jsxs18("section", { className: "vos-record-prose", children: [
|
|
5191
|
+
/* @__PURE__ */ jsxs18("h3", { className: "vos-section-title", children: [
|
|
5054
5192
|
"From a human ",
|
|
5055
|
-
/* @__PURE__ */
|
|
5193
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-hint", children: "\u2014 not computed" })
|
|
5056
5194
|
] }),
|
|
5057
|
-
page.humanText.map((h) => /* @__PURE__ */
|
|
5058
|
-
/* @__PURE__ */
|
|
5059
|
-
/* @__PURE__ */
|
|
5195
|
+
page.humanText.map((h) => /* @__PURE__ */ jsxs18("div", { className: "vos-human-field", children: [
|
|
5196
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-detail-k", children: h.label }),
|
|
5197
|
+
/* @__PURE__ */ jsx18("p", { children: /* @__PURE__ */ jsx18(
|
|
5060
5198
|
GlossaryText,
|
|
5061
5199
|
{
|
|
5062
5200
|
text: h.text,
|
|
@@ -5069,7 +5207,7 @@ function RecordBody({
|
|
|
5069
5207
|
] }) : null
|
|
5070
5208
|
] })
|
|
5071
5209
|
] }) : null,
|
|
5072
|
-
activeTab === "evidence" ? /* @__PURE__ */
|
|
5210
|
+
activeTab === "evidence" ? /* @__PURE__ */ jsx18(
|
|
5073
5211
|
EvidenceTab,
|
|
5074
5212
|
{
|
|
5075
5213
|
register,
|
|
@@ -5079,25 +5217,25 @@ function RecordBody({
|
|
|
5079
5217
|
basePath
|
|
5080
5218
|
}
|
|
5081
5219
|
) : null,
|
|
5082
|
-
activeTab === "connections" ? /* @__PURE__ */
|
|
5083
|
-
activeTab === "history" ? /* @__PURE__ */
|
|
5084
|
-
/* @__PURE__ */
|
|
5085
|
-
/* @__PURE__ */
|
|
5086
|
-
/* @__PURE__ */
|
|
5220
|
+
activeTab === "connections" ? /* @__PURE__ */ jsx18("div", { className: "vos-panels", children: page.panels.map((panel) => /* @__PURE__ */ jsx18(PanelView, { panel, onOpenRecord }, panel.id)) }) : null,
|
|
5221
|
+
activeTab === "history" ? /* @__PURE__ */ jsxs18("section", { className: "vos-detail-list", children: [
|
|
5222
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-detail-row", children: [
|
|
5223
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-k", children: "Created" }),
|
|
5224
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-v", children: formatValue(record.createdAt) })
|
|
5087
5225
|
] }),
|
|
5088
|
-
/* @__PURE__ */
|
|
5089
|
-
/* @__PURE__ */
|
|
5090
|
-
/* @__PURE__ */
|
|
5226
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-detail-row", children: [
|
|
5227
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-k", children: "Last updated" }),
|
|
5228
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-v", children: formatValue(record.updatedAt) })
|
|
5091
5229
|
] }),
|
|
5092
|
-
/* @__PURE__ */
|
|
5093
|
-
/* @__PURE__ */
|
|
5094
|
-
/* @__PURE__ */
|
|
5230
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-detail-row", children: [
|
|
5231
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-k", children: "Version" }),
|
|
5232
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-detail-v", children: formatValue(record.version) })
|
|
5095
5233
|
] }),
|
|
5096
|
-
/* @__PURE__ */
|
|
5234
|
+
/* @__PURE__ */ jsx18("p", { className: "vos-hint", children: "The full change trail lands here as the API exposes version history; this absorbs the retired provenance prose." })
|
|
5097
5235
|
] }) : null,
|
|
5098
|
-
page.hasJourney && journey ? /* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5100
|
-
/* @__PURE__ */
|
|
5236
|
+
page.hasJourney && journey ? /* @__PURE__ */ jsxs18("section", { className: "vos-journey-host", children: [
|
|
5237
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
5238
|
+
/* @__PURE__ */ jsx18(
|
|
5101
5239
|
BeliefJourney,
|
|
5102
5240
|
{
|
|
5103
5241
|
journey,
|
|
@@ -5107,22 +5245,22 @@ function RecordBody({
|
|
|
5107
5245
|
onChanged: onJourneyChanged
|
|
5108
5246
|
}
|
|
5109
5247
|
)
|
|
5110
|
-
] }) : page.hasJourney ? /* @__PURE__ */
|
|
5111
|
-
/* @__PURE__ */
|
|
5112
|
-
/* @__PURE__ */
|
|
5248
|
+
] }) : page.hasJourney ? /* @__PURE__ */ jsxs18("section", { className: "vos-journey-host", children: [
|
|
5249
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Validation journey" }),
|
|
5250
|
+
/* @__PURE__ */ jsx18("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." })
|
|
5113
5251
|
] }) : null
|
|
5114
5252
|
] });
|
|
5115
5253
|
}
|
|
5116
5254
|
function PillView({ pill }) {
|
|
5117
|
-
return /* @__PURE__ */
|
|
5255
|
+
return /* @__PURE__ */ jsx18("span", { className: PILL_CLASS3[pill.tone], children: pill.label });
|
|
5118
5256
|
}
|
|
5119
5257
|
function ConflictBanner({
|
|
5120
5258
|
message,
|
|
5121
5259
|
onReload
|
|
5122
5260
|
}) {
|
|
5123
|
-
return /* @__PURE__ */
|
|
5124
|
-
/* @__PURE__ */
|
|
5125
|
-
/* @__PURE__ */
|
|
5261
|
+
return /* @__PURE__ */ jsxs18("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
5262
|
+
/* @__PURE__ */ jsx18("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx18("span", { children: message }) }),
|
|
5263
|
+
/* @__PURE__ */ jsx18("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
5126
5264
|
] });
|
|
5127
5265
|
}
|
|
5128
5266
|
function MeterView({
|
|
@@ -5130,12 +5268,12 @@ function MeterView({
|
|
|
5130
5268
|
assumption,
|
|
5131
5269
|
basePath
|
|
5132
5270
|
}) {
|
|
5133
|
-
const [why, setWhy] =
|
|
5271
|
+
const [why, setWhy] = useState8(false);
|
|
5134
5272
|
const textTone = meter.tone === "crit" ? "vos-text-crit" : meter.tone === "warn" ? "vos-text-warn" : "";
|
|
5135
|
-
return /* @__PURE__ */
|
|
5136
|
-
/* @__PURE__ */
|
|
5137
|
-
/* @__PURE__ */
|
|
5138
|
-
meter.hasWhy && assumption ? /* @__PURE__ */
|
|
5273
|
+
return /* @__PURE__ */ jsxs18("div", { className: "vos-meter", children: [
|
|
5274
|
+
/* @__PURE__ */ jsxs18("div", { className: "vos-meter-head", children: [
|
|
5275
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-meter-label", children: meter.label }),
|
|
5276
|
+
meter.hasWhy && assumption ? /* @__PURE__ */ jsxs18(
|
|
5139
5277
|
"button",
|
|
5140
5278
|
{
|
|
5141
5279
|
type: "button",
|
|
@@ -5149,12 +5287,12 @@ function MeterView({
|
|
|
5149
5287
|
}
|
|
5150
5288
|
) : null
|
|
5151
5289
|
] }),
|
|
5152
|
-
meter.value === null ? /* @__PURE__ */
|
|
5153
|
-
/* @__PURE__ */
|
|
5154
|
-
/* @__PURE__ */
|
|
5155
|
-
] }) : /* @__PURE__ */
|
|
5156
|
-
/* @__PURE__ */
|
|
5157
|
-
/* @__PURE__ */
|
|
5290
|
+
meter.value === null ? /* @__PURE__ */ jsx18("div", { className: "vos-meter-val vos-muted", children: "\u2014" }) : meter.kind === "pill" ? /* @__PURE__ */ jsx18("span", { className: PILL_CLASS3[meter.tone], children: meter.value }) : meter.kind === "signed" ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
5291
|
+
/* @__PURE__ */ jsx18("div", { className: `vos-meter-val ${textTone}`, children: formatSigned(Number(meter.value)) }),
|
|
5292
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-track vos-signed", children: /* @__PURE__ */ jsx18(SignedFill, { value: Number(meter.value), min: meter.min ?? -100, max: meter.max ?? 100 }) })
|
|
5293
|
+
] }) : /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
5294
|
+
/* @__PURE__ */ jsx18("div", { className: `vos-meter-val ${textTone}`, children: Math.round(Number(meter.value)) }),
|
|
5295
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-risk-bar", children: /* @__PURE__ */ jsx18(
|
|
5158
5296
|
"i",
|
|
5159
5297
|
{
|
|
5160
5298
|
className: meter.tone === "crit" ? "vos-fill-crit" : meter.tone === "warn" ? "vos-fill-warn" : "vos-fill-good",
|
|
@@ -5162,7 +5300,7 @@ function MeterView({
|
|
|
5162
5300
|
}
|
|
5163
5301
|
) })
|
|
5164
5302
|
] }),
|
|
5165
|
-
why && assumption ? /* @__PURE__ */
|
|
5303
|
+
why && assumption ? /* @__PURE__ */ jsx18("div", { className: "vos-why-panel", children: /* @__PURE__ */ jsx18(UnderstandingPanel, { assumption, basePath }) }) : null
|
|
5166
5304
|
] });
|
|
5167
5305
|
}
|
|
5168
5306
|
function SignedFill({ value, min, max }) {
|
|
@@ -5170,34 +5308,34 @@ function SignedFill({ value, min, max }) {
|
|
|
5170
5308
|
const width = Math.round(Math.min(Math.abs(value), span) / span * 50);
|
|
5171
5309
|
const up = value >= 0;
|
|
5172
5310
|
const style = up ? { left: "50%", width: `${width}%`, background: "var(--vos-good)" } : { right: "50%", width: `${width}%`, background: "var(--vos-crit)" };
|
|
5173
|
-
return width > 0 ? /* @__PURE__ */
|
|
5311
|
+
return width > 0 ? /* @__PURE__ */ jsx18("i", { style }) : null;
|
|
5174
5312
|
}
|
|
5175
5313
|
function PanelView({
|
|
5176
5314
|
panel,
|
|
5177
5315
|
onOpenRecord
|
|
5178
5316
|
}) {
|
|
5179
|
-
return /* @__PURE__ */
|
|
5180
|
-
/* @__PURE__ */
|
|
5317
|
+
return /* @__PURE__ */ jsxs18("section", { className: "vos-panel", children: [
|
|
5318
|
+
/* @__PURE__ */ jsxs18("h3", { className: "vos-panel-head", children: [
|
|
5181
5319
|
panel.label,
|
|
5182
|
-
/* @__PURE__ */
|
|
5320
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-group-n", children: panel.items.length })
|
|
5183
5321
|
] }),
|
|
5184
|
-
panel.items.length === 0 ? /* @__PURE__ */
|
|
5322
|
+
panel.items.length === 0 ? /* @__PURE__ */ jsx18("p", { className: "vos-hint", children: "None yet." }) : /* @__PURE__ */ jsx18("ul", { className: "vos-backlinks", children: panel.items.map((item) => /* @__PURE__ */ jsx18(BacklinkRow, { item, onOpenRecord }, item.id)) })
|
|
5185
5323
|
] });
|
|
5186
5324
|
}
|
|
5187
5325
|
function BacklinkRow({
|
|
5188
5326
|
item,
|
|
5189
5327
|
onOpenRecord
|
|
5190
5328
|
}) {
|
|
5191
|
-
return /* @__PURE__ */
|
|
5329
|
+
return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs18(
|
|
5192
5330
|
"button",
|
|
5193
5331
|
{
|
|
5194
5332
|
type: "button",
|
|
5195
5333
|
className: "vos-backlink",
|
|
5196
5334
|
onClick: () => onOpenRecord(item.id),
|
|
5197
5335
|
children: [
|
|
5198
|
-
/* @__PURE__ */
|
|
5199
|
-
/* @__PURE__ */
|
|
5200
|
-
/* @__PURE__ */
|
|
5336
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-backlink-title", children: item.title }),
|
|
5337
|
+
/* @__PURE__ */ jsxs18("span", { className: `vos-chip ${PILL_CLASS3[item.chip.tone]}`, children: [
|
|
5338
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-chip-k", children: item.chip.label }),
|
|
5201
5339
|
item.chip.value
|
|
5202
5340
|
] })
|
|
5203
5341
|
]
|
|
@@ -5212,7 +5350,7 @@ function EvidenceTab({
|
|
|
5212
5350
|
basePath
|
|
5213
5351
|
}) {
|
|
5214
5352
|
if (register === "assumptions") {
|
|
5215
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ jsx18("section", { className: "vos-why-panel", children: /* @__PURE__ */ jsx18(UnderstandingPanel, { assumption: record, basePath }) });
|
|
5216
5354
|
}
|
|
5217
5355
|
const bars = resolveBarLines(
|
|
5218
5356
|
record.barLines ?? [],
|
|
@@ -5220,12 +5358,12 @@ function EvidenceTab({
|
|
|
5220
5358
|
);
|
|
5221
5359
|
const mine = (related.readings ?? []).filter((r) => r.experimentId === record.id);
|
|
5222
5360
|
const nested = nestReadingsByPlan(mine, [record]);
|
|
5223
|
-
return /* @__PURE__ */
|
|
5224
|
-
/* @__PURE__ */
|
|
5225
|
-
/* @__PURE__ */
|
|
5226
|
-
bars.length === 0 ? /* @__PURE__ */
|
|
5227
|
-
/* @__PURE__ */
|
|
5228
|
-
b.assumption ? /* @__PURE__ */
|
|
5361
|
+
return /* @__PURE__ */ jsxs18("div", { className: "vos-record-cols", children: [
|
|
5362
|
+
/* @__PURE__ */ jsxs18("section", { children: [
|
|
5363
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Bar lines" }),
|
|
5364
|
+
bars.length === 0 ? /* @__PURE__ */ jsx18("p", { className: "vos-hint", children: "No pre-registered bars." }) : /* @__PURE__ */ jsx18("ul", { className: "vos-bars", children: bars.map((b, i) => /* @__PURE__ */ jsxs18("li", { className: "vos-bar-line", children: [
|
|
5365
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
5366
|
+
b.assumption ? /* @__PURE__ */ jsx18(
|
|
5229
5367
|
"button",
|
|
5230
5368
|
{
|
|
5231
5369
|
type: "button",
|
|
@@ -5234,7 +5372,7 @@ function EvidenceTab({
|
|
|
5234
5372
|
children: b.assumption.title
|
|
5235
5373
|
}
|
|
5236
5374
|
) : null,
|
|
5237
|
-
/* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ jsx18(
|
|
5238
5376
|
"span",
|
|
5239
5377
|
{
|
|
5240
5378
|
className: b.barVerdict ? "vos-pill vos-pill-good" : "vos-pill vos-pill-neutral",
|
|
@@ -5243,17 +5381,17 @@ function EvidenceTab({
|
|
|
5243
5381
|
)
|
|
5244
5382
|
] }, i)) })
|
|
5245
5383
|
] }),
|
|
5246
|
-
/* @__PURE__ */
|
|
5247
|
-
/* @__PURE__ */
|
|
5248
|
-
nested.length === 0 ? /* @__PURE__ */
|
|
5384
|
+
/* @__PURE__ */ jsxs18("section", { children: [
|
|
5385
|
+
/* @__PURE__ */ jsx18("h3", { className: "vos-section-title", children: "Readings" }),
|
|
5386
|
+
nested.length === 0 ? /* @__PURE__ */ jsx18("p", { className: "vos-hint", children: "No readings logged yet." }) : /* @__PURE__ */ jsx18("ul", { className: "vos-backlinks", children: nested[0].readings.map((r) => /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs18(
|
|
5249
5387
|
"button",
|
|
5250
5388
|
{
|
|
5251
5389
|
type: "button",
|
|
5252
5390
|
className: "vos-backlink",
|
|
5253
5391
|
onClick: () => onOpenRecord(r.id),
|
|
5254
5392
|
children: [
|
|
5255
|
-
/* @__PURE__ */
|
|
5256
|
-
/* @__PURE__ */
|
|
5393
|
+
/* @__PURE__ */ jsx18("span", { className: "vos-backlink-title", children: formatValue(r.Title) }),
|
|
5394
|
+
/* @__PURE__ */ jsxs18("span", { className: "vos-chip vos-pill vos-pill-neutral", children: [
|
|
5257
5395
|
readingBeliefs(r).length,
|
|
5258
5396
|
" belief",
|
|
5259
5397
|
readingBeliefs(r).length === 1 ? "" : "s"
|
|
@@ -5266,10 +5404,10 @@ function EvidenceTab({
|
|
|
5266
5404
|
}
|
|
5267
5405
|
|
|
5268
5406
|
// src/register-browser.tsx
|
|
5269
|
-
import { useMemo as useMemo8, useState as
|
|
5407
|
+
import { useMemo as useMemo8, useState as useState13 } from "react";
|
|
5270
5408
|
|
|
5271
5409
|
// src/register-table.tsx
|
|
5272
|
-
import { jsx as
|
|
5410
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5273
5411
|
function RegisterTable({
|
|
5274
5412
|
register,
|
|
5275
5413
|
records,
|
|
@@ -5279,10 +5417,10 @@ function RegisterTable({
|
|
|
5279
5417
|
}) {
|
|
5280
5418
|
const columns = columnsFor(register);
|
|
5281
5419
|
if (records.length === 0) {
|
|
5282
|
-
return /* @__PURE__ */
|
|
5420
|
+
return /* @__PURE__ */ jsx19("p", { className: "vos-empty", children: "No records yet." });
|
|
5283
5421
|
}
|
|
5284
|
-
return /* @__PURE__ */
|
|
5285
|
-
/* @__PURE__ */
|
|
5422
|
+
return /* @__PURE__ */ jsx19("div", { className: "vos-card vos-table-scroll", children: /* @__PURE__ */ jsxs19("table", { className: "vos-table", children: [
|
|
5423
|
+
/* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsx19("tr", { children: columns.map((c) => /* @__PURE__ */ jsx19(
|
|
5286
5424
|
"th",
|
|
5287
5425
|
{
|
|
5288
5426
|
scope: "col",
|
|
@@ -5291,9 +5429,9 @@ function RegisterTable({
|
|
|
5291
5429
|
},
|
|
5292
5430
|
c.key
|
|
5293
5431
|
)) }) }),
|
|
5294
|
-
/* @__PURE__ */
|
|
5432
|
+
/* @__PURE__ */ jsx19("tbody", { children: records.map((record) => {
|
|
5295
5433
|
const isSelected = record.id === selectedId;
|
|
5296
|
-
return /* @__PURE__ */
|
|
5434
|
+
return /* @__PURE__ */ jsx19(
|
|
5297
5435
|
"tr",
|
|
5298
5436
|
{
|
|
5299
5437
|
onClick: () => onRowClick?.(record.id),
|
|
@@ -5306,11 +5444,11 @@ function RegisterTable({
|
|
|
5306
5444
|
tabIndex: onRowClick ? 0 : void 0,
|
|
5307
5445
|
"aria-selected": isSelected,
|
|
5308
5446
|
className: isSelected ? "is-selected" : void 0,
|
|
5309
|
-
children: columns.map((c, i) => /* @__PURE__ */
|
|
5447
|
+
children: columns.map((c, i) => /* @__PURE__ */ jsx19(
|
|
5310
5448
|
"td",
|
|
5311
5449
|
{
|
|
5312
5450
|
className: c.align === "right" ? "vos-r" : void 0,
|
|
5313
|
-
children: /* @__PURE__ */
|
|
5451
|
+
children: /* @__PURE__ */ jsx19(
|
|
5314
5452
|
Cell,
|
|
5315
5453
|
{
|
|
5316
5454
|
column: c,
|
|
@@ -5336,27 +5474,27 @@ function Cell({
|
|
|
5336
5474
|
}) {
|
|
5337
5475
|
const raw = cellValue(column, record);
|
|
5338
5476
|
if (column.kind === "status") {
|
|
5339
|
-
return /* @__PURE__ */
|
|
5477
|
+
return /* @__PURE__ */ jsx19(StatusPill, { status: raw == null ? null : String(raw) });
|
|
5340
5478
|
}
|
|
5341
5479
|
if (column.kind === "risk") {
|
|
5342
|
-
return typeof raw === "number" ? /* @__PURE__ */
|
|
5480
|
+
return typeof raw === "number" ? /* @__PURE__ */ jsx19(RiskBar, { risk: raw }) : /* @__PURE__ */ jsx19("span", { className: "vos-muted", children: "\u2014" });
|
|
5343
5481
|
}
|
|
5344
5482
|
if (column.kind === "confidence") {
|
|
5345
|
-
return typeof raw === "number" ? /* @__PURE__ */
|
|
5483
|
+
return typeof raw === "number" ? /* @__PURE__ */ jsx19(ConfidenceCell, { confidence: raw }) : /* @__PURE__ */ jsx19("span", { className: "vos-muted", children: "\u2014" });
|
|
5346
5484
|
}
|
|
5347
5485
|
const text = headline && (raw === null || raw === void 0 || raw === "") ? primaryLabel(record) : formatValue(raw);
|
|
5348
5486
|
if (headline && chips && chips.length > 0) {
|
|
5349
|
-
return /* @__PURE__ */
|
|
5350
|
-
/* @__PURE__ */
|
|
5351
|
-
/* @__PURE__ */
|
|
5487
|
+
return /* @__PURE__ */ jsxs19("span", { className: "vos-ttl-wrap", children: [
|
|
5488
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-ttl", children: text }),
|
|
5489
|
+
/* @__PURE__ */ jsx19("span", { className: "vos-reading-chips", children: chips.map((chip, n) => /* @__PURE__ */ jsx19("span", { className: "vos-chip vos-pill vos-pill-neutral", children: chip }, n)) })
|
|
5352
5490
|
] });
|
|
5353
5491
|
}
|
|
5354
|
-
return /* @__PURE__ */
|
|
5492
|
+
return /* @__PURE__ */ jsx19("span", { className: headline ? "vos-ttl" : void 0, children: text });
|
|
5355
5493
|
}
|
|
5356
5494
|
|
|
5357
5495
|
// src/record-drawer.tsx
|
|
5358
|
-
import { useEffect as useEffect3, useState as
|
|
5359
|
-
import { Fragment as Fragment10, jsx as
|
|
5496
|
+
import { useEffect as useEffect3, useState as useState9 } from "react";
|
|
5497
|
+
import { Fragment as Fragment10, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5360
5498
|
var DERIVED_SUB = {
|
|
5361
5499
|
confidence: "Signed average of concluded readings",
|
|
5362
5500
|
risk: "Impact \xD7 (1 \u2212 Confidence\u207A/100)",
|
|
@@ -5379,10 +5517,10 @@ function RecordDrawer({
|
|
|
5379
5517
|
related,
|
|
5380
5518
|
children
|
|
5381
5519
|
}) {
|
|
5382
|
-
const [editing, setEditing] =
|
|
5383
|
-
const [draft, setDraft] =
|
|
5384
|
-
const [baseline, setBaseline] =
|
|
5385
|
-
const [why, setWhy] =
|
|
5520
|
+
const [editing, setEditing] = useState9(false);
|
|
5521
|
+
const [draft, setDraft] = useState9({});
|
|
5522
|
+
const [baseline, setBaseline] = useState9(null);
|
|
5523
|
+
const [why, setWhy] = useState9(false);
|
|
5386
5524
|
const { save, saving, conflict, error: saveError, reset } = useUpdate(
|
|
5387
5525
|
register,
|
|
5388
5526
|
basePath
|
|
@@ -5429,23 +5567,23 @@ function RecordDrawer({
|
|
|
5429
5567
|
const setField = (key, value) => setDraft((d) => ({ ...d, [key]: value }));
|
|
5430
5568
|
const errors = editing ? draftErrors(register, draft) : {};
|
|
5431
5569
|
const hasErrors = Object.keys(errors).length > 0;
|
|
5432
|
-
return /* @__PURE__ */
|
|
5570
|
+
return /* @__PURE__ */ jsxs20(
|
|
5433
5571
|
DrawerShell,
|
|
5434
5572
|
{
|
|
5435
5573
|
open,
|
|
5436
5574
|
onClose,
|
|
5437
5575
|
ariaLabel: `${REGISTER_LABEL[register]} record`,
|
|
5438
5576
|
children: [
|
|
5439
|
-
/* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
/* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5577
|
+
/* @__PURE__ */ jsxs20("header", { className: "vos-drawer-header", children: [
|
|
5578
|
+
/* @__PURE__ */ jsxs20("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5579
|
+
/* @__PURE__ */ jsx20("p", { className: "vos-drawer-eyebrow", children: REGISTER_LABEL[register] }),
|
|
5580
|
+
/* @__PURE__ */ jsx20("h2", { className: "vos-drawer-title", children: record ? primaryLabel(record) : loading ? "Loading\u2026" : "\u2014" })
|
|
5443
5581
|
] }),
|
|
5444
|
-
record ? /* @__PURE__ */
|
|
5582
|
+
record ? /* @__PURE__ */ jsxs20("span", { className: "vos-verbadge", children: [
|
|
5445
5583
|
"v",
|
|
5446
5584
|
formatValue(record.version)
|
|
5447
5585
|
] }) : null,
|
|
5448
|
-
record && !editing && onOpenFull ? /* @__PURE__ */
|
|
5586
|
+
record && !editing && onOpenFull ? /* @__PURE__ */ jsx20(
|
|
5449
5587
|
"button",
|
|
5450
5588
|
{
|
|
5451
5589
|
type: "button",
|
|
@@ -5454,7 +5592,7 @@ function RecordDrawer({
|
|
|
5454
5592
|
children: "Full page \u2197"
|
|
5455
5593
|
}
|
|
5456
5594
|
) : null,
|
|
5457
|
-
record && !editing ? /* @__PURE__ */
|
|
5595
|
+
record && !editing ? /* @__PURE__ */ jsx20(
|
|
5458
5596
|
"button",
|
|
5459
5597
|
{
|
|
5460
5598
|
type: "button",
|
|
@@ -5463,7 +5601,7 @@ function RecordDrawer({
|
|
|
5463
5601
|
children: "Edit"
|
|
5464
5602
|
}
|
|
5465
5603
|
) : null,
|
|
5466
|
-
/* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ jsx20(
|
|
5467
5605
|
"button",
|
|
5468
5606
|
{
|
|
5469
5607
|
type: "button",
|
|
@@ -5474,14 +5612,14 @@ function RecordDrawer({
|
|
|
5474
5612
|
}
|
|
5475
5613
|
)
|
|
5476
5614
|
] }),
|
|
5477
|
-
/* @__PURE__ */
|
|
5478
|
-
derived ? /* @__PURE__ */
|
|
5479
|
-
/* @__PURE__ */
|
|
5480
|
-
/* @__PURE__ */
|
|
5615
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-drawer-body", children: loading ? /* @__PURE__ */ jsx20("p", { className: "vos-muted", children: "Loading record\u2026" }) : error ? /* @__PURE__ */ jsx20("p", { className: "vos-error", children: error }) : !record ? /* @__PURE__ */ jsx20("p", { className: "vos-muted", children: "No record." }) : /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
5616
|
+
derived ? /* @__PURE__ */ jsxs20("div", { children: [
|
|
5617
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-derived", children: [
|
|
5618
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-derived-head", children: [
|
|
5481
5619
|
"Derived",
|
|
5482
|
-
/* @__PURE__ */
|
|
5620
|
+
/* @__PURE__ */ jsx20("span", { className: "vos-lock", children: "\u{1F512} computed on write \u2014 not editable" })
|
|
5483
5621
|
] }),
|
|
5484
|
-
/* @__PURE__ */
|
|
5622
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-dgrid", children: Object.entries(derived).map(([key, value]) => /* @__PURE__ */ jsx20(
|
|
5485
5623
|
DerivedCell,
|
|
5486
5624
|
{
|
|
5487
5625
|
field: key,
|
|
@@ -5493,11 +5631,11 @@ function RecordDrawer({
|
|
|
5493
5631
|
key
|
|
5494
5632
|
)) })
|
|
5495
5633
|
] }),
|
|
5496
|
-
"confidence" in derived && why ? /* @__PURE__ */
|
|
5634
|
+
"confidence" in derived && why ? /* @__PURE__ */ jsx20("div", { className: "vos-why-panel", children: /* @__PURE__ */ jsx20(UnderstandingPanel, { assumption: record, basePath }) }) : null
|
|
5497
5635
|
] }) : null,
|
|
5498
|
-
conflict ? /* @__PURE__ */
|
|
5499
|
-
saveError ? /* @__PURE__ */
|
|
5500
|
-
editing ? /* @__PURE__ */
|
|
5636
|
+
conflict ? /* @__PURE__ */ jsx20(ConflictBanner2, { message: conflict, onReload: reloadLatest }) : null,
|
|
5637
|
+
saveError ? /* @__PURE__ */ jsx20("p", { role: "alert", className: "vos-banner vos-banner-crit", children: saveError }) : null,
|
|
5638
|
+
editing ? /* @__PURE__ */ jsx20(
|
|
5501
5639
|
EditFields,
|
|
5502
5640
|
{
|
|
5503
5641
|
register,
|
|
@@ -5505,8 +5643,8 @@ function RecordDrawer({
|
|
|
5505
5643
|
errors,
|
|
5506
5644
|
onField: setField
|
|
5507
5645
|
}
|
|
5508
|
-
) : /* @__PURE__ */
|
|
5509
|
-
/* @__PURE__ */
|
|
5646
|
+
) : /* @__PURE__ */ jsxs20(Fragment10, { children: [
|
|
5647
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-detail-list", children: rows.map((row) => /* @__PURE__ */ jsx20(
|
|
5510
5648
|
DetailRowView,
|
|
5511
5649
|
{
|
|
5512
5650
|
row,
|
|
@@ -5514,9 +5652,9 @@ function RecordDrawer({
|
|
|
5514
5652
|
},
|
|
5515
5653
|
row.key
|
|
5516
5654
|
)) }),
|
|
5517
|
-
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */
|
|
5518
|
-
/* @__PURE__ */
|
|
5519
|
-
/* @__PURE__ */
|
|
5655
|
+
typeof record.body === "string" && record.body.trim() ? /* @__PURE__ */ jsxs20("section", { className: "vos-record-prose", children: [
|
|
5656
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-detail-k", children: register === "readings" ? "Quote" : "Narrative" }),
|
|
5657
|
+
/* @__PURE__ */ jsx20(
|
|
5520
5658
|
EvidenceBody,
|
|
5521
5659
|
{
|
|
5522
5660
|
text: record.body,
|
|
@@ -5524,9 +5662,9 @@ function RecordDrawer({
|
|
|
5524
5662
|
}
|
|
5525
5663
|
)
|
|
5526
5664
|
] }) : null,
|
|
5527
|
-
register === "readings" ? /* @__PURE__ */
|
|
5528
|
-
/* @__PURE__ */
|
|
5529
|
-
/* @__PURE__ */
|
|
5665
|
+
register === "readings" ? /* @__PURE__ */ jsxs20("section", { className: "vos-record-prose", children: [
|
|
5666
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-detail-k", children: "Per-belief verdicts" }),
|
|
5667
|
+
/* @__PURE__ */ jsx20(
|
|
5530
5668
|
BeliefVerdicts,
|
|
5531
5669
|
{
|
|
5532
5670
|
reading: record,
|
|
@@ -5538,8 +5676,8 @@ function RecordDrawer({
|
|
|
5538
5676
|
] })
|
|
5539
5677
|
] }) }),
|
|
5540
5678
|
record && !loading && !error && !editing ? children : null,
|
|
5541
|
-
record && editing ? /* @__PURE__ */
|
|
5542
|
-
/* @__PURE__ */
|
|
5679
|
+
record && editing ? /* @__PURE__ */ jsxs20("footer", { className: "vos-drawer-footer", children: [
|
|
5680
|
+
/* @__PURE__ */ jsx20(
|
|
5543
5681
|
"button",
|
|
5544
5682
|
{
|
|
5545
5683
|
type: "button",
|
|
@@ -5549,7 +5687,7 @@ function RecordDrawer({
|
|
|
5549
5687
|
children: "Cancel"
|
|
5550
5688
|
}
|
|
5551
5689
|
),
|
|
5552
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx20(
|
|
5553
5691
|
"button",
|
|
5554
5692
|
{
|
|
5555
5693
|
type: "button",
|
|
@@ -5560,7 +5698,7 @@ function RecordDrawer({
|
|
|
5560
5698
|
children: saving ? "Saving\u2026" : "Save"
|
|
5561
5699
|
}
|
|
5562
5700
|
)
|
|
5563
|
-
] }) : record ? /* @__PURE__ */
|
|
5701
|
+
] }) : record ? /* @__PURE__ */ jsxs20("footer", { className: "vos-drawer-footer", children: [
|
|
5564
5702
|
record.id,
|
|
5565
5703
|
" \xB7 updated ",
|
|
5566
5704
|
formatValue(record.updatedAt)
|
|
@@ -5573,11 +5711,11 @@ function DetailRowView({
|
|
|
5573
5711
|
row,
|
|
5574
5712
|
onOpenRecord
|
|
5575
5713
|
}) {
|
|
5576
|
-
return /* @__PURE__ */
|
|
5577
|
-
/* @__PURE__ */
|
|
5578
|
-
/* @__PURE__ */
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
b.assumption ? /* @__PURE__ */
|
|
5714
|
+
return /* @__PURE__ */ jsxs20("div", { className: "vos-detail-row", children: [
|
|
5715
|
+
/* @__PURE__ */ jsx20("span", { className: "vos-detail-k", children: row.label }),
|
|
5716
|
+
/* @__PURE__ */ jsx20("span", { className: "vos-detail-v", children: row.kind === "relation" ? row.items && row.items.length ? /* @__PURE__ */ jsx20(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__ */ jsx20("ul", { className: "vos-bars", children: row.bars.map((b, i) => /* @__PURE__ */ jsxs20("li", { className: "vos-bar-line", children: [
|
|
5717
|
+
/* @__PURE__ */ jsx20("span", { className: "vos-bar-if", children: b.rightIf || "\u2014" }),
|
|
5718
|
+
b.assumption ? /* @__PURE__ */ jsx20(
|
|
5581
5719
|
InlineLink,
|
|
5582
5720
|
{
|
|
5583
5721
|
id: b.assumption.id,
|
|
@@ -5585,7 +5723,7 @@ function DetailRowView({
|
|
|
5585
5723
|
onOpenRecord
|
|
5586
5724
|
}
|
|
5587
5725
|
) : null,
|
|
5588
|
-
/* @__PURE__ */
|
|
5726
|
+
/* @__PURE__ */ jsx20(
|
|
5589
5727
|
"span",
|
|
5590
5728
|
{
|
|
5591
5729
|
className: b.barVerdict ? "vos-pill vos-pill-good" : "vos-pill vos-pill-neutral",
|
|
@@ -5599,9 +5737,9 @@ function RelationLinks({
|
|
|
5599
5737
|
items,
|
|
5600
5738
|
onOpenRecord
|
|
5601
5739
|
}) {
|
|
5602
|
-
return /* @__PURE__ */
|
|
5740
|
+
return /* @__PURE__ */ jsx20("span", { className: "vos-detail-links", children: items.map((item, i) => /* @__PURE__ */ jsxs20("span", { children: [
|
|
5603
5741
|
i > 0 ? ", " : null,
|
|
5604
|
-
/* @__PURE__ */
|
|
5742
|
+
/* @__PURE__ */ jsx20(InlineLink, { id: item.id, title: item.title, onOpenRecord })
|
|
5605
5743
|
] }, item.id)) });
|
|
5606
5744
|
}
|
|
5607
5745
|
function InlineLink({
|
|
@@ -5609,7 +5747,7 @@ function InlineLink({
|
|
|
5609
5747
|
title,
|
|
5610
5748
|
onOpenRecord
|
|
5611
5749
|
}) {
|
|
5612
|
-
return onOpenRecord ? /* @__PURE__ */
|
|
5750
|
+
return onOpenRecord ? /* @__PURE__ */ jsx20(
|
|
5613
5751
|
"button",
|
|
5614
5752
|
{
|
|
5615
5753
|
type: "button",
|
|
@@ -5617,7 +5755,7 @@ function InlineLink({
|
|
|
5617
5755
|
onClick: () => onOpenRecord(id),
|
|
5618
5756
|
children: title
|
|
5619
5757
|
}
|
|
5620
|
-
) : /* @__PURE__ */
|
|
5758
|
+
) : /* @__PURE__ */ jsx20("span", { children: title });
|
|
5621
5759
|
}
|
|
5622
5760
|
function DerivedCell({
|
|
5623
5761
|
field,
|
|
@@ -5633,10 +5771,10 @@ function DerivedCell({
|
|
|
5633
5771
|
toneClass = heroToneClass(derivedTone(field, num3));
|
|
5634
5772
|
display = field === "confidence" ? formatSigned(num3) : String(Math.round(num3));
|
|
5635
5773
|
}
|
|
5636
|
-
return /* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5774
|
+
return /* @__PURE__ */ jsxs20("div", { className: "vos-dcell", children: [
|
|
5775
|
+
/* @__PURE__ */ jsxs20("div", { className: "vos-dcell-k", children: [
|
|
5638
5776
|
derivedLabel(field),
|
|
5639
|
-
showWhy ? /* @__PURE__ */
|
|
5777
|
+
showWhy ? /* @__PURE__ */ jsxs20(
|
|
5640
5778
|
"button",
|
|
5641
5779
|
{
|
|
5642
5780
|
type: "button",
|
|
@@ -5650,22 +5788,22 @@ function DerivedCell({
|
|
|
5650
5788
|
}
|
|
5651
5789
|
) : null
|
|
5652
5790
|
] }),
|
|
5653
|
-
/* @__PURE__ */
|
|
5654
|
-
DERIVED_SUB[field] ? /* @__PURE__ */
|
|
5791
|
+
/* @__PURE__ */ jsx20("div", { className: `vos-dcell-v ${toneClass}`, children: display }),
|
|
5792
|
+
DERIVED_SUB[field] ? /* @__PURE__ */ jsx20("div", { className: "vos-dcell-sub", children: DERIVED_SUB[field] }) : null
|
|
5655
5793
|
] });
|
|
5656
5794
|
}
|
|
5657
5795
|
function ConflictBanner2({
|
|
5658
5796
|
message,
|
|
5659
5797
|
onReload
|
|
5660
5798
|
}) {
|
|
5661
|
-
return /* @__PURE__ */
|
|
5662
|
-
/* @__PURE__ */
|
|
5663
|
-
/* @__PURE__ */
|
|
5799
|
+
return /* @__PURE__ */ jsxs20("div", { role: "alert", className: "vos-banner vos-banner-warn", children: [
|
|
5800
|
+
/* @__PURE__ */ jsx20("div", { className: "vos-banner-body", children: /* @__PURE__ */ jsx20("span", { children: message }) }),
|
|
5801
|
+
/* @__PURE__ */ jsx20("button", { type: "button", onClick: onReload, children: "Review the latest" })
|
|
5664
5802
|
] });
|
|
5665
5803
|
}
|
|
5666
5804
|
|
|
5667
5805
|
// src/record-form.tsx
|
|
5668
|
-
import { useMemo as useMemo6, useState as
|
|
5806
|
+
import { useMemo as useMemo6, useState as useState10 } from "react";
|
|
5669
5807
|
|
|
5670
5808
|
// src/form-fields.ts
|
|
5671
5809
|
var ASSUMPTION_STATUS = ["Draft", "Live", "Invalidated"];
|
|
@@ -5767,7 +5905,7 @@ function toCreatePayload(register, draft) {
|
|
|
5767
5905
|
}
|
|
5768
5906
|
|
|
5769
5907
|
// src/record-form.tsx
|
|
5770
|
-
import { jsx as
|
|
5908
|
+
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5771
5909
|
function RecordForm({
|
|
5772
5910
|
register,
|
|
5773
5911
|
basePath,
|
|
@@ -5775,7 +5913,7 @@ function RecordForm({
|
|
|
5775
5913
|
onCancel
|
|
5776
5914
|
}) {
|
|
5777
5915
|
const fields = useMemo6(() => formFieldsFor(register), [register]);
|
|
5778
|
-
const [draft, setDraft] =
|
|
5916
|
+
const [draft, setDraft] = useState10(
|
|
5779
5917
|
() => emptyDraft(register)
|
|
5780
5918
|
);
|
|
5781
5919
|
const { create, saving, error } = useCreate(register, basePath);
|
|
@@ -5790,9 +5928,9 @@ function RecordForm({
|
|
|
5790
5928
|
} catch {
|
|
5791
5929
|
}
|
|
5792
5930
|
};
|
|
5793
|
-
return /* @__PURE__ */
|
|
5794
|
-
/* @__PURE__ */
|
|
5795
|
-
fields.map((field) => /* @__PURE__ */
|
|
5931
|
+
return /* @__PURE__ */ jsxs21("form", { onSubmit, className: "vos-form", children: [
|
|
5932
|
+
/* @__PURE__ */ jsxs21("div", { className: "vos-form-body", children: [
|
|
5933
|
+
fields.map((field) => /* @__PURE__ */ jsx21(
|
|
5796
5934
|
Field,
|
|
5797
5935
|
{
|
|
5798
5936
|
field,
|
|
@@ -5801,11 +5939,11 @@ function RecordForm({
|
|
|
5801
5939
|
},
|
|
5802
5940
|
field.key
|
|
5803
5941
|
)),
|
|
5804
|
-
error ? /* @__PURE__ */
|
|
5942
|
+
error ? /* @__PURE__ */ jsx21("p", { className: "vos-error", children: error }) : null
|
|
5805
5943
|
] }),
|
|
5806
|
-
/* @__PURE__ */
|
|
5807
|
-
/* @__PURE__ */
|
|
5808
|
-
/* @__PURE__ */
|
|
5944
|
+
/* @__PURE__ */ jsxs21("footer", { className: "vos-drawer-footer", children: [
|
|
5945
|
+
/* @__PURE__ */ jsx21("button", { type: "button", onClick: onCancel, className: "vos-btn vos-btn-ghost vos-btn-sm", children: "Cancel" }),
|
|
5946
|
+
/* @__PURE__ */ jsx21(
|
|
5809
5947
|
"button",
|
|
5810
5948
|
{
|
|
5811
5949
|
type: "submit",
|
|
@@ -5824,12 +5962,12 @@ function Field({
|
|
|
5824
5962
|
onChange
|
|
5825
5963
|
}) {
|
|
5826
5964
|
const id = `field-${field.key}`;
|
|
5827
|
-
return /* @__PURE__ */
|
|
5828
|
-
/* @__PURE__ */
|
|
5965
|
+
return /* @__PURE__ */ jsxs21("div", { className: "vos-field", children: [
|
|
5966
|
+
/* @__PURE__ */ jsxs21("label", { htmlFor: id, className: FIELD_LABEL_CLASS, children: [
|
|
5829
5967
|
field.label,
|
|
5830
|
-
field.required ? /* @__PURE__ */
|
|
5968
|
+
field.required ? /* @__PURE__ */ jsx21("span", { className: "vos-req", children: " *" }) : null
|
|
5831
5969
|
] }),
|
|
5832
|
-
field.kind === "textarea" ? /* @__PURE__ */
|
|
5970
|
+
field.kind === "textarea" ? /* @__PURE__ */ jsx21(
|
|
5833
5971
|
"textarea",
|
|
5834
5972
|
{
|
|
5835
5973
|
id,
|
|
@@ -5839,7 +5977,7 @@ function Field({
|
|
|
5839
5977
|
onChange: (e) => onChange(e.target.value),
|
|
5840
5978
|
className: FIELD_CONTROL_CLASS
|
|
5841
5979
|
}
|
|
5842
|
-
) : field.kind === "select" ? /* @__PURE__ */
|
|
5980
|
+
) : field.kind === "select" ? /* @__PURE__ */ jsxs21(
|
|
5843
5981
|
"select",
|
|
5844
5982
|
{
|
|
5845
5983
|
id,
|
|
@@ -5847,11 +5985,11 @@ function Field({
|
|
|
5847
5985
|
onChange: (e) => onChange(e.target.value),
|
|
5848
5986
|
className: FIELD_CONTROL_CLASS,
|
|
5849
5987
|
children: [
|
|
5850
|
-
/* @__PURE__ */
|
|
5851
|
-
field.options?.map((opt) => /* @__PURE__ */
|
|
5988
|
+
/* @__PURE__ */ jsx21("option", { value: "", children: "\u2014" }),
|
|
5989
|
+
field.options?.map((opt) => /* @__PURE__ */ jsx21("option", { value: opt, children: opt }, opt))
|
|
5852
5990
|
]
|
|
5853
5991
|
}
|
|
5854
|
-
) : /* @__PURE__ */
|
|
5992
|
+
) : /* @__PURE__ */ jsx21(
|
|
5855
5993
|
"input",
|
|
5856
5994
|
{
|
|
5857
5995
|
id,
|
|
@@ -5866,7 +6004,7 @@ function Field({
|
|
|
5866
6004
|
}
|
|
5867
6005
|
|
|
5868
6006
|
// src/relation-editor.tsx
|
|
5869
|
-
import { useMemo as useMemo7, useState as
|
|
6007
|
+
import { useMemo as useMemo7, useState as useState11 } from "react";
|
|
5870
6008
|
|
|
5871
6009
|
// src/link-choices.ts
|
|
5872
6010
|
import { RELATIONS } from "@validation-os/core";
|
|
@@ -5887,7 +6025,7 @@ function linkChoicesFrom(register) {
|
|
|
5887
6025
|
}
|
|
5888
6026
|
|
|
5889
6027
|
// src/relation-editor.tsx
|
|
5890
|
-
import { jsx as
|
|
6028
|
+
import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5891
6029
|
function RelationEditor({
|
|
5892
6030
|
register,
|
|
5893
6031
|
recordId,
|
|
@@ -5895,8 +6033,8 @@ function RelationEditor({
|
|
|
5895
6033
|
onLinked
|
|
5896
6034
|
}) {
|
|
5897
6035
|
const choices = useMemo7(() => linkChoicesFrom(register), [register]);
|
|
5898
|
-
const [relation, setRelation] =
|
|
5899
|
-
const [targetId, setTargetId] =
|
|
6036
|
+
const [relation, setRelation] = useState11("");
|
|
6037
|
+
const [targetId, setTargetId] = useState11("");
|
|
5900
6038
|
const { link, linking, error } = useLink(basePath);
|
|
5901
6039
|
const active = choices.find((c) => c.relation === relation) ?? null;
|
|
5902
6040
|
const { records } = useList(
|
|
@@ -5921,10 +6059,10 @@ function RelationEditor({
|
|
|
5921
6059
|
} catch {
|
|
5922
6060
|
}
|
|
5923
6061
|
};
|
|
5924
|
-
return /* @__PURE__ */
|
|
5925
|
-
/* @__PURE__ */
|
|
5926
|
-
/* @__PURE__ */
|
|
5927
|
-
/* @__PURE__ */
|
|
6062
|
+
return /* @__PURE__ */ jsxs22("section", { className: "vos-relation", children: [
|
|
6063
|
+
/* @__PURE__ */ jsx22("h3", { className: "vos-sectitle", children: "Link a record" }),
|
|
6064
|
+
/* @__PURE__ */ jsxs22("div", { className: "vos-field-stack", children: [
|
|
6065
|
+
/* @__PURE__ */ jsxs22(
|
|
5928
6066
|
"select",
|
|
5929
6067
|
{
|
|
5930
6068
|
"aria-label": "Relation",
|
|
@@ -5935,12 +6073,12 @@ function RelationEditor({
|
|
|
5935
6073
|
},
|
|
5936
6074
|
className: FIELD_CONTROL_CLASS,
|
|
5937
6075
|
children: [
|
|
5938
|
-
/* @__PURE__ */
|
|
5939
|
-
choices.map((c) => /* @__PURE__ */
|
|
6076
|
+
/* @__PURE__ */ jsx22("option", { value: "", children: "Choose a relation\u2026" }),
|
|
6077
|
+
choices.map((c) => /* @__PURE__ */ jsx22("option", { value: c.relation, children: c.label }, c.relation))
|
|
5940
6078
|
]
|
|
5941
6079
|
}
|
|
5942
6080
|
),
|
|
5943
|
-
active ? /* @__PURE__ */
|
|
6081
|
+
active ? /* @__PURE__ */ jsxs22(
|
|
5944
6082
|
"select",
|
|
5945
6083
|
{
|
|
5946
6084
|
"aria-label": "Target record",
|
|
@@ -5948,13 +6086,13 @@ function RelationEditor({
|
|
|
5948
6086
|
onChange: (e) => setTargetId(e.target.value),
|
|
5949
6087
|
className: FIELD_CONTROL_CLASS,
|
|
5950
6088
|
children: [
|
|
5951
|
-
/* @__PURE__ */
|
|
5952
|
-
targets.map((r) => /* @__PURE__ */
|
|
6089
|
+
/* @__PURE__ */ jsx22("option", { value: "", children: "Choose a record\u2026" }),
|
|
6090
|
+
targets.map((r) => /* @__PURE__ */ jsx22("option", { value: r.id, children: primaryLabel(r) }, r.id))
|
|
5953
6091
|
]
|
|
5954
6092
|
}
|
|
5955
6093
|
) : null,
|
|
5956
|
-
error ? /* @__PURE__ */
|
|
5957
|
-
/* @__PURE__ */
|
|
6094
|
+
error ? /* @__PURE__ */ jsx22("p", { className: "vos-error", children: error }) : null,
|
|
6095
|
+
/* @__PURE__ */ jsx22(
|
|
5958
6096
|
"button",
|
|
5959
6097
|
{
|
|
5960
6098
|
type: "button",
|
|
@@ -5970,7 +6108,7 @@ function RelationEditor({
|
|
|
5970
6108
|
}
|
|
5971
6109
|
|
|
5972
6110
|
// src/use-saved-views.ts
|
|
5973
|
-
import { useCallback as useCallback3, useEffect as useEffect4, useState as
|
|
6111
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState as useState12 } from "react";
|
|
5974
6112
|
var storageKey = (register) => `vos:saved-views:${register}`;
|
|
5975
6113
|
function read(register) {
|
|
5976
6114
|
if (typeof window === "undefined") return [];
|
|
@@ -5990,7 +6128,7 @@ function write(register, views) {
|
|
|
5990
6128
|
}
|
|
5991
6129
|
}
|
|
5992
6130
|
function useSavedViews(register) {
|
|
5993
|
-
const [views, setViews] =
|
|
6131
|
+
const [views, setViews] = useState12(() => read(register));
|
|
5994
6132
|
useEffect4(() => setViews(read(register)), [register]);
|
|
5995
6133
|
const save = useCallback3(
|
|
5996
6134
|
(name, descriptor) => {
|
|
@@ -6021,7 +6159,7 @@ function useSavedViews(register) {
|
|
|
6021
6159
|
}
|
|
6022
6160
|
|
|
6023
6161
|
// src/register-browser.tsx
|
|
6024
|
-
import { jsx as
|
|
6162
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6025
6163
|
function contextNeeds(register) {
|
|
6026
6164
|
return {
|
|
6027
6165
|
experiments: register === "assumptions" || register === "readings",
|
|
@@ -6045,17 +6183,17 @@ function RegisterBrowser({
|
|
|
6045
6183
|
const experiments = useList("experiments", basePath, needs.experiments);
|
|
6046
6184
|
const readings = useList("readings", basePath, needs.readings);
|
|
6047
6185
|
const assumptions = useList("assumptions", basePath, needs.assumptions);
|
|
6048
|
-
const [descriptor, setDescriptor] =
|
|
6186
|
+
const [descriptor, setDescriptor] = useState13({});
|
|
6049
6187
|
const savedViews = useSavedViews(register);
|
|
6050
|
-
const [openId, setOpenId] =
|
|
6051
|
-
const [creating, setCreating] =
|
|
6188
|
+
const [openId, setOpenId] = useState13(null);
|
|
6189
|
+
const [creating, setCreating] = useState13(false);
|
|
6052
6190
|
const {
|
|
6053
6191
|
record,
|
|
6054
6192
|
loading: recordLoading,
|
|
6055
6193
|
error: recordError,
|
|
6056
6194
|
refresh: refreshRecord
|
|
6057
6195
|
} = useRecord(register, openId, basePath);
|
|
6058
|
-
const [asOf] =
|
|
6196
|
+
const [asOf] = useState13(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
6059
6197
|
const rows = records ?? [];
|
|
6060
6198
|
const prefiltered = useMemo8(() => {
|
|
6061
6199
|
return rows.filter((r) => {
|
|
@@ -6108,14 +6246,14 @@ function RegisterBrowser({
|
|
|
6108
6246
|
void _name;
|
|
6109
6247
|
setDescriptor(rest);
|
|
6110
6248
|
};
|
|
6111
|
-
return /* @__PURE__ */
|
|
6112
|
-
/* @__PURE__ */
|
|
6113
|
-
/* @__PURE__ */
|
|
6114
|
-
/* @__PURE__ */
|
|
6115
|
-
subtitle ? /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsxs23("div", { children: [
|
|
6250
|
+
/* @__PURE__ */ jsxs23("div", { className: "vos-head", children: [
|
|
6251
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
6252
|
+
/* @__PURE__ */ jsx23("h1", { children: REGISTER_LABEL[register] }),
|
|
6253
|
+
subtitle ? /* @__PURE__ */ jsx23("p", { children: subtitle }) : null
|
|
6116
6254
|
] }),
|
|
6117
|
-
/* @__PURE__ */
|
|
6118
|
-
/* @__PURE__ */
|
|
6255
|
+
/* @__PURE__ */ jsx23("div", { className: "vos-spacer" }),
|
|
6256
|
+
/* @__PURE__ */ jsx23(
|
|
6119
6257
|
"button",
|
|
6120
6258
|
{
|
|
6121
6259
|
type: "button",
|
|
@@ -6124,7 +6262,7 @@ function RegisterBrowser({
|
|
|
6124
6262
|
children: "\u21BB Refresh"
|
|
6125
6263
|
}
|
|
6126
6264
|
),
|
|
6127
|
-
/* @__PURE__ */
|
|
6265
|
+
/* @__PURE__ */ jsxs23(
|
|
6128
6266
|
"button",
|
|
6129
6267
|
{
|
|
6130
6268
|
type: "button",
|
|
@@ -6137,10 +6275,10 @@ function RegisterBrowser({
|
|
|
6137
6275
|
}
|
|
6138
6276
|
)
|
|
6139
6277
|
] }),
|
|
6140
|
-
/* @__PURE__ */
|
|
6278
|
+
/* @__PURE__ */ jsx23("div", { className: "vos-tabs", role: "tablist", "aria-label": "Views", children: shaped.tabs.map((tab) => {
|
|
6141
6279
|
const active = tab.id === shaped.activeTabId;
|
|
6142
6280
|
const badge = badgeFor(tab);
|
|
6143
|
-
return /* @__PURE__ */
|
|
6281
|
+
return /* @__PURE__ */ jsxs23(
|
|
6144
6282
|
"button",
|
|
6145
6283
|
{
|
|
6146
6284
|
type: "button",
|
|
@@ -6150,13 +6288,13 @@ function RegisterBrowser({
|
|
|
6150
6288
|
onClick: () => patch({ tabId: tab.id }),
|
|
6151
6289
|
children: [
|
|
6152
6290
|
tab.label,
|
|
6153
|
-
badge !== null ? /* @__PURE__ */
|
|
6291
|
+
badge !== null ? /* @__PURE__ */ jsx23("span", { className: "vos-tab-badge", children: badge }) : null
|
|
6154
6292
|
]
|
|
6155
6293
|
},
|
|
6156
6294
|
tab.id
|
|
6157
6295
|
);
|
|
6158
6296
|
}) }),
|
|
6159
|
-
/* @__PURE__ */
|
|
6297
|
+
/* @__PURE__ */ jsx23(
|
|
6160
6298
|
ViewControls,
|
|
6161
6299
|
{
|
|
6162
6300
|
register,
|
|
@@ -6167,10 +6305,10 @@ function RegisterBrowser({
|
|
|
6167
6305
|
onQuery: (query) => patch({ query })
|
|
6168
6306
|
}
|
|
6169
6307
|
),
|
|
6170
|
-
/* @__PURE__ */
|
|
6171
|
-
/* @__PURE__ */
|
|
6172
|
-
savedViews.views.length === 0 ? /* @__PURE__ */
|
|
6173
|
-
/* @__PURE__ */
|
|
6308
|
+
/* @__PURE__ */ jsxs23("div", { className: "vos-saved-views", children: [
|
|
6309
|
+
/* @__PURE__ */ jsx23("span", { className: "vos-saved-label", children: "Saved views" }),
|
|
6310
|
+
savedViews.views.length === 0 ? /* @__PURE__ */ jsx23("span", { className: "vos-hint", children: "none yet" }) : savedViews.views.map((v) => /* @__PURE__ */ jsxs23("span", { className: "vos-saved-view", children: [
|
|
6311
|
+
/* @__PURE__ */ jsx23(
|
|
6174
6312
|
"button",
|
|
6175
6313
|
{
|
|
6176
6314
|
type: "button",
|
|
@@ -6179,7 +6317,7 @@ function RegisterBrowser({
|
|
|
6179
6317
|
children: v.name
|
|
6180
6318
|
}
|
|
6181
6319
|
),
|
|
6182
|
-
/* @__PURE__ */
|
|
6320
|
+
/* @__PURE__ */ jsx23(
|
|
6183
6321
|
"button",
|
|
6184
6322
|
{
|
|
6185
6323
|
type: "button",
|
|
@@ -6190,7 +6328,7 @@ function RegisterBrowser({
|
|
|
6190
6328
|
}
|
|
6191
6329
|
)
|
|
6192
6330
|
] }, v.name)),
|
|
6193
|
-
/* @__PURE__ */
|
|
6331
|
+
/* @__PURE__ */ jsx23(
|
|
6194
6332
|
"button",
|
|
6195
6333
|
{
|
|
6196
6334
|
type: "button",
|
|
@@ -6200,11 +6338,11 @@ function RegisterBrowser({
|
|
|
6200
6338
|
}
|
|
6201
6339
|
)
|
|
6202
6340
|
] }),
|
|
6203
|
-
loading && !records ? /* @__PURE__ */
|
|
6341
|
+
loading && !records ? /* @__PURE__ */ jsxs23("p", { className: "vos-muted", children: [
|
|
6204
6342
|
"Loading ",
|
|
6205
6343
|
REGISTER_LABEL[register].toLowerCase(),
|
|
6206
6344
|
"\u2026"
|
|
6207
|
-
] }) : error ? /* @__PURE__ */
|
|
6345
|
+
] }) : error ? /* @__PURE__ */ jsx23("p", { className: "vos-error", children: error }) : /* @__PURE__ */ jsx23(
|
|
6208
6346
|
ShapedBody,
|
|
6209
6347
|
{
|
|
6210
6348
|
register,
|
|
@@ -6214,7 +6352,7 @@ function RegisterBrowser({
|
|
|
6214
6352
|
assumptionTitles
|
|
6215
6353
|
}
|
|
6216
6354
|
),
|
|
6217
|
-
/* @__PURE__ */
|
|
6355
|
+
/* @__PURE__ */ jsx23(
|
|
6218
6356
|
RecordDrawer,
|
|
6219
6357
|
{
|
|
6220
6358
|
register,
|
|
@@ -6231,7 +6369,7 @@ function RegisterBrowser({
|
|
|
6231
6369
|
refreshRecord();
|
|
6232
6370
|
refreshList();
|
|
6233
6371
|
},
|
|
6234
|
-
children: openId ? /* @__PURE__ */
|
|
6372
|
+
children: openId ? /* @__PURE__ */ jsx23(
|
|
6235
6373
|
RelationEditor,
|
|
6236
6374
|
{
|
|
6237
6375
|
register,
|
|
@@ -6245,18 +6383,18 @@ function RegisterBrowser({
|
|
|
6245
6383
|
) : null
|
|
6246
6384
|
}
|
|
6247
6385
|
),
|
|
6248
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsxs23(
|
|
6249
6387
|
DrawerShell,
|
|
6250
6388
|
{
|
|
6251
6389
|
open: creating,
|
|
6252
6390
|
onClose: () => setCreating(false),
|
|
6253
6391
|
ariaLabel: `New ${REGISTER_SINGULAR[register]} record`,
|
|
6254
6392
|
children: [
|
|
6255
|
-
/* @__PURE__ */
|
|
6256
|
-
/* @__PURE__ */
|
|
6257
|
-
/* @__PURE__ */
|
|
6393
|
+
/* @__PURE__ */ jsx23("header", { className: "vos-drawer-header", children: /* @__PURE__ */ jsxs23("div", { children: [
|
|
6394
|
+
/* @__PURE__ */ jsx23("p", { className: "vos-drawer-eyebrow", children: "New" }),
|
|
6395
|
+
/* @__PURE__ */ jsx23("h2", { className: "vos-drawer-title", children: REGISTER_SINGULAR[register] })
|
|
6258
6396
|
] }) }),
|
|
6259
|
-
/* @__PURE__ */
|
|
6397
|
+
/* @__PURE__ */ jsx23(
|
|
6260
6398
|
RecordForm,
|
|
6261
6399
|
{
|
|
6262
6400
|
register,
|
|
@@ -6284,8 +6422,8 @@ function ViewControls({
|
|
|
6284
6422
|
}) {
|
|
6285
6423
|
const sortable = columnsFor(register);
|
|
6286
6424
|
const sort = descriptor.sort ?? null;
|
|
6287
|
-
return /* @__PURE__ */
|
|
6288
|
-
/* @__PURE__ */
|
|
6425
|
+
return /* @__PURE__ */ jsxs23("div", { className: "vos-view-controls", children: [
|
|
6426
|
+
/* @__PURE__ */ jsx23(
|
|
6289
6427
|
"input",
|
|
6290
6428
|
{
|
|
6291
6429
|
type: "search",
|
|
@@ -6296,24 +6434,24 @@ function ViewControls({
|
|
|
6296
6434
|
"aria-label": "Filter records"
|
|
6297
6435
|
}
|
|
6298
6436
|
),
|
|
6299
|
-
axes.length ? /* @__PURE__ */
|
|
6300
|
-
/* @__PURE__ */
|
|
6301
|
-
/* @__PURE__ */
|
|
6437
|
+
axes.length ? /* @__PURE__ */ jsxs23("label", { className: "vos-control", children: [
|
|
6438
|
+
/* @__PURE__ */ jsx23("span", { children: "Group" }),
|
|
6439
|
+
/* @__PURE__ */ jsxs23(
|
|
6302
6440
|
"select",
|
|
6303
6441
|
{
|
|
6304
6442
|
className: "vos-input",
|
|
6305
6443
|
value: descriptor.groupBy ?? "",
|
|
6306
6444
|
onChange: (e) => onGroupBy(e.target.value || null),
|
|
6307
6445
|
children: [
|
|
6308
|
-
/* @__PURE__ */
|
|
6309
|
-
axes.map((axis) => /* @__PURE__ */
|
|
6446
|
+
/* @__PURE__ */ jsx23("option", { value: "", children: "None" }),
|
|
6447
|
+
axes.map((axis) => /* @__PURE__ */ jsx23("option", { value: axis, children: axis }, axis))
|
|
6310
6448
|
]
|
|
6311
6449
|
}
|
|
6312
6450
|
)
|
|
6313
6451
|
] }) : null,
|
|
6314
|
-
/* @__PURE__ */
|
|
6315
|
-
/* @__PURE__ */
|
|
6316
|
-
/* @__PURE__ */
|
|
6452
|
+
/* @__PURE__ */ jsxs23("label", { className: "vos-control", children: [
|
|
6453
|
+
/* @__PURE__ */ jsx23("span", { children: "Sort" }),
|
|
6454
|
+
/* @__PURE__ */ jsxs23(
|
|
6317
6455
|
"select",
|
|
6318
6456
|
{
|
|
6319
6457
|
className: "vos-input",
|
|
@@ -6322,13 +6460,13 @@ function ViewControls({
|
|
|
6322
6460
|
e.target.value ? { key: e.target.value, dir: sort?.dir ?? "desc" } : null
|
|
6323
6461
|
),
|
|
6324
6462
|
children: [
|
|
6325
|
-
/* @__PURE__ */
|
|
6326
|
-
sortable.map((c) => /* @__PURE__ */
|
|
6463
|
+
/* @__PURE__ */ jsx23("option", { value: "", children: "Default" }),
|
|
6464
|
+
sortable.map((c) => /* @__PURE__ */ jsx23("option", { value: c.key, children: c.header }, c.key))
|
|
6327
6465
|
]
|
|
6328
6466
|
}
|
|
6329
6467
|
)
|
|
6330
6468
|
] }),
|
|
6331
|
-
sort ? /* @__PURE__ */
|
|
6469
|
+
sort ? /* @__PURE__ */ jsx23(
|
|
6332
6470
|
"button",
|
|
6333
6471
|
{
|
|
6334
6472
|
type: "button",
|
|
@@ -6349,13 +6487,13 @@ function ShapedBody({
|
|
|
6349
6487
|
}) {
|
|
6350
6488
|
if (shaped.nested) {
|
|
6351
6489
|
if (shaped.nested.length === 0)
|
|
6352
|
-
return /* @__PURE__ */
|
|
6353
|
-
return /* @__PURE__ */
|
|
6354
|
-
/* @__PURE__ */
|
|
6490
|
+
return /* @__PURE__ */ jsx23("p", { className: "vos-empty", children: "No readings in this view." });
|
|
6491
|
+
return /* @__PURE__ */ jsx23("div", { className: "vos-groups", children: shaped.nested.map((group) => /* @__PURE__ */ jsxs23("section", { className: "vos-group", children: [
|
|
6492
|
+
/* @__PURE__ */ jsxs23("h3", { className: "vos-group-head", children: [
|
|
6355
6493
|
group.label,
|
|
6356
|
-
/* @__PURE__ */
|
|
6494
|
+
/* @__PURE__ */ jsx23("span", { className: "vos-group-n", children: group.readings.length })
|
|
6357
6495
|
] }),
|
|
6358
|
-
/* @__PURE__ */
|
|
6496
|
+
/* @__PURE__ */ jsx23(
|
|
6359
6497
|
RegisterTable,
|
|
6360
6498
|
{
|
|
6361
6499
|
register,
|
|
@@ -6369,13 +6507,13 @@ function ShapedBody({
|
|
|
6369
6507
|
}
|
|
6370
6508
|
if (shaped.groups) {
|
|
6371
6509
|
if (shaped.groups.length === 0)
|
|
6372
|
-
return /* @__PURE__ */
|
|
6373
|
-
return /* @__PURE__ */
|
|
6374
|
-
/* @__PURE__ */
|
|
6510
|
+
return /* @__PURE__ */ jsx23("p", { className: "vos-empty", children: "No records in this view." });
|
|
6511
|
+
return /* @__PURE__ */ jsx23("div", { className: "vos-groups", children: shaped.groups.map((group) => /* @__PURE__ */ jsxs23("section", { className: "vos-group", children: [
|
|
6512
|
+
/* @__PURE__ */ jsxs23("h3", { className: "vos-group-head", children: [
|
|
6375
6513
|
group.label,
|
|
6376
|
-
/* @__PURE__ */
|
|
6514
|
+
/* @__PURE__ */ jsx23("span", { className: "vos-group-n", children: group.records.length })
|
|
6377
6515
|
] }),
|
|
6378
|
-
/* @__PURE__ */
|
|
6516
|
+
/* @__PURE__ */ jsx23(
|
|
6379
6517
|
RegisterTable,
|
|
6380
6518
|
{
|
|
6381
6519
|
register,
|
|
@@ -6387,7 +6525,7 @@ function ShapedBody({
|
|
|
6387
6525
|
)
|
|
6388
6526
|
] }, group.key)) });
|
|
6389
6527
|
}
|
|
6390
|
-
return /* @__PURE__ */
|
|
6528
|
+
return /* @__PURE__ */ jsx23(
|
|
6391
6529
|
RegisterTable,
|
|
6392
6530
|
{
|
|
6393
6531
|
register,
|
|
@@ -6476,7 +6614,7 @@ function formatRoute(route) {
|
|
|
6476
6614
|
}
|
|
6477
6615
|
|
|
6478
6616
|
// src/sidebar-nav.tsx
|
|
6479
|
-
import { jsx as
|
|
6617
|
+
import { jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6480
6618
|
function SidebarNav({
|
|
6481
6619
|
route,
|
|
6482
6620
|
onNavigate,
|
|
@@ -6504,13 +6642,13 @@ function SidebarNav({
|
|
|
6504
6642
|
}
|
|
6505
6643
|
}
|
|
6506
6644
|
const active = activeNav();
|
|
6507
|
-
return /* @__PURE__ */
|
|
6508
|
-
/* @__PURE__ */
|
|
6509
|
-
/* @__PURE__ */
|
|
6645
|
+
return /* @__PURE__ */ jsxs24("nav", { className: "vos-nav", "aria-label": "Navigation", children: [
|
|
6646
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
6647
|
+
/* @__PURE__ */ jsx24("div", { className: "vos-nav-group", children: "Workflow" }),
|
|
6510
6648
|
WORKFLOW_NAV.map((item) => {
|
|
6511
6649
|
const isActive = active === item.route;
|
|
6512
6650
|
const count = counts?.[item.route] ?? (item.route === "assumptions" ? counts?.assumptions : item.route === "experiments" ? counts?.experiments : counts?.readings);
|
|
6513
|
-
return /* @__PURE__ */
|
|
6651
|
+
return /* @__PURE__ */ jsxs24(
|
|
6514
6652
|
"button",
|
|
6515
6653
|
{
|
|
6516
6654
|
type: "button",
|
|
@@ -6518,21 +6656,21 @@ function SidebarNav({
|
|
|
6518
6656
|
"aria-current": isActive ? "page" : void 0,
|
|
6519
6657
|
onClick: () => onNavigate({ name: item.route }),
|
|
6520
6658
|
children: [
|
|
6521
|
-
/* @__PURE__ */
|
|
6659
|
+
/* @__PURE__ */ jsx24("span", { className: "vos-nav-ic", "aria-hidden": "true", children: item.icon }),
|
|
6522
6660
|
item.label,
|
|
6523
|
-
item.isDefault ? /* @__PURE__ */
|
|
6524
|
-
/* @__PURE__ */
|
|
6661
|
+
item.isDefault ? /* @__PURE__ */ jsx24("span", { className: "vos-nav-default", children: "home" }) : null,
|
|
6662
|
+
/* @__PURE__ */ jsx24("span", { className: "vos-nav-count vos-num", children: count !== void 0 ? formatCount(count) : "\xB7" })
|
|
6525
6663
|
]
|
|
6526
6664
|
},
|
|
6527
6665
|
item.route
|
|
6528
6666
|
);
|
|
6529
6667
|
})
|
|
6530
6668
|
] }),
|
|
6531
|
-
recordsRegisters.length > 0 ? /* @__PURE__ */
|
|
6532
|
-
/* @__PURE__ */
|
|
6669
|
+
recordsRegisters.length > 0 ? /* @__PURE__ */ jsxs24("div", { children: [
|
|
6670
|
+
/* @__PURE__ */ jsx24("div", { className: "vos-nav-group", children: "Registers" }),
|
|
6533
6671
|
recordsRegisters.map((register) => {
|
|
6534
6672
|
const isActive = register === activeRegister;
|
|
6535
|
-
return /* @__PURE__ */
|
|
6673
|
+
return /* @__PURE__ */ jsxs24(
|
|
6536
6674
|
"button",
|
|
6537
6675
|
{
|
|
6538
6676
|
type: "button",
|
|
@@ -6540,9 +6678,9 @@ function SidebarNav({
|
|
|
6540
6678
|
"aria-current": isActive ? "page" : void 0,
|
|
6541
6679
|
onClick: () => onNavigate({ name: "records", register }),
|
|
6542
6680
|
children: [
|
|
6543
|
-
/* @__PURE__ */
|
|
6681
|
+
/* @__PURE__ */ jsx24("span", { className: "vos-nav-ic", "aria-hidden": "true", children: REGISTER_ICON[register] }),
|
|
6544
6682
|
REGISTER_LABEL[register],
|
|
6545
|
-
needsHuman?.[register] ? /* @__PURE__ */
|
|
6683
|
+
needsHuman?.[register] ? /* @__PURE__ */ jsx24(
|
|
6546
6684
|
"span",
|
|
6547
6685
|
{
|
|
6548
6686
|
className: "vos-nav-alert",
|
|
@@ -6550,7 +6688,7 @@ function SidebarNav({
|
|
|
6550
6688
|
children: formatCount(needsHuman[register] ?? 0)
|
|
6551
6689
|
}
|
|
6552
6690
|
) : null,
|
|
6553
|
-
/* @__PURE__ */
|
|
6691
|
+
/* @__PURE__ */ jsx24("span", { className: "vos-nav-count vos-num", children: counts?.[register] !== void 0 ? formatCount(counts[register] ?? 0) : "\xB7" })
|
|
6554
6692
|
]
|
|
6555
6693
|
},
|
|
6556
6694
|
register
|
|
@@ -6561,12 +6699,12 @@ function SidebarNav({
|
|
|
6561
6699
|
}
|
|
6562
6700
|
|
|
6563
6701
|
// src/use-counts.ts
|
|
6564
|
-
import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo9, useState as
|
|
6702
|
+
import { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo9, useState as useState14 } from "react";
|
|
6565
6703
|
function useCounts(basePath = "/api") {
|
|
6566
|
-
const [counts, setCounts] =
|
|
6567
|
-
const [loading, setLoading] =
|
|
6568
|
-
const [error, setError] =
|
|
6569
|
-
const [tick, setTick] =
|
|
6704
|
+
const [counts, setCounts] = useState14(null);
|
|
6705
|
+
const [loading, setLoading] = useState14(true);
|
|
6706
|
+
const [error, setError] = useState14(null);
|
|
6707
|
+
const [tick, setTick] = useState14(0);
|
|
6570
6708
|
useEffect5(() => {
|
|
6571
6709
|
let live = true;
|
|
6572
6710
|
setLoading(true);
|
|
@@ -6594,7 +6732,7 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
6594
6732
|
const assumptions = useList("assumptions", basePath);
|
|
6595
6733
|
const experiments = useList("experiments", basePath);
|
|
6596
6734
|
const decisions = useList("decisions", basePath);
|
|
6597
|
-
const [asOf] =
|
|
6735
|
+
const [asOf] = useState14(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
6598
6736
|
return useMemo9(() => {
|
|
6599
6737
|
const counts = needsHumanCounts({
|
|
6600
6738
|
asOf,
|
|
@@ -6612,7 +6750,7 @@ function useNeedsHuman(basePath = "/api") {
|
|
|
6612
6750
|
}
|
|
6613
6751
|
|
|
6614
6752
|
// src/dashboard-app.tsx
|
|
6615
|
-
import { jsx as
|
|
6753
|
+
import { jsx as jsx25, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6616
6754
|
function initialsOf(name) {
|
|
6617
6755
|
const parts = name.trim().split(/\s+/);
|
|
6618
6756
|
const first = parts[0]?.[0] ?? "";
|
|
@@ -6628,7 +6766,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6628
6766
|
user,
|
|
6629
6767
|
registers = REGISTER_ORDER
|
|
6630
6768
|
} = config;
|
|
6631
|
-
const [route, setRoute] =
|
|
6769
|
+
const [route, setRoute] = useState15(
|
|
6632
6770
|
() => typeof window === "undefined" ? { name: "assumptions" } : parseRoute(window.location.hash, registers)
|
|
6633
6771
|
);
|
|
6634
6772
|
const { counts } = useCounts(basePath);
|
|
@@ -6655,33 +6793,33 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6655
6793
|
}, []);
|
|
6656
6794
|
const brandName = branding?.name ?? "Validation-OS";
|
|
6657
6795
|
const brandMark = branding?.initials ?? "V";
|
|
6658
|
-
return /* @__PURE__ */
|
|
6659
|
-
/* @__PURE__ */
|
|
6660
|
-
/* @__PURE__ */
|
|
6796
|
+
return /* @__PURE__ */ jsxs25("div", { className: "vos-app", children: [
|
|
6797
|
+
/* @__PURE__ */ jsxs25("div", { className: "vos-brand", children: [
|
|
6798
|
+
/* @__PURE__ */ jsx25("span", { className: "vos-brand-dot", children: branding?.logoUrl ? /* @__PURE__ */ jsx25("img", { src: branding.logoUrl, alt: "" }) : brandMark }),
|
|
6661
6799
|
" ",
|
|
6662
6800
|
brandName
|
|
6663
6801
|
] }),
|
|
6664
|
-
/* @__PURE__ */
|
|
6665
|
-
backendLabel ? /* @__PURE__ */
|
|
6666
|
-
/* @__PURE__ */
|
|
6802
|
+
/* @__PURE__ */ jsxs25("div", { className: "vos-topbar", children: [
|
|
6803
|
+
backendLabel ? /* @__PURE__ */ jsxs25("div", { className: "vos-backend", children: [
|
|
6804
|
+
/* @__PURE__ */ jsx25("span", { className: "vos-live-dot" }),
|
|
6667
6805
|
" Backend: ",
|
|
6668
|
-
/* @__PURE__ */
|
|
6806
|
+
/* @__PURE__ */ jsx25("b", { children: backendLabel })
|
|
6669
6807
|
] }) : null,
|
|
6670
|
-
agentLabel ? /* @__PURE__ */
|
|
6808
|
+
agentLabel ? /* @__PURE__ */ jsxs25("span", { className: "vos-hint", children: [
|
|
6671
6809
|
"Agent: ",
|
|
6672
|
-
/* @__PURE__ */
|
|
6810
|
+
/* @__PURE__ */ jsx25("b", { style: { color: "var(--vos-text)" }, children: agentLabel })
|
|
6673
6811
|
] }) : null,
|
|
6674
|
-
/* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
6676
|
-
user?.name ? /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6679
|
-
/* @__PURE__ */
|
|
6680
|
-
user.caption ? /* @__PURE__ */
|
|
6812
|
+
/* @__PURE__ */ jsx25("div", { className: "vos-spacer" }),
|
|
6813
|
+
/* @__PURE__ */ jsx25("button", { type: "button", className: "vos-iconbtn", onClick: toggleTheme, children: "\u25D0 Theme" }),
|
|
6814
|
+
user?.name ? /* @__PURE__ */ jsxs25("div", { className: "vos-user", children: [
|
|
6815
|
+
/* @__PURE__ */ jsx25("span", { className: "vos-avatar", children: initialsOf(user.name) }),
|
|
6816
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6817
|
+
/* @__PURE__ */ jsx25("span", { className: "vos-user-name", children: user.name }),
|
|
6818
|
+
user.caption ? /* @__PURE__ */ jsx25("small", { children: user.caption }) : null
|
|
6681
6819
|
] })
|
|
6682
6820
|
] }) : null
|
|
6683
6821
|
] }),
|
|
6684
|
-
/* @__PURE__ */
|
|
6822
|
+
/* @__PURE__ */ jsx25(
|
|
6685
6823
|
SidebarNav,
|
|
6686
6824
|
{
|
|
6687
6825
|
route,
|
|
@@ -6691,7 +6829,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6691
6829
|
registers
|
|
6692
6830
|
}
|
|
6693
6831
|
),
|
|
6694
|
-
/* @__PURE__ */
|
|
6832
|
+
/* @__PURE__ */ jsx25("main", { className: "vos-main", children: route.name === "assumptions" ? /* @__PURE__ */ jsx25(
|
|
6695
6833
|
AssumptionsSurface,
|
|
6696
6834
|
{
|
|
6697
6835
|
basePath,
|
|
@@ -6701,21 +6839,21 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6701
6839
|
stage: route.stage
|
|
6702
6840
|
},
|
|
6703
6841
|
`assumptions-${route.view ?? ""}-${route.lens ?? ""}-${route.stage ?? ""}`
|
|
6704
|
-
) : route.name === "experiments" ? /* @__PURE__ */
|
|
6842
|
+
) : route.name === "experiments" ? /* @__PURE__ */ jsx25(
|
|
6705
6843
|
ExperimentsSurface,
|
|
6706
6844
|
{
|
|
6707
6845
|
basePath,
|
|
6708
6846
|
onNavigate: navigate
|
|
6709
6847
|
},
|
|
6710
6848
|
"experiments"
|
|
6711
|
-
) : route.name === "readings" ? /* @__PURE__ */
|
|
6849
|
+
) : route.name === "readings" ? /* @__PURE__ */ jsx25(
|
|
6712
6850
|
ReadingsSurface,
|
|
6713
6851
|
{
|
|
6714
6852
|
basePath,
|
|
6715
6853
|
onNavigate: navigate
|
|
6716
6854
|
},
|
|
6717
6855
|
"readings"
|
|
6718
|
-
) : route.name === "assumption" ? /* @__PURE__ */
|
|
6856
|
+
) : route.name === "assumption" ? /* @__PURE__ */ jsx25(
|
|
6719
6857
|
AssumptionDetail,
|
|
6720
6858
|
{
|
|
6721
6859
|
assumptionId: route.id,
|
|
@@ -6723,7 +6861,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6723
6861
|
onNavigate: navigate
|
|
6724
6862
|
},
|
|
6725
6863
|
`assumption-${route.id}`
|
|
6726
|
-
) : route.name === "experiment" ? /* @__PURE__ */
|
|
6864
|
+
) : route.name === "experiment" ? /* @__PURE__ */ jsx25(
|
|
6727
6865
|
ExperimentDetail,
|
|
6728
6866
|
{
|
|
6729
6867
|
experimentId: route.id,
|
|
@@ -6731,7 +6869,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6731
6869
|
onNavigate: navigate
|
|
6732
6870
|
},
|
|
6733
6871
|
`experiment-${route.id}`
|
|
6734
|
-
) : route.name === "reading" ? /* @__PURE__ */
|
|
6872
|
+
) : route.name === "reading" ? /* @__PURE__ */ jsx25(
|
|
6735
6873
|
ReadingDetail,
|
|
6736
6874
|
{
|
|
6737
6875
|
readingId: route.id,
|
|
@@ -6739,7 +6877,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6739
6877
|
onNavigate: navigate
|
|
6740
6878
|
},
|
|
6741
6879
|
`reading-${route.id}`
|
|
6742
|
-
) : route.name === "records" ? /* @__PURE__ */
|
|
6880
|
+
) : route.name === "records" ? /* @__PURE__ */ jsx25(
|
|
6743
6881
|
RegisterBrowser,
|
|
6744
6882
|
{
|
|
6745
6883
|
register: route.register,
|
|
@@ -6750,7 +6888,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6750
6888
|
stage: route.stage
|
|
6751
6889
|
},
|
|
6752
6890
|
route.register + (route.lens ?? "") + (route.stage ?? "") + (route.view ?? "")
|
|
6753
|
-
) : route.name === "record" ? /* @__PURE__ */
|
|
6891
|
+
) : route.name === "record" ? /* @__PURE__ */ jsx25(
|
|
6754
6892
|
RecordPage,
|
|
6755
6893
|
{
|
|
6756
6894
|
recordId: route.id,
|
|
@@ -6759,7 +6897,7 @@ function ValidationOSDashboard({ config = {} }) {
|
|
|
6759
6897
|
basePath
|
|
6760
6898
|
},
|
|
6761
6899
|
route.id
|
|
6762
|
-
) : /* @__PURE__ */
|
|
6900
|
+
) : /* @__PURE__ */ jsx25(
|
|
6763
6901
|
AssumptionsSurface,
|
|
6764
6902
|
{
|
|
6765
6903
|
basePath,
|
|
@@ -6796,15 +6934,15 @@ function composeConnectCommand(input) {
|
|
|
6796
6934
|
}
|
|
6797
6935
|
|
|
6798
6936
|
// src/connect-claude-code.tsx
|
|
6799
|
-
import { useState as
|
|
6800
|
-
import { jsx as
|
|
6937
|
+
import { useState as useState16 } from "react";
|
|
6938
|
+
import { jsx as jsx26, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6801
6939
|
function ConnectClaudeCode({
|
|
6802
6940
|
apiBaseUrl,
|
|
6803
6941
|
tokenEnv,
|
|
6804
6942
|
mintToken
|
|
6805
6943
|
}) {
|
|
6806
|
-
const [state, setState] =
|
|
6807
|
-
const [copied, setCopied] =
|
|
6944
|
+
const [state, setState] = useState16({ phase: "idle" });
|
|
6945
|
+
const [copied, setCopied] = useState16(false);
|
|
6808
6946
|
async function generate() {
|
|
6809
6947
|
setState({ phase: "minting" });
|
|
6810
6948
|
setCopied(false);
|
|
@@ -6826,21 +6964,21 @@ function ConnectClaudeCode({
|
|
|
6826
6964
|
} catch {
|
|
6827
6965
|
}
|
|
6828
6966
|
}
|
|
6829
|
-
return /* @__PURE__ */
|
|
6830
|
-
/* @__PURE__ */
|
|
6831
|
-
/* @__PURE__ */
|
|
6832
|
-
/* @__PURE__ */
|
|
6967
|
+
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
6968
|
+
/* @__PURE__ */ jsx26("div", { className: "vos-head", children: /* @__PURE__ */ jsxs26("div", { children: [
|
|
6969
|
+
/* @__PURE__ */ jsx26("h1", { children: "Connect Claude Code" }),
|
|
6970
|
+
/* @__PURE__ */ jsx26("p", { children: "Run the validation skills against this register from your own Claude Code \u2014 no repo, no keys to hunt down." })
|
|
6833
6971
|
] }) }),
|
|
6834
|
-
/* @__PURE__ */
|
|
6835
|
-
/* @__PURE__ */
|
|
6836
|
-
/* @__PURE__ */
|
|
6837
|
-
/* @__PURE__ */
|
|
6972
|
+
/* @__PURE__ */ jsxs26("ol", { className: "vos-hint", style: { lineHeight: 1.8 }, children: [
|
|
6973
|
+
/* @__PURE__ */ jsx26("li", { children: "Generate your personal connection command below." }),
|
|
6974
|
+
/* @__PURE__ */ jsx26("li", { children: "Paste it into a terminal in the workspace you'll run the skills in." }),
|
|
6975
|
+
/* @__PURE__ */ jsxs26("li", { children: [
|
|
6838
6976
|
"The command carries a token tied to ",
|
|
6839
|
-
/* @__PURE__ */
|
|
6977
|
+
/* @__PURE__ */ jsx26("strong", { children: "you" }),
|
|
6840
6978
|
" \u2014 anything you write lands under your name. Don't share it."
|
|
6841
6979
|
] })
|
|
6842
6980
|
] }),
|
|
6843
|
-
state.phase !== "ready" ? /* @__PURE__ */
|
|
6981
|
+
state.phase !== "ready" ? /* @__PURE__ */ jsx26(
|
|
6844
6982
|
"button",
|
|
6845
6983
|
{
|
|
6846
6984
|
type: "button",
|
|
@@ -6850,11 +6988,11 @@ function ConnectClaudeCode({
|
|
|
6850
6988
|
children: state.phase === "minting" ? "Generating\u2026" : "Generate connection command"
|
|
6851
6989
|
}
|
|
6852
6990
|
) : null,
|
|
6853
|
-
state.phase === "error" ? /* @__PURE__ */
|
|
6854
|
-
state.phase === "ready" ? /* @__PURE__ */
|
|
6855
|
-
/* @__PURE__ */
|
|
6856
|
-
/* @__PURE__ */
|
|
6857
|
-
/* @__PURE__ */
|
|
6991
|
+
state.phase === "error" ? /* @__PURE__ */ jsx26("p", { className: "vos-hint", role: "alert", children: state.message }) : null,
|
|
6992
|
+
state.phase === "ready" ? /* @__PURE__ */ jsxs26("div", { children: [
|
|
6993
|
+
/* @__PURE__ */ jsx26("pre", { className: "vos-code", "aria-label": "Connection command", children: state.command }),
|
|
6994
|
+
/* @__PURE__ */ jsxs26("div", { style: { display: "flex", gap: 8 }, children: [
|
|
6995
|
+
/* @__PURE__ */ jsx26(
|
|
6858
6996
|
"button",
|
|
6859
6997
|
{
|
|
6860
6998
|
type: "button",
|
|
@@ -6863,31 +7001,31 @@ function ConnectClaudeCode({
|
|
|
6863
7001
|
children: copied ? "Copied" : "Copy command"
|
|
6864
7002
|
}
|
|
6865
7003
|
),
|
|
6866
|
-
/* @__PURE__ */
|
|
7004
|
+
/* @__PURE__ */ jsx26("button", { type: "button", className: "vos-btn-ghost", onClick: generate, children: "Regenerate" })
|
|
6867
7005
|
] }),
|
|
6868
|
-
/* @__PURE__ */
|
|
7006
|
+
/* @__PURE__ */ jsx26("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." })
|
|
6869
7007
|
] }) : null
|
|
6870
7008
|
] });
|
|
6871
7009
|
}
|
|
6872
7010
|
|
|
6873
7011
|
// src/surface-placeholder.tsx
|
|
6874
|
-
import { jsx as
|
|
7012
|
+
import { jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6875
7013
|
function SurfacePlaceholder({
|
|
6876
7014
|
title,
|
|
6877
7015
|
subtitle,
|
|
6878
7016
|
detail
|
|
6879
7017
|
}) {
|
|
6880
|
-
return /* @__PURE__ */
|
|
6881
|
-
/* @__PURE__ */
|
|
6882
|
-
/* @__PURE__ */
|
|
6883
|
-
/* @__PURE__ */
|
|
7018
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
7019
|
+
/* @__PURE__ */ jsx27("div", { className: "vos-head", children: /* @__PURE__ */ jsxs27("div", { children: [
|
|
7020
|
+
/* @__PURE__ */ jsx27("h1", { children: title }),
|
|
7021
|
+
/* @__PURE__ */ jsx27("p", { children: subtitle })
|
|
6884
7022
|
] }) }),
|
|
6885
|
-
/* @__PURE__ */
|
|
7023
|
+
/* @__PURE__ */ jsx27("div", { className: "vos-empty", children: detail })
|
|
6886
7024
|
] });
|
|
6887
7025
|
}
|
|
6888
7026
|
|
|
6889
7027
|
// src/pipeline-surface.tsx
|
|
6890
|
-
import { Fragment as Fragment11, jsx as
|
|
7028
|
+
import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6891
7029
|
function PipelineSurface({
|
|
6892
7030
|
basePath,
|
|
6893
7031
|
onNavigate
|
|
@@ -6897,14 +7035,14 @@ function PipelineSurface({
|
|
|
6897
7035
|
const readings = useList("readings", basePath);
|
|
6898
7036
|
const loading = assumptions.loading || experiments.loading || readings.loading;
|
|
6899
7037
|
const error = assumptions.error || experiments.error || readings.error;
|
|
6900
|
-
return /* @__PURE__ */
|
|
6901
|
-
/* @__PURE__ */
|
|
6902
|
-
/* @__PURE__ */
|
|
6903
|
-
/* @__PURE__ */
|
|
6904
|
-
/* @__PURE__ */
|
|
7038
|
+
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
7039
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-head", children: [
|
|
7040
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7041
|
+
/* @__PURE__ */ jsx28("h1", { children: "Portfolio \u2014 where everything stands" }),
|
|
7042
|
+
/* @__PURE__ */ jsx28("p", { children: "Every belief the business depends on, and how far each has travelled from bet to known." })
|
|
6905
7043
|
] }),
|
|
6906
|
-
/* @__PURE__ */
|
|
6907
|
-
/* @__PURE__ */
|
|
7044
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-spacer" }),
|
|
7045
|
+
/* @__PURE__ */ jsx28(
|
|
6908
7046
|
"button",
|
|
6909
7047
|
{
|
|
6910
7048
|
type: "button",
|
|
@@ -6918,7 +7056,7 @@ function PipelineSurface({
|
|
|
6918
7056
|
}
|
|
6919
7057
|
)
|
|
6920
7058
|
] }),
|
|
6921
|
-
loading && !assumptions.records ? /* @__PURE__ */
|
|
7059
|
+
loading && !assumptions.records ? /* @__PURE__ */ jsx28("p", { className: "vos-muted", children: "Reading where every belief stands\u2026" }) : error ? /* @__PURE__ */ jsx28("p", { className: "vos-error", children: error }) : /* @__PURE__ */ jsx28(
|
|
6922
7060
|
PipelineBoard2,
|
|
6923
7061
|
{
|
|
6924
7062
|
assumptions: assumptions.records ?? [],
|
|
@@ -6948,22 +7086,22 @@ function PipelineBoard2({
|
|
|
6948
7086
|
decisions: []
|
|
6949
7087
|
});
|
|
6950
7088
|
if (cold.cold) {
|
|
6951
|
-
return /* @__PURE__ */
|
|
6952
|
-
/* @__PURE__ */
|
|
6953
|
-
/* @__PURE__ */
|
|
6954
|
-
/* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
7089
|
+
return /* @__PURE__ */ jsxs28(Fragment11, { children: [
|
|
7090
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
7091
|
+
/* @__PURE__ */ jsx28("section", { className: "vos-pipe-hero vos-cold vos-cold-pipe-hero", children: /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-read", children: [
|
|
7092
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-eyebrow", children: "Risk bought down" }),
|
|
7093
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-big vos-num", children: cold.pipeline.headline }),
|
|
7094
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-sub", children: cold.pipeline.invitation })
|
|
6957
7095
|
] }) }),
|
|
6958
|
-
/* @__PURE__ */
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
7096
|
+
/* @__PURE__ */ jsx28(StageSpine, {}),
|
|
7097
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-card vos-pipe-board vos-cold vos-cold-pipe-board", children: [
|
|
7098
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-boardhead", children: /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-bt", children: [
|
|
6961
7099
|
"Pipeline ",
|
|
6962
|
-
/* @__PURE__ */
|
|
7100
|
+
/* @__PURE__ */ jsx28("span", { children: "\xB7 0 live beliefs" })
|
|
6963
7101
|
] }) }),
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
7102
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-cold-pipe-body", children: [
|
|
7103
|
+
/* @__PURE__ */ jsx28("p", { children: cold.pipeline.boardBody }),
|
|
7104
|
+
/* @__PURE__ */ jsx28(
|
|
6967
7105
|
"button",
|
|
6968
7106
|
{
|
|
6969
7107
|
type: "button",
|
|
@@ -6977,73 +7115,73 @@ function PipelineBoard2({
|
|
|
6977
7115
|
] });
|
|
6978
7116
|
}
|
|
6979
7117
|
const openRecord = (id) => onNavigate({ name: "record", id });
|
|
6980
|
-
return /* @__PURE__ */
|
|
6981
|
-
/* @__PURE__ */
|
|
6982
|
-
/* @__PURE__ */
|
|
6983
|
-
/* @__PURE__ */
|
|
6984
|
-
/* @__PURE__ */
|
|
7118
|
+
return /* @__PURE__ */ jsxs28(Fragment11, { children: [
|
|
7119
|
+
/* @__PURE__ */ jsxs28("section", { className: "vos-pipe-hero", children: [
|
|
7120
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-read", children: [
|
|
7121
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-eyebrow", children: "Risk bought down" }),
|
|
7122
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-big vos-num", children: [
|
|
6985
7123
|
Math.round(progress.percent),
|
|
6986
|
-
/* @__PURE__ */
|
|
7124
|
+
/* @__PURE__ */ jsx28("span", { children: "%" })
|
|
6987
7125
|
] }),
|
|
6988
|
-
/* @__PURE__ */
|
|
7126
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-sub", children: [
|
|
6989
7127
|
"of all risk you've ever identified",
|
|
6990
|
-
delta !== null ? /* @__PURE__ */
|
|
7128
|
+
delta !== null ? /* @__PURE__ */ jsxs28(Fragment11, { children: [
|
|
6991
7129
|
" \xB7 ",
|
|
6992
|
-
/* @__PURE__ */
|
|
7130
|
+
/* @__PURE__ */ jsxs28("span", { className: delta >= 0 ? "vos-text-good" : "vos-text-crit", children: [
|
|
6993
7131
|
formatSigned(delta),
|
|
6994
7132
|
" pts this week"
|
|
6995
7133
|
] })
|
|
6996
7134
|
] }) : null
|
|
6997
7135
|
] })
|
|
6998
7136
|
] }),
|
|
6999
|
-
/* @__PURE__ */
|
|
7000
|
-
/* @__PURE__ */
|
|
7001
|
-
/* @__PURE__ */
|
|
7002
|
-
/* @__PURE__ */
|
|
7137
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-figs", children: [
|
|
7138
|
+
/* @__PURE__ */ jsx28(Fig, { value: progress.retired, label: "risk retired", good: true }),
|
|
7139
|
+
/* @__PURE__ */ jsx28(Fig, { value: progress.identified, label: "risk identified" }),
|
|
7140
|
+
/* @__PURE__ */ jsx28(Fig, { value: progress.live, label: "still live" })
|
|
7003
7141
|
] })
|
|
7004
7142
|
] }),
|
|
7005
|
-
/* @__PURE__ */
|
|
7006
|
-
/* @__PURE__ */
|
|
7007
|
-
/* @__PURE__ */
|
|
7008
|
-
/* @__PURE__ */
|
|
7143
|
+
/* @__PURE__ */ jsx28(StageSpine, {}),
|
|
7144
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-card vos-pipe-board", children: [
|
|
7145
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-boardhead", children: [
|
|
7146
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-bt", children: [
|
|
7009
7147
|
"Pipeline ",
|
|
7010
|
-
/* @__PURE__ */
|
|
7148
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
|
7011
7149
|
"\xB7 ",
|
|
7012
7150
|
rows.length,
|
|
7013
7151
|
" live ",
|
|
7014
7152
|
rows.length === 1 ? "belief" : "beliefs"
|
|
7015
7153
|
] })
|
|
7016
7154
|
] }),
|
|
7017
|
-
/* @__PURE__ */
|
|
7155
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-sortnote", children: "sorted by live risk \u2014 riskiest first" })
|
|
7018
7156
|
] }),
|
|
7019
|
-
rows.length === 0 ? /* @__PURE__ */
|
|
7157
|
+
rows.length === 0 ? /* @__PURE__ */ jsx28("div", { className: "vos-empty", style: { margin: 16 }, children: "Every belief is resolved \u2014 nothing live to test right now." }) : rows.map((row) => /* @__PURE__ */ jsx28(RowView, { row, onOpen: () => openRecord(row.id) }, row.id))
|
|
7020
7158
|
] }),
|
|
7021
|
-
resolved.length > 0 ? /* @__PURE__ */
|
|
7022
|
-
/* @__PURE__ */
|
|
7159
|
+
resolved.length > 0 ? /* @__PURE__ */ jsxs28("details", { className: "vos-pipe-resolved", children: [
|
|
7160
|
+
/* @__PURE__ */ jsxs28("summary", { className: "vos-pipe-disclosure", children: [
|
|
7023
7161
|
"Resolved & set apart \u2014 ",
|
|
7024
|
-
/* @__PURE__ */
|
|
7162
|
+
/* @__PURE__ */ jsx28("b", { children: resolved.length }),
|
|
7025
7163
|
" ",
|
|
7026
7164
|
resolved.length === 1 ? "belief" : "beliefs",
|
|
7027
7165
|
" (killed or made moot) \xB7 retired ",
|
|
7028
7166
|
resolvedRetired,
|
|
7029
7167
|
" risk"
|
|
7030
7168
|
] }),
|
|
7031
|
-
/* @__PURE__ */
|
|
7169
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-resolved-body", children: resolved.map((r) => /* @__PURE__ */ jsxs28(
|
|
7032
7170
|
"button",
|
|
7033
7171
|
{
|
|
7034
7172
|
type: "button",
|
|
7035
7173
|
className: "vos-pipe-rrow",
|
|
7036
7174
|
onClick: () => openRecord(r.id),
|
|
7037
7175
|
children: [
|
|
7038
|
-
/* @__PURE__ */
|
|
7039
|
-
/* @__PURE__ */
|
|
7176
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-rstmt", children: r.statement || r.id }),
|
|
7177
|
+
/* @__PURE__ */ jsx28(
|
|
7040
7178
|
"span",
|
|
7041
7179
|
{
|
|
7042
7180
|
className: `vos-pill ${r.kind === "killed" ? "vos-pill-crit" : "vos-pill-neutral"}`,
|
|
7043
7181
|
children: r.kind === "killed" ? "Killed" : "Moot"
|
|
7044
7182
|
}
|
|
7045
7183
|
),
|
|
7046
|
-
/* @__PURE__ */
|
|
7184
|
+
/* @__PURE__ */ jsxs28("span", { className: "vos-pipe-retired", children: [
|
|
7047
7185
|
"retired ",
|
|
7048
7186
|
r.retired,
|
|
7049
7187
|
" risk"
|
|
@@ -7053,10 +7191,10 @@ function PipelineBoard2({
|
|
|
7053
7191
|
r.id
|
|
7054
7192
|
)) })
|
|
7055
7193
|
] }) : null,
|
|
7056
|
-
/* @__PURE__ */
|
|
7057
|
-
/* @__PURE__ */
|
|
7194
|
+
/* @__PURE__ */ jsxs28("p", { className: "vos-hint vos-pipe-foot", children: [
|
|
7195
|
+
/* @__PURE__ */ jsx28("b", { children: "Hidden by default:" }),
|
|
7058
7196
|
" resolved beliefs (above), the raw Impact score (shown only as a faint bar \u2014 the machinery, not the move), and the confidence derivation (it lives on the belief's journey page). The headline is a ",
|
|
7059
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsx28("b", { children: "burn-up" }),
|
|
7060
7198
|
': writing a new bet grows "risk identified", so fresh risk never reads as backsliding.'
|
|
7061
7199
|
] })
|
|
7062
7200
|
] });
|
|
@@ -7066,9 +7204,9 @@ function Fig({
|
|
|
7066
7204
|
label,
|
|
7067
7205
|
good
|
|
7068
7206
|
}) {
|
|
7069
|
-
return /* @__PURE__ */
|
|
7070
|
-
/* @__PURE__ */
|
|
7071
|
-
/* @__PURE__ */
|
|
7207
|
+
return /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-fig", children: [
|
|
7208
|
+
/* @__PURE__ */ jsx28("div", { className: `vos-pipe-fv vos-num ${good ? "vos-text-good" : ""}`, children: Math.round(value) }),
|
|
7209
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-fl", children: label })
|
|
7072
7210
|
] });
|
|
7073
7211
|
}
|
|
7074
7212
|
function StageKey({
|
|
@@ -7077,71 +7215,71 @@ function StageKey({
|
|
|
7077
7215
|
desc,
|
|
7078
7216
|
open
|
|
7079
7217
|
}) {
|
|
7080
|
-
return /* @__PURE__ */
|
|
7081
|
-
/* @__PURE__ */
|
|
7082
|
-
/* @__PURE__ */
|
|
7083
|
-
/* @__PURE__ */
|
|
7084
|
-
/* @__PURE__ */
|
|
7218
|
+
return /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-stage", children: [
|
|
7219
|
+
/* @__PURE__ */ jsx28("span", { className: `vos-pipe-idx ${open ? "vos-pipe-idx-open" : ""}`, children: idx }),
|
|
7220
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7221
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-skname", children: name }),
|
|
7222
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-skdesc", children: desc })
|
|
7085
7223
|
] })
|
|
7086
7224
|
] });
|
|
7087
7225
|
}
|
|
7088
7226
|
function StageSpine() {
|
|
7089
|
-
return /* @__PURE__ */
|
|
7090
|
-
/* @__PURE__ */
|
|
7091
|
-
/* @__PURE__ */
|
|
7092
|
-
/* @__PURE__ */
|
|
7093
|
-
/* @__PURE__ */
|
|
7094
|
-
/* @__PURE__ */
|
|
7095
|
-
/* @__PURE__ */
|
|
7096
|
-
/* @__PURE__ */
|
|
7227
|
+
return /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-stages", children: [
|
|
7228
|
+
/* @__PURE__ */ jsx28(StageKey, { idx: "1", name: "Framed", desc: "The bet is written & complete" }),
|
|
7229
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-arrow", "aria-hidden": "true", children: "\u2192" }),
|
|
7230
|
+
/* @__PURE__ */ jsx28(StageKey, { idx: "2", name: "Planned", desc: "A test is designed to move it" }),
|
|
7231
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-arrow", "aria-hidden": "true", children: "\u2192" }),
|
|
7232
|
+
/* @__PURE__ */ jsx28(StageKey, { idx: "3", name: "Tested", desc: "Evidence landing, bars settling" }),
|
|
7233
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-arrow", "aria-hidden": "true", children: "\u2192" }),
|
|
7234
|
+
/* @__PURE__ */ jsx28(StageKey, { idx: "4", open: true, name: "Known", desc: 'Signed confidence \u2014 never "done"' })
|
|
7097
7235
|
] });
|
|
7098
7236
|
}
|
|
7099
7237
|
function RowView({ row, onOpen }) {
|
|
7100
7238
|
const confClass = row.confSign === "pos" ? "vos-pill-good" : row.confSign === "neg" ? "vos-pill-crit" : "vos-pill-neutral";
|
|
7101
7239
|
const impactPct = Math.max(0, Math.min(100, Math.round(row.impact)));
|
|
7102
|
-
return /* @__PURE__ */
|
|
7103
|
-
/* @__PURE__ */
|
|
7104
|
-
/* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7108
|
-
/* @__PURE__ */
|
|
7240
|
+
return /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-row", children: [
|
|
7241
|
+
/* @__PURE__ */ jsx28("div", { className: `vos-pipe-stripe vos-fill-${row.riskTone}` }),
|
|
7242
|
+
/* @__PURE__ */ jsxs28("button", { type: "button", className: "vos-pipe-belief", onClick: onOpen, children: [
|
|
7243
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-stmt", children: row.statement || row.id }),
|
|
7244
|
+
/* @__PURE__ */ jsxs28("span", { className: "vos-pipe-bmeta", children: [
|
|
7245
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-impact-track", title: `Derived Impact ${row.impact}`, children: /* @__PURE__ */ jsx28("i", { style: { width: `${impactPct}%` } }) }),
|
|
7246
|
+
/* @__PURE__ */ jsxs28("span", { className: "vos-num", children: [
|
|
7109
7247
|
"impact ",
|
|
7110
7248
|
Math.round(row.impact)
|
|
7111
7249
|
] })
|
|
7112
7250
|
] })
|
|
7113
7251
|
] }),
|
|
7114
|
-
/* @__PURE__ */
|
|
7252
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-prog", "aria-label": "Loop progress", children: stageMeters(row).map((m) => /* @__PURE__ */ jsx28(
|
|
7115
7253
|
Meter,
|
|
7116
7254
|
{
|
|
7117
7255
|
n: m.n,
|
|
7118
7256
|
label: m.flag ? void 0 : m.label,
|
|
7119
7257
|
flag: m.flag,
|
|
7120
7258
|
muted: m.muted,
|
|
7121
|
-
children: m.kind === "signed" ? /* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7123
|
-
m.sign !== "zero" ? /* @__PURE__ */
|
|
7259
|
+
children: m.kind === "signed" ? /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-track vos-pipe-known", children: [
|
|
7260
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-known-mid" }),
|
|
7261
|
+
m.sign !== "zero" ? /* @__PURE__ */ jsx28(
|
|
7124
7262
|
"i",
|
|
7125
7263
|
{
|
|
7126
7264
|
className: m.sign === "pos" ? "vos-pipe-known-pos" : "vos-pipe-known-neg",
|
|
7127
7265
|
style: { width: `${m.pct}%` }
|
|
7128
7266
|
}
|
|
7129
7267
|
) : null
|
|
7130
|
-
] }) : /* @__PURE__ */
|
|
7268
|
+
] }) : /* @__PURE__ */ jsx28("div", { className: "vos-pipe-track", children: /* @__PURE__ */ jsx28("i", { className: "vos-pipe-fill-accent", style: { width: `${m.pct}%` } }) })
|
|
7131
7269
|
},
|
|
7132
7270
|
m.key
|
|
7133
7271
|
)) }),
|
|
7134
|
-
/* @__PURE__ */
|
|
7135
|
-
/* @__PURE__ */
|
|
7136
|
-
/* @__PURE__ */
|
|
7137
|
-
/* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-risk", children: [
|
|
7273
|
+
/* @__PURE__ */ jsx28("div", { className: `vos-pipe-rv vos-text-${row.riskTone} vos-num`, children: Math.round(row.risk) }),
|
|
7274
|
+
/* @__PURE__ */ jsx28("div", { className: "vos-pipe-rl", children: "risk" }),
|
|
7275
|
+
/* @__PURE__ */ jsxs28("span", { className: `vos-pill ${confClass} vos-pipe-conf`, children: [
|
|
7138
7276
|
"conf ",
|
|
7139
7277
|
formatSigned(row.confidence)
|
|
7140
7278
|
] })
|
|
7141
7279
|
] }),
|
|
7142
|
-
/* @__PURE__ */
|
|
7143
|
-
/* @__PURE__ */
|
|
7144
|
-
/* @__PURE__ */
|
|
7280
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-actions", children: [
|
|
7281
|
+
/* @__PURE__ */ jsx28("button", { type: "button", className: "vos-btn vos-btn-sm", onClick: onOpen, children: row.nextMove }),
|
|
7282
|
+
/* @__PURE__ */ jsx28(
|
|
7145
7283
|
"button",
|
|
7146
7284
|
{
|
|
7147
7285
|
type: "button",
|
|
@@ -7160,17 +7298,17 @@ function Meter({
|
|
|
7160
7298
|
muted,
|
|
7161
7299
|
children
|
|
7162
7300
|
}) {
|
|
7163
|
-
return /* @__PURE__ */
|
|
7301
|
+
return /* @__PURE__ */ jsxs28("div", { className: "vos-pipe-seg", children: [
|
|
7164
7302
|
children,
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
/* @__PURE__ */
|
|
7167
|
-
flag ? /* @__PURE__ */
|
|
7303
|
+
/* @__PURE__ */ jsxs28("div", { className: "vos-pipe-cap", children: [
|
|
7304
|
+
/* @__PURE__ */ jsx28("span", { className: "vos-pipe-capn", children: n }),
|
|
7305
|
+
flag ? /* @__PURE__ */ jsx28("span", { className: "vos-pipe-flag", children: flag }) : /* @__PURE__ */ jsx28("span", { className: `vos-pipe-capv ${muted ? "vos-muted" : ""}`, children: label })
|
|
7168
7306
|
] })
|
|
7169
7307
|
] });
|
|
7170
7308
|
}
|
|
7171
7309
|
|
|
7172
7310
|
// src/register-counts.tsx
|
|
7173
|
-
import { jsx as
|
|
7311
|
+
import { jsx as jsx29, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7174
7312
|
function RegisterCounts({
|
|
7175
7313
|
counts,
|
|
7176
7314
|
caption,
|
|
@@ -7180,8 +7318,8 @@ function RegisterCounts({
|
|
|
7180
7318
|
const registers = REGISTER_ORDER.filter(
|
|
7181
7319
|
(r) => counts[r] !== void 0
|
|
7182
7320
|
);
|
|
7183
|
-
return /* @__PURE__ */
|
|
7184
|
-
/* @__PURE__ */
|
|
7321
|
+
return /* @__PURE__ */ jsxs29("section", { "aria-label": "Register counts", children: [
|
|
7322
|
+
/* @__PURE__ */ jsx29("div", { className: "vos-tile-grid", children: registers.map((register) => /* @__PURE__ */ jsx29(
|
|
7185
7323
|
StatTile,
|
|
7186
7324
|
{
|
|
7187
7325
|
label: REGISTER_LABEL[register],
|
|
@@ -7191,14 +7329,14 @@ function RegisterCounts({
|
|
|
7191
7329
|
},
|
|
7192
7330
|
register
|
|
7193
7331
|
)) }),
|
|
7194
|
-
caption ? /* @__PURE__ */
|
|
7332
|
+
caption ? /* @__PURE__ */ jsx29("p", { className: "vos-hint", style: { marginTop: 16 }, children: caption }) : null
|
|
7195
7333
|
] });
|
|
7196
7334
|
}
|
|
7197
7335
|
|
|
7198
7336
|
// src/next-move-surface.tsx
|
|
7199
|
-
import { useMemo as useMemo10, useState as
|
|
7337
|
+
import { useMemo as useMemo10, useState as useState17 } from "react";
|
|
7200
7338
|
import { rankNextMoves as rankNextMoves2 } from "@validation-os/core/derivation";
|
|
7201
|
-
import { Fragment as Fragment12, jsx as
|
|
7339
|
+
import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7202
7340
|
var STAGES = ["Framed", "Planned", "Tested", "Known"];
|
|
7203
7341
|
var MOVE_STAGE = {
|
|
7204
7342
|
"score-impact": 0,
|
|
@@ -7219,8 +7357,8 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7219
7357
|
const experiments = useList("experiments", basePath);
|
|
7220
7358
|
const readings = useList("readings", basePath);
|
|
7221
7359
|
const decisions = useList("decisions", basePath);
|
|
7222
|
-
const [why, setWhy] =
|
|
7223
|
-
const [stepIn, setStepIn] =
|
|
7360
|
+
const [why, setWhy] = useState17(false);
|
|
7361
|
+
const [stepIn, setStepIn] = useState17(null);
|
|
7224
7362
|
const lists = [assumptions, experiments, readings, decisions];
|
|
7225
7363
|
const loading = lists.some((l) => l.loading);
|
|
7226
7364
|
const error = lists.map((l) => l.error).find(Boolean) ?? null;
|
|
@@ -7256,12 +7394,12 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7256
7394
|
});
|
|
7257
7395
|
};
|
|
7258
7396
|
if (loading) {
|
|
7259
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ jsx30(NextMoveFrame, { children: /* @__PURE__ */ jsx30("div", { className: "vos-empty", children: "Reading your beliefs\u2026" }) });
|
|
7260
7398
|
}
|
|
7261
7399
|
if (error) {
|
|
7262
|
-
return /* @__PURE__ */
|
|
7263
|
-
/* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7400
|
+
return /* @__PURE__ */ jsx30(NextMoveFrame, { children: /* @__PURE__ */ jsx30("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */ jsxs30("div", { className: "vos-banner-body", children: [
|
|
7401
|
+
/* @__PURE__ */ jsx30("b", { children: "Couldn't load the workflow." }),
|
|
7402
|
+
/* @__PURE__ */ jsx30("span", { children: error })
|
|
7265
7403
|
] }) }) });
|
|
7266
7404
|
}
|
|
7267
7405
|
if (moves.length === 0) {
|
|
@@ -7273,13 +7411,13 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7273
7411
|
};
|
|
7274
7412
|
const cold = coldStartFor(records);
|
|
7275
7413
|
if (cold.cold) {
|
|
7276
|
-
return /* @__PURE__ */
|
|
7277
|
-
/* @__PURE__ */
|
|
7278
|
-
/* @__PURE__ */
|
|
7279
|
-
/* @__PURE__ */
|
|
7280
|
-
/* @__PURE__ */
|
|
7281
|
-
/* @__PURE__ */
|
|
7282
|
-
/* @__PURE__ */
|
|
7414
|
+
return /* @__PURE__ */ jsxs30(NextMoveFrame, { children: [
|
|
7415
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
7416
|
+
/* @__PURE__ */ jsxs30("div", { className: "vos-card vos-cold vos-cold-next", children: [
|
|
7417
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-cold-eyebrow", children: cold.next.eyebrow }),
|
|
7418
|
+
/* @__PURE__ */ jsx30("h2", { className: "vos-cold-headline", children: cold.next.headline }),
|
|
7419
|
+
/* @__PURE__ */ jsx30("p", { className: "vos-cold-body", children: cold.next.body }),
|
|
7420
|
+
/* @__PURE__ */ jsx30(
|
|
7283
7421
|
"button",
|
|
7284
7422
|
{
|
|
7285
7423
|
type: "button",
|
|
@@ -7291,10 +7429,10 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7291
7429
|
] })
|
|
7292
7430
|
] });
|
|
7293
7431
|
}
|
|
7294
|
-
return /* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ jsx30(NextMoveFrame, { children: /* @__PURE__ */ jsxs30("div", { className: "vos-empty", children: [
|
|
7295
7433
|
"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",
|
|
7296
7434
|
" ",
|
|
7297
|
-
/* @__PURE__ */
|
|
7435
|
+
/* @__PURE__ */ jsx30(
|
|
7298
7436
|
"button",
|
|
7299
7437
|
{
|
|
7300
7438
|
type: "button",
|
|
@@ -7312,11 +7450,11 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7312
7450
|
const onDeck = rest.filter((m) => m.assumptionId !== top.assumptionId).slice(0, 3);
|
|
7313
7451
|
const topPres = movePresentation(top.move);
|
|
7314
7452
|
const topTone = riskLevel(top.risk);
|
|
7315
|
-
return /* @__PURE__ */
|
|
7316
|
-
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */
|
|
7317
|
-
/* @__PURE__ */
|
|
7318
|
-
/* @__PURE__ */
|
|
7319
|
-
/* @__PURE__ */
|
|
7453
|
+
return /* @__PURE__ */ jsxs30(NextMoveFrame, { children: [
|
|
7454
|
+
killMoves.length > 0 && !top.killLane ? /* @__PURE__ */ jsx30(KillBanner, { count: killMoves.length, onReview: () => startStepIn(killMoves[0]) }) : null,
|
|
7455
|
+
/* @__PURE__ */ jsxs30("div", { className: `vos-hero vos-card${top.killLane ? " vos-hero-kill" : ""}`, children: [
|
|
7456
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-hero-eyebrow", children: top.killLane ? "Kill lane \u2014 turning against you" : "Your next move" }),
|
|
7457
|
+
/* @__PURE__ */ jsx30(
|
|
7320
7458
|
"button",
|
|
7321
7459
|
{
|
|
7322
7460
|
type: "button",
|
|
@@ -7326,23 +7464,23 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7326
7464
|
children: top.title
|
|
7327
7465
|
}
|
|
7328
7466
|
),
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
/* @__PURE__ */
|
|
7467
|
+
/* @__PURE__ */ jsxs30("div", { className: "vos-riskchip", "aria-label": `Risk: ${RISK_PHRASE[topTone]}`, children: [
|
|
7468
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx30(
|
|
7331
7469
|
"i",
|
|
7332
7470
|
{
|
|
7333
7471
|
className: `vos-fill-${topTone}`,
|
|
7334
7472
|
style: { width: `${riskFraction(top.risk) * 100}%` }
|
|
7335
7473
|
}
|
|
7336
7474
|
) }),
|
|
7337
|
-
/* @__PURE__ */
|
|
7475
|
+
/* @__PURE__ */ jsx30("span", { className: `vos-riskchip-label vos-text-${topTone}`, children: top.killLane ? "Confidence has turned negative" : RISK_PHRASE[topTone] })
|
|
7338
7476
|
] }),
|
|
7339
|
-
/* @__PURE__ */
|
|
7340
|
-
/* @__PURE__ */
|
|
7477
|
+
/* @__PURE__ */ jsx30(ActButton, { move: top, onStepIn: () => startStepIn(top), onReview: () => openRecord(top.assumptionId) }),
|
|
7478
|
+
/* @__PURE__ */ jsx30("button", { type: "button", className: "vos-why", onClick: () => setWhy((w) => !w), children: why ? "Hide details" : "Why this?" })
|
|
7341
7479
|
] }),
|
|
7342
|
-
why ? /* @__PURE__ */
|
|
7343
|
-
onDeck.length > 0 ? /* @__PURE__ */
|
|
7344
|
-
/* @__PURE__ */
|
|
7345
|
-
onDeck.map((m) => /* @__PURE__ */
|
|
7480
|
+
why ? /* @__PURE__ */ jsx30(WhyPanel, { top, ranked: moves }) : null,
|
|
7481
|
+
onDeck.length > 0 ? /* @__PURE__ */ jsxs30("section", { className: "vos-ondeck", children: [
|
|
7482
|
+
/* @__PURE__ */ jsx30("h3", { className: "vos-sectitle", children: "On deck" }),
|
|
7483
|
+
onDeck.map((m) => /* @__PURE__ */ jsx30(
|
|
7346
7484
|
OnDeckRow,
|
|
7347
7485
|
{
|
|
7348
7486
|
move: m,
|
|
@@ -7352,7 +7490,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7352
7490
|
m.assumptionId
|
|
7353
7491
|
))
|
|
7354
7492
|
] }) : null,
|
|
7355
|
-
/* @__PURE__ */
|
|
7493
|
+
/* @__PURE__ */ jsx30(
|
|
7356
7494
|
"button",
|
|
7357
7495
|
{
|
|
7358
7496
|
type: "button",
|
|
@@ -7361,7 +7499,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7361
7499
|
children: "Act on a different belief \u2192"
|
|
7362
7500
|
}
|
|
7363
7501
|
),
|
|
7364
|
-
stepIn?.form === "score-impact" ? /* @__PURE__ */
|
|
7502
|
+
stepIn?.form === "score-impact" ? /* @__PURE__ */ jsx30(
|
|
7365
7503
|
ScoreImpactForm,
|
|
7366
7504
|
{
|
|
7367
7505
|
assumption: stepIn.assumption,
|
|
@@ -7373,7 +7511,7 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7373
7511
|
onCancel: () => setStepIn(null)
|
|
7374
7512
|
}
|
|
7375
7513
|
) : null,
|
|
7376
|
-
stepIn?.form === "write-decision" ? /* @__PURE__ */
|
|
7514
|
+
stepIn?.form === "write-decision" ? /* @__PURE__ */ jsx30(
|
|
7377
7515
|
WriteDecisionForm,
|
|
7378
7516
|
{
|
|
7379
7517
|
assumption: stepIn.assumption,
|
|
@@ -7389,12 +7527,12 @@ function NextMoveSurface({ basePath, onNavigate }) {
|
|
|
7389
7527
|
] });
|
|
7390
7528
|
}
|
|
7391
7529
|
function NextMoveFrame({ children }) {
|
|
7392
|
-
return /* @__PURE__ */
|
|
7393
|
-
/* @__PURE__ */
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7530
|
+
return /* @__PURE__ */ jsxs30("div", { children: [
|
|
7531
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-head", children: /* @__PURE__ */ jsxs30("div", { children: [
|
|
7532
|
+
/* @__PURE__ */ jsx30("h1", { children: "Next move" }),
|
|
7533
|
+
/* @__PURE__ */ jsx30("p", { children: "The single next move to make \u2014 and what's on deck." })
|
|
7396
7534
|
] }) }),
|
|
7397
|
-
/* @__PURE__ */
|
|
7535
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-next", children })
|
|
7398
7536
|
] });
|
|
7399
7537
|
}
|
|
7400
7538
|
function ActButton({
|
|
@@ -7404,20 +7542,20 @@ function ActButton({
|
|
|
7404
7542
|
}) {
|
|
7405
7543
|
const pres = movePresentation(move.move);
|
|
7406
7544
|
if (pres.steppable) {
|
|
7407
|
-
return /* @__PURE__ */
|
|
7545
|
+
return /* @__PURE__ */ jsx30("button", { type: "button", className: "vos-btn vos-hero-act", onClick: onStepIn, children: pres.cta });
|
|
7408
7546
|
}
|
|
7409
|
-
return /* @__PURE__ */
|
|
7410
|
-
/* @__PURE__ */
|
|
7411
|
-
/* @__PURE__ */
|
|
7547
|
+
return /* @__PURE__ */ jsxs30("div", { className: "vos-hero-agent", children: [
|
|
7548
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-agent-note", children: "\u{1F916} Claude Code runs this off the dashboard" }),
|
|
7549
|
+
/* @__PURE__ */ jsx30("button", { type: "button", className: "vos-btn vos-btn-ghost vos-hero-act", onClick: onReview, children: "Review on the record \u2192" })
|
|
7412
7550
|
] });
|
|
7413
7551
|
}
|
|
7414
7552
|
function KillBanner({ count, onReview }) {
|
|
7415
|
-
return /* @__PURE__ */
|
|
7416
|
-
/* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsxs30("div", { className: "vos-banner vos-banner-crit", children: [
|
|
7554
|
+
/* @__PURE__ */ jsxs30("div", { className: "vos-banner-body", children: [
|
|
7555
|
+
/* @__PURE__ */ jsx30("b", { children: count === 1 ? "A belief has fallen into the kill lane" : `${count} beliefs have fallen into the kill lane` }),
|
|
7556
|
+
/* @__PURE__ */ jsx30("span", { children: "Confidence \u2264 \u221250 \u2014 the evidence is against it. Kill it or test it again." })
|
|
7419
7557
|
] }),
|
|
7420
|
-
/* @__PURE__ */
|
|
7558
|
+
/* @__PURE__ */ jsx30("button", { type: "button", onClick: onReview, children: "Review" })
|
|
7421
7559
|
] });
|
|
7422
7560
|
}
|
|
7423
7561
|
function OnDeckRow({
|
|
@@ -7427,47 +7565,47 @@ function OnDeckRow({
|
|
|
7427
7565
|
}) {
|
|
7428
7566
|
const pres = movePresentation(move.move);
|
|
7429
7567
|
const tone = riskLevel(move.risk);
|
|
7430
|
-
return /* @__PURE__ */
|
|
7431
|
-
/* @__PURE__ */
|
|
7432
|
-
/* @__PURE__ */
|
|
7433
|
-
/* @__PURE__ */
|
|
7568
|
+
return /* @__PURE__ */ jsxs30("div", { className: "vos-ondeck-row", children: [
|
|
7569
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-risk-bar", "aria-hidden": "true", children: /* @__PURE__ */ jsx30("i", { className: `vos-fill-${tone}`, style: { width: `${riskFraction(move.risk) * 100}%` } }) }),
|
|
7570
|
+
/* @__PURE__ */ jsx30("button", { type: "button", className: "vos-ondeck-title", onClick: onOpen, children: move.title }),
|
|
7571
|
+
/* @__PURE__ */ jsx30("button", { type: "button", className: "vos-pill vos-pill-accent vos-ondeck-act", onClick: onAct, children: pres.pill })
|
|
7434
7572
|
] });
|
|
7435
7573
|
}
|
|
7436
7574
|
function WhyPanel({ top, ranked }) {
|
|
7437
|
-
return /* @__PURE__ */
|
|
7438
|
-
/* @__PURE__ */
|
|
7439
|
-
/* @__PURE__ */
|
|
7440
|
-
/* @__PURE__ */
|
|
7441
|
-
/* @__PURE__ */
|
|
7575
|
+
return /* @__PURE__ */ jsxs30("div", { className: "vos-why-panel vos-next-why", children: [
|
|
7576
|
+
/* @__PURE__ */ jsx30("p", { className: "vos-why-reason", children: top.reason }),
|
|
7577
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
7578
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-why-section-title", children: "Where it sits" }),
|
|
7579
|
+
/* @__PURE__ */ jsx30(StageStepper, { move: top.move })
|
|
7442
7580
|
] }),
|
|
7443
|
-
/* @__PURE__ */
|
|
7444
|
-
/* @__PURE__ */
|
|
7445
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
7582
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-why-section-title", children: "Why it's on top" }),
|
|
7583
|
+
/* @__PURE__ */ jsxs30("p", { className: "vos-why-formula", children: [
|
|
7446
7584
|
"Ranked by ",
|
|
7447
|
-
/* @__PURE__ */
|
|
7585
|
+
/* @__PURE__ */ jsx30("b", { children: "Feasibility \xD7 Risk" }),
|
|
7448
7586
|
" \u2014 Risk ",
|
|
7449
|
-
/* @__PURE__ */
|
|
7450
|
-
top.feasibility ? /* @__PURE__ */
|
|
7587
|
+
/* @__PURE__ */ jsx30("b", { children: Math.round(top.risk) }),
|
|
7588
|
+
top.feasibility ? /* @__PURE__ */ jsxs30(Fragment12, { children: [
|
|
7451
7589
|
" ",
|
|
7452
7590
|
"\xD7 Feasibility ",
|
|
7453
|
-
/* @__PURE__ */
|
|
7454
|
-
] }) : /* @__PURE__ */
|
|
7591
|
+
/* @__PURE__ */ jsx30("b", { children: top.feasibility })
|
|
7592
|
+
] }) : /* @__PURE__ */ jsx30(Fragment12, { children: " (no test planned yet \u2014 neutral feasibility)" }),
|
|
7455
7593
|
top.killLane ? " \xB7 in the kill lane, so it jumps the queue" : null,
|
|
7456
7594
|
"."
|
|
7457
7595
|
] })
|
|
7458
7596
|
] }),
|
|
7459
|
-
/* @__PURE__ */
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
/* @__PURE__ */
|
|
7462
|
-
/* @__PURE__ */
|
|
7463
|
-
/* @__PURE__ */
|
|
7597
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
7598
|
+
/* @__PURE__ */ jsx30("div", { className: "vos-why-section-title", children: "The ranking" }),
|
|
7599
|
+
/* @__PURE__ */ jsx30("ol", { className: "vos-why-rank", children: ranked.slice(0, 6).map((m) => /* @__PURE__ */ jsxs30("li", { className: m.assumptionId === top.assumptionId ? "vos-why-rank-top" : "", children: [
|
|
7600
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-why-rank-title", children: m.title }),
|
|
7601
|
+
/* @__PURE__ */ jsx30("span", { className: "vos-why-rank-score", children: Math.round(m.score) })
|
|
7464
7602
|
] }, m.assumptionId)) })
|
|
7465
7603
|
] })
|
|
7466
7604
|
] });
|
|
7467
7605
|
}
|
|
7468
7606
|
function StageStepper({ move }) {
|
|
7469
7607
|
const at = MOVE_STAGE[move];
|
|
7470
|
-
return /* @__PURE__ */
|
|
7608
|
+
return /* @__PURE__ */ jsx30("div", { className: "vos-stepper", "aria-label": `Stage: ${STAGES[at]}`, children: STAGES.map((label, i) => /* @__PURE__ */ jsx30(
|
|
7471
7609
|
"span",
|
|
7472
7610
|
{
|
|
7473
7611
|
className: `vos-step${i === at ? " vos-step-at" : ""}${i < at ? " vos-step-done" : ""}`,
|
|
@@ -7478,13 +7616,13 @@ function StageStepper({ move }) {
|
|
|
7478
7616
|
}
|
|
7479
7617
|
|
|
7480
7618
|
// src/stage-grid-surface.tsx
|
|
7481
|
-
import { useMemo as useMemo11, useState as
|
|
7482
|
-
import { jsx as
|
|
7619
|
+
import { useMemo as useMemo11, useState as useState18 } from "react";
|
|
7620
|
+
import { jsx as jsx31, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7483
7621
|
function StageGridSurface({ basePath, onNavigate }) {
|
|
7484
7622
|
const assumptions = useList("assumptions", basePath);
|
|
7485
7623
|
const loading = assumptions.loading;
|
|
7486
7624
|
const error = assumptions.error;
|
|
7487
|
-
const [open, setOpen] =
|
|
7625
|
+
const [open, setOpen] = useState18(null);
|
|
7488
7626
|
const view = useMemo11(
|
|
7489
7627
|
() => buildStageGrid(assumptions.records ?? []),
|
|
7490
7628
|
[assumptions.records]
|
|
@@ -7492,12 +7630,12 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
7492
7630
|
const refresh = () => assumptions.refresh();
|
|
7493
7631
|
const openRecord = (id) => onNavigate({ name: "record", id });
|
|
7494
7632
|
if (loading && !assumptions.records) {
|
|
7495
|
-
return /* @__PURE__ */
|
|
7633
|
+
return /* @__PURE__ */ jsx31(StageGridFrame, { children: /* @__PURE__ */ jsx31("div", { className: "vos-empty", children: "Reading where your bets cluster\u2026" }) });
|
|
7496
7634
|
}
|
|
7497
7635
|
if (error) {
|
|
7498
|
-
return /* @__PURE__ */
|
|
7499
|
-
/* @__PURE__ */
|
|
7500
|
-
/* @__PURE__ */
|
|
7636
|
+
return /* @__PURE__ */ jsx31(StageGridFrame, { children: /* @__PURE__ */ jsx31("div", { className: "vos-banner vos-banner-crit", children: /* @__PURE__ */ jsxs31("div", { className: "vos-banner-body", children: [
|
|
7637
|
+
/* @__PURE__ */ jsx31("b", { children: "Couldn't load the grid." }),
|
|
7638
|
+
/* @__PURE__ */ jsx31("span", { children: error })
|
|
7501
7639
|
] }) }) });
|
|
7502
7640
|
}
|
|
7503
7641
|
const cold = coldStartFor({
|
|
@@ -7507,12 +7645,12 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
7507
7645
|
decisions: []
|
|
7508
7646
|
});
|
|
7509
7647
|
if (cold.cold) {
|
|
7510
|
-
return /* @__PURE__ */
|
|
7511
|
-
/* @__PURE__ */
|
|
7512
|
-
/* @__PURE__ */
|
|
7513
|
-
/* @__PURE__ */
|
|
7514
|
-
/* @__PURE__ */
|
|
7515
|
-
/* @__PURE__ */
|
|
7648
|
+
return /* @__PURE__ */ jsxs31(StageGridFrame, { children: [
|
|
7649
|
+
/* @__PURE__ */ jsx31("div", { className: "vos-firstrun", children: FIRST_RUN_LINE }),
|
|
7650
|
+
/* @__PURE__ */ jsxs31("div", { className: "vos-card vos-cold vos-cold-stage-grid", children: [
|
|
7651
|
+
/* @__PURE__ */ jsx31("span", { className: "vos-cold-eyebrow", children: "No bets yet" }),
|
|
7652
|
+
/* @__PURE__ */ jsx31("p", { className: "vos-cold-body", children: "The Lens \xD7 Stage grid reads your business state off where your bets cluster. Write your first belief and the grid fills in \u2014 the densest cell per row is where that part of the business is." }),
|
|
7653
|
+
/* @__PURE__ */ jsx31(
|
|
7516
7654
|
"button",
|
|
7517
7655
|
{
|
|
7518
7656
|
type: "button",
|
|
@@ -7524,21 +7662,21 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
7524
7662
|
] })
|
|
7525
7663
|
] });
|
|
7526
7664
|
}
|
|
7527
|
-
return /* @__PURE__ */
|
|
7528
|
-
/* @__PURE__ */
|
|
7529
|
-
/* @__PURE__ */
|
|
7530
|
-
/* @__PURE__ */
|
|
7531
|
-
/* @__PURE__ */
|
|
7532
|
-
view.stages.map((stage) => /* @__PURE__ */
|
|
7533
|
-
/* @__PURE__ */
|
|
7534
|
-
/* @__PURE__ */
|
|
7665
|
+
return /* @__PURE__ */ jsxs31(StageGridFrame, { total: view.total, onRefresh: refresh, onNavigate, children: [
|
|
7666
|
+
/* @__PURE__ */ jsxs31("div", { className: "vos-card vos-stage-grid-card", children: [
|
|
7667
|
+
/* @__PURE__ */ jsx31("div", { className: "vos-stage-grid-scroll", children: /* @__PURE__ */ jsxs31("table", { className: "vos-stage-grid", role: "grid", "aria-label": "Lens \xD7 Stage heatmap", children: [
|
|
7668
|
+
/* @__PURE__ */ jsx31("thead", { children: /* @__PURE__ */ jsxs31("tr", { children: [
|
|
7669
|
+
/* @__PURE__ */ jsx31("th", { scope: "col", className: "vos-stage-grid-corner", children: "Lens \u2193 / Stage \u2192" }),
|
|
7670
|
+
view.stages.map((stage) => /* @__PURE__ */ jsxs31("th", { scope: "col", className: "vos-stage-grid-col", children: [
|
|
7671
|
+
/* @__PURE__ */ jsx31("span", { className: "vos-stage-grid-stagename", children: stage }),
|
|
7672
|
+
/* @__PURE__ */ jsx31("span", { className: "vos-stage-grid-stagegloss", children: STAGE_GLOSS[stage] })
|
|
7535
7673
|
] }, stage))
|
|
7536
7674
|
] }) }),
|
|
7537
|
-
/* @__PURE__ */
|
|
7538
|
-
/* @__PURE__ */
|
|
7675
|
+
/* @__PURE__ */ jsx31("tbody", { children: view.lenses.map((lens) => /* @__PURE__ */ jsxs31("tr", { children: [
|
|
7676
|
+
/* @__PURE__ */ jsx31("th", { scope: "row", className: "vos-stage-grid-rowhead", children: lens }),
|
|
7539
7677
|
view.stages.map((stage) => {
|
|
7540
7678
|
const cell = cellAt(view, lens, stage);
|
|
7541
|
-
return /* @__PURE__ */
|
|
7679
|
+
return /* @__PURE__ */ jsx31(
|
|
7542
7680
|
StageCell,
|
|
7543
7681
|
{
|
|
7544
7682
|
cell,
|
|
@@ -7549,9 +7687,9 @@ function StageGridSurface({ basePath, onNavigate }) {
|
|
|
7549
7687
|
})
|
|
7550
7688
|
] }, lens)) })
|
|
7551
7689
|
] }) }),
|
|
7552
|
-
/* @__PURE__ */
|
|
7690
|
+
/* @__PURE__ */ jsx31("p", { className: "vos-hint vos-stage-grid-foot", children: "The densest cell per row is where that part of the business is \u2014 no flag, no declaration, the density tells you. Click a cell to drill into its assumptions, ranked by Risk. Thin/empty cells are gaps: Consumer \xD7 Maturity is honestly 0 (consumers don't drive defense bets); a thin Commercial \xD7 Scale row is under-tracking scale." })
|
|
7553
7691
|
] }),
|
|
7554
|
-
/* @__PURE__ */
|
|
7692
|
+
/* @__PURE__ */ jsx31(
|
|
7555
7693
|
CellDrawer,
|
|
7556
7694
|
{
|
|
7557
7695
|
cell: open,
|
|
@@ -7568,19 +7706,19 @@ function StageGridFrame({
|
|
|
7568
7706
|
onNavigate,
|
|
7569
7707
|
children
|
|
7570
7708
|
}) {
|
|
7571
|
-
return /* @__PURE__ */
|
|
7572
|
-
/* @__PURE__ */
|
|
7573
|
-
/* @__PURE__ */
|
|
7574
|
-
/* @__PURE__ */
|
|
7575
|
-
/* @__PURE__ */
|
|
7709
|
+
return /* @__PURE__ */ jsxs31("div", { children: [
|
|
7710
|
+
/* @__PURE__ */ jsxs31("div", { className: "vos-head", children: [
|
|
7711
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
7712
|
+
/* @__PURE__ */ jsx31("h1", { children: "Lens \xD7 Stage \u2014 where your bets cluster" }),
|
|
7713
|
+
/* @__PURE__ */ jsx31("p", { children: "Every belief cross-tabbed by the actor it's about (Lens) and the kind of response it tests (Stage). The grid is the filter; Risk is the rank." })
|
|
7576
7714
|
] }),
|
|
7577
|
-
/* @__PURE__ */
|
|
7578
|
-
total !== void 0 ? /* @__PURE__ */
|
|
7715
|
+
/* @__PURE__ */ jsx31("div", { className: "vos-spacer" }),
|
|
7716
|
+
total !== void 0 ? /* @__PURE__ */ jsxs31("span", { className: "vos-hint vos-stage-grid-total", children: [
|
|
7579
7717
|
total,
|
|
7580
7718
|
" ",
|
|
7581
7719
|
total === 1 ? "belief" : "beliefs"
|
|
7582
7720
|
] }) : null,
|
|
7583
|
-
onRefresh ? /* @__PURE__ */
|
|
7721
|
+
onRefresh ? /* @__PURE__ */ jsx31(
|
|
7584
7722
|
"button",
|
|
7585
7723
|
{
|
|
7586
7724
|
type: "button",
|
|
@@ -7589,7 +7727,7 @@ function StageGridFrame({
|
|
|
7589
7727
|
children: "\u21BB Refresh"
|
|
7590
7728
|
}
|
|
7591
7729
|
) : null,
|
|
7592
|
-
onNavigate ? /* @__PURE__ */
|
|
7730
|
+
onNavigate ? /* @__PURE__ */ jsx31(
|
|
7593
7731
|
"button",
|
|
7594
7732
|
{
|
|
7595
7733
|
type: "button",
|
|
@@ -7599,7 +7737,7 @@ function StageGridFrame({
|
|
|
7599
7737
|
}
|
|
7600
7738
|
) : null
|
|
7601
7739
|
] }),
|
|
7602
|
-
/* @__PURE__ */
|
|
7740
|
+
/* @__PURE__ */ jsx31("div", { className: "vos-stage-grid-host", children })
|
|
7603
7741
|
] });
|
|
7604
7742
|
}
|
|
7605
7743
|
function StageCell({
|
|
@@ -7612,12 +7750,12 @@ function StageCell({
|
|
|
7612
7750
|
// accent token. Keeps the grid readable in both themes.
|
|
7613
7751
|
"--vos-cell-alpha": (0.08 + cell.density * 0.84).toFixed(3)
|
|
7614
7752
|
};
|
|
7615
|
-
return /* @__PURE__ */
|
|
7753
|
+
return /* @__PURE__ */ jsx31(
|
|
7616
7754
|
"td",
|
|
7617
7755
|
{
|
|
7618
7756
|
className: `vos-stage-grid-cell${empty ? " vos-stage-grid-cell-empty" : ""}`,
|
|
7619
7757
|
style,
|
|
7620
|
-
children: /* @__PURE__ */
|
|
7758
|
+
children: /* @__PURE__ */ jsx31(
|
|
7621
7759
|
"button",
|
|
7622
7760
|
{
|
|
7623
7761
|
type: "button",
|
|
@@ -7625,7 +7763,7 @@ function StageCell({
|
|
|
7625
7763
|
onClick,
|
|
7626
7764
|
"aria-label": `${cell.lens} \xD7 ${cell.stage}: ${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}`,
|
|
7627
7765
|
title: empty ? "No beliefs in this cell" : `Riskiest: ${cell.assumptions[0]?.Title ?? "\u2014"}`,
|
|
7628
|
-
children: /* @__PURE__ */
|
|
7766
|
+
children: /* @__PURE__ */ jsx31("span", { className: "vos-stage-grid-count vos-num", children: cell.count })
|
|
7629
7767
|
}
|
|
7630
7768
|
)
|
|
7631
7769
|
}
|
|
@@ -7637,24 +7775,24 @@ function CellDrawer({
|
|
|
7637
7775
|
onOpenRecord,
|
|
7638
7776
|
onNavigate
|
|
7639
7777
|
}) {
|
|
7640
|
-
return /* @__PURE__ */
|
|
7778
|
+
return /* @__PURE__ */ jsxs31(
|
|
7641
7779
|
DrawerShell,
|
|
7642
7780
|
{
|
|
7643
7781
|
open: cell !== null,
|
|
7644
7782
|
onClose,
|
|
7645
7783
|
ariaLabel: cell ? `${cell.lens} \xD7 ${cell.stage} \u2014 ${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}` : "Cell drill-through",
|
|
7646
7784
|
children: [
|
|
7647
|
-
/* @__PURE__ */
|
|
7648
|
-
/* @__PURE__ */
|
|
7649
|
-
/* @__PURE__ */
|
|
7650
|
-
/* @__PURE__ */
|
|
7785
|
+
/* @__PURE__ */ jsxs31("header", { className: "vos-drawer-header", children: [
|
|
7786
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
7787
|
+
/* @__PURE__ */ jsx31("p", { className: "vos-drawer-eyebrow", children: "Lens \xD7 Stage" }),
|
|
7788
|
+
/* @__PURE__ */ jsxs31("h2", { className: "vos-drawer-title", children: [
|
|
7651
7789
|
cell?.lens,
|
|
7652
7790
|
" \xD7 ",
|
|
7653
7791
|
cell?.stage
|
|
7654
7792
|
] }),
|
|
7655
|
-
/* @__PURE__ */
|
|
7793
|
+
/* @__PURE__ */ jsx31("p", { className: "vos-hint", children: cell && cell.count > 0 ? `${cell.count} ${cell.count === 1 ? "belief" : "beliefs"}, ranked by Risk \u2014 riskiest first.` : "No beliefs in this cell." })
|
|
7656
7794
|
] }),
|
|
7657
|
-
cell && cell.stage !== "\u2014" && onNavigate && /* @__PURE__ */
|
|
7795
|
+
cell && cell.stage !== "\u2014" && onNavigate && /* @__PURE__ */ jsx31(
|
|
7658
7796
|
"button",
|
|
7659
7797
|
{
|
|
7660
7798
|
type: "button",
|
|
@@ -7669,14 +7807,14 @@ function CellDrawer({
|
|
|
7669
7807
|
}
|
|
7670
7808
|
)
|
|
7671
7809
|
] }),
|
|
7672
|
-
cell && cell.count > 0 ? /* @__PURE__ */
|
|
7810
|
+
cell && cell.count > 0 ? /* @__PURE__ */ jsx31("div", { className: "vos-stage-grid-drawer-body", children: /* @__PURE__ */ jsx31(
|
|
7673
7811
|
RegisterTable,
|
|
7674
7812
|
{
|
|
7675
7813
|
register: "assumptions",
|
|
7676
7814
|
records: cell.assumptions,
|
|
7677
7815
|
onRowClick: onOpenRecord
|
|
7678
7816
|
}
|
|
7679
|
-
) }) : cell ? /* @__PURE__ */
|
|
7817
|
+
) }) : cell ? /* @__PURE__ */ jsx31("p", { className: "vos-empty", style: { margin: 16 }, children: "No beliefs in this cell \u2014 a gap, not a bug." }) : null
|
|
7680
7818
|
]
|
|
7681
7819
|
}
|
|
7682
7820
|
);
|