feat: refine Scan & Taste UI, fix desktop scrolling, and resolve production login fetch error

- Reverted theme from gold to amber and restored legacy typography.
- Refactored ScanAndTasteFlow and TastingEditor for robust desktop scrolling.
- Hotfixed sw.js to completely bypass Supabase Auth/API requests to fix 'Failed to fetch' in production.
- Integrated full tasting note persistence (tags, buddies, sessions).
This commit is contained in:
2025-12-21 22:29:16 +01:00
parent 4e8af60488
commit b57f5dc2ad
12 changed files with 1482 additions and 120 deletions

View File

@@ -118,15 +118,22 @@ self.addEventListener('message', (event) => {
// 🚀 FETCH: Offline-First Strategy
self.addEventListener('fetch', (event) => {
if (event.request.method !== 'GET') return;
const url = new URL(event.request.url);
// Bypass Auth/API
if (url.pathname.includes('/auth/') || url.pathname.includes('/api/') || url.hostname.includes('supabase.co')) {
// CRITICAL: Bypass Auth/API/Supabase early and COMPLETELY.
// We do not call event.respondWith() for these, letting the browser handle them natively.
if (
url.pathname.includes('/auth/') ||
url.pathname.includes('/api/') ||
url.hostname.includes('supabase.co') ||
url.hostname.includes('auth') ||
event.request.headers.get('Authorization')
) {
return;
}
if (event.request.method !== 'GET') return;
// RSC Data
if (url.pathname.startsWith('/_next/data/')) {
event.respondWith(