fix: save all changes to Supabase with reliable upsert
- Replace broken PATCH→POST fallback with single atomic upsert (POST +
Prefer: resolution=merge-duplicates). The old PATCH returned 200 OK
with empty body for new articles, causing silent data loss on every
first save per article.
- Fix getAllSyncedRows pagination: add explicit limit=10000 and Range
header to bypass Supabase's default 1000-row cap.
- Add fetchWithRetry helper (2 retries on 5xx/network errors).
- handleSaveRow now returns Promise<boolean> and closes EditPanel only
after a confirmed successful save.
- Add 'error' save status: failed rows turn red (border-l-red-500)
across ProductDescriptions, ArticleDetails, and PricingView.
- EditPanel shows saving spinner, disables buttons while saving, and
displays inline error message with "Retry Save" on failure.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- src/lib/auth.ts: signIn/signOut/getStoredSession via Supabase Auth REST API
- src/components/LoginPage.tsx: login form with domain validation UI
- src/components/TopBar.tsx: show logged-in user email + sign out button
- src/App.tsx: gate entire app behind auth — shows LoginPage if no session
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets up a new project for an AI Studio application. Includes essential files like `package.json`, `vite.config.ts`, `tsconfig.json`, and a basic React application structure (`App.tsx`, `main.tsx`, `index.html`, `index.css`).
Also adds a `README.md` with instructions for running locally, an `.env.example` for API key configuration, and a `.gitignore` to manage project dependencies and build artifacts.