mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
Enrol the two new prefetching pages in their structural guards
The prefetch-caching guard's frozen route set and the session-surface guard's direct-derivation list both name every RSC prefetch wrapper; /checkups and /mood join them with the same reasoning as their five predecessors — getUnswitchedSession only, skipped under a switch.
This commit is contained in:
1 parent
61114fab90
commit
84176af515
2 files changed
+7
-1
No files matched your search
@@ -172,10 +172,12 @@ const prefetchingPages = walk(APP_DIR)
|
||||
*/
|
||||
const PREFETCHING_ROUTES = [
|
||||
"/",
|
||||
"/checkups",
|
||||
"/coach",
|
||||
"/insights",
|
||||
"/insights/workouts",
|
||||
"/medications",
|
||||
"/mood",
|
||||
] as const;
|
||||
|
||||
describe("server-prefetching pages cannot leak a cacheable record", () => {
|
||||
|
||||
@@ -105,7 +105,7 @@ describe("S1 — the direct session-resolution set is frozen", () => {
|
||||
// with the session user's own data. Absence of a session skips the
|
||||
// prefetch rather than failing the render.
|
||||
//
|
||||
// These five resolve through `getUnswitchedSession()`, not `getSession()`,
|
||||
// These seven resolve through `getUnswitchedSession()`, not `getSession()`,
|
||||
// and they stay listed here BECAUSE of it. The helper is still a session
|
||||
// derivation outside `requireAuth` — moving the call one file deeper into
|
||||
// `lib/` would have taken them off this list while changing nothing about
|
||||
@@ -115,6 +115,8 @@ describe("S1 — the direct session-resolution set is frozen", () => {
|
||||
// can only ever hold the caller's own. See
|
||||
// `prefetch-page-caching-guard.test.ts` for the rule that keeps a sixth
|
||||
// prefetching page from reaching for the bare helper.
|
||||
"app/checkups/page.tsx":
|
||||
"RSC prefetch of the session user's reminder list, skipped under a switch",
|
||||
"app/coach/page.tsx":
|
||||
"RSC prefetch of the session user's coach state, skipped under a switch",
|
||||
"app/insights/page.tsx":
|
||||
@@ -123,6 +125,8 @@ describe("S1 — the direct session-resolution set is frozen", () => {
|
||||
"RSC prefetch of the session user's workouts, skipped under a switch",
|
||||
"app/medications/page.tsx":
|
||||
"RSC prefetch of the session user's medications, skipped under a switch",
|
||||
"app/mood/page.tsx":
|
||||
"RSC prefetch of the session user's mood list, skipped under a switch",
|
||||
"app/page.tsx":
|
||||
"RSC prefetch of the session user's dashboard snapshot, skipped under a switch",
|
||||
// Onboarding routing. Reads the actor's own onboarding step to redirect;
|
||||
|
||||
Reference in new issue
Block a user