Repository navigation
feat(local): Show an error event's attachments in its detail panel - #2106
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
SDKs send screenshots, view hierarchies and other files in the error's envelope, but the viewer only listed them in the Attachments view. Error event details now include an Attachments section with every attachment whose envelope header names the event, either by the event's own envelope ID or its payload event_id. Rows reuse the collapsed, lazily decoded attachment list from raw envelopes. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
BYK
force-pushed
the
byk/local-event-attachments
branch
from
November 9, 2026 14:33
35b4934 to
86a9e75
Compare
BYK
requested changes
Nov 9, 2026
BYK
requested changes
Nov 9, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
Wait, I didn't realize this was just 2 items 🤦🏻
Revert...
The ID list holds at most two entries, so Array#includes is simpler and no slower. This reverts commit 352fe72.
BYK
approved these changes
Nov 9, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2105.
SDKs send screenshots, view hierarchies and other files along with the error they belong to, but Sentry Local only listed them in the Attachments view. You saw the error in one place and had to go find its screenshot somewhere else. Spotlight shows them under the event (Context → Attachments).
Error event details now have an Attachments section, placed after the event fields and before context and breadcrumbs.
eventAttachmentsinlib/attachments.tsmatches everyattachmentitem whose envelope headerevent_idequals either the event's own envelope headerevent_idor its payloadevent_id. That covers attachments in the same envelope as the event and attachments sent later in another envelope. It checks both IDs because they don't always match: in the bundled08-attachmentsfixture the header says8259…and the payload says9999….EnvelopeAttachmentsis nowAttachmentListwith alabel, so the error panel doesn't decode every screenshot just to show a stack trace.Screenshots
Bundled
08-attachmentsfixture, Events → "Captured attachment examples":order.jsonandpage.htmlexpanded (HTML stays inert source)Testing
event-detail.test.tsx: an error lists attachments from its own envelope (header ID different from the payload ID) and from a later envelope that names the payload ID. It skips another event's attachment, keeps them collapsed until you click Show preview, and errors with no attachments render no section.apps/local:pnpm run typecheck,pnpm run lintandpnpm run test(324 tests) pass.oxfmt --checkis clean.TypeErrorerror shows no section.via @BYK.
--
View Session in Sentry