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>
76 lines
2.3 KiB
TypeScript
76 lines
2.3 KiB
TypeScript
'use client';
|
|
|
|
import { useParams, useRouter } from 'next/navigation';
|
|
import { cn } from '@/lib/utils';
|
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
import type { QueueStatus } from '@/lib/services/system-monitoring.service';
|
|
|
|
interface QueueOverviewProps {
|
|
queues: QueueStatus[];
|
|
}
|
|
|
|
interface StatPillProps {
|
|
label: string;
|
|
value: number;
|
|
highlight?: boolean;
|
|
}
|
|
|
|
function StatPill({ label, value, highlight }: StatPillProps) {
|
|
return (
|
|
<div className="flex flex-col items-center">
|
|
<span
|
|
className={cn(
|
|
'text-lg font-bold leading-none',
|
|
highlight && value > 0 ? 'text-destructive' : 'text-foreground',
|
|
)}
|
|
>
|
|
{value}
|
|
</span>
|
|
<span className="text-xs text-muted-foreground mt-0.5 uppercase tracking-wide">{label}</span>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function QueueOverview({ queues }: QueueOverviewProps) {
|
|
const router = useRouter();
|
|
const params = useParams<{ portSlug: string }>();
|
|
|
|
function handleQueueClick(queueName: string) {
|
|
router.push(`/${params.portSlug}/admin/monitoring/${queueName}`);
|
|
}
|
|
|
|
return (
|
|
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3">
|
|
{queues.map((queue) => (
|
|
<Card
|
|
key={queue.name}
|
|
className="cursor-pointer hover:border-primary/50 transition-colors"
|
|
onClick={() => handleQueueClick(queue.name)}
|
|
role="button"
|
|
tabIndex={0}
|
|
onKeyDown={(e) => e.key === 'Enter' && handleQueueClick(queue.name)}
|
|
>
|
|
<CardHeader className="p-3 pb-0">
|
|
<CardTitle className="text-xs font-semibold capitalize truncate">
|
|
{queue.name}
|
|
</CardTitle>
|
|
</CardHeader>
|
|
<CardContent className="p-3 pt-2">
|
|
<div className="grid grid-cols-2 gap-x-2 gap-y-1">
|
|
<StatPill label="wait" value={queue.waiting} />
|
|
<StatPill label="active" value={queue.active} />
|
|
<StatPill label="done" value={queue.completed} />
|
|
<StatPill label="failed" value={queue.failed} highlight />
|
|
</div>
|
|
{queue.delayed > 0 && (
|
|
<p className="text-xs text-muted-foreground text-center mt-1">
|
|
{queue.delayed} delayed
|
|
</p>
|
|
)}
|
|
</CardContent>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|