chore(audit-drain): rip out next-intl, RTL lint, sweeps, polish

Drain the long-tail audit queue captured in alpha-uat-master.md.

- next-intl ripped out (zero useTranslations callers ever existed):
  package.json, next.config.ts plugin wrap, src/i18n/, messages/, and
  the layout NextIntlClientProvider all gone; <html lang="en"> hardcoded.
- RTL lint nudge added: warn-only no-restricted-syntax on physical
  Tailwind utilities (ml-/mr-/pl-/pr-/text-left/text-right/border-l/
  border-r/rounded-l-/rounded-r-) inside JSX className literals.
  Existing ~1,000 sites grandfathered; new code trends toward logical.
- Icon-only button accessibility lint: jsx-a11y/control-has-associated-
  label enabled at warn; 4 empty <th>/<td> action placeholders gain
  sr-only labels.
- Currency: SUPPORTED_CURRENCIES drops the hardcoded English labels;
  new currencyLabel(code, locale?) helper resolves via Intl.DisplayNames.
  CurrencySelect + settings-manager migrated.
- Date locale sweep: 7 surfaces flip from toLocaleString('en-GB'|'en-US')
  to toLocaleString(undefined, ...) so dates honour runtime locale.
- Dialog/Sheet width: 10 document/EOI/entity-form dialogs gain a
  lg:max-w-4xl or lg:max-w-5xl step so wide desktops get breathing room.
- PaymentsSection collapsed-bar: slim one-line bar showing
  "Payments - Not received yet" or "Payments - \$X received - N payments
  - Expand"; per-interest collapse state persists in localStorage; the
  RecordPayment flow auto-expands.
- muted-foreground opacity sweep: 10 text-bearing
  text-muted-foreground/{60,70,80} hits dropped to plain
  text-muted-foreground for AA contrast on muted bg. Icon-only
  (aria-hidden) opacity hits left as-is.
- Micro-type bump: text-[10px] and text-[11px] -> text-xs (12px)
  across 87 files in src/components + src/app. Pure mechanical sweep.
- Audit-doc cleanup: alpha-uat-master.md stale 2026-05-25 summary
  rewritten with cumulative state through today. Items genuinely still
  open are now a short long-tail list.
- New docs/marketing-site-followups.md: Umami Phase 4a/3/5, email
  pixel E2E verification, and website-cutover work parked here so
  they don't get lost in the CRM audit doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 18:48:46 +02:00
parent 353a31323e
commit e9509dc45c
115 changed files with 528 additions and 776 deletions

View File

@@ -129,7 +129,7 @@ export function Inbox() {
key={combined}
data-testid="inbox-bell-badge"
className={cn(
'absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-bold text-white shadow-sm ring-2 ring-background animate-badge-pop',
'absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-xs font-bold text-white shadow-sm ring-2 ring-background animate-badge-pop',
// Critical system alerts win the colour war - they need the
// most attention. Otherwise the brand gradient.
systemCritical > 0 ? 'bg-destructive' : 'bg-gradient-brand',
@@ -149,7 +149,7 @@ export function Inbox() {
<Bell className="h-3 w-3" aria-hidden />
Personal
{personalUnread > 0 ? (
<span className="ml-1 rounded-full bg-brand/15 px-1.5 text-[10px] font-semibold text-brand">
<span className="ml-1 rounded-full bg-brand/15 px-1.5 text-xs font-semibold text-brand">
{personalUnread > 99 ? '99+' : personalUnread}
</span>
) : null}
@@ -160,7 +160,7 @@ export function Inbox() {
{systemTotal > 0 ? (
<span
className={cn(
'ml-1 rounded-full px-1.5 text-[10px] font-semibold',
'ml-1 rounded-full px-1.5 text-xs font-semibold',
systemCritical > 0
? 'bg-destructive/15 text-destructive'
: 'bg-amber-500/15 text-amber-600',

View File

@@ -111,7 +111,7 @@ export function MoreSheet({
<div className="space-y-4 px-3 pb-4">
{groups.map((group) => (
<section key={group.label}>
<h3 className="mb-1.5 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground">
<h3 className="mb-1.5 px-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground">
{group.label}
</h3>
<ul className="grid grid-cols-3 gap-2">

View File

@@ -365,7 +365,7 @@ function SidebarContent({
<div key={section.title}>
{!collapsed && (
<div className="flex items-center justify-between px-1 mb-1">
<span className="text-slate-500 text-[10px] font-semibold uppercase tracking-[0.12em]">
<span className="text-slate-500 text-xs font-semibold uppercase tracking-[0.12em]">
{section.title}
</span>
{section.adminRequired && (
@@ -457,12 +457,12 @@ function SidebarContent({
</p>
<Badge
variant="outline"
className="text-[10px] px-1.5 py-0 text-slate-500 border-slate-300 mt-0.5"
className="text-xs px-1.5 py-0 text-slate-500 border-slate-300 mt-0.5"
>
{isSuperAdmin ? 'Super Admin' : formatRole(portRoles[0]?.role?.name)}
</Badge>
{currentPortName && (
<p className="mt-1 text-[10px] text-slate-400 truncate">{currentPortName}</p>
<p className="mt-1 text-xs text-slate-400 truncate">{currentPortName}</p>
)}
</div>
</button>