variant round: roll retired, chance is variant literature (strict parse, crypto pick on reception, picked-only rendering, /story variance metric); entity round: /story the whole deliverable, /table the play projection, the slidwin carry (smart contwin cutoff, whole exchanges, housekeeper reads session-minus-tail); dormant-session rework: universal session lifecycle (dormant->live->finished, sessions/<n> storage), move-at-stop, start lint + auto-send rule, rebaseable housekeeping, turn-0 -> carryover.jsonl, seed -> memory.json, draft-only save-package; format house rules enforced by the nine-rule check-repo (ascii bytes, no text-mutating css); smoke 105/105 + restart + reminder + browser pass green, irene hand-migrated to the new layout

This commit is contained in:
2026-11-15 14:35:00 +00:00
parent c51d31078e
commit fa3f23b474
51 changed files with 3477 additions and 1719 deletions
+9 -9
View File
@@ -1,9 +1,9 @@
// web/widgets.mjs — the small factories the views share.
// web/widgets.mjs -- the small factories the views share.
//
// Three patterns that were hand-copied per use, now one each:
// - armedButton: the two-click confirm (no JS confirm() — it blocks
// - armedButton: the two-click confirm (no JS confirm() -- it blocks
// the embedded pane; every destructive act is armed instead)
// - paneEditor: the status/agenda pattern — a body line, an edit
// - paneEditor: the status/agenda pattern -- a body line, an edit
// button, an inline editor; the section shell stays in index.html
// - modelsBox: the per-run player/housekeeper selects over the
// upstream listing; setup and the play aside each carry one
@@ -14,7 +14,7 @@ import { state } from './state.mjs';
import { banner } from './chrome.mjs';
import { render } from './router.mjs';
// two-click confirm — the second click within 5s fires; anything
// two-click confirm -- the second click within 5s fires; anything
// else disarms. Each button owns its own arm state.
export function armedButton(btn, { label, confirm, fire }) {
let timer = null;
@@ -32,7 +32,7 @@ export function armedButton(btn, { label, confirm, fire }) {
}
// a pane: body line + edit button + inline editor. save(items)
// resolves on success and throws on failure — a failed save keeps
// resolves on success and throws on failure -- a failed save keeps
// the editor open, nothing was changed. setEditable(false) is the
// spectator state: no edit button, an open editor cancels.
export function paneEditor({ section, body, empty, placeholder, rows, format, toText, fromText, save }) {
@@ -80,7 +80,7 @@ export function paneEditor({ section, body, empty, placeholder, rows, format, to
await save(next);
} catch (e) {
banner(e.message);
return; // stay in the editor — nothing was changed
return; // stay in the editor -- nothing was changed
}
items = next;
cancel();
@@ -99,7 +99,7 @@ export function paneEditor({ section, body, empty, placeholder, rows, format, to
};
}
// the upstream model listing, fetched once per session — a live
// the upstream model listing, fetched once per session -- a live
// /models call every render would hammer the endpoint for a list
// that rarely changes
let cachedModels = null;
@@ -118,7 +118,7 @@ function fillSelect(sel, current, list, def) {
o.value = v;
sel.appendChild(o);
};
mk('', `deployment default${def ? ` — ${def}` : ' (unset)'}`);
mk('', `deployment default${def ? ` -- ${def}` : ' (unset)'}`);
const opts = [...list];
if (current && !opts.includes(current)) opts.push(current);
for (const m of opts) mk(m, m);
@@ -126,7 +126,7 @@ function fillSelect(sel, current, list, def) {
}
// the models box: player/housekeeper selects + save, posting the
// per-run overrides. The mount keeps its id — the CSS panels it.
// per-run overrides. The mount keeps its id -- the CSS panels it.
export function modelsBox(mount, { title }) {
const root = typeof mount === 'string' ? $(mount) : mount;
root.textContent = '';