Skip to content

refactor(ui): modernize code for eslint 10 and react best practices#6227

Open
erka wants to merge 2 commits into
v2from
rd/v2/ui-modernize
Open

refactor(ui): modernize code for eslint 10 and react best practices#6227
erka wants to merge 2 commits into
v2from
rd/v2/ui-modernize

Conversation

@erka

@erka erka commented Jul 19, 2026

Copy link
Copy Markdown
Contributor
  • Replace let with const for non-reassigned variables
  • Remove unused catch parameters and function arguments
  • Remove eslint-disable comments where violations are fixed
  • Fix isFetchBaseQueryError return type to eliminate @ts-ignore
  • Route navigation through browser.navigateTo abstraction
  • Simplify SegmentsPicker: useMemo over useRef/useEffect
  • Fix Analytics: derive selectedFlag and pollingInterval with useMemo
  • Fix Preferences: useRef for isInitialLoad, streamline debounce

- Replace let with const for non-reassigned variables
- Remove unused catch parameters and function arguments
- Remove eslint-disable comments where violations are fixed
- Fix isFetchBaseQueryError return type to eliminate @ts-ignore
- Route navigation through browser.navigateTo abstraction
- Simplify SegmentsPicker: useMemo over useRef/useEffect
- Fix Analytics: derive selectedFlag and pollingInterval with useMemo
- Fix Preferences: useRef for isInitialLoad, streamline debounce

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.27%. Comparing base (2ba7835) to head (521b835).

Additional details and impacted files
@@           Coverage Diff           @@
##               v2    #6227   +/-   ##
=======================================
  Coverage   62.27%   62.27%           
=======================================
  Files         145      145           
  Lines       14815    14815           
=======================================
  Hits         9226     9226           
  Misses       4829     4829           
  Partials      760      760           
Flag Coverage Δ
integrationtests 33.50% <ø> (ø)
unittests 53.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot left a comment

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.

Verdict: approve

Clean mechanical refactor. The const/let fixes, unused-parameter cleanups, eslint-disable removals, type-guard correction, and effect simplifications in SegmentsPicker and Analytics all look correct. The prior automated review’s two concerns (Preferences.tsx missing a mount effect and NavUser.tsx duplicate import) appear to have been based on a misread—the current diff preserves the separate mount effect and has only a single merged import line. No changes requested.

🤖 Automated review by the Flipt PR review agent.

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@erka erka added automerge Used by Kodiak bot to automerge PRs v2 Flipt v2 labels Jul 19, 2026
@erka
erka marked this pull request as ready for review July 19, 2026 22:28
@erka
erka requested a review from a team as a code owner July 19, 2026 22:28
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Used by Kodiak bot to automerge PRs size:L This PR changes 100-499 lines, ignoring generated files. v2 Flipt v2

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant