Commit Graph
5 Commits
Author SHA1 Message Date
cgalo5758 408fa6f5a6 Add page anatomy parts and UI quality gate
- Add shared ui_*.html parts (pageHeader, sectionHeader, statusBadge,
  emptyState) parsed into every template set
- Add anatomy lint rules with a shrinking allowlist and screen-coverage
  check
- Add make screens capture harness with contact sheets and baseline diff
- Compose member and FedWiki regions server-side so pages arrive
  complete
- Rebuild Domains and Integrations on the parts as pilots
2026-08-30 04:05:31 -05:00
cgalo5758 dd3962990b Adopt entity keys and add invoice numbers
Replace the entity slugs on organizations, workspaces, resource pools,
and
plan ladders with nullable `key` columns and add keys to products,
prices,
and entitlement sets. Rename `providers.slug` to `provider` and add
partial
unique indexes for system and org role names.

Assign invoice numbers per billing account from a gapless transactional
counter; Stripe's number moves to the invoice mapping as an external
reference.

Seeds, fixtures, and the operator lookup address rows by key, and the
returning-login resync no longer blanks a display name when the IdP
sends
no `name` claim.
2026-08-29 20:12:04 -05:00
cgalo5758 c71115b51a db-error-translation: field error translator, 9 leak site fixes, lint enforcement
Add web.FieldErrorsFromDB — a constraint-name-to-field translator that converts
PostgreSQL constraint violations into 422 FieldErrors (per the §6 error contract)
instead of leaking raw driver text to users.

- New web/dberrors.go: FieldErrorsFromDB + ConstraintMessages map
- New web/dberrors_test.go: constraint hits, per-class fallbacks (23505/23503/23514/22001),
  nil map, non-Postgres, 23P01 exclusion requires named entry
- Fix 9 leak sites: workspace creation, enrollment (IssueGrant/ExtendGrant/
  CreateNonPlanGrant/RevokeGrantAndTransition), org type default-plan update,
  entitlement set CRUD, product create/update
- New lint rule raw-error-render: flags err.Error() on any line touching a UI sink
  (render*, fireErrorToast, fireSuccessToast, http.Error), exempts slog lines
- Docs: add §4 db-write-failure contract and §9 anti-pattern row

Closes: openspec/changes/db-error-translation
2026-07-02 16:19:03 -05:00
cgalo5758 1a1649ba53 Add operatorURL helper and template linter
Introduce cmd/lint to statically verify operator templates vs routes
(internal/lint). Replace interpolated hx-* URL strings with operatorURL
calls in partials, register operatorURL in the template FuncMap,
add server/operator_url.go with unit tests, and update go.mod.
Add routeURL helper and template linter
2026-05-18 01:36:18 -05:00
cgalo5758 2e4b065e99 Add structured form field error support
Introduce web.FieldErrors for server-side per-field messages. Update
templates to render is-invalid/invalid-feedback and add a fieldErr
template helper that scopes errors to a specific form instance. Update
operator handlers to validate inputs, populate FieldErrors, and render
form-specific error state; add a no-op fieldErr stub to fedwiki partials
so parsing succeeds.
2026-05-17 14:08:46 -05:00