You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8dd5fe5
Browse filesBrowse the repository at this point in the historyBrowse files
Add retention, trend reporting, and a browsable demo site
A second, mostly additive pass on top of the enterprise hardening: the
operability features that make formwatch sustainable over time, and a
bundled playground so people can see it work.
History retention. `formwatch prune (--keep-last N | --keep-days D)
[--dry-run]`, plus `keep_last`/`keep_days` config and
FORMWATCH_KEEP_LAST/FORMWATCH_KEEP_DAYS, trims append-only history per form.
Backed by history::prune (Retain::Last/Retain::Days), which only ever
touches *.json run files and uses a total filename tiebreak so same-second
runs stay ordered.
Reporting. history::streaks computes each check's unbroken run of its
current status; the plain-text report adds a "↳ FAIL for the last N run(s),
since <date>" line for chronic non-Pass checks, and the HTML report adds a
streak badge plus a compact trend strip. The HTML report also gained a
client-side toolbar: search by name/URL, filter by status (failing /
warnings / flaky / passing), sort by recency / severity / name, and a live
shown/total count — all self-contained, no external assets.
Demo site and benchmarks. `formwatch demo` serves, from the binary, 35
bundled forms (demo-sites/) covering every built-in check and known edge
case: a clean baseline, missing labels / low contrast / missing alt / no
landmarks, tiny targets and horizontal overflow, validation variants, the
document-upload variants, autofill, lost input vs. explained session loss,
multi-step wizards including slow/keyup-gated/icon-only-next, open and
nested and closed shadow roots, multiple forms on a page, RTL Arabic,
reCAPTCHA/hCaptcha/Turnstile/full-page Cloudflare challenge, and the LLM
wording demos. scripts/benchmark.sh runs monitor over the whole set and
reports timings; BENCHMARKS.md carries the methodology and current numbers
(35 forms / 280 checks, median 12.96s at --wait 1).
Fixes found by building the demo site:
- Mobile usability never reported horizontal overflow: it compared
documentElement.scrollWidth to window.innerWidth, which under mobile
emulation already reflects the overflowed width. Now compares against the
layout viewport (documentElement.clientWidth). New fixture + test.
- Validation counted the <form> element itself as an unlabeled invalid
field, since form:invalid matches whenever any control inside is invalid.
Now queries input/select/textarea:invalid plus [aria-invalid=true]. New
fixture + test.
Also corrects two demo pages that silently did nothing: a JS `var name`
collision with window.name, and a text glyph where an icon-only button
needs an SVG.
fmt, clippy -D warnings, and the full test suite (138 tests) pass.
0 commit comments