Refactor: move public storefront stop data to server-side + parallel agent work

Server-side / caching refactor (Grok):
- New RPC get_public_stops_for_brand (migration 148) for public storefront stops
- New server action getPublicStopsForBrand with revalidate=300 + tags
- Add revalidateTag invalidation to createStopsBatch + publishStop
- Convert /tuxedo/stops and /indian-river-direct/stops to Server Components
- Extract TuxedoStopsList + IndianRiverStopsList as client islands (GSAP only)
- Removes supabase-js from browser bundle on those routes
- Both pages now statically prerendered (5m ISR)

Parallel agent changes also staged:
- AI provider model list refresh (claude-sonnet-4-5, etc.)
- ESLint directive patches for react-hooks/set-state-in-effect
- Admin + storefront + checkout + cart updates
- New admin_create_stop_rpcs migration (147)
- Misc fixes across ~90 files

Build verified: typecheck clean, lint clean on new files, production build succeeds.
This commit is contained in:
2026-06-03 02:04:21 +00:00
parent 57da01c786
commit 1fe5ffee8d
95 changed files with 1470 additions and 733 deletions
+30 -2
View File
@@ -1,12 +1,40 @@
// AI provider model definitions — shared between client and server
export type AIProvider = "openai" | "anthropic" | "google" | "xai" | "custom";
export type AIProvider = "openai" | "anthropic" | "google" | "xai" | "minimax" | "custom";
export const PROVIDER_MODELS: Record<Exclude<AIProvider, "custom">, string[]> = {
openai: ["gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-3.5-turbo"],
anthropic: ["claude-3-5-sonnet-20241002", "claude-3-5-sonnet-20250611", "claude-3-opus-20240229", "claude-3-haiku-20240307"],
// Note: claude-3-5-sonnet-* model IDs have been retired by Anthropic.
// Current IDs are claude-sonnet-4-5, claude-sonnet-4-*, claude-opus-4-*, etc.
// See https://docs.anthropic.com/en/docs/about-claude/models/overview
anthropic: [
"claude-sonnet-4-5",
"claude-sonnet-4-20250514",
"claude-opus-4-1",
"claude-opus-4-20250514",
"claude-3-7-sonnet-20250219",
"claude-3-5-haiku-20241022",
"claude-3-haiku-20240307",
],
google: ["gemini-2.0-flash", "gemini-1.5-pro", "gemini-1.5-flash", "gemini-pro"],
xai: ["grok-2", "grok-2-mini", "grok-1.5"],
minimax: [
"MiniMax-M3",
"MiniMax-M3-highspeed",
"MiniMax-M2.5",
"MiniMax-M2.5-highspeed",
"MiniMax-M2.7",
"MiniMax-M2.1",
"MiniMax-M2",
],
};
export const DEFAULT_MODELS: Record<Exclude<AIProvider, "custom">, string> = {
openai: "gpt-4o-mini",
anthropic: "claude-sonnet-4-5",
google: "gemini-2.0-flash",
xai: "grok-2",
minimax: "MiniMax-M3",
};
export function getModelsForProvider(provider: Exclude<AIProvider, "custom">): string[] {