Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
23f45926
Unverified
Commit
23f45926
authored
Oct 19, 2026
by
Aurora Scharff
Committed by
GitHub
Oct 19, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show compiling status alongside DevTools issues (#100178)
parent
b087b286
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
205 additions
and
14 deletions
+205
-14
next-logo.tsx
...s/dev-overlay/components/devtools-indicator/next-logo.tsx
+14
-12
status-indicator.tsx
...verlay/components/devtools-indicator/status-indicator.tsx
+7
-2
message.disabled.slow.js
...pp/build-indicator/disabled-slow/message.disabled.slow.js
+1
-0
page.js
...v-indicator/app/app/build-indicator/disabled-slow/page.js
+5
-0
message.enabled.slow.js
.../app/build-indicator/enabled-slow/message.enabled.slow.js
+1
-0
page.js
...ev-indicator/app/app/build-indicator/enabled-slow/page.js
+5
-0
page.js
...pment/dev-indicator/app/app/build-indicator/issue/page.js
+29
-0
build-indicator.test.ts
test/development/dev-indicator/build-indicator.test.ts
+122
-0
next.config.js
test/development/dev-indicator/next.config.js
+17
-0
slow-loader.js
test/development/dev-indicator/slow-loader.js
+4
-0
No files found.
packages/next/src/next-devtools/dev-overlay/components/devtools-indicator/next-logo.tsx
View file @
23f45926
...
@@ -114,6 +114,9 @@ export function NextLogo({
...
@@ -114,6 +114,9 @@ export function NextLogo({
state
.
cacheIndicator
state
.
cacheIndicator
)
)
const
showStatusIndicator
=
displayStatus
!==
Status
.
None
const
showStatusIndicator
=
displayStatus
!==
Status
.
None
const
statusReplacesIssues
=
showStatusIndicator
&&
!
state
.
disableDevIndicator
const
showIssues
=
!
statusReplacesIssues
&&
(
isErrorExpanded
||
state
.
disableDevIndicator
)
const
ref
=
useRef
<
HTMLDivElement
|
null
>
(
null
)
const
ref
=
useRef
<
HTMLDivElement
|
null
>
(
null
)
const
measuredWidth
=
useMeasureWidth
(
ref
)
const
measuredWidth
=
useMeasureWidth
(
ref
)
...
@@ -438,9 +441,9 @@ export function NextLogo({
...
@@ -438,9 +441,9 @@ export function NextLogo({
<
div
<
div
data
-
next
-
badge
data
-
next
-
badge
data
-
error=
{
hasError
&&
!
insightsOnly
}
data
-
error=
{
hasError
&&
!
insightsOnly
}
data
-
insights
-
only=
{
insightsOnly
}
data
-
insights
-
only=
{
insightsOnly
&&
!
statusReplacesIssues
}
data
-
error
-
expanded=
{
isExpanded
}
data
-
error
-
expanded=
{
isExpanded
}
data
-
status=
{
hasError
?
Status
.
None
:
displayStatus
}
data
-
status=
{
displayStatus
}
data
-
cache
-
badge=
{
cacheBadge
??
undefined
}
data
-
cache
-
badge=
{
cacheBadge
??
undefined
}
data
-
animate=
{
newErrorDetected
}
data
-
animate=
{
newErrorDetected
}
style=
{
{
width
}
}
style=
{
{
width
}
}
...
@@ -460,7 +463,7 @@ export function NextLogo({
...
@@ -460,7 +463,7 @@ export function NextLogo({
aria
-
label=
{
`${isMenuOpen ? 'Close' : 'Open'} Next.js Dev Tools`
}
aria
-
label=
{
`${isMenuOpen ? 'Close' : 'Open'} Next.js Dev Tools`
}
data
-
nextjs
-
dev
-
tools
-
button
data
-
nextjs
-
dev
-
tools
-
button
style=
{
{
style=
{
{
display
:
showStatusIndicator
&&
!
hasError
?
'none'
:
'flex'
,
display
:
showStatusIndicator
?
'none'
:
'flex'
,
}
}
}
}
{
...
buttonProps
}
{
...
buttonProps
}
>
>
...
@@ -470,7 +473,7 @@ export function NextLogo({
...
@@ -470,7 +473,7 @@ export function NextLogo({
{
isExpanded
&&
(
{
isExpanded
&&
(
<>
<>
{
/* Error badge has priority over cache indicator */
}
{
/* Error badge has priority over cache indicator */
}
{
(
isErrorExpanded
||
state
.
disableDevIndicator
)
&&
(
{
showIssues
&&
(
<
div
data
-
issues
data
-
toast
-
pill
>
<
div
data
-
issues
data
-
toast
-
pill
>
<
button
<
button
data
-
issues
-
open
data
-
issues
-
open
...
@@ -542,14 +545,13 @@ export function NextLogo({
...
@@ -542,14 +545,13 @@ export function NextLogo({
/>
/>
)
}
)
}
{
/* Status indicator shown while rendering or compiling */
}
{
/* Status indicator shown while rendering or compiling */
}
{
showStatusIndicator
&&
{
showStatusIndicator
&&
!
state
.
disableDevIndicator
&&
(
!
hasError
&&
<
StatusIndicator
!
state
.
disableDevIndicator
&&
(
status=
{
displayStatus
}
<
StatusIndicator
isError=
{
hasError
&&
!
insightsOnly
}
status=
{
displayStatus
}
onClick=
{
onTriggerClick
}
onClick=
{
onTriggerClick
}
/>
/>
)
}
)
}
</>
</>
)
}
)
}
</
div
>
</
div
>
...
...
packages/next/src/next-devtools/dev-overlay/components/devtools-indicator/status-indicator.tsx
View file @
23f45926
...
@@ -35,10 +35,15 @@ export function getCurrentStatus(
...
@@ -35,10 +35,15 @@ export function getCurrentStatus(
interface
StatusIndicatorProps
{
interface
StatusIndicatorProps
{
status
:
Status
status
:
Status
isError
?:
boolean
onClick
?:
()
=>
void
onClick
?:
()
=>
void
}
}
export
function
StatusIndicator
({
status
,
onClick
}:
StatusIndicatorProps
)
{
export
function
StatusIndicator
({
status
,
isError
=
false
,
onClick
,
}:
StatusIndicatorProps
)
{
const
statusText
:
Record
<
Status
,
string
>
=
{
const
statusText
:
Record
<
Status
,
string
>
=
{
[
Status
.
None
]:
''
,
[
Status
.
None
]:
''
,
[
Status
.
Compiling
]:
'Compiling'
,
[
Status
.
Compiling
]:
'Compiling'
,
...
@@ -170,7 +175,7 @@ export function StatusIndicator({ status, onClick }: StatusIndicatorProps) {
...
@@ -170,7 +175,7 @@ export function StatusIndicator({ status, onClick }: StatusIndicatorProps) {
<
div
<
div
data
-
status
-
dot
data
-
status
-
dot
style=
{
{
style=
{
{
backgroundColor
:
statusDotColor
[
status
],
backgroundColor
:
isError
?
'#fff'
:
statusDotColor
[
status
],
}
}
}
}
/>
/>
)
}
)
}
...
...
test/development/dev-indicator/app/app/build-indicator/disabled-slow/message.disabled.slow.js
0 → 100644
View file @
23f45926
export
default
'Disabled slow page'
test/development/dev-indicator/app/app/build-indicator/disabled-slow/page.js
0 → 100644
View file @
23f45926
import
message
from
'./message.disabled.slow'
export
default
function
Page
()
{
return
<
p
>
{
message
}
<
/p
>
}
test/development/dev-indicator/app/app/build-indicator/enabled-slow/message.enabled.slow.js
0 → 100644
View file @
23f45926
export
default
'Enabled slow page'
test/development/dev-indicator/app/app/build-indicator/enabled-slow/page.js
0 → 100644
View file @
23f45926
import
message
from
'./message.enabled.slow'
export
default
function
Page
()
{
return
<
p
>
{
message
}
<
/p
>
}
test/development/dev-indicator/app/app/build-indicator/issue/page.js
0 → 100644
View file @
23f45926
'use client'
import
{
useEffect
}
from
'react'
import
Link
from
'next/link'
export
default
function
Page
()
{
useEffect
(()
=>
{
console
.
error
(
'test issue'
)
},
[])
return
(
<>
<
Link
id
=
"to-enabled-slow"
href
=
"/app/build-indicator/enabled-slow"
prefetch
=
{
false
}
>
Go
to
enabled
slow
page
<
/Link
>
<
Link
id
=
"to-disabled-slow"
href
=
"/app/build-indicator/disabled-slow"
prefetch
=
{
false
}
>
Go
to
disabled
slow
page
<
/Link
>
<
/
>
)
}
test/development/dev-indicator/build-indicator.test.ts
0 → 100644
View file @
23f45926
import
{
nextTestSetup
}
from
'e2e-utils'
import
{
retry
,
toggleDevToolsIndicatorPopover
}
from
'next-test-utils'
const
installCheckCompilingReplacesIssue
=
(
browser
)
=>
{
return
browser
.
eval
(
`(function() {
sessionStorage.setItem('showedCompilingInPlaceOfIssue', 'false')
window.checkInterval = setInterval(function() {
const root = document.querySelector('nextjs-portal').shadowRoot
const statusElement = root.querySelector('[data-indicator-status]')
const issuesElement = root.querySelector('[data-issues]')
const logoButton = root.querySelector('[data-nextjs-dev-tools-button]')
const badge = root.querySelector('[data-next-badge]')
const statusDot = root.querySelector('[data-status-dot]')
const isVisible =
statusElement?.textContent.includes('Compiling') &&
issuesElement === null &&
logoButton !== null &&
getComputedStyle(logoButton).display === 'none' &&
badge?.getAttribute('data-error') === 'true' &&
getComputedStyle(badge).backgroundColor === 'rgb(202, 42, 48)' &&
getComputedStyle(statusDot).backgroundColor === 'rgb(255, 255, 255)'
if (isVisible) {
sessionStorage.setItem('showedCompilingInPlaceOfIssue', 'true')
clearInterval(window.checkInterval)
}
}, 5)
})()`
)
}
const
installCheckCompilingKeepsDisabledIssue
=
(
browser
)
=>
{
return
browser
.
eval
(
`(function() {
sessionStorage.setItem('keptDisabledIssueWhileCompiling', 'false')
window.checkInterval = setInterval(function() {
const root = document.querySelector('nextjs-portal').shadowRoot
const statusElement = root.querySelector('[data-indicator-status]')
const issuesElement = root.querySelector('[data-issues]')
const badge = root.querySelector('[data-next-badge]')
const status = badge?.getAttribute('data-status')
const isVisible =
status &&
status !== 'none' &&
statusElement === null &&
issuesElement?.textContent.includes('Issue') &&
root.querySelector('[data-disabled-icon]') !== null &&
badge?.getAttribute('data-error') === 'true'
if (isVisible) {
sessionStorage.setItem('keptDisabledIssueWhileCompiling', 'true')
clearInterval(window.checkInterval)
}
}, 5)
})()`
)
}
const
waitForIssue
=
(
browser
)
=>
retry
(
async
()
=>
{
expect
(
await
browser
.
eval
(
`(function() {
const root = document.querySelector('nextjs-portal').shadowRoot
return root.querySelector('[data-issues]')?.textContent ?? null
})()`
)
).
toContain
(
'Issue'
)
})
describe
(
'build indicator with an issue'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
__dirname
,
env
:
{
__NEXT_DEV_INDICATOR_COOLDOWN_MS
:
'0'
,
},
})
it
(
'shows red compiling status in place of an existing issue'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/app/build-indicator/issue'
)
await
waitForIssue
(
browser
)
await
installCheckCompilingReplacesIssue
(
browser
)
await
browser
.
elementByCss
(
'#to-enabled-slow'
).
click
()
await
retry
(
async
()
=>
{
expect
(
await
browser
.
eval
(
`sessionStorage.getItem('showedCompilingInPlaceOfIssue')`
)
).
toBe
(
'true'
)
})
await
retry
(
async
()
=>
{
expect
(
await
browser
.
elementByCss
(
'main > p'
).
text
()).
toBe
(
'Enabled slow page'
)
})
})
it
(
'keeps the disabled issue visible while compiling'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/app/build-indicator/issue'
)
await
waitForIssue
(
browser
)
await
toggleDevToolsIndicatorPopover
(
browser
)
await
browser
.
elementByCss
(
'[data-preferences]'
).
click
()
await
browser
.
elementByCss
(
'[data-hide-dev-tools]'
).
click
()
await
waitForIssue
(
browser
)
await
installCheckCompilingKeepsDisabledIssue
(
browser
)
await
browser
.
elementByCss
(
'#to-disabled-slow'
).
click
()
await
retry
(
async
()
=>
{
expect
(
await
browser
.
eval
(
`sessionStorage.getItem('keptDisabledIssueWhileCompiling')`
)
).
toBe
(
'true'
)
})
await
retry
(
async
()
=>
{
expect
(
await
browser
.
elementByCss
(
'main > p'
).
text
()).
toBe
(
'Disabled slow page'
)
})
})
})
test/development/dev-indicator/next.config.js
0 → 100644
View file @
23f45926
module
.
exports
=
{
turbopack
:
{
rules
:
{
'*.slow.js'
:
{
loaders
:
[
'./slow-loader.js'
],
as
:
'*.js'
,
},
},
},
webpack
(
config
)
{
config
.
module
.
rules
.
push
({
test
:
/
\.
slow
\.
js$/
,
use
:
[
require
.
resolve
(
'./slow-loader.js'
)],
})
return
config
},
}
test/development/dev-indicator/slow-loader.js
0 → 100644
View file @
23f45926
module
.
exports
=
function
slowLoader
(
source
)
{
const
callback
=
this
.
async
()
setTimeout
(()
=>
callback
(
null
,
source
),
1000
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment