fix: improve calculator accessibility and async result handling
This commit is contained in:
1 parent
ea2f0fbe05
commit
bb21a767d7
9 files changed
+473
-105
No files matched your search
@@ -1,5 +1,15 @@
|
||||
# Structure and Data
|
||||
|
||||
## Calculator and related UI guidance pass — 2026-11-14
|
||||
|
||||
- `web/calculator.html` keeps the existing warm palette and typography. Section navigation now uses real links with `aria-current` and browser history; calculation mode uses a native radio group with built-in arrow-key behavior. File inputs, repeatable kitten fields, quick input and output have accessible labels/focus; dialogs retain native modal focus and Escape handling. No new runtime dependencies or polyfills were required.
|
||||
- Prepared reports/results are invalidated by edits, helper actions and mode changes. An incrementing version discards stale async responses; calculation/application submit guards prevent concurrent duplicate requests in the current page. Clipboard denial selects the output and gives manual-copy instructions. This does not provide server-side idempotency for retries after an uncertain network failure.
|
||||
- Fixed the existing training-points display: `/api/calculate` returns `kitten_points: 25` for training, while coaching uses an array. The UI now accepts both and renders score text with DOM nodes. Inactive points fields cannot block native form validation; “Без ресурсов” clears inspection resources. Application practice-link visibility/disabled state is recomputed when changing type and after reset.
|
||||
- `web/applications.html` keeps the standalone form, exposes the native file picker to keyboard users, reports pressed selection/success, snapshots application data before uploads and guards submission. `web/admin.html` gives password/gallery accessible names, uses `aria-pressed` for ordinary selection buttons, adds solid focus outlines and preserves native dialog dismissal. Existing current-month defaults, sorting and history persistence are retained.
|
||||
- `tests/browser/calculator.cjs` uses external Playwright against an isolated loopback server, checks 1280/390 px flows and closes browser resources. Python dependencies and SQLite fixtures were kept in `/tmp/cwshed-ui-review`; no remote test-zone or token-optimizer MCP was exposed. Validation used Python 3.14.9 and Chromium 157 on Linux (the production Python 3.12 image was not rebuilt): 49 focused Python tests (calculator web, API, applications, history, lookup and admin/export), Python compilation, JS syntax, browser interactions and screenshot inspection. The temporary server, environment and artifacts are removed after review. No push/deployment.
|
||||
- `chrome-extensions` was checked for applicability: the retained CatWar files are userscripts (`@match` / `@grant`), not an MV3 extension; no Chrome extension manifest or `chrome.*` integration exists in the inspected entry points. No manifest conversion or third-party asset updates were warranted. This is not a comprehensive audit of the legacy bundled code or installed browser extensions.
|
||||
- Root `project-info.txt` records the owner-selected LongMemory namespace `catwar`; it is a literal identifier, never executable configuration. Project context and targeted recall were empty at the start of this pass.
|
||||
|
||||
## PHP CVE applicability review — 2026-10-21
|
||||
|
||||
- Static review of revision `765d4023605b2cf56c81e2027f5def606e45637f`: CVE-2026-109618 and CVE-2026-109619 are not actionable for the declared project stack because it has no PHP request runtime. Both concern PHP core; see the [PHP advisory](https://www.php.net/archive/2026.php).
|
||||
|
||||
Reference in new issue
Block a user