Make facts precede informational outcomes

This commit is contained in:
Meta Vens 2026-08-17 21:19:35 +02:00
commit ab0feece30
9 changed files with 278 additions and 39 deletions

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View file

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>GhostlightDungeon</title> <script type="module" crossorigin src="/assets/index-DmZm_kJC.js"></script>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>GhostlightDungeon</title> <script type="module" crossorigin src="/assets/index-CicytASo.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DLoOYHpE.css">
</head>
<body><header><p class="eyebrow">STARFIRE / PRIVATE VERSE</p><h1>GhostlightDungeon</h1><p id="status" role="status" aria-live="polite">Reading the world…</p></header><main>

View file

@ -198,6 +198,22 @@ async function showPreview(result: any) {
? `Evidence use: ${evidenceCounts.direct_seed ?? 0} direct · ${evidenceCounts.setting_background ?? 0} background · ${evidenceCounts.excluded ?? 0} excluded`
: "Evidence use: no retrieved sources were admitted to this seed.", "quiet"),
);
const branchFacts = Array.isArray(preview.branch_facts) ? preview.branch_facts : [];
const factDisclosure = node("details");
factDisclosure.append(node("summary", `Branch-local world facts (${branchFacts.length}) · contains operator spoilers`));
if (branchFacts.length) {
const list = node("ul");
for (const fact of branchFacts) {
const locations = Array.isArray(fact.discoverable_at_location_ids) && fact.discoverable_at_location_ids.length
? ` · discoverable at ${fact.discoverable_at_location_ids.join(", ")}`
: " · not directly discoverable";
list.append(node("li", `${fact.statement}${locations}`));
}
factDisclosure.append(list);
} else {
factDisclosure.append(node("p", "No branch-local facts are proposed."));
}
card.append(factDisclosure);
const approve = node("button", "Approve and enter");
approve.type = "button";
approve.addEventListener("click", async () => { await compilerPost(`/api/compiler/approve/${result.preview_id}`, {}); await refresh(); });