feat: lay down the day view and timeline contract

Land every file the day view, the timeline and life events share before
any of them is built, so the server, the day view and the timeline can be
built side by side without editing the same file (#613).

Schema and migration 0387: LifeEvent with a short category list, calendar
start and end dates, a day/month/year precision, encrypted title and note,
a soft-delete tombstone and an index for the per-user live list. Every new
column is annotated for the column-reader sweep. Life events travel in both
backup purposes with their two ends in one file, are wiped with the
account, and are registered for key rotation.

src/lib/day/contract.ts carries the constants and wire types for
GET /api/day/{date}, /api/day/index, /api/timeline, /api/timeline/readiness
and the life-event routes, free of Zod so the navigation chrome can import
it; the schemas beside it feed the routes and the published contract. The
Coach and MCP tool name get_day is reserved there, and life events are
listed as the one section no model ever sees.

The opt-in timeline module, its navigation entry, the day-section and
timeline-lane surfaces, the day and timeline query keys (evicted by every
record data bundle), and stub routes that answer 501 behind their
admissions. The four cross-section reads declare the whole record for now;
the life-event list is a profile read, and life events join the profile
sharing domain and its consent copy in all seven locales. The day,
timeline and lifeEvents message namespaces carry their base copy as
release-pending keys.

The aggregate bundle cap moves to 4400: the branch already measured 4365
against 4335, and the new copy adds 10 KB.
This commit is contained in:
Marc-André Bombeck committed 2026-10-08 13:03:37 +02:00
1 parent 861ba21086
commit c79fc6cc7b
57 files changed
+4290 -21

No files matched your search

+140 -2
View File
@@ -436,7 +436,8 @@
"illness": "Enfermedad",
"documents": "Documentos",
"vaccinations": "Vacunas",
"mentalWellbeing": "Bienestar mental"
"mentalWellbeing": "Bienestar mental",
"timeline": "Cronología"
},
"auth": {
"login": "Iniciar sesión",
@@ -9608,6 +9609,10 @@
"vaccinations": {
"label": "Vacunas",
"description": "La cartilla de vacunación estructurada: dosis, serie, próximo refuerzo."
},
"timeline": {
"label": "Cronología",
"description": "Años de un vistazo: enfermedades, medicamentos y visitas junto a tus valores, además de tus propios acontecimientos vitales."
}
},
"moduleOff": {
@@ -11831,7 +11836,7 @@
},
"profile": {
"label": "Antecedentes de salud",
"detail": "Alergias, antecedentes familiares, los datos de tu perfil de salud, tus visitas médicas y consultas, y tu cartilla de vacunación."
"detail": "Alergias, antecedentes familiares, los datos de tu perfil de salud, tus visitas médicas y consultas, tu cartilla de vacunación y tus acontecimientos vitales."
},
"illness": {
"label": "Enfermedades",
@@ -12144,5 +12149,138 @@
"title": "Síntomas registrados",
"filed": "registrado con esta enfermedad"
}
},
"day": {
"title": "Día",
"previousDay": "Día anterior",
"nextDay": "Día siguiente",
"close": "Cerrar día",
"openDay": "Abrir día",
"viewWholeDay": "Ver el día completo",
"captureForDay": "Registrar para este día",
"empty": "No hay entradas para este día.",
"notShared": "Algunas áreas no están compartidas contigo.",
"inTimeline": "En la cronología",
"askCoach": "Preguntar al Coach por este día",
"chartHint": "Haz clic en un punto para abrir su día.",
"daysWithEntries": "Días con entradas",
"loadFailed": "No se pudo cargar este día.",
"dayOf": "Día {n} de {m}",
"dayN": "Día {n}",
"since": "Desde {date}",
"usualRange": "Habitual de {lo} a {hi}",
"groups": {
"running": "En curso",
"values": "Valores",
"happened": "Sucedió"
},
"sections": {
"values": "Valores",
"sleep": "Sueño",
"mood": "Estado de ánimo",
"assessments": "Cuestionarios",
"medications": "Medicamentos",
"illness": "Enfermedad",
"symptoms": "Síntomas",
"allergies": "Alergias",
"labs": "Laboratorio",
"visits": "Médico e intervenciones",
"vaccinations": "Vacunas",
"checkups": "Chequeos",
"documents": "Documentos",
"workouts": "Entrenamientos",
"cycle": "Ciclo",
"environment": "Entorno",
"lifestyle": "Estilo de vida",
"lifeEvents": "Acontecimientos vitales"
},
"notable": {
"extremeHigh": "Valor diario más alto desde {since}",
"extremeLow": "Valor diario más bajo desde {since}",
"firstValue": "Primera medición de este tipo",
"gap": "{days} días sin medición"
}
},
"timeline": {
"title": "Cronología",
"subtitle": "Años de un vistazo.",
"legend": "Mostrado uno junto a otro, no como causa y efecto.",
"standing": "Permanente",
"startMissing": "Falta la fecha de inicio",
"openDay": "Abrir {date}",
"zoom": {
"all": "Todo",
"year": "12 meses",
"quarter": "3 meses"
},
"lanes": {
"life": "Vida",
"illness": "Enfermedades",
"allergies": "Alergias",
"medications": "Medicamentos",
"vaccinations": "Vacunas",
"visits": "Médico e intervenciones",
"labs": "Laboratorio",
"documents": "Documentos",
"cycle": "Ciclo"
},
"readiness": {
"title": "Lo que tu cronología ya muestra",
"subtitle": "Un inventario honesto antes de abrirla.",
"menuEntry": "Cobertura de datos",
"hint": "Las pistas vacías permanecen ocultas hasta que haya algo. Los módulos desactivados nunca aparecen. Encontrarás este resumen más adelante en Cobertura de datos, dentro de la cronología.",
"later": "Más tarde",
"open": "Abrir cronología",
"verdict": {
"carries": "Ya tiene contenido.",
"thin": "Aún escasa. Por ahora la cronología muestra sobre todo tus valores."
},
"status": {
"carries": "completa",
"thin": "escasa",
"empty": "vacía"
},
"lanes": {
"values": "Valores",
"mood": "Estado de ánimo",
"environment": "Entorno"
}
}
},
"lifeEvents": {
"title": "Acontecimiento vital",
"add": "Acontecimiento vital",
"subtitle": "Un ancla para la cronología, no una medición.",
"privacy": "El título y la nota se guardan cifrados. No se envían a ninguna IA.",
"empty": "Aún no hay acontecimientos vitales",
"emptyHint": "Una mudanza, un nacimiento o un nuevo trabajo dan un ancla a los años.",
"save": "Guardar",
"cancel": "Cancelar",
"delete": "Eliminar acontecimiento vital",
"saved": "Acontecimiento vital guardado",
"deleted": "Acontecimiento vital eliminado",
"fields": {
"title": "¿Qué pasó?",
"category": "Tipo",
"when": "Cuándo",
"precision": "Precisión",
"addEnd": "Fecha de fin, si fue un periodo",
"endDate": "Hasta",
"note": "Nota",
"optionalTag": "opcional",
"notePlaceholder": "Algo que quieras saber más adelante"
},
"category": {
"FAMILY": "Familia",
"HOME": "Vivienda",
"WORK": "Trabajo",
"LOSS": "Pérdida",
"OTHER": "Otro"
},
"precision": {
"DAY": "Día",
"MONTH": "Mes",
"YEAR": "Año"
}
}
}