Fix #486: name live validation #489

Merged
crueber merged 2 commits from fix/issue-486 into main 2026-09-13 19:56:47 +00:00
Owner

Replaces the always-on name-charset helper spans on /new and /import with live inline validation (red rule-naming message only while the name is actually invalid; silent on empty/valid), rendered into a reserved-height slot inside the name label so no grid row shifts — stacked and sm:2-col by construction. Shared headless rule web/src/lib/repo-name.js consumed by both pages (+ both mirror modes); aria-invalid/describedby + aria-live=polite; Import gains the client submit gate (New keeps its fieldError gate); server 400s unchanged. No backend/SDK/wire change, no new deps. Headless: new web/test/unit/repo-name-486.test.js (8 tests) + #486-scoped update to create-forms-479 pins; full node suite 1055/1053/2 (2 pre-existing live-server smoke fails, identical on main); vite + esbuild green. Decision in docs/go/12_web_ui.md. Browser proof open (shared-daemon loopback guard — no private daemon per workspace rules). Fixes #486.

Replaces the always-on name-charset helper spans on /new and /import with live inline validation (red rule-naming message only while the name is actually invalid; silent on empty/valid), rendered into a reserved-height slot inside the name label so no grid row shifts — stacked and sm:2-col by construction. Shared headless rule web/src/lib/repo-name.js consumed by both pages (+ both mirror modes); aria-invalid/describedby + aria-live=polite; Import gains the client submit gate (New keeps its fieldError gate); server 400s unchanged. No backend/SDK/wire change, no new deps. Headless: new web/test/unit/repo-name-486.test.js (8 tests) + #486-scoped update to create-forms-479 pins; full node suite 1055/1053/2 (2 pre-existing live-server smoke fails, identical on main); vite + esbuild green. Decision in docs/go/12_web_ui.md. Browser proof open (shared-daemon loopback guard — no private daemon per workspace rules). Fixes #486.
New.jsx + Import.jsx drop the static name helper spans for a shared
validateRepoChars rule (web/src/lib/repo-name.js) rendered live into a
reserved-height slot (no grid shift); aria-invalid/describedby + polite
live region; Import gains the client submit gate. Decision appended to
docs/go/12_web_ui.md.
The 81-char rule text wraps at sm:2-col cell widths (~300px) and at
390px mobile stacked, so min-h-[1rem] still shifted; min-h-[2rem]
holds both. Test pin + 12_web_ui.md updated in the same change.
Sign in to join this conversation.
No description provided.