# Carousel Dashboard Plan Verification Checklist Use this checklist to comprehensively audit the Carousel Dashboard Plan in a single pass. Each item includes verification steps to confirm accuracy. --- ## ⚠️ CRITICAL DISTINCTION: Type Duplication **Before using this checklist, understand this important guideline:** ### ❌ UNACCEPTABLE: Duplicate Go Types ```go // WRONG: Creating duplicate types in Go templates package package templates type SectionData struct { ... } // DON'T DO THIS - duplicates handlers.SectionData ``` ### ✅ ACCEPTABLE: TypeScript Type Recreation (MUST BE COMPLETE) ```typescript // OKAY: Recreating types in TypeScript .d.ts files // Go's pgtype fields cannot auto-convert, so manual recreation is necessary // CRITICAL: Must include ALL fields from Go handler (no partial types) interface SectionData { id: string; // matches Go's json:"id" type: string; // matches Go's json:"type" title: string; // matches Go's json:"title" description: string; // matches Go's json:"description" icon: string; // matches Go's json:"icon" items: BookInfo[]; // matches Go's json:"items" view_all_url: string; // matches Go's json:"view_all_url" priority: number; // matches Go's json:"priority" is_hidden: boolean; // matches Go's json:"is_hidden" created_at: string; // matches Go's json:"created_at" updated_at: string; // matches Go's json:"updated_at" } // All 11 fields from Go struct included - COMPLETE TYPE MATCHING ``` ### ❌ UNACCEPTABLE: Partial TypeScript Types ```typescript // WRONG: TypeScript interface with only subset of Go fields (breaks type safety) interface SectionData { id: string; type: string; title: string; items: BookInfo[]; // Missing: description, icon, view_all_url, priority, is_hidden, created_at, updated_at // This is a PARTIAL type and violates type safety guidelines } ``` **Key Points:** - **In Go**: Templates MUST use `handlers.*` types directly (no duplication) - **In TypeScript**: `.d.ts` files recreate **complete** handler JSON structure (all fields) - **Reason**: Go's `pgtype.Text`, `pgtype.UUID`, etc. don't map cleanly to TypeScript - **Type Safety**: Partial TypeScript types break type safety and can cause runtime errors - **Verification**: Field counts must match (Go struct has N fields = TypeScript has N fields) This checklist enforces **NO Go duplication** while **requiring complete TypeScript duplication**. --- ## 1. Prerequisites Verification ### 1.1 Verify TypeScript Conversion Plan Completed **Before starting Carousel Dashboard:** - [ ] TypeScript Conversion Plan (20-25.5 days) is fully completed - [ ] All infrastructure modules exist in `web/src/`: - [ ] `api.ts` - Centralized API client with auth - [ ] `toast.ts` - Toast notification system - [ ] `events.ts` - Event delegation utilities - [ ] `storage.ts` - localStorage wrapper - [ ] `dom.ts` - DOM utilities (escapeHtml, etc.) - [ ] `types/api.d.ts` - Type definitions for all API responses - [ ] Event delegation pattern established (data attributes) - [ ] TypeScript compilation pipeline working (`npm run build:ts`) - [ ] All inline JavaScript removed from templates - [ ] Progressive enhancement maintained across all features **Verification Commands:** ```bash # Verify TypeScript modules exist ls -la web/src/{api,toast,events,storage,dom}.ts # Verify type definitions exist ls -la web/src/types/api.d.ts # Verify build works npm run build:ts # Check for remaining inline JavaScript rg '