feat(supabase): implement BYOS offline-first sync layer (US-42) - #119
Merged
Conversation
…arch and history (US-46, closes #113) - Refactor dojo-command-palette: full command registry (14 cmds, 4 categories) - Add fuzzy search algorithm (char-in-order with consecutive bonus) - Add localStorage command history (max 10, shown on empty query) - Add keyboard shortcut badges per command - Emit dojo:palette-command event; preserve legacy task events - Update dojo-app to listen and execute all 14 palette commands - Add user-stories/US-46-command-palette.md - Add requirements/improvements-16-keyboard-shortcuts.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add native Supabase client (zero-dep) with Auth, REST and Realtime - Add IRepository interface, SupabaseRepository, SyncRepository, RepositoryFactory - Add dojo-setup-screen and dojo-auth-screen Web Components - Patch all repositories (board, column, task, label, person, project, template) with syncUpsert/syncDelete fire-and-forget after every IndexedDB write - Add camelCase→snake_case MAPPERS and TABLE_NAMES (taskTemplates→task_templates) - Add offline queue in localStorage with auto-flush on 'online' event - Add syncAllLocalToSupabase() for bulk initial sync on login - Wire Supabase init flow in main.ts before IndexedDB bootstrap Closes #103
- Read taskTemplates store in exportBoardData() transaction - Restore taskTemplates in importBoardData() when present in file - Validate templates with _isValidTaskTemplate() (id, name, createdAt) - Backward-compatible: old exports without taskTemplates import cleanly fix(task): increase title maxLength from 120 to 250 characters
- Add docs/dojo-kanban-supabase-init.sql with all tables, RLS policies and triggers - Add docs/wiki/17-sincronizacion-nube.md (BYOS setup guide, offline-first arch, FAQ) - Update docs/wiki/15-templates-tareas.md: subtasks field, export/import and sync notes - Update docs/wiki/04-etiquetas.md: note about cloud delete sync - Update docs/wiki/index.md: entry #17 - Update COOKBOOK.md: Pasos 35, 36 and 37 with decisions and patterns
…tion feat(supabase): US-42 — Integración BYOS offline-first con Supabase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important fixes and improvements to the handling, export/import, and cloud synchronization of task templates, as well as providing a comprehensive Supabase SQL initialization script for BYOS deployments. The main changes address missing synchronization logic, correct naming mismatches between IndexedDB and Supabase, and update documentation to reflect these enhancements.
Export/Import and Synchronization Fixes:
taskTemplates) are now included in export/import operations, with backward compatibility for older exports and minimal validation requirements.label.repository.ts,project.repository.ts,template.repository.ts) now call the appropriate Supabase sync functions (syncUpsert,syncDelete, etc.) after create, update, or delete operations, ensuring full two-way sync.TABLE_NAMES) to translate camelCase IndexedDB store names (liketaskTemplates) to snake_case Supabase table names (liketask_templates). This prevents sync errors due to naming mismatches.Supabase Schema and Initialization:
docs/dojo-kanban-supabase-init.sql) to initialize all required tables, policies, triggers, and indices in a personal Supabase project, supporting user-level isolation and real-time updates.Documentation Updates:
Most important changes:
Export/Import & Synchronization
taskTemplatesin export/import logic, with minimal validation and backward compatibility.taskTemplates.supabase-sync.tsto translate IndexedDB store names to Supabase table names, fixing sync issues due to naming mismatches.Supabase Schema
Documentation