Validate the template source first, then submit the typed name create-only,
matching the browser's P5 flow and wording. Refusals keep the prompt and the
typed name; the accepted detail is reported once through the callback. The
labelled field, visible feedback and native Material/Cupertino controls are
covered by focused widget tests and a loopback browser probe.
Add the nonvisual templates data/domain slice: TemplateRepository over the
shared ApiGateway for list_templates, validate and create-only submit, and
TemplateEntry preserving every server field in a deeply read-only raw map.
Re-include test/**/data/ in app/.gitignore so the mirroring tests are not
silently dropped from a fresh checkout.
Tests cover exact request shapes, source preservation, blank-name refusal,
malformed replies, server refusals and immutability.