Skip to content

feat: Provide releases link only if exists on source maps details page#95100

Merged
priscilawebdev merged 8 commits into
masterfrom
priscila/feat/source-maps-details/provide-release-link-only-if-exists
Jul 9, 2025
Merged

feat: Provide releases link only if exists on source maps details page#95100
priscilawebdev merged 8 commits into
masterfrom
priscila/feat/source-maps-details/provide-release-link-only-if-exists

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Jul 9, 2025

Copy link
Copy Markdown
Member

Similar to the PR but now on the details page.

Screen.Recording.2025-07-09.at.10.42.59.mov

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 9, 2025
Comment on lines +161 to +200
const releaseVersions = debugIdBundlesArtifacts?.associations.map(
association => `"${association.release}"`
);

const {data: releasesData, isPending: releasesLoading} = useApiQuery<Release[]>(
[
`/organizations/${organization.slug}/releases/`,
{
query: {
project: [project.id],
query: releaseVersions ? `release:[${releaseVersions.join(',')}]` : undefined,
},
},
],
{
staleTime: Infinity,
retry: false,
enabled: isDebugIdBundle && !debugIdBundlesArtifactsLoading,
}
);

const debugIdBundlesArtifactsData = useMemo(() => {
if (releasesLoading) {
return debugIdBundlesArtifacts;
}

if (!debugIdBundlesArtifacts) {
return undefined;
}

const existingReleaseNames = new Set((releasesData ?? []).map(r => r.version));

return {
...debugIdBundlesArtifacts,
associations: debugIdBundlesArtifacts.associations.map(association => ({
...association,
exists: existingReleaseNames.has(association.release),
})),
};
}, [releasesLoading, releasesData, debugIdBundlesArtifacts]);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can probably extract this into a reusable function, but let's clean that up in a later pass

@codecov

codecov Bot commented Jul 9, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #95100   +/-   ##
=======================================
  Coverage   87.87%   87.87%           
=======================================
  Files       10452    10452           
  Lines      604761   604737   -24     
  Branches    23613    23608    -5     
=======================================
- Hits       531444   531426   -18     
+ Misses      72959    72953    -6     
  Partials      358      358           

@priscilawebdev priscilawebdev marked this pull request as ready for review July 9, 2025 09:38
@priscilawebdev priscilawebdev requested a review from a team July 9, 2025 09:38
cursor[bot]

This comment was marked as outdated.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Distribution Info Formatting Issue

Release distribution information is now always displayed, even when dist is null or empty (e.g., "(Dist: none)" or "(Dist: )"). Additionally, a leading space before the distribution text is missing. This results in a format like "Version(Dist: ...)" instead of "Version (Dist: ...)" or no distribution text when dist is absent.

static/app/views/settings/projectSourceMaps/associatedReleases.tsx#L35-L36

</Tooltip>
{`(Dist: ${formatDist(association.dist)})`}

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@priscilawebdev priscilawebdev requested a review from a team July 9, 2025 10:32
@priscilawebdev priscilawebdev merged commit bc9bf1e into master Jul 9, 2025
47 checks passed
@priscilawebdev priscilawebdev deleted the priscila/feat/source-maps-details/provide-release-link-only-if-exists branch July 9, 2025 11:16
andrewshie-sentry pushed a commit that referenced this pull request Jul 14, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants