- `POST /groups/:gid/attendees/:aid/move` mueve al mismo attendee a otro
grupo del profesor: conserva historial, cuotas (siguen del grupo anterior)
y acceso a la app de alumnos. Cancela las faltas avisadas y libera lo
reservado en clases futuras del grupo anterior.
- Cupo y teléfono duplicado se validan con `checkCanJoinGroup`, compartido
con el paso desde la lista de espera.
- Ficha del miembro: "Cambiar de grupo" abre un diálogo con el selector de
grupo destino y navega a la ficha en el grupo nuevo.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `POST /groups/:gid/waitlist/:entryId/promote` acepta `targetGroupId`
opcional (por defecto, el grupo en el que se anotó). El destino tiene que
ser del mismo profesor; cupo y teléfono duplicado se validan ahí.
- Detalle de la lista de espera: selector "Asignar a" con los grupos llenos
deshabilitados.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- El listado de grupos devuelve `unpaidPaymentsCount` (PENDING y OVERDUE).
- Cobros: nuevo selector de grupo (GroupFilter) junto a los filtros de estado;
con un grupo filtrado no se repite su nombre en cada card.
- Sheet: entra deslizando desde abajo en mobile (salvo reduced motion).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/acceso → /access, /alumno/* → /student/* (welcome, classes, payments,
profile, notify-absence, report-payment). El link del mail de confirmación
pasa a /access/email/:token. AGENTS.md documenta que los paths van en inglés.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Acceso del alumno o tutor con link de un solo uso (hash SHA-256, consumo
atómico, el GET no consume), sesión propia de 90 días deslizante, passkeys
opcionales (SimpleWebAuthn) y mail de recuperación con rate limit.
- Lado alumno (/i/:token, /acceso, /alumno/*): inicio, clases, avisar falta,
pagos, informar pago con comprobante (S3 privado, magic bytes) y perfil.
- Lado profe: acceso a la app en la ficha del alumno (invitar/reinvitar),
"Pagos para verificar" en Cobros con badge, faltas avisadas en la ficha de
grupo y datos para transferir en Ajustes.
- "Requiere atención" y el recordatorio de WhatsApp excluyen cuotas informadas.
- Zona horaria por defecto: Buenos Aires.
- Migración add_student_access, tests contra Postgres real (test:db) y docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Grupos: subtítulo con resumen (grupos · alumnos · lugares libres),
sección "Requiere atención" con los 4 alumnos más urgentes y tarjetas
con avatares (punteados por lugar libre en grupos chicos, superpuestos
con "+N" en grandes; con alerta primero y anillo de gravedad).
- Pantalla nueva /groups/attention: filtros Todos/Asistencia/Pagos,
secciones Urgente y A vigilar, Contactar / Enviar recordatorio por
wa.me y "Resuelto" persistente con update optimista.
- FAB "Nuevo grupo" que se pliega al scrollear (respeta reduced motion);
los toasts en mobile suben para no quedar debajo.
- Alertas centralizadas en computeStudentAlerts (shared). La regla de
asistencia pasa a: urgente = 3 seguidas o 4 de las últimas 6; a vigilar
= 2 de las últimas 4 (sin inactividad por días ni tendencia). Cuotas:
1 vencida vigilar, 2+ urgente.
- Backend: GET /attention y POST /attention/:attendeeId/resolve; tabla
attendee_alert_resolutions (la alerta vuelve si cambia la firma).
- Tokens de gravedad para claro y oscuro; se quita el indicador de pills.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ficha de grupo: "Agregar miembro" a todo el ancho y debajo Estadísticas,
Cobrar y Compartir con icono y texto (antes iconos sueltos en mobile).
Los mensajes automáticos de WhatsApp quedan en una fila plegable que
arranca cerrada si no hay ninguno activo.
- Historial del alumno: arranca en la primera clase registrada si es
anterior al alta, como la lista y la regla de riesgo ("1 de 5" en ambos).
- Nuevo grupo: cupo 10 por defecto, precio vacío obligatorio y foco
inicial en el nombre.
- Ajustes: chevron en Seguridad; el botón de tema del header queda solo
en desktop (en mobile vive en Apariencia).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Estadísticas ("Alumnos en riesgo") y el job de reenganche usan la misma
regla de dominio que la lista de grupos e Inicio
(summarizeMemberAttendance). El armado del historial por alumno vive en
analytics/lib/member-attendance.ts y se borra el clasificador viejo
(racha o asistencia mensual < 50%).
- El badge de alumnos en riesgo muestra el motivo real (faltas seguidas,
días sin venir o asistencia en baja).
- GET /home devuelve pendingPreRegistrations por grupo (en la misma
consulta de grupos) y "Para atender" las lista con link a la ficha en
la pestaña Pendientes (?section=pending).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Inicio: saludo con fecha, estadísticas compactas en fila (arregla el
"0 / 0 por cobrar"), sección "Para atender" (alumnos en riesgo alto y
cobros vencidos), tarjeta de clase de hoy con CTA a todo el ancho y
estado vacío de cobros que lleva a vincular Mercado Pago.
- Riesgo: la inactividad se mide desde la última presencia hasta la última
clase faltada, no contra hoy; un grupo sin clases registradas ya no pone
a todos sus miembros en riesgo alto.
- Tarjeta de grupo: el aviso usa el motivo real ("12 días sin venir") en
vez de "0 faltas".
- Días del horario en orden de calendario (sortWeekDays).
- Toast por encima del BottomNav en mobile; ficha de alumno sin flecha de
volver en mobile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Puerto BillingProvider con adaptadores de Mercado Pago (/preapproval) y
Stripe (Checkout en modo suscripción, fetch plano). El país elige proveedor
solo para suscripciones nuevas; sync, cancel y webhook usan row.provider.
- Migración add_billing_providers (provider, checkout_ref, ids genéricos).
- fix: /authorized_payments/search respondía 400 "Invalid value for limit";
se pagina por offset sin limit.
- fix: si falla la consulta de cobros, la sync guarda igual el estado de la
suscripción (ya no queda PENDING tras autorizar) y reintenta los cobros.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Módulo billing: suscripción Pro mensual vía /preapproval con credenciales
de plataforma por país, webhook firmado y reconciliación por polling.
- PlanGuard en los use-cases que crean grupos/alumnos, cobran con MP o
activan automatizaciones (402 plan_limit_reached / plan_feature_required /
plan_read_only), detrás de BILLING_ENFORCEMENT.
- Onboarding: paso Plan obligatorio (POST /onboarding/plan); con Free se
saltean Cobros y WhatsApp.
- Web: pantalla /billing, aviso de Pro desde el MutationCache.
- Migración billing_subscriptions y docs/billing.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desde el teléfono no se puede escanear el QR de la propia pantalla. Con
OpenWA el profesor ahora puede escribir su número y recibir un código de
8 caracteres para ingresar en WhatsApp (POST /whatsapp/connect/pairing-code).
En mobile el modal arranca por el número y en desktop por el QR.
- Puerto: requestPairingCode opcional (Kapso no lo implementa).
- OpenWA: reintenta el 409 mientras la sesión arranca.
- Número normalizado con el país del profesor (toWhatsappE164).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenWA se instala por separado: la API le habla por OPENWA_API_URL (sin
default). La guía documenta el compose recomendado y el alta de la key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Puerto MessagingProvider con adaptadores OpenWA (MVP, QR) y Kapso
(setup link de Meta + templates), elegido con WHATSAPP_PROVIDER.
- Vinculación del WhatsApp del profesor en el onboarding y en Ajustes.
- Job semanal (lunes 10:00 AR): recordatorio de pago y reenganche a
alumnos en riesgo (cooldown 14 días), con switches por grupo.
- Idempotencia por (kind, attendee, semana ISO), webhooks firmados con
HMAC y deduplicados, normalización de teléfonos a E.164.
- Servicio openwa en docker-compose y guía en docs/whatsapp.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Introduced CountryStep component for selecting the country during onboarding, affecting payment currency.
- Updated FirstGroupStep to include country information.
- Enhanced PaymentsProvider to manage payment states and renewals.
- Created PaymentRow component for displaying individual payment details.
- Implemented PaymentsView for listing and filtering payments by group and status.
- Added API endpoints for fetching and creating payments, including batch processing.
- Defined payment schemas for validation and data handling.
- Updated GroupHeader and GroupDetailView to include charging functionality for group members.
- Implemented MpReauthNotice component to notify users when reauthorization is needed.
- Created MpStatusCard component to display the current status of the Mercado Pago account.
- Added utility functions and constants for handling Mercado Pago status and messages.
- Introduced hooks for managing the connection and disconnection of Mercado Pago accounts.
- Developed a disconnect confirmation modal for user actions.
- Added tests for the new functionality and utility functions.
- Defined schemas for Mercado Pago account status and callback reasons in shared package.
- Added payment presentation logic to display payment status and due dates.
- Introduced AttendeeNotesSection and AttendeePaymentsSection components for managing notes and payments.
- Implemented forms for editing contact information and notes with validation.
- Updated API to support attendee updates and added corresponding tests.
- Improved attendance summary logic to reflect all visible sessions.
- Enhanced UI with loading states and error handling for better user experience.
- Translated comments from Spanish to English in vite.config.ts, docker-compose.yml, attendance-risk.ts, analytics.ts, attendance.ts, attendees.ts, enums.ts, groups.ts, and onboarding.ts.
- Improved descriptions for better understanding of code functionality and purpose.
- Ensured uniformity in terminology and phrasing throughout the codebase.
- Export attendance risk related schemas and types from shared package.
- Introduce new schemas for attendance risk levels and urgent member summaries.
- Implement attendance risk calculation logic in the shared library.
- Create tests for attendance risk calculations and group attendance summaries.
- Add a new component for visualizing attendance capacity indicators in the web app.
feat(attendance): refactor attendance summary logic and update tests
feat(analytics): extend GroupRiskSummary schema with absence and attendance counts
feat(groups): enhance group schema with attendee and waitlist counts
chore(skills): add frontend design skill with guidelines and license
feat(attendee-detail): implement AttendeePhoneLine component for phone display
feat(groups): create AttendanceBadge and CapacityIndicator components for group cards
feat(groups): add card utility functions for attendance alerts and capacity summaries
test(groups): implement tests for attendance alert and capacity summary logic
- Add API endpoints for managing group pre-registrations, including approval and rejection.
- Create database migration for `group_pre_registrations` table and associated enum for status.
- Implement use cases for listing, approving, and rejecting pre-registrations.
- Add frontend components for displaying pre-registration details and managing approvals/rejections.
- Update shared schemas to include pre-registration data structures and validation.
- Remove obsolete `WaitlistNoticeCard` component and replace with `PreRegistrationNoticeCard`.
- Implemented API endpoints to fetch attendee details and statistics.
- Created new route for fetching attendee by ID and their attendance stats.
- Added schemas for attendee statistics.
- Developed frontend components to display attendee details and attendance statistics.
- Integrated attendee detail provider to manage state and data fetching.
- Added tests for attendee retrieval and statistics calculation.
- Implemented AbsenceNotifyView for notifying absence with session details.
- Created AnalyticsView for displaying group analytics and managing students at risk.
- Added ClassAttendanceView for marking attendance in classes.
- Defined new schemas for analytics and attendance in shared package.
- Added home routes and corresponding route handler for fetching home summary.
- Created GetHomeSummary use case to aggregate user data including groups, attendees, and upcoming payments.
- Introduced HomeSummaryDto and related schemas for data validation.
- Implemented nextClassOccurrence function to determine the next class based on user timezone.
- Added tests for home summary functionality and next class occurrence logic.
- Removed organization dependency from group creation logic.
- Introduced new route and use-case for creating groups.
- Refactored form handling for group creation into a reusable GroupForm component.
- Updated API calls to support new group creation endpoint.
- Adjusted tests to reflect changes in group creation logic and validation.
- Removed obsolete organizations route and related components.
- Updated breadcrumb navigation and routing for group management.
- Introduced GroupWaitlistEntry model in Prisma schema to manage waitlisted users for groups.
- Implemented API route to add users to the group waitlist with validation.
- Enhanced attendee creation logic to handle group capacity and waitlisting scenarios.
- Added new problem builders for handling waitlist-related errors.
- Updated frontend to support waitlist interactions, including modals for capacity warnings.
- Created tests for waitlist functionality, ensuring proper handling of full groups and existing waitlist entries.
- Use real logo/isotype SVGs across app and emails
- Token-based color system aligned with landing (brand scale + semantic tokens)
- ThemeProvider (light/dark/system) with header toggle and settings card
- Embed logo in transactional emails; centralize email colors
- root: bun workspaces via package.json, packageManager bun@1.4.0, scripts use bun --filter
- backend: Bun.serve, bun test (vitest removed), bun --watch dev script, tsconfig types bun
- tests: migrate 6 test files from vitest to bun:test (mock.module)
- validate: replace @hono/zod-validator with hono validator + zod safeParse (fixes TS2589)
- lockfile: bunfig.toml saveTextLockfile, regenerated bun.lock (text) for turbo
- docs: AGENTS.md, README.md, stack.md updated to Bun stack