gm surface: home flow, run identity, full-assembly editor, notepad, wrap replay; sigils and dateless rings
This commit is contained in:
+735
-178
File diff suppressed because it is too large
Load Diff
+84
-14
@@ -8,48 +8,118 @@
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<select id="run-select" title="run"></select>
|
||||
<details id="new-run">
|
||||
<summary>new run</summary>
|
||||
<form id="new-run-form">
|
||||
<select id="new-run-package"></select>
|
||||
<input id="new-run-name" placeholder="run id (slug)" autocomplete="off">
|
||||
<button type="submit">create</button>
|
||||
</form>
|
||||
</details>
|
||||
<a id="home-link" href="/">rp-test</a>
|
||||
<div id="window-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="transcript" aria-live="polite"></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>
|
||||
|
||||
<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 window 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 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>
|
||||
<div id="transcript" aria-live="polite"></div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<aside>
|
||||
<aside id="play-aside">
|
||||
<section id="status-pane">
|
||||
<h2>her paper</h2>
|
||||
<ul id="paper"></ul>
|
||||
<div class="pane-head">
|
||||
<h2>her paper</h2>
|
||||
<button id="paper-edit">edit</button>
|
||||
</div>
|
||||
<div id="paper"></div>
|
||||
<div id="paper-editor" hidden>
|
||||
<textarea id="paper-edit-area" rows="5" placeholder="one description per line — empty clears the paper"></textarea>
|
||||
<div class="pane-editor-actions">
|
||||
<button id="paper-save">save</button>
|
||||
<button id="paper-cancel">cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="conflict" hidden></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>close window & housekeep</button>
|
||||
<label id="hk-override-wrap"><input type="checkbox" id="hk-override"> override: skip the unhousekept check</label>
|
||||
<button id="window-open" hidden>open window</button>
|
||||
<button id="hk-replay" hidden title="run the housekeeper over the session log — nothing applied">dry-run the wrap</button>
|
||||
<details id="hk-log" hidden><summary>window 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>
|
||||
</aside>
|
||||
|
||||
<footer>
|
||||
<div id="banner" hidden></div>
|
||||
<textarea id="gm-input" rows="2" placeholder="GM line — Enter sends, Shift+Enter newlines" disabled></textarea>
|
||||
<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>
|
||||
|
||||
+202
-25
@@ -1,6 +1,7 @@
|
||||
/* rp-test SPA — dark, quiet, fiction-first. Three registers: speech is
|
||||
plain, narration is italic (rendered dimmer), OOC is boxed. Machinery
|
||||
(tools, notes, deltas) stays small and muted. */
|
||||
(tools, notes, deltas) stays small and muted. Home / setup views are
|
||||
workbenches: cards, a file editor, read-only context. */
|
||||
|
||||
:root {
|
||||
--bg: #16161a;
|
||||
@@ -25,11 +26,19 @@ html, body {
|
||||
|
||||
body {
|
||||
display: grid;
|
||||
grid-template:
|
||||
"header" auto
|
||||
"main" 1fr
|
||||
"footer" auto / 1fr;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* play keeps the two-column transcript + aside layout */
|
||||
body.play {
|
||||
grid-template:
|
||||
"header header" auto
|
||||
"main aside" 1fr
|
||||
"footer footer" auto / 1fr 300px;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* --- header --- */
|
||||
@@ -44,6 +53,35 @@ header {
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
#home-link { color: var(--accent); text-decoration: none; font-weight: 600; letter-spacing: 0.04em; }
|
||||
#home-link:hover { text-decoration: underline; }
|
||||
|
||||
#window-info { color: var(--dim); font-size: 13px; margin-left: auto; white-space: nowrap; }
|
||||
|
||||
#context-meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); visibility: hidden; }
|
||||
body.play #context-meter { visibility: visible; }
|
||||
#context-bar { width: 90px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
|
||||
#context-fill { height: 100%; width: 0; background: var(--ok); transition: width 0.4s; }
|
||||
#context-fill.hot { background: var(--danger); }
|
||||
|
||||
#diag-btn { font-size: 11px; padding: 1px 8px; color: var(--dim); }
|
||||
#diag {
|
||||
position: fixed;
|
||||
right: 14px;
|
||||
top: 46px;
|
||||
width: min(620px, 85vw);
|
||||
max-height: 45vh;
|
||||
overflow-y: auto;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
font: 11px/1.5 ui-monospace, Consolas, monospace;
|
||||
color: var(--dim);
|
||||
white-space: pre-wrap;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
select, input, textarea, button {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
@@ -56,21 +94,130 @@ select, input, textarea, button {
|
||||
button { cursor: pointer; }
|
||||
button:hover { border-color: var(--accent); }
|
||||
button:disabled { opacity: 0.4; cursor: default; }
|
||||
button.primary { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
#new-run summary { cursor: pointer; color: var(--dim); }
|
||||
#new-run form { display: flex; gap: 6px; margin-top: 6px; }
|
||||
|
||||
#window-info { color: var(--dim); font-size: 13px; margin-left: auto; white-space: nowrap; }
|
||||
|
||||
#context-meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
|
||||
#context-bar { width: 90px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
|
||||
#context-fill { height: 100%; width: 0; background: var(--ok); transition: width 0.4s; }
|
||||
#context-fill.hot { background: var(--danger); }
|
||||
|
||||
/* --- transcript --- */
|
||||
/* --- main / views --- */
|
||||
|
||||
main { grid-area: main; overflow-y: auto; padding: 18px 22px; }
|
||||
|
||||
h1 { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: normal; margin: 4px 0 14px; }
|
||||
|
||||
.hint { color: var(--dim); font-size: 13px; font-style: italic; }
|
||||
|
||||
/* cards: runs on home, packages on /new — real buttons, left-aligned */
|
||||
.card {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
text-align: left;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
background: var(--panel);
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.card:hover { border-color: var(--accent); }
|
||||
.card.busy { opacity: 0.5; cursor: wait; }
|
||||
.card-name { display: block; font-weight: 600; letter-spacing: 0.02em; }
|
||||
.card-meta { display: block; color: var(--dim); font-size: 13px; margin-top: 2px; }
|
||||
.card-state { display: block; font-size: 12px; margin-top: 6px; color: var(--dim); }
|
||||
.card-state.draft { color: var(--accent); }
|
||||
.card-state.ok { color: var(--ok); }
|
||||
.card-state.attention { color: var(--danger); }
|
||||
|
||||
#new-run-btn { margin-top: 8px; }
|
||||
|
||||
/* the naming form (new run) and the vars box (setup) */
|
||||
#create-form { max-width: 560px; }
|
||||
#create-form h2 { font-size: 15px; margin: 0 0 14px; color: var(--text); font-weight: 600; }
|
||||
.field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--dim); font-size: 13px; }
|
||||
.field input { flex: 1; }
|
||||
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
|
||||
|
||||
#setup-vars {
|
||||
max-width: 560px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 6px;
|
||||
background: var(--panel);
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
#setup-vars h2 {
|
||||
margin: 0 0 10px; font-size: 11px; letter-spacing: 0.14em;
|
||||
text-transform: uppercase; color: var(--dim); font-weight: normal;
|
||||
}
|
||||
#setup-vars-state { color: var(--dim); font-size: 12px; }
|
||||
|
||||
/* --- setup: the editor --- */
|
||||
|
||||
.setup-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 14px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.setup-head h1 { margin: 0; }
|
||||
#setup-state { color: var(--dim); font-size: 13px; flex: 1; }
|
||||
#setup-delete { font-size: 12px; color: var(--danger); }
|
||||
|
||||
.setup-body {
|
||||
display: grid;
|
||||
grid-template-columns: 190px 1fr;
|
||||
gap: 14px;
|
||||
height: calc(100vh - 130px);
|
||||
}
|
||||
|
||||
#setup-files { overflow-y: auto; }
|
||||
.file-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
}
|
||||
.file-item:hover { border-color: var(--line); }
|
||||
.file-item.current { border-color: var(--accent); }
|
||||
.file-item.absent { color: var(--dim); font-style: italic; }
|
||||
.file-item.ro { color: var(--dim); }
|
||||
.file-item.dirty .file-dirty::after { content: "*"; color: var(--accent); }
|
||||
|
||||
#setup-editor { display: flex; flex-direction: column; min-width: 0; }
|
||||
#edit-stack { position: relative; flex: 1; min-height: 0; }
|
||||
/* the highlight overlay: a pre behind a transparent-text textarea,
|
||||
identical metrics, scroll-synced — sigils and vars light up in place */
|
||||
#edit-hl, #setup-edit {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
margin: 0;
|
||||
padding: 5px 8px;
|
||||
font: 13px/1.5 ui-monospace, Consolas, monospace;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
}
|
||||
#edit-hl { pointer-events: none; overflow: hidden; color: var(--text); border-color: transparent; }
|
||||
#setup-edit {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
caret-color: var(--text);
|
||||
resize: none;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#setup-edit::selection { background: rgba(201, 162, 109, 0.3); }
|
||||
.tok-sigil { color: var(--accent); }
|
||||
.tok-var { color: var(--ok); }
|
||||
#setup-edit-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
|
||||
#setup-edit-state { color: var(--dim); font-size: 12px; }
|
||||
|
||||
/* --- transcript (play) --- */
|
||||
|
||||
.turn { margin: 0 0 20px; max-width: 760px; }
|
||||
.turn .who { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 3px; }
|
||||
.turn.gm .who { color: var(--accent); }
|
||||
@@ -88,7 +235,6 @@ main { grid-area: main; overflow-y: auto; padding: 18px 22px; }
|
||||
}
|
||||
.chip.lost { text-decoration: line-through; }
|
||||
.chip.gained { color: var(--ok); border-color: var(--ok); }
|
||||
.chip.machinery { font-size: 11px; }
|
||||
|
||||
.machinery {
|
||||
margin: 6px 0; font-size: 12px; color: var(--dim);
|
||||
@@ -96,7 +242,17 @@ main { grid-area: main; overflow-y: auto; padding: 18px 22px; }
|
||||
}
|
||||
.machinery .head { color: var(--text); }
|
||||
|
||||
/* the bundle: a collapsed card, per part */
|
||||
/* the opening beat, when the window opened but the beat never sent */
|
||||
.beat {
|
||||
display: flex; align-items: center; gap: 14px;
|
||||
border: 1px solid var(--accent); border-radius: 6px;
|
||||
padding: 8px 12px; margin: 0 0 16px; max-width: 760px;
|
||||
font-size: 13px; color: var(--dim);
|
||||
}
|
||||
.beat button { margin-left: auto; }
|
||||
|
||||
/* the bundle: a collapsed card, per part — the system message is
|
||||
inspectable like the rest, read-only */
|
||||
details.bundle {
|
||||
margin: 14px 0; border: 1px solid var(--line); border-radius: 6px;
|
||||
background: var(--panel); font-size: 13px; color: var(--dim);
|
||||
@@ -106,32 +262,51 @@ details.bundle pre { margin: 0; padding: 0 12px 10px; white-space: pre-wrap; fon
|
||||
|
||||
.error-line { color: var(--danger); }
|
||||
|
||||
/* --- aside --- */
|
||||
/* --- aside (play) --- */
|
||||
|
||||
aside {
|
||||
#play-aside {
|
||||
grid-area: aside;
|
||||
border-left: 1px solid var(--line);
|
||||
background: var(--panel);
|
||||
padding: 14px;
|
||||
overflow-y: auto;
|
||||
font-size: 13px;
|
||||
display: none;
|
||||
}
|
||||
body.play #play-aside { display: block; }
|
||||
|
||||
aside h2 {
|
||||
#play-aside h2 {
|
||||
margin: 4px 0 8px; font-size: 11px; letter-spacing: 0.14em;
|
||||
text-transform: uppercase; color: var(--dim); font-weight: normal;
|
||||
}
|
||||
|
||||
#paper { list-style: none; margin: 0; padding: 0; }
|
||||
#paper li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
|
||||
#paper li::before { content: "— "; color: var(--dim); }
|
||||
#paper li.empty { color: var(--dim); font-style: italic; }
|
||||
.pane-head { display: flex; align-items: baseline; gap: 8px; }
|
||||
.pane-head h2 { flex: 1; margin: 4px 0 8px; }
|
||||
.pane-head button { font-size: 11px; padding: 1px 8px; color: var(--dim); }
|
||||
|
||||
#paper { margin: 0; line-height: 1.5; }
|
||||
#paper.empty { color: var(--dim); font-style: italic; }
|
||||
|
||||
#paper-editor textarea { width: 100%; resize: vertical; font: 13px/1.5 inherit; }
|
||||
.pane-editor-actions { display: flex; gap: 6px; margin-top: 6px; }
|
||||
.pane-editor-actions button { font-size: 12px; padding: 2px 12px; }
|
||||
|
||||
#conflict {
|
||||
margin-top: 10px; padding: 8px; border: 1px solid var(--danger);
|
||||
border-radius: 4px; color: var(--danger); font-size: 12px;
|
||||
}
|
||||
|
||||
/* the GM's notepad: always on screen during play, auto-saved */
|
||||
#notes-pane { margin-top: 22px; }
|
||||
#notes-state { color: var(--dim); font-size: 11px; }
|
||||
#gm-notes {
|
||||
width: 100%;
|
||||
min-height: 150px;
|
||||
resize: vertical;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
#housekeeping { margin-top: 22px; }
|
||||
#hk-state { color: var(--dim); margin-bottom: 8px; white-space: pre-wrap; }
|
||||
#hk-state.rejected { color: var(--danger); }
|
||||
@@ -141,21 +316,23 @@ aside h2 {
|
||||
#housekeeping button { width: 100%; margin-top: 6px; }
|
||||
#hk-override-wrap { display: block; margin-top: 6px; color: var(--dim); font-size: 12px; }
|
||||
|
||||
/* --- footer --- */
|
||||
/* --- footer (play) --- */
|
||||
|
||||
footer {
|
||||
grid-area: footer;
|
||||
display: flex; gap: 8px; padding: 10px 14px;
|
||||
background: var(--panel); border-top: 1px solid var(--line);
|
||||
position: relative;
|
||||
display: none;
|
||||
}
|
||||
body.play footer { display: flex; }
|
||||
#gm-input { flex: 1; resize: none; }
|
||||
#gm-send { padding: 5px 18px; }
|
||||
#busy { color: var(--dim); font-size: 12px; font-style: italic; white-space: nowrap; align-self: center; }
|
||||
|
||||
/* in-page banner — replaces JS alert()/confirm() (they block the
|
||||
embedded pane); errors and notices land here instead */
|
||||
#banner {
|
||||
position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%);
|
||||
position: fixed; left: 50%; top: 12px; transform: translateX(-50%);
|
||||
max-width: 70%; padding: 8px 14px; border-radius: 6px;
|
||||
background: var(--panel); border: 1px solid var(--danger);
|
||||
color: var(--danger); font-size: 13px; white-space: pre-wrap; z-index: 10;
|
||||
|
||||
Reference in New Issue
Block a user