fix(medications): keep dose-window defaults off the client server graph

The dose-window editor pulled DOSE_WINDOW_DEFAULTS from
@/lib/analytics/compliance, dragging the server-only scheduling graph
(which imports node:async_hooks) into the client bundle. Turbopack
rejected the client chunk; tsc does not model the boundary so the type
check stayed green.

Move the constant into a leaf module with no server imports and
re-export it from compliance so the server path is unchanged. The
client-reachable editor now imports the leaf directly.
This commit is contained in:
Marc-André Bombeck committed 2026-06-08 20:09:09 +02:00
1 parent 82d4081ac5
commit dfb6a7f298
3 files changed
+40 -19

No files matched your search

@@ -20,7 +20,7 @@
* - day-scale (weekly / rolling): ±1 day on-time, +4 days late tail.
*/
import { DOSE_WINDOW_DEFAULTS } from "@/lib/analytics/compliance";
import { DOSE_WINDOW_DEFAULTS } from "@/lib/medications/scheduling/dose-window-defaults";
/** One persisted explicit window. Matches `doseWindowEntrySchema`. */
export interface DoseWindowEntry {