feat(source-map-config-issues): Implementing problem, diagnosis and troubleshooting section designs#112393
feat(source-map-config-issues): Implementing problem, diagnosis and troubleshooting section designs#112393
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for all 3 issues found in the latest run.
- ✅ Fixed: Potentially undefined
sampleEventIdcauses invalid API request- I added an
eventIdtruthiness guard inuseSourceMapDebugQueryand passed a safe empty-string fallback forsampleEventIdso missing IDs no longer trigger.../events/undefined/...requests.
- I added an
- ✅ Fixed: Null SDK name now enables query instead of disabling
- I restored the default behavior to disable queries when
sdkNameis missing and added an explicit opt-in option used only bySourceMapIssueDetailswhere null SDKs should still fetch.
- I restored the default behavior to disable queries when
- ✅ Fixed: Styled Flex wrapper replaceable with Flex props
- I removed the new
styled(Flex)wrapper and replaced it with an inlineFlexusingpaddingTop,align, andgapprops.
- I removed the new
Or push these changes by commenting:
@cursor push ce73a3a0c1
Preview (ce73a3a0c1)
diff --git a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebuggerData.tsx b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebuggerData.tsx
--- a/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebuggerData.tsx
+++ b/static/app/components/events/interfaces/crashContent/exception/useSourceMapDebuggerData.tsx
@@ -49,15 +49,20 @@
min_debug_id_sdk_version?: string | null;
}
+interface UseSourceMapDebugQueryOptions {
+ shouldFetchWhenSdkNameMissing?: boolean;
+}
+
export function useSourceMapDebugQuery(
projectSlug: string,
eventId: string,
- sdkName: string | null = null
+ sdkName: string | null = null,
+ {shouldFetchWhenSdkNameMissing = false}: UseSourceMapDebugQueryOptions = {}
) {
const organization = useOrganization({allowNull: true});
const isSdkThatShouldShowSourceMapsDebugger = sdkName
? sdkName.startsWith('sentry.javascript.')
- : true;
+ : shouldFetchWhenSdkNameMissing;
return useApiQuery<SourceMapDebugBlueThunderResponse>(
[
getApiUrl(
@@ -72,7 +77,10 @@
),
],
{
- enabled: isSdkThatShouldShowSourceMapsDebugger && organization !== null,
+ enabled:
+ isSdkThatShouldShowSourceMapsDebugger &&
+ organization !== null &&
+ Boolean(eventId),
staleTime: Infinity,
retry: false,
refetchOnWindowFocus: false,
diff --git a/static/app/views/issueDetails/configurationIssues/sourceMapIssues/sourceMapIssueDetails.tsx b/static/app/views/issueDetails/configurationIssues/sourceMapIssues/sourceMapIssueDetails.tsx
--- a/static/app/views/issueDetails/configurationIssues/sourceMapIssues/sourceMapIssueDetails.tsx
+++ b/static/app/views/issueDetails/configurationIssues/sourceMapIssues/sourceMapIssueDetails.tsx
@@ -17,8 +17,9 @@
export function SourceMapIssueDetails({event, project}: SourceMapIssueDetailsProps) {
const sourceMapQuery = useSourceMapDebugQuery(
project.slug,
- event.occurrence?.evidenceData?.sampleEventId,
- event.sdk?.name ?? null
+ event.occurrence?.evidenceData?.sampleEventId ?? '',
+ event.sdk?.name ?? null,
+ {shouldFetchWhenSdkNameMissing: true}
);
return (
diff --git a/static/app/views/issueDetails/configurationIssues/sourceMapIssues/troubleshootingSection.tsx b/static/app/views/issueDetails/configurationIssues/sourceMapIssues/troubleshootingSection.tsx
--- a/static/app/views/issueDetails/configurationIssues/sourceMapIssues/troubleshootingSection.tsx
+++ b/static/app/views/issueDetails/configurationIssues/sourceMapIssues/troubleshootingSection.tsx
@@ -1,5 +1,3 @@
-import styled from '@emotion/styled';
-
import {LinkButton} from '@sentry/scraps/button';
import {InlineCode} from '@sentry/scraps/code';
import {Disclosure} from '@sentry/scraps/disclosure';
@@ -121,22 +119,16 @@
</Text>
</Disclosure.Content>
</Disclosure>
- <FooterRow>
- <Text variant="muted">{t('Not what you\u2019re looking for?')}</Text>
+ <Flex paddingTop="sm" align="center" gap="sm">
+ <Text variant="muted">{t('Not what you’re looking for?')}</Text>
<ExternalLink href="https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/">
<Flex align="center" gap="xs">
<IconDocs size="xs" />
{t('Read all documentation')}
</Flex>
</ExternalLink>
- </FooterRow>
+ </Flex>
</Stack>
</Stack>
);
}
-
-const FooterRow = styled(Flex)`
- padding-top: ${p => p.theme.space.sm};
- align-items: center;
- gap: ${p => p.theme.space.sm};
-`;This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
| if (group.issueType === IssueType.SOURCEMAP_CONFIGURATION) { | ||
| return <SourceMapIssueDetails group={group} event={event} project={project} />; | ||
| } |
There was a problem hiding this comment.
are you sure we won't want anything from the existing experience?
There was a problem hiding this comment.
@scttcper valid concern, in this iteration, the designs are deliberately made different to create a separation from issues representing customer data
That said, the issue type config is still fully registered, so anything from the existing experience (graph, activity, linked issues, sidebar) can be opted back in incrementally if needed.
| if (!data) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
don't think we need this if its not loading and not error
There was a problem hiding this comment.
Oh I have receipts from ts check failures: https://github.com/getsentry/sentry/actions/runs/24187324827/job/70595246122?pr=112393
It would've worked for isPending check instead. Keeping the guard added a quick message for the no data case
| message ?? ( | ||
| <Text> | ||
| {t( | ||
| 'Source maps appear to be configured but Sentry could not pinpoint the exact issue.' | ||
| )} | ||
| </Text> | ||
| ) |
There was a problem hiding this comment.
which would remove the need for this fallback
| <Text size="lg" bold> | ||
| {t('Troubleshooting suggestions')} | ||
| </Text> |
There was a problem hiding this comment.
should this be a header actually?
There was a problem hiding this comment.
Yeah ^, pushed the change
| <Text> | ||
| {t( | ||
| 'When running JavaScript build tools (like webpack, Vite, ...) in development-mode/watch-mode, the generated code is sometimes incompatible with our source map uploading processes.' | ||
| )} | ||
| <br /> | ||
| <br /> | ||
| {t( | ||
| 'We recommend, especially when testing locally, to run a production build to verify your source maps uploading setup.' | ||
| )} | ||
| </Text> |
There was a problem hiding this comment.
TIL, pushed the change ^
| * Configuration for the issue-level information header | ||
| */ | ||
| header: { | ||
| // Controls the "X in this issue" event navigation row (First/Latest/Recommended) |
There was a problem hiding this comment.
| // Controls the "X in this issue" event navigation row (First/Latest/Recommended) | |
| /** | |
| * Controls the "X in this issue" event navigation row. | |
| */ |
Let's use a docstring here so we get this documentation in the LSP
There was a problem hiding this comment.
Though it looks like some of the other ones are wrong also lol
There was a problem hiding this comment.
Updated all three in the file ^
| } | ||
|
|
||
| interface DiagnosisSectionProps { | ||
| sourceMapQuery: ReturnType<typeof useSourceMapDebugQuery>; |
There was a problem hiding this comment.
didn't we export the type?
There was a problem hiding this comment.
Yeah updated this ^
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0955fab. Configure here.
…roubleshooting section designs (#112393) dev-ui link for testing: [issue in dev org](https://instrument-gc.dev.getsentry.net:7999/issues/7389912885/?project=4511172452286464&query=&referrer=issue-stream) A little context on the endpoint used for the diagnosis section. - `GET /api/0/projects/{org}/{project}/events/{event_id}/source-map-debug-blue-thunder-edition/` — given an event, checks whether source maps can be resolved for each frame across three paths. - - Debug ID — whether the bundle has a debug ID injected and the corresponding artifacts are uploaded - - Release artifacts — whether the minified file and source map resolve correctly for the event's release/dist - - Scraping — whether Sentry attempted to fetch source maps from the deployed URL and the outcome (success, not found, disabled, timeout, etc.) <img width="1185" height="825" alt="Screenshot 2026-04-08 at 12 21 20 AM" src="https://github.com/user-attachments/assets/9b41cf59-16c8-40ff-babf-7e36d9893826" /> --------- Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>


dev-ui link for testing: issue in dev org
A little context on the endpoint used for the diagnosis section.
GET /api/0/projects/{org}/{project}/events/{event_id}/source-map-debug-blue-thunder-edition/— given an event, checks whether source maps can be resolved for each frame across three paths.