diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 479339e..161766d 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -644,3 +644,9 @@ above, including: requires fully explored space and prefers up on equal distances. A 256-point trail records every four grains without per-tick allocations; loading rebuilds it from the bot position. Searches happen only on burial, capped at 440 nudge and 256 trail probes per escape episode. + +- **New-world seed controls (t100, 2026-10-29).** The owner asked for a dice icon beside + the seed and numeric validation matching the internal limit. Keep only digits and clamp + above 4294967295 with a nearby hint. Zero is a seed; empty means random on Generate. + The dice uses the same six-digit random rule as the initial field and refreshes the + automatic camp name while preserving a name the player typed. diff --git a/docs/PROJECT_MAP.md b/docs/PROJECT_MAP.md index 0d89670..a8d76e2 100644 --- a/docs/PROJECT_MAP.md +++ b/docs/PROJECT_MAP.md @@ -622,7 +622,7 @@ Shared world colours, minimap and full map. Browser-only clocks; simulation code stays usable without a browser or a clock. - variables: PERF_MARKS, PERF_FRAME, perfMarks, perfTimes, perfLast -### src/ui/loop.js (150 lines) +### src/ui/loop.js (170 lines) The frame loop and boot. - functions: scanVisible, frame, boot - variables: lastT, acc, lastRender, frameMs, simMs, fpsSm, ambientT @@ -678,6 +678,7 @@ The frame loop and boot. - `test/t_render_dirty.js`: Render invalidation must not depend on whether a grain moved or the chunk stayed awake. - `test/t_screw_heat.js`: t69: melt feedback, full-cost repair without disturbing the load, and repair undo. - `test/t_screw_heat.py`: t69 only: both looks, persistent damage, hover, first message and real click/G repair. +- `test/t_seed.py`: t100: new-world seed editing, random button and generation, in both looks. - `test/t_silo_contents.js`: Stored snow keeps its identity and remains in the world's water budget. - `test/t_sim_optimizations.js`: Optimized paths must match the full roof scan and the original heat loop exactly. - `test/t_slope_belt_art.js`: Drawing geometry against real parts, without changing transport. diff --git a/docs/TESTING.md b/docs/TESTING.md index da3ee69..bac3114 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -94,6 +94,10 @@ screenshots go to `shots/t72-{retrace,escape,open}.png`. ## Browser tests +- `python3 test/t_seed.py` checks the new-world seed field: typed and pasted text, + real text dragging, clamping at 4294967295, zero and empty seeds, keyboard dice + activation, automatic/custom names and real generation with seed zero. Both-look + screenshots of the dice and limit hint go to `shots/t100-{pixel,smooth}.png`. - They need the `.venv` from README.md → Develop; plain `python3` switches to it on its own. - `test/play.py` (about 2.5 minutes) builds a world through the title screen and plays it with real input. It checks the tools, building, copy/cut/paste, undo, the build menu, filters, pipes, diff --git a/docs/agent-log.md b/docs/agent-log.md index 5956be2..24081d2 100644 --- a/docs/agent-log.md +++ b/docs/agent-log.md @@ -4,6 +4,18 @@ 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-29: t100 new-world seed controls (Codex) + +- Added a labeled dice button and shared seed parsing/random rule; ignore non-digits, + clamp above 4294967295 with a hint, preserve zero, and randomize empty on Generate. +- Files: src/shell.html, src/styles/style.css, src/ui/loop.js, test/t_seed.py, + test/run_all.py, docs/{DESIGN,TESTING,PROJECT_MAP}.md, tasks/t100* and this log. +- Ten seed checks failed against the unchanged build first. All 41 headless suites pass; + test/t_seed.py passes 21 checks (real clipboard/text drag and zero-world generation), + and pixel test/play.py shots/t100-play passes with no console errors. Browser runs + used host GPU access after sandbox WebGPU was unavailable. Inspected both-look + shots/t100-{pixel,smooth}.png and play/new-world.png. Map regenerated; nothing open. + ## 2026-10-29: t87 reuse the near-miss view (Codex) - Reused one scratch view, its entry array and get/has methods in src/sim/joins.js; diff --git a/src/shell.html b/src/shell.html index 3d19a35..8417f17 100644 --- a/src/shell.html +++ b/src/shell.html @@ -56,7 +56,14 @@