docs(plan): fases 11–14 — tags, section visibility, server admin, PWA hardening

Adds four planned-phase docs covering the next post-MVP roadmap:

- Fase 11 — item tags (collective-scoped) + drag-reorder UI for the
  existing `shopping_items.sort_order` column. Migration 021.
- Fase 12 — section visibility via JSONB `feature_flags` on `users` and
  `collectives`, with a `section_enabled()` SQL helper that resolves
  precedence (collective > user > default ON). Migration 022.
- Fase 13 — `/admin` area with a global `server_admins` role, append-only
  `admin_actions` audit log, RPCs for collective CRUD + member removal,
  and server-level section-visibility defaults that sit above Fase 12.
  Migrations 023+024. Depends on Fase 12.
- Fase 14 — PWA hardening: `onNeedRefresh` update toast, explicit offline
  indicator + sync queue badge + conflict surface, `__APP_VERSION__` and
  `__APP_COMMIT__` baked at build with a chip in `/settings`. No migration.
  Depends on Fase 9.3 (`sync_conflicts` wiring).

Also bumps CLAUDE.md project status with the planned-fases pointer, and
brings README.md status + index tables in line with Fase 7, 8, 9, 10
(previously missing) plus the four new ones.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 00:38:23 +02:00
parent d4a781ddcf
commit 6e0814169d
6 changed files with 513 additions and 3 deletions

View File

@@ -16,8 +16,16 @@
| Fase 3 — Tareas y Notas | ✅ Completa |
| Fase 4 — Búsqueda y Pulido | ✅ Búsqueda + RLS audit completos; PWA install/rate-limit/JWT rotation cerrados en Fase 6 |
| Fase 5 — Rediseño UX Mobile | ✅ Completa en scope automatizable (shell + masthead + big-button create + row redesign + selection mode + sticky detail chrome); presence avatars en cards + M-swipe/SEL-long-press touch E2E diferidos a WebKit install |
| Fase 6 — Deploy readiness | ✅ Completa (PWA injectManifest + manifest + iconos placeholder + Kong rate-limit en invitaciones + rotación JWT dev + rotate-jwt.sh + `.env.production.example` + rls-audit.sh + `just lighthouse`). Rate-limit auth retirado — Keycloak brute-force nativa cubre el caso. Push notifications y iconos finales fuera de scope. |
| Suite de tests (pgTAP + Vitest + Playwright) | ✅ 236 tests verdes (34 pgTAP + 140 integración + 15 unit + 46 E2E) + 1 rate-limit gated (`just test-rate-limit`). 3 skipped en `just test-all`. |
| Fase 6 — Deploy readiness | ✅ Completa (PWA generateSW + manifest + iconos placeholder + Kong rate-limit en invitaciones + rotación JWT dev + rotate-jwt.sh + `.env.erosi.example` + rls-audit.sh + `just lighthouse`). Rate-limit auth retirado — Keycloak brute-force nativa cubre el caso. Push notifications y iconos finales fuera de scope. |
| Fase 7 — Collective-flow E2E tests | ✅ Completa (12 Playwright nuevos O-01..MC-05; 3 bugs latentes corregidos: RPC atómica `create_collective`, restore de `pendingInvitationToken` tras login, hidratación tardía de `$currentCollective` en manage; migración 013 trigger `role/aud` default). |
| Fase 8 — Prod auth hardening | ✅ Completa (migración 014 extiende `role/aud` guard a UPDATE; `logout()` RP-initiated Keycloak end-session + ruta pública `/logged-out`). |
| Fase 9 — Polish + Dark Mode | 📋 Planificada |
| Fase 10 — Spec completion | 📋 Planificada |
| Fase 11 — Item tags + importance UX | 📋 Planificada |
| Fase 12 — Section visibility | 📋 Planificada |
| Fase 13 — Server administration | 📋 Planificada (depende de Fase 12) |
| Fase 14 — PWA hardening | 📋 Planificada (depende de Fase 9.3) |
| Suite de tests (pgTAP + Vitest + Playwright) | ✅ 259 tests verdes (45 pgTAP + 140 integración + 15 unit + 59 E2E) + 1 rate-limit gated (`just test-rate-limit`). 3 skipped en `just test-all`. |
---
@@ -43,8 +51,15 @@ Las fases ya cerradas (0, 1, 2a) reflejan este patrón retroactivamente: la secc
| Fase 4 | [fase-4-busqueda-pulido.md](plan/fase-4-busqueda-pulido.md) | 1 semana |
| Fase 5 | [fase-5-mobile-ux.md](plan/fase-5-mobile-ux.md) | 12 semanas |
| Fase 6 | [fase-6-deploy-prep.md](plan/fase-6-deploy-prep.md) | 35 días |
| Fase 7 | [fase-7-collective-flow-tests.md](plan/fase-7-collective-flow-tests.md) | 1 semana |
| Fase 9 | [fase-9-polish-dark-mode.md](plan/fase-9-polish-dark-mode.md) | 12 semanas |
| Fase 10 | [fase-10-spec-completion.md](plan/fase-10-spec-completion.md) | 23 semanas |
| Fase 11 | [fase-11-item-tags-importance.md](plan/fase-11-item-tags-importance.md) | 12 semanas |
| Fase 12 | [fase-12-section-visibility.md](plan/fase-12-section-visibility.md) | 1 semana |
| Fase 13 | [fase-13-server-admin.md](plan/fase-13-server-admin.md) | 23 semanas |
| Fase 14 | [fase-14-pwa-hardening.md](plan/fase-14-pwa-hardening.md) | 35 días |
**Total estimado: 1116 semanas (con Fase 6 deploy prep)**
**Total estimado MVP (Fase 06): 1116 semanas. Post-MVP (Fase 714): 1014 semanas adicionales.**
Los mockups de referencia viven en [`design/`](design/) (organizados por pantalla — ver `design/slate_collective/DESIGN.md` para la dirección "Monolith Editorial").