feat(fase-3): Tareas + Notas — TDD complete (148 tests green)

3.0 Tests primero
  pgTAP: 005_tasks_rls.sql (5 — completion CHECK), 006_notes_trash_purge.sql (4 — purge SQL inline + pin/archive CHECK)
  Vitest RLS: rls-tasks.test.ts (14), rls-notes.test.ts (15)
  Playwright: tasks.test.ts (3), notes.test.ts (4)

3.1 Tareas
  Migration 008_tasks.sql: task_lists + tasks + task_list_collective_id() helper
  CHECK constraint: is_completed ⇔ completed_by ⇔ completed_at
  RLS by role + cross-collective isolation
  Store apps/web/src/lib/stores/tasks.ts (optimistic CRUD + reorder)
  /tasks overview (grid + sticky create input + 5s polling)
  /tasks/[id] detail with svelte-dnd-action reorder, flip animation,
    inline edit (dblclick), "Completed by …" attribution via lazy-loaded
    collective_members

3.2 Notas
  Migration 009_notes.sql: notes + note_color enum (8) + pin/archive CHECK
    + 7d trash window in RLS + fn_notes_touch trigger + pg_cron purge job
  Store apps/web/src/lib/stores/notes.ts (CRUD + pin/archive/trash/duplicate)
  /notes board (pinned section testid notes-pinned + 30s polling)
  /notes/[id] editor (title + textarea, 500ms debounced autosave,
    color picker, pin/archive/duplicate/trash actions)
  /notes/archive (restore + send to trash)
  /notes/trash (restore + permanent delete)

3.Z Verification
  just test-all → 148 verdes, 2 skipped:
    25 pgTAP (was 16, +9)
    88 Vitest integration (was 59, +29; 2 presence skipped)
    6 Vitest unit (unchanged)
    29 Playwright (was 22, +3 tasks +4 notes)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 10:28:19 +02:00
parent e7a961a66d
commit 104eeba02e
23 changed files with 2563 additions and 81 deletions

View File

@@ -96,7 +96,44 @@
"list_finish_confirm_yes": "Sí, terminar",
"list_finish_confirm_no": "Seguir comprando",
"tasks_title": "Tareas",
"tasks_no_lists": "Sin listas de tareas",
"tasks_create_first": "Crea tu primera lista de tareas",
"tasks_new_list_placeholder": "Nueva lista de tareas",
"tasks_new_task_placeholder": "Añadir tarea",
"tasks_empty": "Sin tareas",
"tasks_empty_hint": "Añade tu primera tarea abajo",
"tasks_completed_section": "Completadas",
"tasks_pending_section": "Por hacer",
"tasks_completed_by": "Completada por {name}",
"tasks_toggle": "Alternar tarea",
"tasks_uncheck": "Desmarcar tarea",
"tasks_delete": "Eliminar tarea",
"tasks_delete_list": "Eliminar lista",
"tasks_delete_list_confirm": "¿Eliminar esta lista y todas sus tareas?",
"notes_title": "Notas",
"notes_new": "Nueva nota",
"notes_pinned_section": "Fijadas",
"notes_active_section": "Notas",
"notes_archive": "Archivar",
"notes_archive_view": "Notas archivadas",
"notes_archived_empty": "Sin notas archivadas",
"notes_trash_view": "Papelera de notas",
"notes_trash_empty": "La papelera está vacía",
"notes_pin": "Fijar nota",
"notes_unpin": "Desfijar nota",
"notes_unarchive": "Desarchivar nota",
"notes_send_to_trash": "Enviar a la papelera",
"notes_restore": "Restaurar",
"notes_duplicate": "Duplicar",
"notes_color": "Color",
"notes_title_placeholder": "Título",
"notes_content_placeholder": "Empieza a escribir…",
"notes_content_aria": "Contenido",
"notes_back_to_board": "Volver al tablero",
"notes_saved": "Guardado",
"notes_saving": "Guardando…",
"notes_empty_board": "Sin notas",
"notes_empty_board_hint": "Haz clic en \"Nueva nota\" para empezar",
"search_title": "Buscar",
"search_placeholder": "Busca listas, tareas, notas…",
"trash_restore": "Restaurar",