Files
tiny-worlds/web/index.html
T
mute 53f992a5e0 the rewind and conflict-persistence rounds, plus the GM's reminder edit: the take-back and the honest error record.
The rewind (GM, 2026-11-17): "session rewind" came off the operator queue and was redesigned simpler than the turn-surgery proposal -- physical truncation, not typed cut events; fork is the preservation story (fork before rewinding keeps the branch, no fork no archaeology), and the derivation model made the simple design free: status, agenda, and the sheet are all scanState-derived from the log, so a cut re-derives every channel with zero compensation, and every log reader (the view, the scan, the carry walk, the story, housekeeping) sees the same shorter log with nothing new between them. As built: the send commits the rewind -- POST /turn takes optional rewind (a log line index naming one of your turns; that turn and everything after it leave the log, the send replaces it) and optional expect (the log line count the client composed against; the log only moves through sends, so a mismatch means a stale tab and refuses before anything rides -- the ask answer carries it too); gmTurn's order is pendingAsk-refusal -> expect -> expand -> truncate -> land, one commit inside the activity lock, a crash between truncate and land leaving a consistent shorter log and no rewound-but-waiting state ever existing; the floor is the start marker ({t:'note', kind:'start'} written once at start right after the carryover) -- the frozen opening never unwinds, the rule reads the LAST marker (a carried log may hold an older one inside its opening), and a pre-build log refuses loudly as unmarked; the player-facing records tools are OFF until rewind-compatible (their verbs mutate the session db, which a truncation does not compensate; the manifest carries ask_gm alone whatever the settings gate says, while the CLI's --gm filings never ride a turn and stand, rewind-safe by construction); and /retry never existed -- resending the same words after a rewind IS the retry (the GM had no recollection of where the idea came from; dropped, subsumed). The SPA stages the gesture client-side until the send: a per-GM-turn rewind control (the transcript walk's onRewind, offered live and ask-free only), two-click armed, the target's EXPANDED words auto-filling the composer (the log is truth, $vars baked), a composer tint plus a note naming the cut in entries (the colour alone says something is pending, not what dies), cancel restoring the pre-gesture state, text in the box disabling the buttons under the rename "to rewind delete your current input" (a visible affordance, not hiding), and a failed send keeping the gesture armed only on a 400 (anything else may have moved the log). The gm.md desync is parked to ROADMAP's deferred list (notes taken at turn 30 surviving a rewind to 20, orphaned from the narrative -- nothing mechanical is safe there, fork covers it meanwhile). Verified: typecheck green on both programs, smoke ALL PASS with +14 rewind assertions (the floor refusals, her-turn refusal, the stale-expect 409, the truncation 45->42 lines, the dead-range sheet record reverting, the story dropping the cut, the marker surviving), restart + reminder checks green, check-repo clean after staging, and a browser pass committing a real rewind through the UI end to end (the gesture staged, cancelled, re-staged, edited, sent: 20 turns to 8 on the table, the wire body exactly {line, expect, rewind}, zero console errors).

The conflict-persistence round (GM, 2026-11-18): conflicts stay in the contwin and are self-contained. The old view policy treated conflicts as transient (visible only while the latest word, elided after) -- overruled: a mistake remains visible so it is not made again. Self-contained means the conflict DESCRIBES ITS PROBLEM IN FULL, quoting the offending emission, because the block it answers strips from the view (STRIP_HERS takes her <model>/<mind>/<sheet>) -- an old conflict cannot lean on the turn it immediately follows, and the quote is the only visible trace of what went wrong. As built: renderView renders conflictOnly unconditionally (the lastGmIdx elision gone, the variable with it); a shared quote() helper (trim, collapse whitespace, cap at 160 -- enough to identify the mistake, never a wall) feeds the guards ("yours said: {...}" on <model> and <sheet>, "(you set: ...)" on the mind verb's per-key refusals, "-- yours: {the block}" on mind JSON that does not parse; the out-of-bounds mind already carried "(got 7)" and keeps its exact form); and the ripple caught: carry.mjs's visibleBytes counted conflicts as zero-cost on the grounds they "elide once the story moves on" -- carried conflicts now render in the new session, so they cost against the 96KB budget like the prose they are. The story keeps omitting conflicts (machinery, not deliverable) and invariants' one line still reads true, so no prompt-side change was needed. Verified: smoke ALL PASS with +3 assertions (both session-1 conflicts rendering in the view despite being old news, the model-guard quote, the sheet-guard quote), restart + reminder checks green, check-repo clean.

The GM's prompt-side edit rides the same commit: the reminder's decision passage gains the checked-action metrics -- three probes for when an action should be written as intent (external conditions: the lever; scope expansion: the mall; unilateral canonisation: the gasp at what is inside), each example attempt-form under the handbook's "the attempt, never the outcome", and the third deliberately bending that line with the price named in the same breath (the reaction is hers to have, the contents never hers to say, and the dud reveal embraced as a subversion vehicle -- purview taught as a negotiation, not a prohibition); the impulsive/irrational line now names the channel ("mention it in the narration"); the two tab-indented continuations normalized to the file's spaces.

Also: the smoke's final line now prints the draft id (a smoke draft survived cleanup because "run ids" never named it -- caught on the runs listing, deleted, the print is the fix). Docs: README's protocol passage carries the rewind and the conflict lifetime, with the records-off notes in the substrate section, the tiers table, and the layout; DECISIONS #15 gains the full amendment (the ruling record: a-g, expect, the ask refusal, records-off, the gm.md park); QUESTIONS' turn-surgery details closed (retry dropped, truncation ruled); ROADMAP's surgery sections built-and-amended, the operator queue line removed, the gm.md desync parked; DICTIONARY gains the rewind entry and amends the conflict and view entries. The box package and detention stay untracked WIP, untouched.
2026-11-18 17:24:37 +00:00

213 lines
7.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tiny Worlds</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<header>
<a id="home-link" href="/">Tiny Worlds</a>
<span id="who"></span>
<div id="session-info"></div>
<div id="context-meter" title="context usage of the last call">
<div id="context-bar"><div id="context-fill"></div></div>
<span id="context-label"></span>
</div>
<button id="diag-btn" title="diagnostics log">log</button>
</header>
<main>
<section id="view-claim" hidden>
<h1>claim an invite</h1>
<p class="hint" id="claim-hint"></p>
<form id="claim-form">
<label class="field">invite code <input id="claim-code" autocomplete="off"></label>
<label class="field">display name <input id="claim-name" autocomplete="off"></label>
<div class="form-actions">
<button type="submit" class="primary">claim</button>
</div>
</form>
</section>
<section id="view-home" hidden>
<h1>runs</h1>
<div id="run-list"></div>
<button id="new-run-btn" class="primary">new run</button>
<section id="admin" hidden>
<h2>admin</h2>
<div class="form-actions">
<button id="invite-mint">mint invite</button>
<span id="invite-code"></span>
</div>
<div id="invite-list"></div>
<div id="user-list"></div>
<div id="models-admin">
<h3>models</h3>
<div id="models-state" class="hint"></div>
<div class="form-actions">
<button id="models-discover">discover</button>
<button id="models-refine">refine</button>
</div>
<div id="refine-progress" hidden>
<div id="refine-topline">
<span id="refine-count"></span>
<span id="refine-label" class="hint"></span>
</div>
<div id="refine-bar"><div id="refine-fill"></div></div>
</div>
<div id="refine-lines"></div>
<div id="models-list"></div>
</div>
</section>
</section>
<section id="view-new" hidden>
<h1>new run</h1>
<div id="package-pick">
<p class="hint">a run is a copy of the package -- everything stays editable until the session opens</p>
<div id="package-list"></div>
</div>
<form id="create-form" hidden>
<h2 id="create-title"></h2>
<label class="field">package name <input id="create-name" autocomplete="off"></label>
<label class="field">main character name <input id="create-pc" autocomplete="off"></label>
<div class="form-actions">
<button type="button" id="create-back">back</button>
<button type="submit" class="primary">create</button>
</div>
</form>
</section>
<section id="view-setup" hidden>
<div class="setup-head">
<h1 id="setup-title"></h1>
<span id="setup-state"></span>
<button id="setup-delete">delete draft</button>
<button id="setup-start" class="primary">start</button>
</div>
<div id="setup-vars" hidden>
<h2>prompt variables -- declared by the prompts, filled per run</h2>
<div id="setup-vars-list"></div>
<div class="form-actions">
<button id="setup-vars-save">save variables</button>
<span id="setup-vars-state"></span>
</div>
</div>
<div id="setup-models"></div>
<div id="setup-savepkg">
<input id="savepkg-name" placeholder="new package display name" autocomplete="off">
<button id="savepkg-btn">save as package</button>
<span id="savepkg-state"></span>
</div>
<div class="setup-body">
<nav id="setup-files"></nav>
<div id="setup-editor">
<div id="edit-stack">
<pre id="edit-hl" aria-hidden="true"></pre>
<textarea id="setup-edit" spellcheck="false"></textarea>
</div>
<div id="setup-edit-bar">
<button id="setup-save">save</button>
<span id="setup-edit-state"></span>
</div>
</div>
</div>
</section>
<section id="view-play" hidden>
<nav id="table-tabs" hidden>
<button id="tab-table" class="tab">table</button>
<button id="tab-raw" class="tab">raw</button>
</nav>
<div id="transcript" aria-live="polite"></div>
</section>
<section id="view-story" hidden>
<div class="story-head">
<h1 id="story-title"></h1>
<button id="story-fork">fork this run</button>
<button id="story-back">back to the table</button>
</div>
<div id="story"></div>
</section>
</main>
<aside id="play-aside">
<section id="status-pane">
<div class="pane-head">
<h2>her status</h2>
</div>
<div id="status"></div>
<div id="conflict" hidden></div>
</section>
<section id="agenda-pane">
<div class="pane-head">
<h2>her agenda</h2>
</div>
<div id="agenda"></div>
</section>
<section id="sheet-pane">
<div class="pane-head">
<h2>the sheet</h2>
</div>
<div id="sheet"></div>
</section>
<section id="notes-pane">
<div class="pane-head">
<h2>gm notes</h2>
<span id="notes-state"></span>
</div>
<textarea id="gm-notes" placeholder="yours alone -- never sent to the model"></textarea>
</section>
<section id="housekeeping">
<h2>housekeeping</h2>
<div id="hk-state"></div>
<button id="hk-run" hidden>stop session</button>
<label id="hk-override-row" hidden><input type="checkbox" id="hk-override"> override: skip the unhousekept check</label>
<button id="session-open" hidden>start session</button>
<button id="hk-rerun" hidden title="a fresh pass over the finished predecessor -- the dormant session's rings are replaced">re-run housekeeping</button>
<button id="hk-replay" hidden title="run the housekeeper over a session log -- nothing applied">dry-run housekeeping</button>
<details id="hk-log" hidden><summary>session log</summary><pre id="hk-log-content"></pre></details>
<details id="hk-replay-log" hidden><summary>replay manifest</summary><pre id="hk-replay-content"></pre></details>
</section>
<section id="story-pane">
<h2>the story</h2>
<button id="story-link">read the story so far</button>
</section>
<section id="fork-pane">
<h2>fork</h2>
<p class="hint">a copy of this run -- yours to continue</p>
<button id="fork-btn">fork this run</button>
</section>
<section id="models-pane" hidden></section>
</aside>
<footer>
<div id="rewind-note" hidden>
<span id="rewind-note-text"></span>
<button id="rewind-cancel">cancel rewind</button>
</div>
<div id="gm-stack">
<pre id="gm-hl" aria-hidden="true"></pre>
<textarea id="gm-input" rows="6" placeholder="GM turn -- Enter newlines, Ctrl+Space sends" disabled></textarea>
</div>
<span id="busy" hidden>her turn...</span>
<button id="gm-send" disabled>send</button>
</footer>
<div id="banner" hidden></div>
<pre id="diag" hidden></pre>
<dialog id="ask-modal">
<h2>the player asks</h2>
<p id="ask-question"></p>
<textarea id="ask-answer" rows="3" placeholder="your ruling -- Enter sends"></textarea>
<button id="ask-send">answer</button>
</dialog>
<script type="module" src="/app.mjs"></script>
</body>
</html>