Skip to content

Conversation

srest2021
Copy link
Member

@srest2021 srest2021 commented Oct 8, 2025

Previously, we were using release.newGroups to populate the per-project new issues counts for releases. However, this count is the total number of new issues for this release. Here, we instead use release.projects[x].newGroups, which now contains the correct number of new issues for this release in the selected project.

We switch to using release.projects[x].newGroups in the following places: releases index, releases drawer, session health

reverts #99555, which switched from release.projects[x].newGroups to release.newGroups

followup to #101003, which fixed the backend bug when calculating release.projects[x].newGroups

Demo Setup

RELEASE 1.0.0

Project A - 3 total new groups

  • Development - 2 new groups (Error & TypeError)
  • Production - 1 new group (SyntaxError)

Project B - 4 total new groups

  • Development - 3 new groups (ReferenceError & EvalError & URIError
  • Production - 1 new group (SyntaxError)

RELEASE 2.0.0

Project A - 1 total new group

  • Development - 1 new group (RangeError)

Demo

Before: the new issues counts for each project are all equal to the total number of new issues in that release (eg, 7 new groups for each project in Release 1.0.0 == 2+1+3+1)

Screen.Recording.2025-10-08.at.2.47.53.PM.mov

After: we get the correct per-project new issues counts, even when filtering by project or env or both

Screen.Recording.2025-10-08.at.2.49.45.PM.mov

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 8, 2025
@srest2021 srest2021 marked this pull request as ready for review October 8, 2025 22:07
@srest2021 srest2021 requested review from a team as code owners October 8, 2025 22:07
release: d.version,
date: d.dateCreated,
error_count: d.newGroups ?? 0,
error_count: d.projects[0]?.newGroups ?? 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Inconsistent Null Handling in Project Mapping

The recent update to error_count introduced inconsistent null handling for projects[0]. Within the same object mapping, projects[0] is accessed with a non-null assertion (!) for the project field, but with optional chaining (?.) for error_count. If projects[0] is null, this can lead to a runtime error, despite error_count safely returning 0. This pattern appears in both releasesDrawerTable.tsx and useOrganizationReleases.tsx.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@michellewzhang michellewzhang left a comment

Choose a reason for hiding this comment

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

THANK YOU

@srest2021 srest2021 merged commit 983546d into master Oct 8, 2025
70 checks passed
@srest2021 srest2021 deleted the srest2021/releases-new-groups-fix branch October 8, 2025 22:36
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.

2 participants