mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
* Add table quickstart with templates and AI generation Implement table quickstart feature with two variants: - Template-based: Pre-built schemas across multiple categories (social, ecommerce, content, productivity) - AI-powered: Generate custom table schemas from natural language prompts Key features: - Template selector with category tabs and schema previews - AI generation using gpt-oss-120b via Bedrock for fast response times - Streaming responses with real-time table generation - Quick idea chips for common use cases - Success feedback and seamless integration with table editor - Feature flag gated (tableQuickstart) with 7-day new project window - Comprehensive error handling and retry logic - ARIA labels and accessibility improvements Technical implementation: - Custom React hooks for AI generation and state management - Zod schema validation for type-safe streaming - API endpoint with structured object streaming - localStorage-based dismissal state - Consistent styling with existing UI patterns * Refactor and optimize AI table generation Refactor to use AI SDK streaming with structured object generation: - Use streamObject() with Zod schema validation for type-safe streaming - Add 50KB buffer limit to prevent memory issues from oversized responses - Replace custom stream parsing with Object.assign() for efficient merging - Use fetchHandler utility for consistent error messages across codebase - Clean up comments and unused code * Update quickstart widget styling to match action card - Changed background from bg-surface-75 to bg-surface-100 - Changed hover background to bg-surface-200 - Applied to AI widget, template widget, and quick idea buttons * Address PR review feedback - Persist AI results to localStorage so users can create multiple tables from same generation - Remove unnecessary isMountedRef checks before synchronous state updates - Change Quick ideas label to semantic h4 element for accessibility - Add TODO comment about migrating to experimental_useObject() hook * Clean up table quickstart implementation - Match SQL Editor ActionCard styling with circular icons - Implement smart Generate/Regenerate button logic - Add tooltips for column counts - Persist prompt to localStorage - Fix React hook dependency warnings - Remove debugging artifacts