feat: implement game-like LU trainer and companion map
This commit is contained in:
1 parent
87d5a6720f
commit
74c8504d52
21 files changed
+1160
-14
No files matched your search
@@ -1,10 +1,14 @@
|
||||
# Structure and Data
|
||||
|
||||
## LU trainer interface planning — 2026-11-17
|
||||
## LU trainer implementation — 2026-11-17
|
||||
|
||||
- Root `LU_TRAINER_PROJECT.md` records the owner-requested game-like interface and explicitly requested «Минное поле» companion map. It separates confirmed scope, screenshot observations, upstream code behavior, proposed implementation and unresolved game rules.
|
||||
- Upstream `tek1laa/catwar-lu-trainer` was statically inspected at commit `52f7f6111576f57fa5fe3edf43a38ffe2299f799`; no upstream code/assets were imported. The owner's screenshot remains a chat attachment; identifying content was not copied into Git.
|
||||
- Proposed `/lu-trainer` and `web/lu-trainer/` do not exist yet. No runtime, infrastructure, dependencies or deployment changed. GitHub MCP fetch was unavailable; public GitHub API/raw files supplied the source. Token-optimizer and remote test-zone MCP were not exposed; no application tests/builds or background services were run for this documentation task.
|
||||
- Implemented root `LU_TRAINER_PROJECT.md` after the owner's follow-up request to implement it. `/lu-trainer`, `/lu-trainer/` and `/lu-trainer.html` serve the same standalone page. Python aliases are explicit in `app/main.py`; Nginx aliases use `try_files /lu-trainer.html`. `Dockerfile` and `Dockerfile.gateway` already copy all `web/`; the gateway release Dockerfile also copies `nginx.conf`. Production images, cluster manifests and registry state were not changed. Existing gateway base publishing requirements still apply before a release.
|
||||
- `web/lu-trainer/engine.js`: original DOM/clock/storage-free ES module with a 6x10 field, reserved safe route, documented height/growth/season formulas, eight-neighbor counts and adjacency relative to any opened cell. Entrance/exit are excluded from victory counts. Immutable settings and copied public snapshots hide unknown hazard/value facts until completion. Notes remain separate from facts; temporary hint IDs are deliberately disclosed by action results. This implements the described upstream model, not verified CatWar mechanics. No upstream source code/assets were imported.
|
||||
- `web/lu-trainer.html`, `web/lu-trainer/style.css`, `web/lu-trainer/ui.js`: dense ochre/forest three-column desktop view, compact tablet/phone view, fictional character at the last safe visit, messages, history and companion map. Native radios/buttons/dialogs, roving grid focus with geometry-based arrow navigation, large confirmation controls on coarse pointers, map/history modal focus restoration, projection-only note visibility, confirmed clear/restart and terminal action locks. Hints last 2 seconds and retain coordinates in messages. Repeated hints renew their duration; end/restart/pagehide cancels timers. No persistence, backend writes, external game actions or Belki report integration.
|
||||
- `web/lu-trainer/assets/forest.webp` and `cat.png` are original built-in imagegen outputs, optimized for delivery with the PNG alpha preserved. Provenance and complete generation prompts are in `assets/README.md`. The private reference screenshot was not copied into Git. Forest, grid, labels and character share one coordinate plane; failed images retain the neutral background, interactive grid and text character marker.
|
||||
- `tests/lu-trainer/engine.test.mjs`: 9 deterministic Node cases including all 75 complexity combinations, generation safety/reachability, edge counts, adjacency, transition exclusion, notes, fall, both victories, hints, unknown-fact visibility and invalid settings. `tests/test_lu_trainer.py`: aliases, asset MIME and missing/escaping paths. `tests/browser/lu-trainer.cjs`: local-only Playwright acceptance for both grids, single-action logs, keyboard/mouse/touch, note projection, clear/restart/settings confirmation, native modal focus/Escape, hints/log/duration, terminal locks, timer cleanup, image failure and 200% layout/magnification.
|
||||
- Validation: remote test-zone/token-optimizer MCP and Browser skill were not exposed; used bundled Node 24.22.1/Playwright with system Chromium 157.0.8103.38 and temporary Python venv from existing requirements. 9 engine checks and 5 focused Python routing/calculator-page checks passed. Browser scenarios passed at 1920x1080, 1366x768, 768x1024 and 390x844, including reduced motion and an equivalent 200% layout viewport plus CSS magnification. Screenshots were actually inspected; tablet history was collapsed to give the scene more room. No relevant JS console errors. Isolated `nginx:alpine` (`sha256:fed7e14be83cbd2661a75cdc5b872d936cf155d46c327084d30b8df19ae88d72`) passed `nginx -t` and returned 200 with correct MIME for all aliases/assets; both servers served identical page bytes. A real Chromium jump through the Nginx alias also updated the rendered count; the accessibility snapshot exposed named grid/row/gridcell/button semantics.
|
||||
- The temporary `/tmp/cwshed-lu-check` venv/data/screenshots, guide/reference temp files, Python server and named Nginx container/image were removed/stopped after verification. One reviewed desktop screenshot was retained as a delivery preview outside Git under the task’s Codex visualizations directory. No remote systems were modified. Coverage is local Chromium/Python 3.14 and stock Nginx, not deployed production, physical touch hardware, screen-reader acceptance or other browsers. Design follows the document's retained reference description; the private screenshot was not available for a fresh pixel comparison.
|
||||
|
||||
## Homepage Matrix chat — 2026-11-17
|
||||
|
||||
|
||||
Reference in new issue
Block a user