mirror of
https://github.com/supabase/supabase.git
synced 2026-06-20 19:16:04 +08:00
## Summary Removes two concluded A/B experiments that didn't produce positive results: - **tableQuickstart**: Tested AI-powered table generation, template selection, and assistant integration for new table creation - **realtimeButtonVariant**: Tested hiding the realtime button or replacing it with a triggers button ## Changes - Delete `TableQuickstart/` folder with AI widget, templates widget, and generation hooks - Delete `useRealtimeExperiment` hook and remove variant-conditional logic - Delete `/api/ai/table-quickstart/generate-schemas` endpoint - Remove telemetry event definitions for both experiments - Remove local storage exposure tracking key - Remove API endpoint from proxy whitelist - Clean up eslint baseline references ## Testing - [x] Tested locally - Table Editor renders correctly without experiment widgets - [x] TypeScript compiles without errors - [x] No remaining references to removed experiment code **Quick test:** 1. Navigate to Table Editor → New Tab shows only "Create a table" card (no AI/Templates/Assistant variants) 2. Open table create panel → Realtime checkbox shows unconditionally when realtime is enabled ## Linear fixes GROWTH-609 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Removed Features** * AI-powered table generation and quickstart assistance (templates, AI widget, generation hook, templates data, and related utilities) * Quickstart templates widget and predefined table templates * Database triggers management interface * Realtime experiment gating and related experiment variants * **API & Storage** * Hosted AI quickstart API endpoint removed * Local storage key for quickstart exposure tracking removed * **Telemetry** * Quickstart- and realtime-experiment telemetry events removed * **UI Changes** * Simplified realtime toggle control in the table editor <!-- end of auto-generated comment: release notes by coderabbit.ai -->
42 lines
1019 B
TypeScript
42 lines
1019 B
TypeScript
import { IS_PLATFORM } from 'lib/constants'
|
|
import type { NextRequest } from 'next/server'
|
|
|
|
export const config = {
|
|
matcher: '/api/:function*',
|
|
}
|
|
|
|
// [Joshen] Return 404 for all next.js API endpoints EXCEPT the ones we use in hosted:
|
|
const HOSTED_SUPPORTED_API_URLS = [
|
|
'/ai/sql/generate-v4',
|
|
'/ai/sql/policy',
|
|
'/ai/feedback/rate',
|
|
'/ai/code/complete',
|
|
'/ai/sql/cron-v2',
|
|
'/ai/sql/title-v2',
|
|
'/ai/sql/filter-v1',
|
|
'/ai/onboarding/design',
|
|
'/ai/feedback/classify',
|
|
'/ai/docs',
|
|
'/get-ip-address',
|
|
'/get-utc-time',
|
|
'/get-deployment-commit',
|
|
'/check-cname',
|
|
'/edge-functions/test',
|
|
'/edge-functions/body',
|
|
'/generate-attachment-url',
|
|
'/incident-status',
|
|
'/api/integrations/stripe-sync',
|
|
]
|
|
|
|
export function proxy(request: NextRequest) {
|
|
if (
|
|
IS_PLATFORM &&
|
|
!HOSTED_SUPPORTED_API_URLS.some((url) => request.nextUrl.pathname.endsWith(url))
|
|
) {
|
|
return Response.json(
|
|
{ success: false, message: 'Endpoint not supported on hosted' },
|
|
{ status: 404 }
|
|
)
|
|
}
|
|
}
|