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';