refactor: dead-code cleanup + drop the lib/types shim (slice 9)

- Delete orphaned components (theme-provider, task-claim-button), the unused
  roleDisplayName helper, the fully-dead cleanupRateLimits, the 6 never-imported
  validation schemas (signIn/signUp/createSpace/joinSpace — a replaced auth flow;
  proposalStatuses; updateAreaLeadRoleSchema).
- Migrate all @/lib/types importers to the canonical @/types/domain and delete
  the compatibility shim.

tsc 0, 635 tests green, lint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Moheeb Zara
2026-08-04 06:19:11 -07:00
co-authored by Claude Opus 4.8
parent 71ba558522
commit f775f954ad
20 changed files with 11 additions and 147 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { redirect } from 'next/navigation'
import Link from 'next/link'
import { createClient } from '@/lib/supabase/server'
import type { FinancialVisibility, Payment, Space } from '@/lib/types'
import type { FinancialVisibility, Payment, Space } from '@/types/domain'
import { Receipt } from 'lucide-react'
import { PageTitle } from '@/components/ui/page-title'
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription } from '@/components/ui/empty'
@@ -8,7 +8,7 @@ import {
addIncidentUpdate,
appealIncident,
} from '@/lib/actions'
import type { IncidentStatus } from '@/lib/types'
import type { IncidentStatus } from '@/types/domain'
import { incidentStatuses, incidentUpdateVisibilities } from '@/lib/validations'
type Props = {
+1 -1
View File
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { redirect, notFound } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import type { Incident, IncidentUpdateRow } from '@/lib/types'
import type { Incident, IncidentUpdateRow } from '@/types/domain'
import { IncidentActions } from './incident-actions'
import { MarkdownBody } from '@/components/markdown'
import { CommentThread } from '@/components/comments/comment-thread'
+1 -1
View File
@@ -2,7 +2,7 @@ import Link from 'next/link'
import { redirect } from 'next/navigation'
import { ShieldCheck } from 'lucide-react'
import { createClient } from '@/lib/supabase/server'
import type { Incident, IncidentStatus } from '@/lib/types'
import type { Incident, IncidentStatus } from '@/types/domain'
import { PageTitle } from '@/components/ui/page-title'
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle } from '@/components/ui/empty'
+1 -1
View File
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { redirect, notFound } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import type { Policy } from '@/lib/types'
import type { Policy } from '@/types/domain'
import { PolicyActions } from './policy-actions'
import { MarkdownBody } from '@/components/markdown'
import { CommentThread } from '@/components/comments/comment-thread'
+1 -1
View File
@@ -4,7 +4,7 @@ import { useState, useTransition } from 'react'
import { useRouter } from 'next/navigation'
import { supersedePolicy, updatePolicyStatus } from '@/lib/actions'
import { policyStatuses } from '@/lib/validations'
import type { Policy } from '@/lib/types'
import type { Policy } from '@/types/domain'
export function PolicyActions({ policy }: { policy: Policy }) {
const router = useRouter()
+1 -1
View File
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import type { Policy, PolicyStatus } from '@/lib/types'
import type { Policy, PolicyStatus } from '@/types/domain'
import { PageTitle } from '@/components/ui/page-title'
export const dynamic = 'force-dynamic'
+1 -1
View File
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { redirect, notFound } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import type { Proposal, ProposalVote } from '@/lib/types'
import type { Proposal, ProposalVote } from '@/types/domain'
import { ProposalStatusBadge } from '../proposal-badges'
import { ProposalActions } from './proposal-actions'
import { MarkdownBody } from '@/components/markdown'
@@ -8,7 +8,7 @@ import {
openProposal,
withdrawProposal,
} from '@/lib/actions'
import type { ProposalStatus, ProposalVote, VotePosition } from '@/lib/types'
import type { ProposalStatus, ProposalVote, VotePosition } from '@/types/domain'
import { votePositions } from '@/lib/validations'
type Props = {
+1 -1
View File
@@ -2,7 +2,7 @@ import Link from 'next/link'
import { redirect } from 'next/navigation'
import { Vote } from 'lucide-react'
import { createClient } from '@/lib/supabase/server'
import type { Proposal } from '@/lib/types'
import type { Proposal } from '@/types/domain'
import { ProposalStatusBadge } from './proposal-badges'
import { PageTitle } from '@/components/ui/page-title'
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle } from '@/components/ui/empty'
+1 -1
View File
@@ -1,4 +1,4 @@
import type { ProposalStatus } from '@/lib/types'
import type { ProposalStatus } from '@/types/domain'
const STATUS_STYLE: Record<ProposalStatus, string> = {
draft: 'text-muted-foreground bg-muted',