mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
test(dashboard): repoint the disableCoach grep-guard at the shared snapshot read
The cached-snapshot read moved from the API route body into src/lib/dashboard/snapshot-read.ts (shared by the route and the dashboard RSC prefetch); the bidirectional allowlist follows the user.disableCoach read to its new home. H4
This commit is contained in:
1 parent
9f2a3e25fe
commit
1d368b7cd2
1 file changed
+5
-4
@@ -323,11 +323,12 @@ describe("Coach per-user disableCoach invariant", () => {
|
||||
// v1.7.0 W6 — the unified dashboard snapshot builder reads
|
||||
// `user.disableCoach` to gate the embedded daily briefing to
|
||||
// `briefingState: "disabled"`. Covered by the briefingState matrix
|
||||
// in `src/lib/dashboard/__tests__/snapshot.test.ts`. The route is
|
||||
// a thin pass-through of the resolved session user into the
|
||||
// builder.
|
||||
// in `src/lib/dashboard/__tests__/snapshot.test.ts`. The shared
|
||||
// cached-read helper (used by BOTH the API route and the dashboard
|
||||
// RSC prefetch) maps the session user's flag into the builder
|
||||
// input; the route itself no longer touches the flag.
|
||||
"src/lib/dashboard/snapshot.ts",
|
||||
"src/app/api/dashboard/snapshot/route.ts",
|
||||
"src/lib/dashboard/snapshot-read.ts",
|
||||
// v1.18.0 — the module enable/disable gate delegates the `coach`
|
||||
// module to the SAME two-layer source of truth (`user.disableCoach`
|
||||
// AND the operator assistant master flag) rather than owning a
|
||||
|
||||
Reference in new issue
Block a user