feat(issues): collapse repetitive issue activity - #121488
Conversation
Roll older status flapping and priority event runs into expandable activity rows while keeping the newest resolve and regress cycle visible. Preserve the underlying event count in the sidebar and gate the behavior behind the organization feature. Co-Authored-By: Codex <noreply@openai.com>
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 798365f. Configure here.
| const visibleActivityCount = sidebarVisibleActivities.filter( | ||
| item => item.type !== 'collapsed_status_activities' | ||
| ).length; | ||
| const hiddenActivityCount = totalActivityCount - visibleActivityCount; |
There was a problem hiding this comment.
Sidebar count ignores expanded rollups
Low Severity
hiddenActivityCount always treats rollup events as hidden. After expanding a sidebar rollup, the footer still says those now-visible events remain to be viewed, and its analytics count is also incorrect.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 798365f. Configure here.
Keep the status flapping rollups compatible with the latest activity feed props, comment links, and connector behavior. Co-Authored-By: OpenAI Codex <noreply@openai.com>
| > | ||
| <Button | ||
| variant="transparent" | ||
| size="zero" | ||
| style={{marginLeft: -6}} | ||
| onClick={onClick} | ||
| > | ||
| <Text as="span" variant="muted" size="md" density="comfortable"> | ||
| {label} | ||
| </Text> | ||
| </Button> |
There was a problem hiding this comment.
Bug: When expanding a collapsed status activity group, the inner ActivityFeedRow components are rendered without the showConnector prop, causing connector lines to be missing between items.
Severity: LOW
Suggested Fix
Pass the showConnector prop to the recursive ActivityFeedRow component when rendering the items within an expanded collapsed_status_activities group. This will ensure connector lines are drawn, matching the rest of the activity feed's appearance.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
static/app/views/issueDetails/activitySection/activityLineItem/collapsedStatusActivityRow.tsx#L58-L68
Potential issue: When a collapsed status activity group is expanded, the inner
`ActivityFeedRow` components are rendered without the `showConnector` prop. The
`ActivityLineRow` component only draws the vertical connector lines between activity
items when `showConnector` is truthy. Because this prop is omitted when rendering the
expanded `collapsed_status_activities`, the connector lines are not drawn, creating a
visual inconsistency in the activity feed.
Did we get this right? 👍 / 👎 to inform future reviews.
The sidebar mixed underlying rollup events with rendered rows, so it could show both "Show 2 more" and "View 2 more" for the same activity. Count only rows omitted from the sidebar and remove the unused rollup exports flagged by knip. Co-Authored-By: OpenAI Codex <noreply@openai.com>
| const latestPairIndex = activities.findIndex((activity, index) => { | ||
| const nextActivity = activities[index + 1]; | ||
| return ( | ||
| activity.activity.type === GroupActivityType.SET_REGRESSION && | ||
| nextActivity !== undefined && | ||
| isResolutionActivity(nextActivity) | ||
| ); | ||
| }); | ||
|
|
||
| // Preserve everything through the newest pair; +2 includes both the regression and resolution. | ||
| const protectedActivityCount = latestPairIndex === -1 ? 0 : latestPairIndex + 2; |
There was a problem hiding this comment.
Bug: The collapseSeerActivityPairs function can insert a CollapsedSeerActivity between a regression/resolution pair, breaking the adjacency check in collapseFlappingStatusActivities and preventing flapping detection.
Severity: MEDIUM
Suggested Fix
Modify collapseFlappingStatusActivities to be robust against intervening activities. Instead of checking the immediately adjacent element activities[index+1], the logic should scan forward from a SET_REGRESSION activity to find the next relevant activity, skipping over others like CollapsedSeerActivity, to see if it is a SET_RESOLVED activity.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
static/app/views/issueDetails/activitySection/activityLineItem/activityFeedItem.ts#L223-L233
Potential issue: The `collapseFlappingStatusActivities` function assumes that
`SET_REGRESSION` and `SET_RESOLVED` activities are adjacent in the activity feed to
detect a "flapping" issue. However, the `collapseSeerActivityPairs` function, which runs
prior, can create and insert a `CollapsedSeerActivity` object between the regression and
resolution activities. This breaks the adjacency assumption, as the logic specifically
checks `activities[index+1]`. Consequently, if a Seer analysis completes between an
issue regressing and being resolved, the flapping status will not be correctly
identified and displayed in the UI.


Older resolve and regress loops can bury useful issue activity. This rolls older flapping status and automatic priority events into an expandable activity row, preserves the latest resolve and regress activity.
flag pr #121489
before
after