From edd9cdf94048883dc9d24acc95a3287e67ebffd4 Mon Sep 17 00:00:00 2001 From: 44r0n7 <44r0n7+gitea@pm.me> Date: Sat, 24 Oct 2026 01:19:25 -0400 Subject: [PATCH] Name box in the New world panel (t10) Co-Authored-By: Claude Opus 5.5 --- docs/PROJECT_MAP.md | 6 +++--- docs/agent-log.md | 11 +++++++++++ src/shell.html | 1 + src/styles/style.css | 1 + src/ui/loop.js | 11 +++++++++-- src/ui/saves.js | 3 ++- src/ui/session.js | 4 ++-- tasks/t10_world_name_box.md | 10 ++++++++-- test/play.py | 17 +++++++++++++++-- 9 files changed, 52 insertions(+), 12 deletions(-) diff --git a/docs/PROJECT_MAP.md b/docs/PROJECT_MAP.md index c9d038e..7ad11c8 100644 --- a/docs/PROJECT_MAP.md +++ b/docs/PROJECT_MAP.md @@ -370,9 +370,9 @@ The title screen art. - functions: buildTitleCells, drawTitle - variables: FONT5, TITLE -### src/ui/saves.js (177 lines) +### src/ui/saves.js (178 lines) Saves in IndexedDB, world files (export / import) and the blueprint library. -- functions: newWorldId, worldWrite, listWorlds, putWorldEntry, worldNewest, deleteWorld, renameWorld, migrateWorlds, saveWorld, newestSave, b64FromBytes, bytesFromB64, gz, exportWorld, importWorldFile, libLoad, libSave, bpEncode, bpValid, bpDecode +- functions: newWorldId, worldWrite, listWorlds, putWorldEntry, worldNewest, deleteWorld, cleanWorldName, renameWorld, migrateWorlds, saveWorld, newestSave, b64FromBytes, bytesFromB64, gz, exportWorld, importWorldFile, libLoad, libSave, bpEncode, bpValid, bpDecode - variables: DB, worldIdTime, worldIdCounter, worldWrites ### src/ui/session.js (125 lines) @@ -431,7 +431,7 @@ Previews drawn under the cursor: build ghosts, drill aim and pulses, selections, Events from the simulation (emit) turned into sounds, toasts and cards. - functions: drainEvents -### src/ui/loop.js (119 lines) +### src/ui/loop.js (126 lines) The frame loop and boot. - functions: scanVisible, frame, boot - variables: lastT, acc, lastRender, frameMs, simMs, fpsSm, ambientT diff --git a/docs/agent-log.md b/docs/agent-log.md index 55fe21b..d82166e 100644 --- a/docs/agent-log.md +++ b/docs/agent-log.md @@ -4,6 +4,17 @@ What agents have done, newest first. Add an entry for every piece of work: the d note or request it was for, what changed, the files touched, the tests run, and anything left open or not verified. Keep each entry short; the git history has the details. +## 2026-10-24: t10 World name box for a new world (Claude Code, Codex) + +- `src/shell.html`, `src/styles/style.css`: a Name box across the top of the New world panel. +- `src/ui/loop.js`: opening the panel fills it with the next `World N` and selects it; Enter in + Name or Seed generates. `src/ui/session.js`: `startNewWorld(seed, w, h, name)`. +- `src/ui/saves.js`: `cleanWorldName` (trim, 40 characters, else a fallback), shared with + `renameWorld`. +- `test/play.py`: a typed name reaches the Worlds list and the pause menu; the default and an + all-spaces name both give `World N`. Screenshot `shots/play/new-world.png` checked. +- Tests: `run_all.py --browser` all pass. + ## 2026-10-24: t7 Option to turn off smooth pan following the mouse (Claude Code, Codex) - New setting `cameraLead` (Display: "Camera looks toward the pointer", on by default): diff --git a/src/shell.html b/src/shell.html index 6aa332f..82cbaeb 100644 --- a/src/shell.html +++ b/src/shell.html @@ -50,6 +50,7 @@