From b1edb5c460d2628779c3462f7fa3125b01952afd Mon Sep 17 00:00:00 2001 From: Moheeb Zara Date: Sat, 1 Aug 2026 18:56:11 -0700 Subject: [PATCH] =?UTF-8?q?types:=20clear=20remaining=20tsc=20errors=20acr?= =?UTF-8?q?oss=2041=20files=20(76=E2=86=9214,=20behavior-preserving)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-file type-only fixes surfaced after the Supabase client was correctly typed. All fixes preserve runtime behavior; no any/ts-ignore/ts-expect-error. - lib/supabase/client.ts: annotate the browser client as SupabaseClient (same ssr/js drift as server.ts; fixes it centrally for all callers). - Supabase embedded-select joins whose FK metadata is missing from the generated types are bridged with `as unknown as ` + a TODO to remove after regenerating types/database.ts. - setState optimistic-update variance and raw setVisibility(e.target.value)} + onChange={e => setVisibility(e.target.value as 'board' | 'all_members' | 'admin_only')} className="w-full bg-background border border-border rounded px-3 py-2 font-sans text-sm text-foreground focus:outline-none focus:border-primary transition" > diff --git a/app/(app)/ops/[id]/page.tsx b/app/(app)/ops/[id]/page.tsx index 0b24db2..7201195 100644 --- a/app/(app)/ops/[id]/page.tsx +++ b/app/(app)/ops/[id]/page.tsx @@ -3,6 +3,7 @@ import { notFound } from 'next/navigation' import Link from 'next/link' import { ArrowLeft } from 'lucide-react' import KbEntryEditor from './kb-entry-editor' +import type { Tables } from '@/types/database' export default async function OpsEntryPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params @@ -19,5 +20,5 @@ export default async function OpsEntryPage({ params }: { params: Promise<{ id: s if (!entry) notFound() - return + return } /> } diff --git a/app/(app)/ops/new/page.tsx b/app/(app)/ops/new/page.tsx index b44d654..1d918e3 100644 --- a/app/(app)/ops/new/page.tsx +++ b/app/(app)/ops/new/page.tsx @@ -1,4 +1,5 @@ import { createClient } from '@/lib/supabase/server' +import type { Tables } from '@/types/database' import KbEntryEditor from '../[id]/kb-entry-editor' export default async function NewOpsEntryPage() { @@ -10,5 +11,5 @@ export default async function NewOpsEntryPage() { .from('space_members').select('space_id, role, display_name').eq('user_id', user.id).in('status', ['current', 'unverified', 'late']).single() if (!member) return null - return + return } /> } diff --git a/app/(app)/ops/ops-client.tsx b/app/(app)/ops/ops-client.tsx index c7fc9b4..705a8a0 100644 --- a/app/(app)/ops/ops-client.tsx +++ b/app/(app)/ops/ops-client.tsx @@ -9,7 +9,7 @@ import { revealSecret, deleteSecret } from '@/lib/actions/secrets' import { OpsAclEditor } from '@/components/ops/ops-acl-editor' import { createClient } from '@/lib/supabase/client' import { toast } from 'sonner' -import type { Tables, TablesInsert } from '@/types/database' +import type { Tables, TablesInsert, TablesUpdate, Enums } from '@/types/database' import { PageTitle } from '@/components/ui/page-title' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { useConfirm } from '@/components/ui/confirm' @@ -135,7 +135,7 @@ function KbModal({