Browse Source

feat(issue-stream): Update how unhandled is fetched (#58478)

this pr updates how the unhandled information for groups is handled.
Now, we are collapsing "unhandled" which will no longer find the
unhandled information during the issues request. instead, it will gather
it in the stats request and populate it from there. It is hidden behind
a feature flag, so even though "unhandled" is always being collapsed,
the behavior will only be different if you have the flag.

https://github.com/getsentry/sentry/issues/57847
Richard Roggenkemper 1 year ago
parent
commit
23cde0d963

+ 1 - 1
static/app/types/group.tsx

@@ -520,6 +520,7 @@ interface GroupFiltered {
 export interface GroupStats extends GroupFiltered {
   filtered: GroupFiltered | null;
   id: string;
+  isUnhandled?: boolean;
   // for issue alert previews, the last time a group triggered a rule
   lastTriggered?: string;
   lifetime?: GroupFiltered;
@@ -611,7 +612,6 @@ export interface BaseGroup {
   isBookmarked: boolean;
   isPublic: boolean;
   isSubscribed: boolean;
-  isUnhandled: boolean;
   issueCategory: IssueCategory;
   issueType: IssueType;
   lastSeen: string;

+ 1 - 1
static/app/views/issueList/overview.spec.tsx

@@ -996,7 +996,7 @@ describe('IssueList', function () {
       expect(fetchDataMock).toHaveBeenLastCalledWith(
         '/organizations/org-slug/issues/',
         expect.objectContaining({
-          data: 'collapse=stats&expand=owners&expand=inbox&limit=25&project=99&query=is%3Aunresolved&shortIdLookup=1&statsPeriod=14d',
+          data: 'collapse=stats&collapse=unhandled&expand=owners&expand=inbox&limit=25&project=99&query=is%3Aunresolved&shortIdLookup=1&statsPeriod=14d',
         })
       );
     });

+ 1 - 1
static/app/views/issueList/overview.tsx

@@ -540,7 +540,7 @@ class IssueListOverview extends Component<Props, State> {
     }
 
     requestParams.expand = ['owners', 'inbox'];
-    requestParams.collapse = 'stats';
+    requestParams.collapse = ['stats', 'unhandled'];
 
     if (this._lastRequest) {
       this._lastRequest.cancel();