- tools/ui_map.mjs find <words on screen | key | /anomalous/route | file.js>, read from the code
each time (tools/ui_map_scan.mjs: the words, what each web file shows and calls, its CSS
classes, imports, the backend's routes); build writes the whole map to the untracked
docs/ui-map.md, with the routes no page calls and the words no file uses.
- docs/architecture/ui-flows.md: the hand-written part for the AI workbench (what each part
is for, what a click does, why) and a glossary of one name per thing. The structure check
fails when a word in it is no longer on screen, a file or route it names is gone, or a
retired name is back on screen.
- One name each on the AI page: 素材 (not 材料), 留言 (not 消息), 节点结构 (the / command
too), 连接 for the last AI, 副本 for the task's tab, 撤销; English "Node map".
- AGENTS.md: look a button up with the map before changing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pattern behind issue #22 came back once already (removed in v1.57.2,
back with the icon rail in v1.58.0). tools/check_structure.mjs now fails
on any :has() in the web stylesheets whose argument matches [style...],
pointing at the line; AGENTS.md, docs/guides/testing.md and lessons.md
say why and what to do instead (a class on an ancestor).
Prepared in a cloud session (checkpoint cbfc782), committed now that the
issue #22 fix is on this branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cards look as before for models matched on Civitai. Only the exceptions are
marked: a base model inferred from the file shows "≈ <base>" with a dashed
outline, and a .safetensors model not scanned yet says so; both explain
themselves in a tooltip (model_source.js). The detail header's line adds
the source and the fields the user edited; the green title that meant
"renamed" gives way to it (ui_detail.js 755 -> 752 lines).
Fix: the previous commit's locales.js had raw line breaks inside the
"fetch again" confirmation strings, so the plugin did not load. Neither
`node --check` (it passes such .js files on Node 24) nor the structure
check noticed. check_structure.mjs now compiles every web file as the ES
module the browser loads and fails on a parse error; AGENTS.md says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New files stay under 600 lines; files already over it may only shrink or stay
the same when touched, so they get smaller with everyday work instead of a
dedicated refactor. tools/check_structure.mjs now compares with the last commit
and fails on a new oversized file or a grown one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md section 0 lists what every commit must do, with a table of which
document each kind of change updates. tools/check_structure.mjs (tracked)
fails when a source file has no line in the architecture map or a web module
is unreachable from an entry, and lists files over the size threshold.
ARCHITECTURE.md now points to section 0 instead of repeating it; CLAUDE.md
joins GEMINI.md as a reading entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>