Repository navigation
Feat/sentry export v2 - #40
Merged
Merged
Conversation
Acts on triage feedback about the Sentry "copy for agent" brief.
Export (buildSentryAgentText rewritten to the requested format):
- High-signal fields first: ISSUE (type: message), Culprit, Environment,
Handled (no=unhandled crash), Level, Release, Events·Users, First/Last seen,
URL, Client, then the Sentry issue link AND the event-specific link.
- Stacktrace in a code fence, crash-first, in-app frames marked "← in-app",
consecutive duplicate frames collapsed (×N), tail truncated ("… +N frames").
- Breadcrumbs (last ~5) with timestamp + category + message (http crumbs render
"POST /url → 500").
- Degrades gracefully before the latest event loads (env/handled show
"unknown", no fence).
New extraction (api/sentry/events.ts):
- extractEventContext() distills environment / release / handled (mechanism
first, then tag) / url / client (browser·os·device) / breadcrumbs / event id
from the latest event. SentryExceptionValue gains `mechanism`.
UI:
- SentryIssueModal shows env / handled / release / client chips and passes the
context to the copy builder.
- Issues scope orders repo groups by most-recent activity (was alphabetical);
unmapped Sentry issues sink last.
Tests: events.test.ts (context/breadcrumbs/handled precedence) + rewritten
agentPrompt tests (format, in-app, dedup, truncation, graceful degrade) —
suite now 45 tests / 10 files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… raw JSON Follow-up enrichment on the Sentry agent brief, all from data Sentry already returns (no extra calls): - Sentry processing errors (event.errors) → surfaced as a "⚠ frames may be minified — upload source maps" block + modal warning. This is the actionable half of the sourcemap pain: it names exactly what Sentry couldn't symbolicate. - Trend from the issue event series (stats) → "N in 24h · M in 14d" (growing vs dead). Derived from the 14d series tail, no extra request. - Issue-level isUnhandled now drives the Handled line (more reliable than the per-event mechanism), plus Sentry priority. - platform / runtime (contexts.runtime) / affected user (id·email) / SDK / HTTP method folded into the URL line. - Full raw event JSON appended last, collapsed (<details>) and capped at 8KB — readable summary on top, complete payload for the agent below. - Demo Sentry issues gain isUnhandled + priority so the demo brief shows them. Types: SentryIssue gains isUnhandled/priority/stats; SentryLatestEvent gains platform/errors/contexts/user/sdk; SentryEventContext carries the distilled fields. Tests extended — suite now 47 tests / 10 files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Suspect commits (silent until configured):
- fetchSentrySuspectCommits hits /issues/{id}/committers/ and returns [] on any
error (the endpoint 404s until the Sentry-side GitHub integration + commit
tracking is set up), so it stays invisible until enabled, then lights up
automatically.
- The modal fetches it only when a real connector is configured (retry off);
shows "Suspect commit: <sha> <msg> — @author PR #N" and the brief gains a
"Suspect commits (Sentry blame)" section pointing the agent where to start.
Sentry token format validation:
- validateSentryTokenFormat() — inline hint under the Auth token field: must
start with sntryu_ (User Auth Token; flags sntrys_ org tokens specifically)
and be ~65–75 chars. Soft warning + aria-invalid, doesn't hard-block.
Tests: token format (prefix/length/empty/org-token), suspect-commit formatting
— suite now 52 tests / 11 files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Screenshots
Test plan
npm run buildis green (0 errors, 0 warnings)confirm()/alert()/prompt()not introduced (use<ConfirmDialog>)<SanitizedMarkdown>(DOMPurify)Related