feat(v3.1.0): complete SaaS transformation — auth, sync, paywall, sharing - #1
Conversation
…ring Blocks B–L of the Delay v3.1 SaaS build: AUTH GATE (Block B) - Auth guard in App.tsx: if Supabase configured + no session → AuthPage - useProfile.ts: fetch/upsert profiles row, realtime plan updates - ProfileButton with avatar, plan badge, XP/level, sign-out dropdown - gamificationStore: setXP/setStreak setters + fire-and-forget Supabase sync CLOUD SYNC (Block C) - Dexie v4 migration: sync_queue, voice_recordings, note sharing fields - sync.ts: enqueueSync → drain (5× retry), pullFromSupabase, subscribeToTable - notesStore + tasksStore wired to enqueueSync on create/update/delete PUBLIC SHARING (Block H) - Note type: is_public, public_slug fields - Share button in NoteEditor: nanoid slug, copy link, revoke - PublicNotePage: read-only view at #/share/note/:slug (no auth required) - Supabase RLS policy: is_public=1 rows readable by anyone PAYWALL / PRICING (Block K) - usePlanLimits: free/pro/max limits (notes, boards, share, vault) - PricingPage: Free/$0, Pro/$8, Max/$18 — Stripe TODO stubbed - UpgradeModal: plan comparison cards, CTA to /pricing - Public share gated for pro+ users via UpgradeModal FEATURE FIXES (Block F) - BucketPage: FilePreviewModal (image/video/audio/PDF/text), drag-to-preview - VoiceStudioPage: recordings persisted to Dexie voice_recordings table - AppLayout: AnimatePresence page transitions (opacity + y slide) UX POLISH (Block G) - Timer: +25 XP on focus session complete - Tasks: +50 XP bonus when all today's tasks are done AI WEEKLY INSIGHT (Block I) - StatusPage: Monday insight card via OpenRouter, cached in profile BUILDS (Block J) - package.json: electron:build:win/mac/linux scripts, mac DMG+ZIP multi-arch - electron/entitlements.mac.plist: hardened runtime for macOS notarization SUPABASE (infra) - migrations/001_profiles.sql: profiles table + RLS + auto-insert trigger - migrations/002_sync_tables.sql: user_notes/tasks/events + RLS - functions/create-checkout/index.ts: Stripe stub (503, full impl commented) - functions/stripe-webhook/index.ts: Stripe stub (503, full impl commented) README: full v3.1.0 rewrite with badges, features, download table, tech stack https://claude.ai/code/session_015FM4HeBho3cC7tbBX3qXUM
Parallel jobs for windows-latest, macos-latest, ubuntu-latest. All artifacts collected and published in a final create-release job. Matches new electron:build:win/mac/linux scripts added in v3.1.0. https://claude.ai/code/session_015FM4HeBho3cC7tbBX3qXUM
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (27)
📝 WalkthroughWalkthroughThis PR introduces v3.1.0 with Supabase-backed user profiles, cloud data synchronization, plan-gated feature tiers, and public note sharing. The multi-platform build system supports Windows, macOS, and Linux. Core additions include the useProfile hook for cloud profile management, a sync layer for offline-first local-Supabase bidirectional sync, and feature-gate components like pricing pages and upgrade modals. Voice recordings and note sharing are now persistent. ChangesVersion 3.1.0 Feature Release
🎯 4 (Complex) | ⏱️ ~60 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Followed up the audit with concrete fixes for what was actually broken:
1. BLOCKER — desktop & Android releases shipped with empty Supabase env.
.github/workflows/main.yml passed GH_TOKEN to all four platform build
steps but never VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY. Result:
the bundled app called createClient("", "") and isSupabaseConfigured
returned false, so the installed desktop app had no cloud features at
all and Account/Workspaces showed "sign in" with no working sign-in.
Now passed on Win / Mac / Linux / Android.
2. captureStore.loadItems() was only called by CapturePage's useEffect.
Quick Capture (Ctrl+Shift+S from anywhere) and the command palette
read the same store. If the user used those before visiting the Saved
tab, the store was [] in memory while localStorage had content —
making it look like Saved messages were silently failing. App.tsx
now pre-loads captureStore + flowsStore at boot.
3. MarkdownRenderer (used by AI chat for assistant replies) wrote raw
markdown HTML through dangerouslySetInnerHTML without sanitization.
renderMarkdown escapes inline text but inline HTML in the input would
leak through. Now wrapped with DOMPurify (same config as the public
note share page).
4. package.json bumped to 3.2.1 — tagging this immediately so the next
release build picks up #1.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Blocks B–L of the Delay v3.1 SaaS build:
AUTH GATE (Block B)
CLOUD SYNC (Block C)
PUBLIC SHARING (Block H)
PAYWALL / PRICING (Block K)
FEATURE FIXES (Block F)
UX POLISH (Block G)
AI WEEKLY INSIGHT (Block I)
BUILDS (Block J)
SUPABASE (infra)
README: full v3.1.0 rewrite with badges, features, download table, tech stack
https://claude.ai/code/session_015FM4HeBho3cC7tbBX3qXUM
Summary by CodeRabbit
Release Notes
New Features
Improvements