Files
tiny-worlds/web/index.html
T
mute 193dc336be gm-input expansion built from the roadmap (DECISIONS #9's strictness ruling): the GM's line and ask answers expand at ingestion -- @PC/@Package and $vars resolve before the log, an unresolved token refuses the turn with a 400 naming it and nothing appended; the log records the expanded line, keeping continuation carryovers expansion-free by construction; smoke +4 (the $Bogus refusal, the log provably unchanged, a live sigil turn, the expanded line in the log) -- 115/115 all pass; the GM input gains a highlight overlay (the setup editor's stack pattern transplanted): *italics* render italic, **bold** renders bold, @PC/@Package gold, $vars green, every character kept on screen (the asterisks too) so the caret never desyncs, bold/italics matched per-line like the transcript renderer; the box rekeys -- Enter is a plain newline, Ctrl+Space sends, placeholder updated; and a pre-existing bug the live pass caught: failed-action banners were wiped by the render() that follows every action (the runGone trap) -- sendTurn, sendAnswer, and startRun now set the banner after the render; browser-proven end to end: tokens highlight in place, Enter newlines, the refusal loop shows the banner and restores the line un-eaten and still highlighted, the sigil expands in the log, zero console errors; the roadmap item struck as built, DECISIONS #9 amended to same-day-built, README's substitution paragraph and AGENTS' identity-model bullet carry the live-input rule; typecheck green on both programs, check-repo clean
2026-11-15 23:45:15 +00:00

186 lines
6.2 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>
</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="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="gm-stack">
<pre id="gm-hl" aria-hidden="true"></pre>
<textarea id="gm-input" rows="2" placeholder="GM line -- 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>