From ff19a1b4d3e6b413d2827763d52874156ebd479c Mon Sep 17 00:00:00 2001 From: Jeffrey Smith Date: Wed, 1 Apr 2026 14:52:14 +0000 Subject: [PATCH] Feat v0.6.16 usability survey gate (#51) Co-authored-by: Jeffrey Smith Co-committed-by: Jeffrey Smith --- CHANGELOG.md | 40 ++++ ROADMAP-UI.md | 19 +- docs/DEPLOYMENT.md | 6 +- docs/DISTRIBUTION.md | 22 +-- docs/USABILITY-SURVEY.md | 227 ++++++++++++++++++++++ scripts/audit-touch-targets.sh | 146 ++++++++++++++ scripts/check-contrast.sh | 225 ++++++++++++++++++++++ scripts/generate-coverage-matrix.sh | 160 ++++++++++++++++ scripts/generate-ui-inventory.sh | 287 ++++++++++++++++++++++++++++ src/css/modals.css | 3 + src/css/sw-primitives.css | 30 +++ src/css/variables.css | 16 +- 12 files changed, 1146 insertions(+), 35 deletions(-) create mode 100644 docs/USABILITY-SURVEY.md create mode 100755 scripts/audit-touch-targets.sh create mode 100755 scripts/check-contrast.sh create mode 100755 scripts/generate-coverage-matrix.sh create mode 100755 scripts/generate-ui-inventory.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index f57651e..89323dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,46 @@ All notable changes to Armature are documented here. +## v0.6.16 — Usability Survey Gate + +Machine-auditable UI quality gate. Four new audit scripts, a structured survey +prompt, contrast and touch-target fixes, and Docker Hub documentation correction. + +### Added + +- **`scripts/generate-ui-inventory.sh`** — walks all kernel + package CSS, + extracts every class selector with surface, line number, responsive breakpoints, + spacing tokens, and font-size usage. Outputs `ui-inventory.json` (1567 entries). +- **`scripts/check-contrast.sh`** — parses `variables.css` dark/light token + pairs, computes WCAG AA contrast ratios for 24 semantic text-on-background + pairings per theme (48 total). Uses AA (4.5:1) for normal text, AA-lg (3.0:1) + for large/bold text contexts. +- **`scripts/generate-coverage-matrix.sh`** — 12 kernel primitives × all surfaces + markdown table. Flags any deprecated component usage (`.btn-primary`, etc.). +- **`scripts/audit-touch-targets.sh`** — static analysis for 44px minimum mobile + touch targets on close buttons and interactive elements. +- **`docs/USABILITY-SURVEY.md`** — structured 8-section prompt (viewport, banners, + responsive, styling, contrast, touch targets, focus indicators, component + uniformity) with pass/fail criteria and file paths for automated execution. +- **Focus indicators** — `:focus-visible` styles on `.sw-btn`, `.sw-input`, + `.sw-dropdown__trigger`, `.sw-menu__item`, `.sw-tabs__tab`. +- **Mobile touch targets** — `min-width/min-height: 44px` in `@media (max-width: + 768px)` for `.sw-banner__close`, `.sw-toast__close`, `.sw-dialog__close`, + `.sw-drawer__close`, `.sw-tabs__arrow`, `.modal-close`, `.sw-tabs__tab`, + `.sw-dropdown__option`. + +### Fixed + +- **WCAG contrast violations** — dark-mode accent darkened from `#6c9fff` to + `#6493ed` (3.03:1 with white text), dark-mode success from `#22c55e` to + `#1dab51` (3.00:1). Light-mode `--text-3` darkened from `#8b8da3` to `#787a92`. + Light-mode `--success-light` and `--warning-light` darkened for badge contrast. + All 48 pairings now pass. +- **Docker Hub references** — `docs/DEPLOYMENT.md` and `docs/DISTRIBUTION.md` + corrected from `ghcr.io/armature/armature` to `gobha/armature` (Docker Hub). + Builder image corrected to `gobha/armature-builder`. GitHub URL corrected to + `github.com/gobha/armature`. + ## v0.6.15 — User Display Audit Every user-facing identity surface now shows human-readable names instead of diff --git a/ROADMAP-UI.md b/ROADMAP-UI.md index d85e336..9c93ff8 100644 --- a/ROADMAP-UI.md +++ b/ROADMAP-UI.md @@ -99,18 +99,11 @@ Chat participants resolved from users table instead of snapshot. All admin surfaces show `display_name || username || 'Unknown'`. Chat-core snapshot column deprecated. 5 new handler tests. See CHANGELOG.md. -### v0.6.16 — Usability Survey Gate +### v0.6.16 — Usability Survey Gate ✅ -Make the UI machine-auditable so Claude Code can run an automated survey. - -| Step | Description | -|------|-------------| -| UI inventory manifest | `scripts/generate-ui-inventory.sh` — walks kernel CSS + package CSS, extracts every rendered class, groups by surface, outputs `ui-inventory.json`. Fields: `{surface, component, classes, file, line, responsive_breakpoints, spacing_tokens_used, font_size_tokens_used}`. | -| Contrast checker | Script that parses `variables.css` light/dark token pairs and checks WCAG AA contrast ratios for all `text-*` on `bg-*` combinations. Outputs pass/fail report. | -| Component coverage matrix | Markdown table: each kernel primitive (button, input, dropdown, dialog, toast, menu, tabs, avatar, spinner, tooltip, drawer, banner) × each surface that uses it. Identifies surfaces still using deprecated old-style components. | -| Touch target audit | Script that finds all `