Skip to content

feat(issues): Add native stack trace component - #114082

Draft
scttcper wants to merge 41 commits into
masterfrom
scttcper/native-stack-trace
Draft

scttcper wants to merge 41 commits into
masterfrom
scttcper/native-stack-trace

Conversation

@scttcper

@scttcper scttcper commented Apr 27, 2026 •

Copy link
Copy Markdown
Member

Adds the native version of the new stack trace to issue details behind the issue-details-new-stack-trace flag, including native group previews, exceptions without threads, standalone traces, and threaded events.

The frame layout is designed around native debugging: image/package, relative or absolute instruction address, function/file, symbolication status, grouping markers, hidden and omitted frames, and Dart async suspensions. The display menu supports relevant/full/raw views, symbolicated and unsymbolicated frames, absolute paths and addresses, verbose function names, and frame order. Preferences are kept per project, including choices made on JavaScript threads within native events.

The thread section includes navigation, state/tags/lock details, exception-backed and thread-only traces, raw crash report loading/download, copy-as-text, source links, git provider banners, and suspect commits. Exceptions without threads use Apple reports where supported; standalone raw traces use their event frames.

Uses the shared new stack trace primitives and one frame dispatcher for native and non-native layouts. Shared pages are covered by #123988, the independent ANR/template migration is in #123989, and the final removal of legacy renderers stays in #123987.

scttcper and others added 2 commits April 25, 2026 09:52
New native flavor of the stack trace component at
`static/app/components/stackTrace/native/`. Built on top of the existing
`StackTraceProvider` so it shares frame/row state, view state, and the
expanded body (`FrameContent` already handles source / vars / registers
/ assembly).

`NativeStackTraceProvider` resolves the debug image and pads relative
addresses once for the whole stacktrace, then exposes them through
`NativeStackTraceContext`. `NativeFrameHeader` lays out the row in the
classic native columns: status icon, package, address, function +
filename, actions. The status column is dropped entirely when no frame
in the stack would render an icon, so cleanly symbolicated stacks don't
reserve dead space on the left.

Includes:
- symbolicator status icons (image debug status wins over the per-frame
  symbolicatorStatus when an image is found)
- absolute / relative instruction addresses with shared column padding
- inline frame and stack-scanning tooltips on the address
- "Go to images loaded" debug-meta navigation
- raw view download button for native (Apple Crash Report endpoint)
- dart async suspension labels
- lead hint ("crashed in non-app") on its own line so toggling
  expansion doesn't change row height

Followups for parity: real `StacktraceLink` integration,
`OpenInContextLine` for sentry-app stacktrace-link components, the
`isUsedForGrouping` refresh icon, native display options
(absolute-addresses / verbose-function-names / absolute-file-paths)
wired into `StackTraceViewState`, and `AnnotatedText` PII annotations
on the function name.

Stories cover the multi-thread thread picker (one js thread for variety,
rendered with the generic stack trace), missing debug file, inline frame,
stack scanning, absolute addresses, long package names, omitted frames,
and dart async.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 27, 2026
@github-actions

github-actions Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.66% 95.67% 🟢 +0.01%
Typed 142,467 142,968 🟢 +501
Untyped 6,466 6,466 ±0
🔍 5 new type safety issues introduced

any-typed symbols (3 new)

File Line Detail
static/app/components/stackTrace/issueStackTrace/exceptionStackTrace.tsx 71 rawEntryMeta (var(binding))
static/app/components/stackTrace/issueStackTrace/exceptionStackTrace.tsx 71 exceptionValuesMeta (var(binding))
static/app/components/stackTrace/issueStackTrace/exceptionStackTrace.tsx 100 exceptionMeta (var)

Non-null assertions (!) (2 new)

File Line Detail
static/app/components/stackTrace/issueStackTrace/exceptionStackTrace.tsx 99 exceptions[0]!
static/app/components/stackTrace/native/nativeFrameAnalysis.ts 29 frames[i]!

This is informational only and does not block the PR.

scttcper and others added 4 commits May 18, 2026 14:52
Native stack trace display options now hydrate from the same persisted option list as the old issue details stack trace, and write back as users change the dropdown.

Also threads the active thread id into raw crash report downloads so the endpoint gets the right thread when viewing threaded native crashes.

Co-Authored-By: Codex <noreply@openai.com>
Native thread stack traces still used the old issue details renderer, so the new stack trace path was missing thread controls, source links, and native display option behavior there.

Adds a composable issue-thread stack trace module with local contexts for the active thread and native display state. Also tightens native frame layout to better match the old renderer: address spacing, non-in-app styling, and native-specific frame actions without the generic repeated-frame badge.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The native frame header got pretty miserable in narrow containers. The viewport breakpoint was the wrong tool and the actions column could squeeze the useful text down to crumbs.

Switch the compact layout to a container query, keep address/package/actions on the first line, and cap long native addresses so unsymbolicated frames do not take over the row.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
scttcper and others added 9 commits May 28, 2026 19:52
The new native thread stack trace was rendering raw mode from the parsed frames, which missed the Apple crash report endpoint behavior from the old component.

Fetch the raw report for the active thread and keep the generic formatted raw trace as the standalone fallback. Also update stale issue details imports from the master merge so this path actually compiles.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The new native stack trace still missed a handful of old frame-level behaviors: grouping frames could disappear from app-only view, Images Loaded did not focus the matching image, copy-as-text used a hand-rolled format, and some frame metadata/expansion details were not carried over.

This wires those through the native provider and frame rows. Native rows now keep grouping frames visible, support the Images Loaded jump/search flow, use the raw stack trace formatter for copy text, render redaction metadata in function headers, pick the default expanded frame based on sort order, and keep the single empty-frame fallback expandable.

Adds focused native tests around each of those paths.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The old native stack trace kept Dart async suspension sentinels out of the app-only view. The new row builder rendered them like normal native frames.

Add an opt-in native row filter so Dart async frames stay hidden in app-only mode while still showing in the full stack trace.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The old native frame row only showed the lead hint in app-only view, and only while the row was collapsed. The new header showed it in full stack traces too.

Gate the hint on the native app-only view so full stack traces stay focused on the frame data.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The old native stack trace gave revealed hidden system frames a different background so they were visually distinct from the anchor frame.

Carry the existing row isSubFrame flag through frame context and use it in the native header styling.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Issue-thread native actions already showed the grouping marker, but the default native frame actions did not. That left non-thread native stack traces without the old grouping indicator.

Render the same marker from default native actions whenever the frame participates in grouping.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The old native frame row only swapped to rawFunction when the verbose option was enabled and rawFunction actually differed from function. The new header used rawFunction more broadly.

Restore that old condition so verbose native names do not expose raw-only values or duplicate identical names.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The native stack trace rewrite had a few places where parity fixes were landing as one-off branches in shared code. This moves that into explicit row policy and native frame analysis helpers so the generic stack trace path stays boring.

Also matches the old raw thread behavior: exception-backed native threads can render the Apple crash report, plain thread stacks render formatted raw frames. Cleans up the native display menu, raw download support, row density, and removes global class styling from the new native trace.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
scttcper and others added 4 commits May 28, 2026 22:49
Native exception-backed thread traces used to go through the old exception renderer, which could show the Git provider CTA when source linking had enough frame info.

Add that banner back for native exception threads only. Thread-only traces and raw Apple crash reports stay out of it.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The native stack trace thread picker had a tiny external store for local component state. That made the flow feel more intense than it needed to be.

Move active thread selection into the existing provider and delete the store. Same behavior, fewer moving pieces.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
The native thread stack trace still had a second active-thread context and a fallback path for non-native rendering that cannot happen from this entry point.

Push the active model into the main provider, let selected thread state fall back during render, and make copy-as-text use the same stacktrace that is rendered.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Symbolicator status only needs to describe icons we actually render. Drop the fake success state and let no-icon cases be null.

Also tighten the debug image helper return type so native frame analysis does not need a cast, and use Scraps Text for the empty stacktrace message.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@getsantry getsantry Bot added the Stale label Aug 22, 2026
@scttcper scttcper removed the Stale label Aug 24, 2026
Preserve missing-stack-trace handling in the shared exception renderer and update native components for current types and tooltip props.

Co-Authored-By: Codex <noreply@openai.com>
Raw view dropped chained exceptions, and frame-detail controls only checked
the active trace. Keep the full exception chain and use all displayed
traces to determine which controls are available.

Show system-only traces in full and preserve display preferences when
switching threads. Add regression coverage for these cases.

Co-Authored-By: Codex <noreply@openai.com>
Remove redundant display state plumbing and share native frame capability
checks. Reuse frame analysis directly and use Scraps layout primitives
in the native frame header.

Co-Authored-By: Codex <noreply@openai.com>
The stack provider wrapped the whole thread section, remounting controls
on thread changes and duplicating providers around exception traces.

Move providers into the trace content and trim redundant thread context
fields. Keep navigation focused while resetting frame state, with tests
for both exception-backed and thread-only traces.

Co-Authored-By: Codex <noreply@openai.com>
Use the native renderer for exceptions and standalone traces behind the
existing flag. Share frame dispatch with threads and persist display changes
from JavaScript threads in native events.

Co-Authored-By: Codex <noreply@openai.com>
Use the display menu directly and keep fixture creation outside render. Match the event project to the loaded project in the rollout tests.

Co-Authored-By: Codex <noreply@openai.com>
@getsantry

getsantry Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Oct 1, 2026
@scttcper scttcper removed the Stale label Oct 1, 2026
Co-Authored-By: Codex <noreply@openai.com>
Use a dedicated native rollout flag after the shared flag was retired.
Bring over single-select view and order controls, full-path tooltips,
and frame actions that wrap in narrow containers.

Flag registration is in #126284.

Co-Authored-By: Codex <noreply@openai.com>
Fix the duplicate import caught by lint in the images-loaded action.

Co-Authored-By: Codex <noreply@openai.com>
The renderer flag test could finish before the delayed source-link query.
Wait for the request before teardown clears its mock response.

Co-Authored-By: Codex <noreply@openai.com>
The 896px breakpoint left normal-width stack traces with three-line
headers. Switch to the desktop layout at 640px.

Co-Authored-By: Codex <noreply@openai.com>

This branch was successfully deployed

1 active deployment
Preview — c08dce63 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant