From 6d81471294fe25305f5f9122c656f3f6c3620a66 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 13 Jun 2026 13:17:24 +0200 Subject: [PATCH] docs(timeline): flag DatePrecision as a hand-maintained backend mirror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note above the DatePrecision type that it mirrors the Java DatePrecision enum, must be updated manually in lockstep with that enum, and must not be migrated to the OpenAPI-generated type — it drives the shared client-side formatter shared by documents and the timeline date-label facade. Refs #778 Co-Authored-By: Claude Opus 4.8 --- frontend/src/lib/shared/utils/documentDate.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/lib/shared/utils/documentDate.ts b/frontend/src/lib/shared/utils/documentDate.ts index bc5aa5d7..d46f6346 100644 --- a/frontend/src/lib/shared/utils/documentDate.ts +++ b/frontend/src/lib/shared/utils/documentDate.ts @@ -4,6 +4,13 @@ import { m } from '$lib/paraglide/messages.js'; /** * Precision of a document's date — mirrors the backend {@code DatePrecision} enum * and the import normalizer's seven values verbatim. + * + * DRIFT RISK: this is a hand-maintained mirror of the Java {@code DatePrecision} + * enum, NOT an OpenAPI-generated type. It must be updated manually whenever the + * Java enum changes, and must NOT be migrated to the generated API type — the + * generated enum is request/response-shaped, while this drives the shared + * client-side formatter (used by both documents and the timeline façade). Keep + * the two in lockstep by hand. */ export type DatePrecision = 'DAY' | 'MONTH' | 'SEASON' | 'YEAR' | 'RANGE' | 'APPROX' | 'UNKNOWN';