Skip to content

fix(frontend): remove exhaustive-deps suppression from Findings virtualizer effect#1723

Merged
utksh1 merged 1 commit into
utksh1:mainfrom
SathvikaSingoti:fix/findings-virtualizer-deps-1407
Jul 7, 2026
Merged

fix(frontend): remove exhaustive-deps suppression from Findings virtualizer effect#1723
utksh1 merged 1 commit into
utksh1:mainfrom
SathvikaSingoti:fix/findings-virtualizer-deps-1407

Conversation

@SathvikaSingoti

Copy link
Copy Markdown
Collaborator

Description

Removes the eslint-disable react-hooks/exhaustive-deps suppression on the Findings virtualizer scroll effect. The effect previously read selectedFinding, virtualRows, and virtualizer from render scope while only depending on selectedFindingId, which could leave stale virtualizer/row data after filtering or sorting. Fixed by keeping selectedFindingId as the only reactive dependency, while virtualRows and virtualizer are now read through refs kept fresh via separate no-dependency-array effects, satisfying exhaustive-deps without over-firing the scroll on every filter/sort.

Related Issues

Closes #1407

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added a regression test covering selection changing after a sort-order change, verifying scrollToIndex is called with the correct post-sort index rather than a stale pre-sort one.
  • Ran full frontend suite: npm run test - 531/531 passing.
  • Ran npm run typecheck - no errors.
  • Ran npm run build - succeeds (pre-existing vendor chunk size warning is unrelated to this change).
  • Ran scripts/check-artifacts.sh - all clear, no generated artifacts staged.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@utksh1 utksh1 merged commit 64d5c33 into utksh1:main Jul 7, 2026
20 of 21 checks passed
@utksh1 utksh1 added gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label area:frontend Frontend React/UI work labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Frontend React/UI work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FRONTEND] Remove exhaustive-deps suppression from Findings virtualizer effect

2 participants