Line numbers are places in import and export; fix stale scripts

Import: each row's place is its line number, so blank lines leave a
place empty; a fully numbered text file ("38. Title") or a Rank column
gives places directly, and repeated numbers take the next free place.
Entries are added at those places (existing ones there move down), the
review shows each row's #, and the room check covers the highest place.

Export writes a blank line for every empty place, so line N is #N and a
file round-trips.

Static files now carry an ETag and unversioned ones are revalidated on
every load. Scripts import each other without a ?v= tag, so browsers kept
an hour-old import.js (with the "null" bug) after an update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-10-08 14:43:53 -07:00
1 parent 88373176f2
commit 62fcf6b45d
7 files changed
+151 -72

No files matched your search

+2 -2
View File
@@ -889,12 +889,12 @@ input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px;
.import-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.import-row.is-review, .import-row.is-none, .import-row.is-error { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.import-row-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.import-num { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
.import-num { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
.import-src { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-src b { font-weight: 600; }
.badge--ok { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.badge .icon { width: 12px; height: 12px; }
.import-chosen { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding-left: calc(2.5ch + 10px); }
.import-chosen { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding-left: calc(4.5ch + 10px); }
.import-card { display: flex; align-items: center; gap: 10px; min-width: 0; }
.import-card .result-art { width: 38px; flex: none; }
.import-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }