fix(audit-wave-9): standardize on Sheet for previews; doctrine in CLAUDE.md

Swap the one outlier (client-interests-tab.tsx) from Vaul Drawer to
Sheet side=right so every detail-preview surface uses the same
primitive. Document the doctrine: Sheet for side panels on both desktop
and mobile; Vaul Drawer reserved for mobile-only bottom-sheet UX
(currently just MoreSheet).

Closes ui/ux M11.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 11:50:07 +02:00
parent b2588ecdd8
commit 4233aa3ac3
94 changed files with 1674 additions and 895 deletions

View File

@@ -6,6 +6,7 @@ import { RotateCcw, Clock } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { apiFetch } from '@/lib/api/client';
import { useConfirmation } from '@/hooks/use-confirmation';
interface TemplateVersion {
version: number;
@@ -27,6 +28,7 @@ export function TemplateVersionHistory({
onRollback,
}: TemplateVersionHistoryProps) {
const queryClient = useQueryClient();
const { confirm, dialog: confirmDialog } = useConfirmation();
const queryKey = ['admin', 'template-versions', templateId] as const;
const [rollingBack, setRollingBack] = useState<number | null>(null);
const [error, setError] = useState<string | null>(null);
@@ -47,12 +49,12 @@ export function TemplateVersionHistory({
const effectiveError = error ?? (queryError instanceof Error ? queryError.message : null);
async function handleRollback(version: number) {
if (
!confirm(
`Roll back to version ${version}? This will create a new version ${currentVersion + 1}.`,
)
)
return;
const ok = await confirm({
title: `Roll back to version ${version}`,
description: `This will create a new version ${currentVersion + 1}.`,
confirmLabel: 'Restore',
});
if (!ok) return;
setRollingBack(version);
setError(null);
@@ -133,6 +135,7 @@ export function TemplateVersionHistory({
</div>
))}
</div>
{confirmDialog}
</div>
);
}