Conversation
…ted repos in a modal
static/app/components/repositories/scmIntegrationTree/scmIntegrationTree.tsx
Show resolved
Hide resolved
static/app/components/repositories/scmIntegrationTree/scmIntegrationTreeRow.tsx
Show resolved
Hide resolved
static/app/components/repositories/scmIntegrationTree/scmIntegrationTree.tsx
Show resolved
Hide resolved
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.
| addSuccessMessage(t('Removed %s', repo.name)); | ||
| } catch { | ||
| queryClient.setQueryData(reposQueryKey as any, previousData); | ||
| } |
There was a problem hiding this comment.
Concurrent optimistic rollback can restore stale cache state
Low Severity
The previousData snapshot captured before an optimistic removal doesn't account for concurrent removals. If a user disconnects repo A then repo B in quick succession, previousDataA is [A, B, C] and previousDataB is [B, C]. If repo A's API call fails, the rollback restores the cache to [A, B, C], undoing repo B's legitimate optimistic removal. Even if repo B's API call succeeds, it won't update the cache, leaving B incorrectly shown as connected until queries are invalidated (e.g., on modal close).


Some changes:
<Stack>from SeerRepoTable and moved<ListItemCheckboxProvider>closer to where it's needed.