You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scaffolds a new API, unstable_navigation(). It's only allowed in server code, so we ban it from being imported in the client.
Implementation follows upstack. Intended to be merged together.
back navigation before hydration after reload > Suspense boundary above the page > reconciles the URL with the rendered content once hydration completes (DD)
back navigation before hydration after reload > Suspense boundary above the page > other history changes before hydration > leaves the traversal unhandled when a third-party write lands before the replay (DD)
back navigation before hydration after reload > no Suspense boundary above the page > reconciles the URL with the rendered content once hydration completes (DD)
back navigation before hydration after reload > no Suspense boundary above the page > reconciles when the traversed entry differs only in search params (DD)
Expand output
● back navigation before hydration after reload › no Suspense boundary above the page › reconciles the URL with the rendered content once hydration completes
expect(received).toBe(expected) // Object.is equality
Expected: "Home"
Received: "Post"
127 | await retry(async () => {
128 | expect(new URL(await browser.url()).pathname).toBe(homePath)
> 129 | expect(await browser.elementByCss('h1').text()).toBe('Home')
| ^
130 | })
131 |
132 | // History traversal must still work after recovery.
at toBe (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:129:57)
at retry (lib/next-test-utils.ts:868:14)
at Object.<anonymous> (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:127:7)
● back navigation before hydration after reload › no Suspense boundary above the page › reconciles when the traversed entry differs only in search params
● back navigation before hydration after reload › Suspense boundary above the page › reconciles the URL with the rendered content once hydration completes
expect(received).toBe(expected) // Object.is equality
Expected: "Home"
Received: "Post"
127 | await retry(async () => {
128 | expect(new URL(await browser.url()).pathname).toBe(homePath)
> 129 | expect(await browser.elementByCss('h1').text()).toBe('Home')
| ^
130 | })
131 |
132 | // History traversal must still work after recovery.
at toBe (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:129:57)
at retry (lib/next-test-utils.ts:868:14)
at Object.<anonymous> (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:127:7)
● back navigation before hydration after reload › Suspense boundary above the page › other history changes before hydration › leaves the traversal unhandled when a third-party write lands before the replay
expect(received).toBe(expected) // Object.is equality
Expected: "?tp=1"
Received: ""
298 | // particular the router must not reload a page that just loaded.
299 | expect(await browser.eval('window.__stayed')).toBe(true)
> 300 | expect(new URL(await browser.url()).search).toBe('?tp=1')
| ^
301 | expect(await browser.elementByCss('h1').text()).toBe('Post')
302 | })
303 |
at toBe (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:300:55)
at retry (lib/next-test-utils.ts:868:14)
at Object.<anonymous> (e2e/app-dir/back-before-hydration/back-before-hydration.test.ts:295:9)
lubieowoce
changed the title
Scaffold unstable_navigation()
Scaffold navigation()
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scaffolds a new API,
unstable_navigation(). It's only allowed in server code, so we ban it from being imported in the client.Implementation follows upstack. Intended to be merged together.