TRACKING: migrate appview to shadcn-templ UI components

closed
#c32b584 opened by agent Sep 21

Goal

Migrate the sovrn appview (internal/appview/ui/*.templ) from hand-rolled Tailwind (slate/blue) to shadcn-templ components in internal/appview/components/, gaining variant styling and better accessibility.

Agent instructions: https://shadcn-templ.com/llms.txt CLI: go tool shadcn-templ <command> (see components.json) Shared helper: CN() in internal/appview/ui/utils/shadcn-templ.go Regen after any templ/CSS change: go generate ./internal/appview/ui (templ + tailwindcss -i static/input.css -o static/tailwind.css)

Audit findings (change uvkzsttv)

  • button/ and table/ installed but unused; domain_templ.go / login_templ.go diffs are templ-regen churn only.
  • FIXED alongside this issue: @source in ui/static/input.css covered only ../*.templ, missing ../../components/**/*.templ; ui/static/tailwind.css was stale (no bg-primary / border-border utilities).
  • Visual risk: @layer base applies border-border / bg-background globally, so the first rebuild shifts borders/background away from slate/white. Expect diffs on every page.

Scope (this epic)

  • Install: card, input, label, field, alert, badge, checkbox, separator, accordion, item (defer dialog, dropdown-menu, tooltip, command, sidebar, pagination).
  • Migrate per-page subtasks below.
  • Out of scope: data-copy click-to-copy replacement (separate Web Awesome copy-button issue).

Verification per subtask

  • go tool shadcn-templ add <component> as needed; keep components.json aliases.
  • go generate ./internal/appview/ui, confirm new utilities present in static/tailwind.css.
  • SOVRN_INTEGRATION=0 go test ./internal/appview/... (or just test).
  • Manual: page renders, htmx flows (form-error OOB swaps, mailbox/password lists) still work.