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:
@@ -17,6 +17,7 @@ import { logger } from '@/lib/logger';
|
||||
import { createAuditLog } from '@/lib/audit';
|
||||
import { checkRateLimit, rateLimiters } from '@/lib/rate-limit';
|
||||
import { captureErrorEvent } from '@/lib/services/error-events.service';
|
||||
import { withPublicContext } from '@/lib/api/helpers';
|
||||
|
||||
// BR-024: Dedup via signatureHash unique index on documentEvents
|
||||
// Always return 200 from webhook (webhook best practice)
|
||||
@@ -83,7 +84,7 @@ type DocumensoWebhookBody = {
|
||||
};
|
||||
};
|
||||
|
||||
export async function POST(req: NextRequest): Promise<NextResponse> {
|
||||
async function handleDocumensoWebhook(req: NextRequest): Promise<NextResponse> {
|
||||
let rawBody: string;
|
||||
|
||||
try {
|
||||
@@ -296,3 +297,9 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
|
||||
|
||||
return NextResponse.json({ ok: true }, { status: 200 });
|
||||
}
|
||||
|
||||
// Wrap with withPublicContext so the handler runs inside a
|
||||
// runWithRequestContext ALS frame — without it the inline
|
||||
// `captureErrorEvent` call in the catch block silently no-ops because
|
||||
// getRequestContext() returns null for unauthenticated routes.
|
||||
export const POST = withPublicContext(handleDocumensoWebhook);
|
||||
|
||||
Reference in New Issue
Block a user