Fix the Probes page failing to load; add a JS syntax check
An apostrophe in "aren't" ended a single-quoted string in views/probes.js,
so the module failed to parse ("missing ) after argument list") and the
Probes page couldn't load. Use the typographic apostrophe like the rest of
the UI copy.
scripts/check-js.sh parses every frontend module as an ES module (node in a
container if the host has none). Plain node --check on a .js file accepted
the broken file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cd2deda996
commit
cb092f2333
3 changed files with 21 additions and 1 deletions
|
|
@ -89,6 +89,7 @@ tests/ pytest: hub API, health maths, fake AdGuard, probe checks
|
|||
- no `"${arr[@]}"` on possibly-empty arrays under `set -u`
|
||||
- don't `source <(...)`
|
||||
- check with `docker run --rm -v "$PWD":/src:ro bash:3.2 bash -n /src/install.sh`
|
||||
- **After any frontend change, run `bash scripts/check-js.sh`.** It parses every module as an ES module, the way browsers load them. Plain `node --check file.js` missed a broken string once, and the Probes page failed to load. In UI copy, write apostrophes as ’ so a `'` can't end a single-quoted string.
|
||||
- **No build step.** Plain ES modules and CSS. Vendor any library into `app/static/vendor/` with its version noted.
|
||||
- **Frontend style.** Follow the house style: toolbar → content → status bar per screen, house classes/tokens, sentence-case copy. Put user and API strings into the DOM with `textContent` only (`el()` does this). Never `replaceChildren(null)`; use `fill()` from `common.js`.
|
||||
- **Startup work goes in `lifespan`, never at import.** `update` imports `app.main` as a pre-flight check.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue