add the ASCII-only source rule and the visual-verification note to CLAUDE.md

Two things learned the hard way while moving the build buttons. A shift glyph
written as a literal would have been mangled by MSVC 2017, which does not read
the sources as UTF-8 by default, and a PowerShell Get-Content/Set-Content
round-trip re-encoded a source file with a BOM and double-encoded em-dashes.

Screen-capturing the app window returns a blank client area because the capture
cannot read the QOpenGLWidget surface, which is easy to misread as a broken UI;
visual checks belong to the user.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
This commit is contained in:
2026-08-06 08:19:46 +02:00
parent 57ab63202f
commit 8f6815f414

View File

@@ -60,6 +60,13 @@ keep the citation accurate.
* don't use abbreviations, except very common ones ("s" for seconds, "min", "max", etc.) * don't use abbreviations, except very common ones ("s" for seconds, "min", "max", etc.)
* if a variable holds a value that has a unit or if a function returns a value that has a unit, append that unit to the name (e.g. "m_shipVelocity_mps", "getAcceleration_mpss()") * if a variable holds a value that has a unit or if a function returns a value that has a unit, append that unit to the name (e.g. "m_shipVelocity_mps", "getAcceleration_mpss()")
* always enclose scopes in braces * always enclose scopes in braces
* keep source files ASCII-only. A non-ASCII character needed at runtime (a glyph in a
UI string, a symbol drawn on a widget) is written as its code point with a comment
naming it (`const QChar shiftGlyph(0x21E7); // U+21E7 UPWARDS WHITE ARROW`), never
as a literal character: MSVC 2017 does not read the sources as UTF-8 by default and
silently mangles them. Never round-trip a source file through
`Get-Content`/`Set-Content` either: Windows PowerShell reads it as ANSI and writes
it back double-encoded with a BOM. Use the Edit/Write tools.
## Build ## Build
@@ -96,6 +103,15 @@ output directories and copies the Qt DLLs.
Run the app: `build/DotaFactory/Debug/app/DotaFactory.exe`, optionally Run the app: `build/DotaFactory/Debug/app/DotaFactory.exe`, optionally
`--replay <file>` for view-only playback of a recorded run. `--replay <file>` for view-only playback of a recorded run.
**Visual verification is the user's job.** Screen-capturing the app window does not
work here: `CopyFromScreen` and `PrintWindow` both return a blank white client area
even while the app is running and rendering normally, because the capture cannot read
the composited surface of the `QOpenGLWidget`-backed window. A blank capture therefore
says nothing about whether the UI works, so do not read one as a regression and do not
try to work around it. To check a UI change: build, run the tests, launch the app, and
ask the user to look at it. Redirecting the process's stdout/stderr to a file does
work and is worth checking for Qt warnings.
## Tests ## Tests
Catch2, single executable, links `lib` only — no QApplication, no display. Catch2, single executable, links `lib` only — no QApplication, no display.