@rsc-kit/mcp 0.41.0 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/recipes.js +18 -2
  2. package/dist/recipes.js.map +1 -1
  3. package/guides/admin-plugins.md +206 -6
  4. package/guides/api-routes.md +159 -215
  5. package/guides/authorization.md +103 -114
  6. package/guides/backend-answered-pages.md +301 -252
  7. package/guides/bap-vs-inertia.md +67 -25
  8. package/guides/blueprints.md +300 -169
  9. package/guides/bun.md +42 -25
  10. package/guides/caching.md +46 -49
  11. package/guides/coming-from-inertia.md +2 -2
  12. package/guides/commands.md +251 -200
  13. package/guides/connection.md +50 -54
  14. package/guides/content-security-policy.md +133 -84
  15. package/guides/domains.md +190 -149
  16. package/guides/edge-caching.md +242 -268
  17. package/guides/emails.md +96 -45
  18. package/guides/errors.md +116 -137
  19. package/guides/feature-flags.md +100 -30
  20. package/guides/file-uploads.md +101 -26
  21. package/guides/fonts.md +139 -110
  22. package/guides/forms.md +520 -542
  23. package/guides/images.md +87 -28
  24. package/guides/index.json +13 -33
  25. package/guides/instrumentation.md +134 -95
  26. package/guides/isr.md +3 -3
  27. package/guides/live-data-in-production.md +695 -0
  28. package/guides/live-data.md +170 -839
  29. package/guides/mcp.md +83 -59
  30. package/guides/metadata.md +124 -179
  31. package/guides/navigation.md +118 -147
  32. package/guides/no-javascript.md +49 -57
  33. package/guides/offline.md +118 -153
  34. package/guides/openapi.md +100 -35
  35. package/guides/pages.md +160 -50
  36. package/guides/ppr.md +178 -256
  37. package/guides/pwa.md +270 -216
  38. package/guides/queries.md +171 -300
  39. package/guides/react-compiler.md +90 -50
  40. package/guides/redirects.md +141 -177
  41. package/guides/response-headers.md +76 -74
  42. package/guides/route-interception.md +112 -111
  43. package/guides/routing.md +216 -322
  44. package/guides/sections.md +63 -66
  45. package/guides/seo-files.md +127 -65
  46. package/guides/server-actions.md +285 -357
  47. package/guides/static-generation.md +131 -199
  48. package/guides/testing.md +269 -147
  49. package/guides/third-party-scripts.md +94 -47
  50. package/guides/typed-routes.md +115 -113
  51. package/guides/url-validation.md +113 -61
  52. package/guides/validation.md +53 -62
  53. package/guides/view-transitions.md +159 -132
  54. package/guides/where-it-runs.md +226 -162
  55. package/package.json +2 -2
  56. package/guides/admin.md +0 -520
  57. package/guides/deployment.md +0 -598
  58. package/guides/go.md +0 -539
  59. package/guides/laravel.md +0 -787
  60. package/guides/your-own-backend.md +0 -602
@@ -1,23 +1,33 @@
1
1
  # Headers and cookies
2
2
 
3
- > Setting response headers and cookies during a render.
3
+ > Reading request headers and cookies, setting response headers and cookies, and security headers.
4
4
 
5
- ## Reading
6
-
7
- Anywhere in a server component or action:
5
+ Read headers and cookies anywhere on the server. Set them in a middleware:
8
6
 
9
7
  ```tsx
10
- import { headers, cookies, searchParams } from '@rsc-kit/core/request'
8
+ import { cookies } from '@rsc-kit/core/request'
11
9
 
12
10
  export default async function Page() {
13
- const h = await headers()
14
11
  const jar = await cookies()
15
12
 
16
13
  return <p>Hello {jar.get('name')?.value ?? 'stranger'}</p>
17
14
  }
18
15
  ```
19
16
 
20
- ## Writing
17
+ ## Reading headers and cookies
18
+
19
+ In a server component or an action:
20
+
21
+ ```tsx
22
+ import { headers, cookies, searchParams } from '@rsc-kit/core/request'
23
+
24
+ const h = await headers()
25
+ const jar = await cookies()
26
+ ```
27
+
28
+ ## Setting headers and cookies
29
+
30
+ Set them in a `middleware.ts`:
21
31
 
22
32
  ```tsx
23
33
  import { responseHeaders, cookies } from '@rsc-kit/core/request'
@@ -30,13 +40,12 @@ export async function middleware() {
30
40
  }
31
41
  ```
32
42
 
33
- **Writing only works in middleware.** Middleware runs before the render, while
34
- the response line has not been sent yet. A component runs *during* streaming,
35
- when the headers are already on the wire — writing from one throws rather than
36
- being silently dropped, so you find out immediately.
43
+ **Only middleware can set them.** It runs before the render, while the response
44
+ headers haven't been sent. A component runs while the page streams, after
45
+ they have, so setting one from a component throws.
37
46
 
38
- A redirect carries them too, which is what lets middleware remember where
39
- someone was going before sending them to log in:
47
+ A redirect carries them too, so a middleware can remember where someone was
48
+ going before sending them to sign in:
40
49
 
41
50
  ```tsx
42
51
  export async function middleware() {
@@ -49,10 +58,34 @@ export async function middleware() {
49
58
  }
50
59
  ```
51
60
 
61
+ ### Cookie options
62
+
63
+ ```ts
64
+ jar.set('name', 'value', {
65
+ httpOnly: true,
66
+ secure: true,
67
+ sameSite: 'lax', // 'strict' | 'lax' | 'none'
68
+ path: '/',
69
+ maxAge: 60 * 60 * 24,
70
+ expires: new Date('2027-01-01'),
71
+ })
72
+ ```
73
+
74
+ Names, `sameSite` and `expires` are checked, so a typo is an error rather than
75
+ a header the browser quietly ignores.
76
+
77
+ ### A cookie you set is the one you read
78
+
79
+ For the rest of the request, `cookies().get()` returns the value you set, not
80
+ what the browser sent. That includes the sections an action `revalidate()`s,
81
+ which render in the same request. A deleted cookie is gone from `get`, `has`
82
+ and `getAll`. So an action that does `jar.set('agent', id)` then
83
+ `revalidate('all')` gets a sidebar rendered with the new choice. Next.js works
84
+ the same way. The next request starts from what the browser sends.
85
+
52
86
  ## Security headers
53
87
 
54
- Nothing sets them for you, because which ones an app wants is the app's
55
- decision. The ones that are the same on every page go in the config:
88
+ Nothing sets security headers for you. The ones that are the same on every page go in the config:
56
89
 
57
90
  ```ts title="vite.config.ts"
58
91
  rscKit({
@@ -65,72 +98,41 @@ rscKit({
65
98
  })
66
99
  ```
67
100
 
68
- Every response gets them, and a page stays one an
69
- [edge may serve from its cache](/guides/edge-caching): they are fixed for the
70
- build, so the edge sends them with its copy. A middleware's own value for the
71
- same header wins.
101
+ Every response gets them.
72
102
 
73
- Only the headers an edge can send with a cached page are accepted:
74
- `Content-Language`, `X-Robots-Tag`, `Content-Security-Policy`,
75
- `Content-Security-Policy-Report-Only`, `Permissions-Policy`, `Referrer-Policy`, `Strict-Transport-Security`,
76
- `X-Frame-Options`, `X-Content-Type-Options`, `Cross-Origin-Opener-Policy`,
103
+ They are fixed for the build, so a page can still be
104
+ [served from an edge's cache](/guides/edge-caching) with them. Only headers an
105
+ edge can send with a cached page are accepted: `Content-Language`,
106
+ `X-Robots-Tag`, `Content-Security-Policy`,
107
+ `Content-Security-Policy-Report-Only`, `Permissions-Policy`,
108
+ `Referrer-Policy`, `Strict-Transport-Security`, `X-Frame-Options`,
109
+ `X-Content-Type-Options`, `Cross-Origin-Opener-Policy`,
77
110
  `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy` and
78
- `X-DNS-Prefetch-Control`. Anything else is a build error that says so.
79
- `Cache-Control` and `Link` are left out because the renderer sets them per
80
- response.
111
+ `X-DNS-Prefetch-Control`. Anything else is a build error. `Cache-Control` and
112
+ `Link` are left out because the renderer sets them per response.
81
113
 
82
- A header that depends on the request goes in a middleware instead. A
83
- middleware runs per request, so a page under one is never served from an
84
- edge's cache: a root `middleware.ts` keeps every page out.
114
+ - **A header that depends on the request** goes in a middleware. A middleware's
115
+ value for a header wins over the config's. A page under a middleware is never
116
+ served from an edge's cache, so a root `middleware.ts` keeps every page out.
117
+ - **`Content-Security-Policy`** needs each page's inline code allowed. Use
118
+ [`contentSecurityPolicy`](/guides/content-security-policy), which adds the
119
+ hashes, and a nonce where the page streams.
85
120
 
86
- A `Content-Security-Policy` needs more than a fixed header, because each page
87
- has inline code of its own to allow. Set it with
88
- [`contentSecurityPolicy`](/guides/content-security-policy) instead, which adds
89
- each page's hashes, and a nonce where it streams.
121
+ ## Headers rsc-kit sets
90
122
 
91
- ## Cookie options
123
+ **`X-RSC-Kit`** says how a response was served: `stored` (a page the build
124
+ wrote), `rendered` (rendered for this visitor) or `shell` (a stored shell with
125
+ its holes rendered now). Check it in the Network tab when a page is slower
126
+ than expected, or key a CDN rule or health check on it. It's the equivalent of
127
+ `X-Nextjs-Cache`.
92
128
 
93
- ```ts
94
- jar.set('name', 'value', {
95
- httpOnly: true,
96
- secure: true,
97
- sameSite: 'lax', // 'strict' | 'lax' | 'none'
98
- path: '/',
99
- maxAge: 60 * 60 * 24,
100
- expires: new Date('2027-01-01'),
101
- })
102
- ```
103
-
104
- Names are validated as cookie tokens and `sameSite` / `expires` are checked, so
105
- a typo is an error rather than a header the browser quietly ignores.
106
-
107
- A cookie set is the cookie read, for the rest of the request. After
108
- `jar.set('agent', id)`, every `cookies().get('agent')` in the same request —
109
- in the action, and in the sections it `revalidate()`s, which render in the
110
- same request and travel back with the answer — sees `id`, not what the
111
- browser sent; a deleted one is gone from `get`, `has` and `getAll`. This is
112
- Next's rule too, and it is what makes `set` then `revalidate('all')` the
113
- whole of a switcher: the sidebar re-renders with the choice the browser is
114
- about to hold. The next request starts from what it arrives with.
115
-
116
- ## What a response says about itself
117
-
118
- Two things, and they are not the same kind:
119
-
120
- **How it was served**, always: `X-RSC-Kit: stored`, `rendered` or `shell` on
121
- every response — a page from a file the build wrote, a page rendered for this
122
- visitor, or a stored shell with its holes rendered now. It is the header a
123
- developer reads in the Network tab when a page is slower than expected, the
124
- way `X-Nextjs-Cache` is, and a CDN rule or a health check can key on it. It
125
- names no product, so there is nothing to strip.
126
-
127
- **What built it**, by default: `X-Powered-By: rsc-kit` on every response and
128
- `<meta name="generator" content="rsc-kit">` in every document — what
129
- BuiltWith and Wappalyzer read. The name only, never the version: a version in
130
- every response is what a vulnerability scanner filters on. A policy that
131
- strips every framework identifier turns both off, which matters for the tag,
132
- since a proxy can strip a header but not a line inside the HTML:
129
+ **`X-Powered-By: rsc-kit`** on every response, and
130
+ `<meta name="generator" content="rsc-kit">` in every document, name the
131
+ framework but never its version. To turn both off:
133
132
 
134
133
  ```ts title="vite.config.ts"
135
134
  rscKit({ identify: false })
136
135
  ```
136
+
137
+ A proxy can strip the header but not the tag inside the HTML, which is why
138
+ the option exists.
@@ -2,41 +2,36 @@
2
2
 
3
3
  > Opening a route as a modal over the page you were on.
4
4
 
5
- Route interception lets you load a route from a different part of your app within the current layout. When a user clicks a link, the intercepted component renders in a parallel slot (like a modal) while the current page stays visible behind it. On hard navigation (refresh or direct URL), the normal page renders instead.
5
+ Route interception opens a route over the page you are on, usually as a modal.
6
+ Clicking a photo in a feed opens it in a modal, and the feed stays behind it.
7
+ Refreshing, or opening the link directly, shows the photo's own page:
6
8
 
7
- This follows the same convention as Next.js — using `(.)folder`, `(..)folder`, and `(...)folder` prefixes.
9
+ ```text
10
+ src/app/
11
+ layout.tsx renders {children} and {modal}
12
+ page.tsx the feed
13
+ @modal/
14
+ default.tsx nothing, when no modal is open
15
+ (.)photo/[id]/
16
+ page.tsx the photo, in a modal
17
+ photo/[id]/
18
+ page.tsx the photo's own page
19
+ ```
8
20
 
9
- ## Convention
21
+ The prefixes are the same as Next.js:
10
22
 
11
23
  | Prefix | Intercepts |
12
24
  | --- | --- |
13
- | (.)folder | Same level — matches a sibling route |
14
- | (..)folder | One level up — matches a route in the parent segment |
15
- | (...)folder | Root level — matches a route from the app root |
16
-
17
- ## A photo modal
25
+ | `(.)folder` | A route at the same level |
26
+ | `(..)folder` | A route one level up |
27
+ | `(...)folder` | A route from the app root |
18
28
 
19
- The most common use case is showing content in a modal on SPA navigation, with the full page as a fallback on hard navigation.
29
+ ## Opening a page in a modal
20
30
 
21
- ### File Structure
22
-
23
- ```tsx title="File structure"
24
- src/app/
25
- ├── layout.tsx ← renders {children} + {modal}
26
- ├── page.tsx ← feed page
27
- ├── @modal/
28
- │ ├── default.tsx ← empty by default (no modal open)
29
- │ └── (.)photo/[id]/
30
- │ └── page.tsx ← photo modal (interceptor)
31
- └── photo/[id]/
32
- └── page.tsx ← full photo page (hard nav)
33
- ```
31
+ Interception builds on [parallel routes](/guides/routing#parallel-routes): the
32
+ modal is a slot. The layout receives it as a prop and renders it:
34
33
 
35
- ### Root Layout
36
-
37
- The layout receives the `modal` parallel slot as a prop. No special wrapper component needed — just render it directly:
38
-
39
- ```tsx title="app/layout.tsx"
34
+ ```tsx title="src/app/layout.tsx"
40
35
  export default function Layout({
41
36
  children,
42
37
  modal,
@@ -45,54 +40,77 @@ export default function Layout({
45
40
  modal: React.ReactNode;
46
41
  }) {
47
42
  return (
48
- <div>
43
+ <>
49
44
  <main>{children}</main>
50
45
  {modal}
51
- </div>
46
+ </>
52
47
  );
53
48
  }
54
49
  ```
55
50
 
56
- ### Default Slot
51
+ The slot renders nothing until a navigation puts something in it:
57
52
 
58
- The `@modal/default.tsx` renders when no interception is active:
59
-
60
- ```tsx title="app/@modal/default.tsx"
61
- export default function ModalDefault() {
53
+ ```tsx title="src/app/@modal/default.tsx"
54
+ export default function NoModal() {
62
55
  return null;
63
56
  }
64
57
  ```
65
58
 
66
- ### Interceptor Component
59
+ The interceptor is an ordinary page inside the slot. It receives the target
60
+ route's `params`, and it can be a server component. Only the frame around it
61
+ needs to be interactive:
62
+
63
+ ```tsx title="src/app/@modal/(.)photo/[id]/page.tsx"
64
+ import { Suspense } from 'react';
65
+ import { findPhoto } from '@/data';
66
+
67
+ export default function PhotoModal({ params }: { params: Promise<{ id: string }> }) {
68
+ return (
69
+ <ModalShell>
70
+ <Suspense fallback={<p>Loading…</p>}>
71
+ <Photo params={params} />
72
+ </Suspense>
73
+ </ModalShell>
74
+ );
75
+ }
76
+
77
+ async function Photo({ params }: { params: Promise<{ id: string }> }) {
78
+ const { id } = await params;
79
+ const photo = await findPhoto(id);
80
+
81
+ return <img src={photo.url} alt={photo.title} />;
82
+ }
83
+ ```
67
84
 
68
- The interceptor at `@modal/(.)photo/[id]/page.tsx` receives the target route's params. It can be a server component — only the frame around it needs to be interactive:
85
+ The photo's own page is what a refresh or a shared link renders:
69
86
 
70
- ```tsx title="app/@modal/(.)photo/[id]/page.tsx"
71
- import { ModalShell } from '../../../components/ModalShell';
72
- import { findPhoto } from '../../../../data';
87
+ ```tsx title="src/app/photo/[id]/page.tsx"
88
+ import { findPhoto } from '@/data';
73
89
 
74
- export default async function PhotoModal({ id }: { id: string }) {
90
+ export default async function PhotoPage({ params }: { params: Promise<{ id: string }> }) {
91
+ const { id } = await params;
75
92
  const photo = await findPhoto(id);
76
93
 
77
94
  return (
78
- <ModalShell>
79
- <h2>{photo.title}</h2>
80
- <p>This renders in a modal on SPA navigation.</p>
81
- </ModalShell>
95
+ <article>
96
+ <h1>{photo.title}</h1>
97
+ <img src={photo.url} alt={photo.title} />
98
+ </article>
82
99
  );
83
100
  }
84
101
  ```
85
102
 
86
- Read the same data the full page reads. An interceptor pointed at a
87
- different source than the page it stands in for looks exactly like a
88
- broken interception: the modal opens correctly and says the record does
89
- not exist.
103
+ Read the same data in both. An interceptor pointed at a different source than
104
+ the page it stands in for looks exactly like a broken interception: the modal
105
+ opens correctly and says the record does not exist.
90
106
 
91
- ### Closing It
107
+ ## Closing the modal
92
108
 
93
- The engine puts the interceptor in the slot; the affordances for dismissing it are yours to write. A modal needs three, and the last two are the ones that get forgotten — a close control, the `Escape` key, and a click on the backdrop:
109
+ The engine puts the interceptor in the slot. The ways to dismiss it are yours
110
+ to write, and a modal needs three: a close button, the `Escape` key, and a
111
+ click on the backdrop. The last two are the ones that get forgotten:
94
112
 
95
- ```tsx title="components/ModalShell.tsx"
113
+ ```tsx title="src/components/ModalShell.tsx"
96
114
  "use client";
97
115
 
98
116
  import { useEffect, useRef } from 'react';
@@ -127,80 +145,63 @@ export function ModalShell({ children }: { children: ReactNode }) {
127
145
  }
128
146
  ```
129
147
 
130
- Closing is `history.back()` rather than a link to a fixed URL. The modal was opened by pushing a history entry over the page beneath, so going back is both what the browser's own back button does and what returns to whatever page it was opened *over* — a hardcoded destination is wrong the moment the same modal is reachable from two places.
131
-
132
- The router recognises that as leaving an interception and empties the slot without asking the server for anything. The page underneath never left, so closing costs no request and everything typed into it is still there.
148
+ Close with `history.back()`, not a link to a fixed URL. Opening the modal
149
+ pushed a history entry over the page beneath, so going back returns to
150
+ whichever page it was opened over. A hardcoded destination is wrong as soon as
151
+ the same modal opens from two places.
133
152
 
134
- A modal reachable from exactly one place can link to that place instead, and a real `<Link>` is worth keeping for it — a link can be opened in a new tab, and it still works before the page hydrates. `history.back()` is for a shell used from several.
153
+ The router sees going back as leaving the interception and empties the slot
154
+ without asking the server for anything. The page underneath never left, so
155
+ closing costs no request, and anything typed into it is still there.
135
156
 
136
- ### Full Page (Hard Nav)
157
+ A modal that opens from exactly one place can link to that place instead. A
158
+ real `<Link>` is worth keeping then: it opens in a new tab, and it works before
159
+ the page hydrates.
137
160
 
138
- When a user navigates directly to `/photo/123` (hard refresh, shared link), the normal page renders:
139
-
140
- ```tsx title="app/photo/[id]/page.tsx"
141
- export default function PhotoPage({ id }: { id: string }) {
142
- return (
143
- <div>
144
- <h1>Photo {id}</h1>
145
- <p>Full photo page — shown on direct navigation or refresh.</p>
146
- </div>
147
- );
148
- }
149
- ```
150
-
151
- ## How it works
161
+ ## Intercepting from another level
152
162
 
153
- On **SPA navigation** (clicking a Link):
163
+ Use `(..)` for a route one level up, and `(...)` for a route from the app root:
154
164
 
155
- - The client checks the intercept manifest (generated at build time)
156
- - If the target URL matches an intercept pattern, headers are added to the request
157
- - The server resolves the current page from the referer URL, to know which slot the interceptor belongs in
158
- - It renders the interceptor *alone*, and says so with `X-RSC-Revalidate: modal`
159
- - The client puts it in that slot. The page underneath is never re-rendered — so a half-filled form on it is still half-filled
165
+ ```text
166
+ # From /feed, intercept /photo/[id] at the same level
167
+ src/app/@modal/(.)photo/[id]/page.tsx
160
168
 
161
- On **hard navigation** (direct URL, refresh):
169
+ # From /feed/trending, intercept /photo/[id] one level up
170
+ src/app/feed/@modal/(..)photo/[id]/page.tsx
162
171
 
163
- - Normal route matching — `/photo/123` renders `photo/[id]/page.tsx`
164
- - No interception — the full photo page renders
165
-
166
- Re-rendering the page underneath would put the modal on screen at the
167
- cost of rebuilding everything below the layout that declares the slot.
168
- That page is already mounted and still correct; only the slot is new.
169
-
170
- ## Nested interception
171
-
172
- Use `(..)` to intercept routes one level up, or `(...)` to intercept from the app root:
173
-
174
- ```tsx title="Intercepting from a nested page"
175
- // From /feed, intercept /photo/[id] at the same level
176
- app/@modal/(.)photo/[id]/page.tsx
177
-
178
- // From /feed/trending, intercept /photo/[id] one level up
179
- app/feed/@modal/(..)photo/[id]/page.tsx
180
-
181
- // From /dashboard/settings, intercept /photo/[id] from root
182
- app/dashboard/settings/@drawer/(...)photo/[id]/page.tsx
172
+ # From /dashboard/settings, intercept /photo/[id] from the root
173
+ src/app/dashboard/settings/@drawer/(...)photo/[id]/page.tsx
183
174
  ```
184
175
 
185
- ## Several slots
176
+ ## Intercepting into several slots
186
177
 
187
- You can intercept the same route into different slots:
178
+ The same route can be intercepted into different slots:
188
179
 
189
- ```tsx title="File structure"
190
- app/
191
- ├── @modal/(.)photo/[id]/page.tsx ← renders in "modal" slot
192
- ├── @preview/(.)photo/[id]/page.tsx ← renders in "preview" slot
193
- └── photo/[id]/page.tsx ← full page
180
+ ```text
181
+ src/app/
182
+ @modal/(.)photo/[id]/page.tsx renders in the modal slot
183
+ @preview/(.)photo/[id]/page.tsx renders in the preview slot
184
+ photo/[id]/page.tsx the photo's own page
194
185
  ```
195
186
 
196
187
  ## Seeing it work
197
188
 
198
- The example app in the repository has a working one: `@modal/(.)posts/[slug]`
199
- over a feed of posts. Click a post to open it in a modal, then refresh to get
200
- the same route as a page.
189
+ The example app in the repository has one: `@modal/(.)posts/[slug]` over a
190
+ feed of posts. Click a post to open it in a modal, then refresh to get the
191
+ same route as a page.
192
+
193
+ ## How it works
194
+
195
+ On a client navigation, through a `Link`:
201
196
 
202
- ---
197
+ - The client checks the intercept manifest, which the build generates.
198
+ - If the target URL matches an intercept pattern, headers are added to the
199
+ request.
200
+ - The server resolves the current page from the referer URL, to know which
201
+ slot the interceptor belongs in.
202
+ - It renders the interceptor *alone*, and says so with `X-RSC-Revalidate: modal`.
203
+ - The client puts it in that slot. The page underneath is never rendered
204
+ again, so a half-filled form on it is still half-filled.
203
205
 
204
- Route interception builds on [parallel routes](/guides/routing). The `@folder`
205
- convention is worth being comfortable with first — an interceptor is a page
206
- inside a slot, and everything a slot does applies to it.
206
+ On a full page load, from a refresh or a direct URL, routes match as normal:
207
+ `/photo/123` renders `photo/[id]/page.tsx`, and nothing is intercepted.