Skip to content

v1.5.1 — Session recovery + full sync schema parity

Choose a tag to compare

@denandy83 denandy83 released this 26 Apr 07:03
· 265 commits to main since this release

Bug Fixes

  • Auto-recover dead Supabase sessions — When setSession failed on cold start (network blip, expired refresh token), the app entered a silent zombie state where every push hit RLS 42501 because auth.uid() was null. Now retries 3× with exponential backoff before falling back, and a 30-second background timer keeps trying while offline. On success the queue drains and sync resumes — no logout/login required.
  • Session guards on every push and delete — Every Supabase write now checks for a live session first and skips cleanly with a warn log when there isn't one, instead of issuing an anonymous request that gets rejected by RLS.
  • Realtime subscriptions gated on a live session — subscribeToPersonalProject no longer joins the WebSocket without auth, so we don't end up with dead listeners.
  • "Sync paused" banner when offline — A persistent amber banner appears at the top of the app when the auth store is in offline-fallback mode, with "Retry now" and "Sign in again" actions.
  • Project ordering, default-project flag, and area assignments now sync across devices — is_default, sidebar_order, and area_id were previously local-only. They're now real columns on Supabase that follow you to every device.
  • Project↔label associations now sync incrementally — Adding or removing a label on a project only synced on initial setup. Now propagates to every device immediately, and survives offline reconnect.
  • project_labels is a real Supabase junction table — Was stored as a denormalized projects.label_data JSON which had three bugs: rename drift (label rename silently broke its association on every project until next push), multi-device clobber (full-array overwrite meant simultaneous edits clobbered each other), and no per-association tombstones. Now (project_id, label_id, created_at, deleted_at) with proper LWW reconcile. Backfilled 70 rows from label_data.
  • Project templates now sync across devices — Were a local-only feature per the v1.5.0 scope. Now a real synced table with the same shape, soft-delete, and RLS scoped to owner.
  • Member invite provenance preserved — project_members.invited_by was missing on Supabase, so the cloud forgot who invited each member after the historical project_invites row was gone. Column added, 3 rows backfilled, accept_invite RPC populates it on acceptance.
  • user_themes.created_at synced — Was missing on Supabase while local has it. Now propagates.
  • Reconcile push storm prevented for projects — Reconcile: projects — failed=N was firing every cycle because toRemote was shipping local-only columns Supabase rejected. Fixed by promoting those columns properly and using Date.parse() numeric LWW (so a …Z local timestamp and …+00:00 remote timestamp for the same instant don't false-flag as drift).

Improvements

  • Dropped two stale Supabase tables — task_labels_backup_20260425, user_labels_backup_20260425.
  • tasks.label_names denorm dropped from push — pushTask no longer writes the redundant JSON; the task_labels junction is the source of truth. Shared-project Realtime fast-path keeps reading the column as a fallback for transition.