Skip to content

feat(source-map-config-issues): Implementing problem, diagnosis and troubleshooting section designs#112393

Merged
Abdkhan14 merged 11 commits intomasterfrom
abdk/config-issues-ui-v1
Apr 9, 2026
Merged

feat(source-map-config-issues): Implementing problem, diagnosis and troubleshooting section designs#112393
Abdkhan14 merged 11 commits intomasterfrom
abdk/config-issues-ui-v1

Conversation

@Abdkhan14
Copy link
Copy Markdown
Contributor

@Abdkhan14 Abdkhan14 commented Apr 7, 2026

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.
    • 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.)
Screenshot 2026-04-08 at 12 21 20 AM

@Abdkhan14 Abdkhan14 requested review from a team as code owners April 7, 2026 18:29
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sampleEventId causes invalid API request
    • I added an eventId truthiness guard in useSourceMapDebugQuery and passed a safe empty-string fallback for sampleEventId so missing IDs no longer trigger .../events/undefined/... requests.
  • ✅ Fixed: Null SDK name now enables query instead of disabling
    • I restored the default behavior to disable queries when sdkName is missing and added an explicit opt-in option used only by SourceMapIssueDetails where null SDKs should still fetch.
  • ✅ Fixed: Styled Flex wrapper replaceable with Flex props
    • I removed the new styled(Flex) wrapper and replaced it with an inline Flex using paddingTop, align, and gap props.

Create PR

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.

@Abdkhan14 Abdkhan14 marked this pull request as draft April 7, 2026 18:57
Comment on lines +163 to +165
if (group.issueType === IssueType.SOURCEMAP_CONFIGURATION) {
return <SourceMapIssueDetails group={group} event={event} project={project} />;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure we won't want anything from the existing experience?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@Abdkhan14 Abdkhan14 marked this pull request as ready for review April 8, 2026 16:33
@Abdkhan14 Abdkhan14 changed the title feat(source-map-config-issues): Implementinproblem, diagnosis and troubleshooting section designs feat(source-map-config-issues): Implementing problem, diagnosis and troubleshooting section designs Apr 8, 2026
Comment on lines +20 to +22
if (!data) {
return null;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think we need this if its not loading and not error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +175 to +181
message ?? (
<Text>
{t(
'Source maps appear to be configured but Sentry could not pinpoint the exact issue.'
)}
</Text>
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which would remove the need for this fallback

Comment on lines +23 to +25
<Text size="lg" bold>
{t('Troubleshooting suggestions')}
</Text>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a header actually?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah ^, pushed the change

Comment on lines +73 to +82
<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>
Copy link
Copy Markdown
Member

@evanpurkhiser evanpurkhiser Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use Prose here (to avoid the <br />)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, pushed the change ^

* Configuration for the issue-level information header
*/
header: {
// Controls the "X in this issue" event navigation row (First/Latest/Recommended)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it looks like some of the other ones are wrong also lol

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated all three in the file ^

}

interface DiagnosisSectionProps {
sourceMapQuery: ReturnType<typeof useSourceMapDebugQuery>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we export the type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah updated this ^

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

@Abdkhan14 Abdkhan14 merged commit 629be90 into master Apr 9, 2026
65 checks passed
@Abdkhan14 Abdkhan14 deleted the abdk/config-issues-ui-v1 branch April 9, 2026 17:02
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…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>
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.

3 participants