Skip to content

ref(issues): Remove grouping store#115970

Merged
scttcper merged 7 commits into
masterfrom
scttcper/remove-grouping-store
May 21, 2026
Merged

ref(issues): Remove grouping store#115970
scttcper merged 7 commits into
masterfrom
scttcper/remove-grouping-store

Conversation

@scttcper
Copy link
Copy Markdown
Member

The merged fingerprints tab was using a Reflux store even though every real caller lived in the same issue details area. This moves the endpoint query and local UI state into groupMerged so the feature owns its own data flow.

The local model now matches the hashes endpoint response instead of carrying the old store's dead fields around.

The merged fingerprints tab was using a Reflux store even though every real caller lived in the same issue details area. This moves the endpoint query and local UI state into groupMerged so the feature owns its own data flow.

The local model now matches the hashes endpoint response instead of carrying the old store's dead fields around.

Co-authored-by: Codex GPT-5 <noreply@openai.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.62%

Remove the local provider/context now that the state only feeds a small component tree. The view owns the query and reducer hooks, then passes the few values the toolbar and rows need.

Also drops a couple leftovers from the old store migration: the identity parser and the unused fingerprint argument on initial state.

Co-authored-by: Codex GPT-5 <noreply@openai.com>
trim a few implementation-y assertions from the grouping store migration tests. The specs still cover the useful row state behavior and rendered merged fingerprints, without adding loading state coverage.

Co-authored-by: Codex GPT-5 <noreply@openai.com>
@scttcper scttcper requested review from a team May 20, 2026 23:37
@scttcper scttcper marked this pull request as ready for review May 20, 2026 23:37
@scttcper scttcper requested a review from a team as a code owner May 20, 2026 23:37
Copy link
Copy Markdown
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

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

W

Comment on lines +164 to +174

return {
...state,
fingerprintState: setFingerprintState(
state.fingerprintState,
action.fingerprintIds,
{checked: false, busy: true}
),
unmergeList,
};
}
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: After a successful unmerge, the busy state is incorrectly set to true instead of false, permanently disabling the UI row for the unmerged item.
Severity: MEDIUM

Suggested Fix

In the unmergeSuccess case within the reducer, update the setFingerprintState call to set busy: false. This will ensure that after a successful unmerge operation, the item's UI row returns to an interactive state.

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/groupMerged/useGroupMerged.tsx#L161-L174

Potential issue: In the reducer within `useGroupMerged.tsx`, the `unmergeSuccess` case
incorrectly sets the `busy` state to `true` instead of `false`. When a user successfully
unmerges an item, its state is permanently marked as busy. This causes the corresponding
UI row to become disabled and visually faded, preventing the user from interacting with
it again. The logic for the `unmergeError` case correctly sets `busy: false`,
highlighting the logical error in the success path.

Did we get this right? 👍 / 👎 to inform future reviews.

@scttcper scttcper enabled auto-merge (squash) May 21, 2026 17:07
@scttcper scttcper merged commit ea71861 into master May 21, 2026
70 checks passed
@scttcper scttcper deleted the scttcper/remove-grouping-store branch May 21, 2026 17:10
Comment on lines 64 to 68
}

const unmergeDisabledReason =
mergedItems.length <= 1
fingerprints.length <= 1
? t('To unmerge, the list must contain 2 or more items')
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: The disabled reason for the unmerge button is misleading because the logic for the disabled state and the reason message use different fingerprint lists, causing an inconsistency.
Severity: LOW

Suggested Fix

Align the logic for unmergeDisabledReason with the logic for unmergeDisabled. The check for the number of items in mergedToolbar.tsx should use fingerprintsWithLatestEvent.length instead of fingerprints.length to ensure the disabled reason accurately reflects the state.

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/groupMerged/mergedToolbar.tsx#L64-L68

Potential issue: There is an inconsistency between the logic that disables the 'unmerge'
button and the logic that generates the tooltip explaining why it's disabled. This
occurs when some fingerprints have a null `latestEvent` due to data retention policies.
The `unmergeDisabled` flag correctly uses a filtered list of fingerprints
(`fingerprintsWithLatestEvent`), while the `unmergeDisabledReason` message logic uses
the full, unfiltered `fingerprints` list. This can lead to a scenario where the button
is disabled because there's only one item available to unmerge, but the tooltip
incorrectly states that the user needs to select an item, creating a confusing user
experience.

Also affects:

  • static/app/views/issueDetails/groupMerged/mergedToolbar.tsx:83~89

JonasBa pushed a commit that referenced this pull request May 21, 2026
The merged fingerprints tab was using a Reflux store even though every
real caller lived in the same issue details area. This moves the
endpoint query and local UI state into groupMerged so the feature owns
its own data flow.

The local model now matches the hashes endpoint response instead of
carrying the old store's dead fields around.
natemoo-re pushed a commit that referenced this pull request May 21, 2026
The merged fingerprints tab was using a Reflux store even though every
real caller lived in the same issue details area. This moves the
endpoint query and local UI state into groupMerged so the feature owns
its own data flow.

The local model now matches the hashes endpoint response instead of
carrying the old store's dead fields around.
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