Skip to content

ref(repos): Refactor Settings > Seer > Repos to use virtual rendering#108798

Merged
ryan953 merged 12 commits intomasterfrom
ryan953/seerRepoTable-render
Feb 26, 2026
Merged

ref(repos): Refactor Settings > Seer > Repos to use virtual rendering#108798
ryan953 merged 12 commits intomasterfrom
ryan953/seerRepoTable-render

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Feb 21, 2026

Update & improve the rendering of <SeerRepoTable> which is visible on at the path /settings/seer/repos/

Depends on #108295

@ryan953 ryan953 requested review from a team as code owners February 21, 2026 01:17
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 21, 2026
@ryan953 ryan953 force-pushed the ryan953/seerRepoTable-render branch from 08f1ee6 to 788adc0 Compare February 23, 2026 16:48
@scttcper
Copy link
Member

pr title could use some help

@scttcper
Copy link
Member

scttcper commented Feb 23, 2026

the checkbox to select all rows (or any checkbox) seems to select all for a second then unselect them all

Base automatically changed from ryan953/ref-useOrganizationRepositoriesWithSettings to master February 24, 2026 21:44
@ryan953 ryan953 changed the title streamline rendering into one component ref(repos): Refactor Settings > Seer > Repos to use virtual rendering Feb 24, 2026
fetchNextPageRepositories,
isFetchingNextPageRepositories,
]);

Copy link
Contributor

Choose a reason for hiding this comment

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

Initialization runs with only first page of data

High Severity

The initialization effect at line 125 checks isRepositoriesFetching (which is isFetching from useInfiniteQuery) to decide when to initialize the code review map and RCA repos. The old useFetchSequentialPages kept isFetching: true until ALL pages were fetched in a single async loop. With useInfiniteQuery + the auto-fetch useEffect, isFetching briefly goes false after the first page completes — before fetchNextPage() is called. During this gap, the initialization effect runs with only the first page of data and sets hasInitializedCodeReviewMap.current = true, permanently preventing re-initialization when subsequent pages load. Organizations with more than 100 repos will have incomplete initial state for code review and root cause analysis settings.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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.

</InputGroup>
);
})}
</VirtualInner>
Copy link
Contributor

Choose a reason for hiding this comment

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

Virtual rows may overlap without dynamic measurement

Medium Severity

The virtualizer uses a fixed estimateSize of 60px without measureElement or a height constraint on rows. Each row contains a Stack with at least two lines of text (repo name + URL) and a trigger cell with one div per trigger. These rows can exceed 60px in height, but the next row's translateY is calculated assuming exactly 60px, causing visible overlap. Every other useVirtualizer usage in the codebase passes virtualizer.measureElement as a ref to rendered items for accurate positioning.

Additional Locations (1)

Fix in Cursor Fix in Web

Comment on lines +254 to +258
const maxHeight = scrollBodyHeight
? isAnySelected
? SELECTED_ROW_HEIGHT + scrollBodyHeight
: scrollBodyHeight
: undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: The virtualized table's maxHeight is calculated once and doesn't update when the header's height changes dynamically, resulting in an incorrect scrollable area size.
Severity: MEDIUM

Suggested Fix

The height measurement should be re-triggered whenever the header's layout changes. This can be done by using a ResizeObserver on the header element to detect size changes and re-run the measurement. Alternatively, move the measurement logic into a useEffect hook that depends on state variables affecting the header's size, such as isAnySelected and isAllSelected.

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/gsApp/views/seerAutomation/components/repoTable/seerRepoTable.tsx#L254-L258

Potential issue: The `maxHeight` for the virtualized table body is calculated once when
the component mounts by measuring the `top` position of the `ScrollableBody`. This
measurement becomes stale when the header's height changes, which occurs when a
`FullGridAlert` is displayed after a user selects items. The height measurement logic
within the `setScrollBodyRef` callback is not re-executed when the header layout
changes. This results in the `ScrollableBody` having an incorrect height, which can lead
to improper scroll behavior or the table extending beyond its intended bounds.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is true, but it's ok for now, we're getting better and better as we go.

@ryan953 ryan953 merged commit 65b03ee into master Feb 26, 2026
63 checks passed
@ryan953 ryan953 deleted the ryan953/seerRepoTable-render branch February 26, 2026 01:00
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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