Skip to content

fix(symbolicate): correct suspect-frame selection + Turbopack path no… - #41

Merged
Sharifur merged 1 commit into
mainfrom
dev
Aug 10, 2026
Merged

fix(symbolicate): correct suspect-frame selection + Turbopack path no…#41
Sharifur merged 1 commit into
mainfrom
dev

Conversation

@Sharifur

Copy link
Copy Markdown
Contributor

…rmalization

Two bugs behind framework frames (node_modules/next/...) outranking real app frames as the "suspect"/"crashed in" frame:

  1. StackTrace.tsx and IssueDetail.tsx SuspectFrame picked a frame by contextLine/usable-path availability before exhausting in-app options — an in-app frame can resolve inApp:true with contextLine:undefined (its chunk's map lacked sourcesContent) while an unrelated framework frame from a different chunk resolves with full context, wrongly winning.
  2. apply-map.ts's FRAMEWORK_INTERNAL_RE has an anchored ^src/... alternative for Next-internal files that resolve without a node_modules segment; Turbopack's unstripped turbopack:///[project]/ prefix broke that anchor.

New packages/shared/src/frames.ts (normalizeFramePath + pickSuspectFrame) is the single source of truth, replacing 5 duplicated/inconsistent path-stripping and frame-selection implementations across workers + web (also fixes agentMarkdown.ts's outermost-first pick and GitHub deep-link building for Turbopack paths). FR-MAP-5/FR-GRP-3.

…rmalization

Two bugs behind framework frames (node_modules/next/...) outranking real
app frames as the "suspect"/"crashed in" frame:

1. StackTrace.tsx and IssueDetail.tsx SuspectFrame picked a frame by
   contextLine/usable-path availability before exhausting in-app options —
   an in-app frame can resolve inApp:true with contextLine:undefined (its
   chunk's map lacked sourcesContent) while an unrelated framework frame
   from a different chunk resolves with full context, wrongly winning.
2. apply-map.ts's FRAMEWORK_INTERNAL_RE has an anchored `^src/...`
   alternative for Next-internal files that resolve without a node_modules
   segment; Turbopack's unstripped turbopack:///[project]/ prefix broke
   that anchor.

New packages/shared/src/frames.ts (normalizeFramePath + pickSuspectFrame)
is the single source of truth, replacing 5 duplicated/inconsistent
path-stripping and frame-selection implementations across workers + web
(also fixes agentMarkdown.ts's outermost-first pick and GitHub deep-link
building for Turbopack paths). FR-MAP-5/FR-GRP-3.
@Sharifur
Sharifur merged commit 1fec44a into main Aug 10, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant