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
7e7ddeb1
Unverified
Commit
7e7ddeb1
authored
Mar 07, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Mar 07, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev-overlay] Stop grouping callstack frames into ignored vs. not ignored (#76861)
parent
66c42c47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
41 deletions
+12
-41
call-stack.stories.tsx
...ay/ui/components/errors/call-stack/call-stack.stories.tsx
+1
-0
call-stack.tsx
...ev-overlay/ui/components/errors/call-stack/call-stack.tsx
+9
-39
error-ignored-frames.test.ts
...overlay/error-ignored-frames/error-ignored-frames.test.ts
+2
-2
No files found.
packages/next/src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.stories.tsx
View file @
7e7ddeb1
...
...
@@ -62,6 +62,7 @@ export const MultipleFrames: Story = {
lineNumber
:
5
,
},
},
...
Array
(
5
).
fill
(
ignoredFrame
),
{
...
frame
,
originalStackFrame
:
{
...
...
packages/next/src/client/components/react-dev-overlay/ui/components/errors/call-stack/call-stack.tsx
View file @
7e7ddeb1
...
...
@@ -11,24 +11,8 @@ export function CallStack({ frames, dialogResizerRef }: CallStackProps) {
const
initialDialogHeight
=
useRef
<
number
>
(
NaN
)
const
[
isIgnoreListOpen
,
setIsIgnoreListOpen
]
=
useState
(
false
)
const
{
visibleFrames
,
ignoredFrames
,
ignoreListLength
}
=
useMemo
(()
=>
{
const
visible
:
OriginalStackFrame
[]
=
[]
const
ignored
:
OriginalStackFrame
[]
=
[]
for
(
const
frame
of
frames
)
{
if
(
!
frame
.
ignored
)
{
visible
.
push
(
frame
)
}
if
(
frame
.
ignored
)
{
ignored
.
push
(
frame
)
}
}
return
{
visibleFrames
:
visible
,
ignoredFrames
:
ignored
,
ignoreListLength
:
ignored
.
length
,
}
const
ignoredFramesTally
=
useMemo
(()
=>
{
return
frames
.
reduce
((
tally
,
frame
)
=>
tally
+
(
frame
.
ignored
?
1
:
0
),
0
)
},
[
frames
])
function
onToggleIgnoreList
()
{
...
...
@@ -65,36 +49,22 @@ export function CallStack({ frames, dialogResizerRef }: CallStackProps) {
{
frames
.
length
}
</
span
>
</
p
>
{
ignore
ListLength
>
0
&&
(
{
ignore
dFramesTally
>
0
&&
(
<
button
data
-
expand
-
ignore
-
button=
{
isIgnoreListOpen
}
className=
"error-overlay-call-stack-ignored-list-toggle-button"
onClick=
{
onToggleIgnoreList
}
>
{
`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignore
ListLength} ignore-listed frames
`
}
{
`${isIgnoreListOpen ? 'Hide' : 'Show'} ${ignore
dFramesTally} ignore-listed frame(s)
`
}
<
ChevronUpDown
/>
</
button
>
)
}
</
div
>
{
visibleFrames
.
map
((
frame
,
frameIndex
)
=>
(
<
CallStackFrame
key=
{
`call-stack-leading-${frameIndex}`
}
frame=
{
frame
}
index=
{
frameIndex
}
/>
))
}
{
isIgnoreListOpen
&&
(
<>
{
ignoredFrames
.
map
((
frame
,
frameIndex
)
=>
(
<
CallStackFrame
key=
{
`call-stack-ignored-${frameIndex}`
}
frame=
{
frame
}
index=
{
frameIndex
}
/>
))
}
</>
)
}
{
frames
.
map
((
frame
,
frameIndex
)
=>
{
return
!
frame
.
ignored
||
isIgnoreListOpen
?
(
<
CallStackFrame
key=
{
frameIndex
}
frame=
{
frame
}
index=
{
frameIndex
}
/>
)
:
null
})
}
</
div
>
)
}
...
...
test/development/app-dir/error-overlay/error-ignored-frames/error-ignored-frames.test.ts
View file @
7e7ddeb1
...
...
@@ -99,15 +99,15 @@ describe('error-ignored-frames', () => {
if
(
isTurbopack
)
{
expect
(
expendedStack
).
toMatchInlineSnapshot
(
`
"at <unknown> (app/interleaved/page.tsx (7:11))
at Page (app/interleaved/page.tsx (6:35))
at invokeCallback ()
at Page (app/interleaved/page.tsx (6:35))
at ClientPageRoot ()"
`
)
}
else
{
expect
(
expendedStack
).
toMatchInlineSnapshot
(
`
"at eval (app/interleaved/page.tsx (7:11))
at Page (app/interleaved/page.tsx (6:36))
at invokeCallback (node_modules/interleave/index.js (2:1))
at Page (app/interleaved/page.tsx (6:36))
at ClientPageRoot (../src/client/components/client-page.tsx (60:12))"
`
)
}
...
...
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