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": "Choroba",
"documents": "Dokumenty",
"vaccinations": "Szczepienia",
"mentalWellbeing": "Dobrostan psychiczny"
"mentalWellbeing": "Dobrostan psychiczny",
"timeline": "Oś czasu"
},
"auth": {
"login": "Zaloguj się",
@@ -9608,6 +9609,10 @@
"vaccinations": {
"label": "Szczepienia",
"description": "Książeczka szczepień uporządkowana: dawka, seria, następne przypomnienie."
},
"timeline": {
"label": "Oś czasu",
"description": "Lata w jednym widoku: choroby, leki i wizyty obok Twoich wartości, a do tego Twoje własne wydarzenia życiowe."
}
},
"moduleOff": {
@@ -11831,7 +11836,7 @@
},
"profile": {
"label": "Historia zdrowia",
"detail": "Alergie, wywiad rodzinny, dane z Twojego profilu zdrowotnego, wizyty lekarskie i gabinety oraz Twoja historia szczepień."
"detail": "Alergie, wywiad rodzinny, dane z Twojego profilu zdrowotnego, wizyty lekarskie i gabinety, Twoja historia szczepień oraz Twoje wydarzenia życiowe."
},
"illness": {
"label": "Choroby",
@@ -12144,5 +12149,138 @@
"title": "Zapisane objawy",
"filed": "zapisano przy tej chorobie"
}
},
"day": {
"title": "Dzień",
"previousDay": "Poprzedni dzień",
"nextDay": "Następny dzień",
"close": "Zamknij dzień",
"openDay": "Otwórz dzień",
"viewWholeDay": "Zobacz cały dzień",
"captureForDay": "Dodaj dla tego dnia",
"empty": "Brak wpisów dla tego dnia.",
"notShared": "Niektóre obszary nie są Ci udostępnione.",
"inTimeline": "Na osi czasu",
"askCoach": "Zapytaj Coacha o ten dzień",
"chartHint": "Kliknij punkt, aby otworzyć jego dzień.",
"daysWithEntries": "Dni z wpisami",
"loadFailed": "Nie udało się wczytać tego dnia.",
"dayOf": "Dzień {n} z {m}",
"dayN": "Dzień {n}",
"since": "Od {date}",
"usualRange": "Zwykle od {lo} do {hi}",
"groups": {
"running": "W toku",
"values": "Wartości",
"happened": "Wydarzyło się"
},
"sections": {
"values": "Wartości",
"sleep": "Sen",
"mood": "Nastrój",
"assessments": "Kwestionariusze",
"medications": "Leki",
"illness": "Choroba",
"symptoms": "Objawy",
"allergies": "Alergie",
"labs": "Badania",
"visits": "Lekarz i zabiegi",
"vaccinations": "Szczepienia",
"checkups": "Badania profilaktyczne",
"documents": "Dokumenty",
"workouts": "Treningi",
"cycle": "Cykl",
"environment": "Otoczenie",
"lifestyle": "Styl życia",
"lifeEvents": "Wydarzenia życiowe"
},
"notable": {
"extremeHigh": "Najwyższa wartość dzienna od {since}",
"extremeLow": "Najniższa wartość dzienna od {since}",
"firstValue": "Pierwszy pomiar tego rodzaju",
"gap": "{days} dni bez pomiaru"
}
},
"timeline": {
"title": "Oś czasu",
"subtitle": "Lata w jednym widoku.",
"legend": "Pokazane obok siebie, nie jako przyczyna i skutek.",
"standing": "Stałe",
"startMissing": "Brak daty rozpoczęcia",
"openDay": "Otwórz {date}",
"zoom": {
"all": "Wszystko",
"year": "12 miesięcy",
"quarter": "3 miesiące"
},
"lanes": {
"life": "Życie",
"illness": "Choroby",
"allergies": "Alergie",
"medications": "Leki",
"vaccinations": "Szczepienia",
"visits": "Lekarz i zabiegi",
"labs": "Badania",
"documents": "Dokumenty",
"cycle": "Cykl"
},
"readiness": {
"title": "Co już zawiera Twoja oś czasu",
"subtitle": "Uczciwy przegląd, zanim ją otworzysz.",
"menuEntry": "Stan danych",
"hint": "Puste ścieżki pozostają ukryte, dopóki coś się nie pojawi. Wyłączone moduły nigdy się nie pojawiają. Ten przegląd znajdziesz później w sekcji Stan danych na osi czasu.",
"later": "Później",
"open": "Otwórz oś czasu",
"verdict": {
"carries": "Już ma treść.",
"thin": "Jeszcze skromna. Na razie oś czasu pokazuje głównie Twoje wartości."
},
"status": {
"carries": "wypełniona",
"thin": "skromna",
"empty": "pusta"
},
"lanes": {
"values": "Wartości",
"mood": "Nastrój",
"environment": "Otoczenie"
}
}
},
"lifeEvents": {
"title": "Wydarzenie życiowe",
"add": "Wydarzenie życiowe",
"subtitle": "Punkt odniesienia na osi czasu, nie pomiar.",
"privacy": "Tytuł i notatka są zapisywane w postaci zaszyfrowanej. Nie trafiają do żadnej AI.",
"empty": "Brak wydarzeń życiowych",
"emptyHint": "Przeprowadzka, narodziny dziecka czy nowa praca dają latom punkt odniesienia.",
"save": "Zapisz",
"cancel": "Anuluj",
"delete": "Usuń wydarzenie życiowe",
"saved": "Zapisano wydarzenie życiowe",
"deleted": "Usunięto wydarzenie życiowe",
"fields": {
"title": "Co się wydarzyło?",
"category": "Rodzaj",
"when": "Kiedy",
"precision": "Dokładność",
"addEnd": "Data zakończenia, jeśli był to okres",
"endDate": "Do",
"note": "Notatka",
"optionalTag": "opcjonalnie",
"notePlaceholder": "Coś, co zechcesz wiedzieć później"
},
"category": {
"FAMILY": "Rodzina",
"HOME": "Mieszkanie",
"WORK": "Praca",
"LOSS": "Strata",
"OTHER": "Inne"
},
"precision": {
"DAY": "Dzień",
"MONTH": "Miesiąc",
"YEAR": "Rok"
}
}
}