local-label-queue / index.html
WideChaos's picture
Publish Local Label Queue 0.1.0
d806877 verified
Raw History Blame Contribute Delete
8.08 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none'"
/>
<title>Local Label Queue</title>
<link rel="stylesheet" href="style.css" />
<script type="module" src="app.mjs"></script>
</head>
<body>
<main>
<header>
<p class="eyebrow">WIDECHAOS / LOCAL LABEL QUEUE</p>
<h1>Annotate text. Keep the unfinished records.</h1>
<p class="lede">
A browser queue with explicit labels, abstentions and portable
checkpoints.
</p>
<p class="memory-note">
Decisions stay in this page's memory. Download a checkpoint before
closing or reloading; there is no automatic backup.
</p>
</header>
<div class="workspace">
<aside>
<section>
<h2>Start or restore</h2>
<details id="setup" open>
<summary>New session setup</summary>
<label for="items">Inventory JSONL</label
><textarea
id="items"
rows="9"
spellcheck="false"
aria-describedby="setup-help"
></textarea>
<p id="setup-help" class="hint">
Each line: id, group, text. Use null for an unknown group. Up to
1,000 records / 1 MiB UTF-8. The sample has 12 synthetic items
with no gold labels.
</p>
<label for="taxonomy">Labels · one per line</label
><textarea id="taxonomy" rows="3" spellcheck="false">
bug
question
example</textarea
>
<p class="hint">
Use 2–9 distinct labels. Editing setup leaves the active session
unchanged until you start it.
</p>
<p class="replace-note">
Starting replaces current decisions. Download their checkpoint
first if you need them.
</p>
<button id="start" disabled>Start new session</button>
</details>
<div class="restore">
<label for="checkpoint-file">Checkpoint JSON file</label
><input
id="checkpoint-file"
type="file"
accept=".json,application/json"
/>
<p class="hint">
Files are read locally, not uploaded. A verified preview appears
before replacement.
</p>
<div id="restore-preview" hidden>
<p id="preview-summary"></p>
<p id="preview-hash" class="mono hint"></p>
<button id="replace" class="secondary">
Replace session with this checkpoint
</button>
</div>
</div>
<p class="hint">
Checksums detect inconsistent content. Anyone can modify and
rehash a file; this is not a signature or authenticity check.
</p>
</section>
<section id="save-pane" hidden>
<h2>Keep a checkpoint</h2>
<p id="save-state" class="save-state"></p>
<button id="prepare">Prepare current downloads</button>
<div id="downloads" class="downloads"></div>
<p class="hint">
Both files include all source texts, ids, groups and current
decisions. Check contents before sharing. Downloading annotations
does not save a resumable checkpoint.
</p>
</section>
</aside>
<div>
<p id="status" role="status" aria-live="polite">
Loading synthetic inventory…
</p>
<p id="error" role="alert" tabindex="-1" hidden></p>
<div id="initial" class="placeholder">
Start a session or restore a verified checkpoint to review records.
</div>
<section id="session-pane" hidden>
<h2>Active session</h2>
<div id="counts" class="counts"></div>
<p id="reviewed" class="hint"></p>
<progress
id="progress"
max="1"
value="0"
aria-label="Reviewed fraction, including abstentions"
></progress>
<p id="inventory-hash" class="mono hint"></p>
<div class="controls">
<div>
<label for="filter">Queue filter</label
><select id="filter">
<option value="all">All records</option>
<option value="unlabelled">Unlabelled</option>
<option value="labelled">Labelled</option>
<option value="abstained">Abstained</option>
</select>
</div>
<div>
<label for="jump">Jump to record</label
><select id="jump"></select>
</div>
</div>
<div class="navigation">
<button id="previous" class="secondary">Previous record</button
><span id="position"></span
><button id="next" class="secondary">Next record</button>
</div>
<article
id="record-panel"
tabindex="0"
aria-label="Current annotation record"
aria-describedby="shortcuts"
>
<div id="empty-record" hidden></div>
<div id="record" hidden>
<p id="record-id" class="record-id"></p>
<p id="record-group" class="hint"></p>
<blockquote id="source-text"></blockquote>
<p id="decision" class="decision"></p>
<div
id="label-buttons"
role="group"
aria-label="Choose a label"
class="label-buttons"
></div>
<div class="actions">
<button id="abstain" class="secondary">Abstain · A</button
><button id="clear" class="secondary">Clear decision</button>
</div>
</div>
</article>
<div class="actions undo-row">
<button id="undo" class="secondary">
Undo last decision · U
</button>
<p id="undo-count" class="hint"></p>
</div>
<p id="shortcuts" class="hint">
Keyboard: 1–9 choose a label, A abstains, U undoes. Shortcuts are
inactive inside text and selection inputs. A decision advances to
the next unlabelled item, switching to All if needed.
</p>
<details>
<summary>Counts by label</summary>
<div class="table-wrap">
<table>
<thead>
<tr>
<th scope="col">Label</th>
<th scope="col">Records</th>
</tr>
</thead>
<tbody id="label-counts"></tbody>
</table>
</div>
</details>
<p class="hint">
Reviewed includes abstentions. Completion is not evidence that
labels are correct; every record remains in exports.
</p>
</section>
</div>
</div>
<footer>
<p>
Local memory and explicit downloads · no models, uploads, browser
storage or telemetry ·
<a href="README.md">Format and reproducible checks</a>
</p>
<p lang="zh">
标签、弃权、未完成分别保留。刷新前下载检查点,恢复先校验再明确替换;哈希不证明文件来源或标注正确性。
</p>
</footer>
</main>
</body>
</html>