Unverified Commit 10fb5bc6 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[devtool] enable segment explorer by default (#81737)

Enable `experimental.devtoolSegmentExplorer` on canary by default and update snapshots
parent 719bc5e7
...@@ -1463,7 +1463,7 @@ export const defaultConfig = Object.freeze({ ...@@ -1463,7 +1463,7 @@ export const defaultConfig = Object.freeze({
useCache: undefined, useCache: undefined,
slowModuleDetection: undefined, slowModuleDetection: undefined,
globalNotFound: false, globalNotFound: false,
devtoolSegmentExplorer: false, devtoolSegmentExplorer: true,
browserDebugInfoInTerminal: false, browserDebugInfoInTerminal: false,
optimizeRouterScrolling: false, optimizeRouterScrolling: false,
strictNextHead: true, strictNextHead: true,
......
...@@ -21,11 +21,15 @@ describe('hydration-error-count', () => { ...@@ -21,11 +21,15 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/bad-nesting" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/bad-nesting" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <SegmentViewNode type="page" pagePath="bad-nestin...">
<Page params={Promise} searchParams={Promise}> <SegmentTrieNode>
> <p> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p> > <p>
...", > <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
"environmentLabel": null, "environmentLabel": null,
...@@ -69,12 +73,16 @@ describe('hydration-error-count', () => { ...@@ -69,12 +73,16 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/html-diff" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}> <InnerLayoutRouter url="/html-diff" tree={[...]} cacheNode={{lazyData:null, ...}} segmentPath={[...]}>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <SegmentViewNode type="page" pagePath="html-diff/...">
<Page params={Promise} searchParams={Promise}> <SegmentTrieNode>
<p> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
+ client <Page params={Promise} searchParams={Promise}>
- server <p>
...", + client
- server
...
...
...",
"description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:", "description": "Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null, "environmentLabel": null,
"label": "Recoverable Error", "label": "Recoverable Error",
...@@ -105,11 +113,15 @@ describe('hydration-error-count', () => { ...@@ -105,11 +113,15 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <SegmentViewNode type="page" pagePath="two-issues...">
<Page params={Promise} searchParams={Promise}> <SegmentTrieNode>
> <p className="client"> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
> <p> <Page params={Promise} searchParams={Promise}>
...", > <p className="client">
> <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
"environmentLabel": null, "environmentLabel": null,
...@@ -133,13 +145,17 @@ describe('hydration-error-count', () => { ...@@ -133,13 +145,17 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/two-issues" tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <SegmentViewNode type="page" pagePath="two-issues...">
<Page params={Promise} searchParams={Promise}> <SegmentTrieNode>
<p <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
+ className="client" <Page params={Promise} searchParams={Promise}>
- className="server" <p
> + className="client"
...", - className="server"
>
...
...
...",
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:", "description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null, "environmentLabel": null,
"label": "Recoverable Error", "label": "Recoverable Error",
...@@ -171,11 +187,15 @@ describe('hydration-error-count', () => { ...@@ -171,11 +187,15 @@ describe('hydration-error-count', () => {
<RedirectBoundary> <RedirectBoundary>
<RedirectErrorBoundary router={{...}}> <RedirectErrorBoundary router={{...}}>
<InnerLayoutRouter url="/hydration..." tree={[...]} cacheNode={{lazyData:null, ...}} ...> <InnerLayoutRouter url="/hydration..." tree={[...]} cacheNode={{lazyData:null, ...}} ...>
<ClientPageRoot Component={function Page} searchParams={{}} params={{}}> <SegmentViewNode type="page" pagePath="hydration-...">
<Page params={Promise} searchParams={Promise}> <SegmentTrieNode>
> <p> <ClientPageRoot Component={function Page} searchParams={{}} params={{}}>
<Page params={Promise} searchParams={Promise}>
> <p> > <p>
...", > <p>
...
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>. "description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.", This will cause a hydration error.",
"environmentLabel": null, "environmentLabel": null,
......
...@@ -142,6 +142,7 @@ describe('client-dev-overlay', () => { ...@@ -142,6 +142,7 @@ describe('client-dev-overlay', () => {
Static Static
Turbopack Turbopack
Enabled Enabled
Route Info
Preferences" Preferences"
`) `)
} else { } else {
...@@ -151,6 +152,7 @@ describe('client-dev-overlay', () => { ...@@ -151,6 +152,7 @@ describe('client-dev-overlay', () => {
Route Route
Static Static
Try Turbopack Try Turbopack
Route Info
Preferences" Preferences"
`) `)
} }
......
...@@ -13,7 +13,7 @@ const EXTERNAL = { ...@@ -13,7 +13,7 @@ const EXTERNAL = {
const COLLECTOR_PORT = 9001 const COLLECTOR_PORT = 9001
describe('opentelemetry', () => { describe('opentelemetry', () => {
const { next, skipped } = nextTestSetup({ const { next, skipped, isNextDev } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true, skipDeployment: true,
dependencies: require('./package.json').dependencies, dependencies: require('./package.json').dependencies,
...@@ -170,7 +170,7 @@ describe('opentelemetry', () => { ...@@ -170,7 +170,7 @@ describe('opentelemetry', () => {
}, },
{ {
attributes: { attributes: {
'next.clientComponentLoadCount': 7, 'next.clientComponentLoadCount': isNextDev ? 8 : 7,
'next.span_type': 'next.span_type':
'NextNodeServer.clientComponentLoading', 'NextNodeServer.clientComponentLoading',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment