Skip to content

fix(ui): lazy init useState in MetadataForm and CopyToNamespacePanel#6171

Merged
kodiakhq[bot] merged 1 commit into
v2from
rd/v2/ui-lazy-state
Jul 11, 2026
Merged

fix(ui): lazy init useState in MetadataForm and CopyToNamespacePanel#6171
kodiakhq[bot] merged 1 commit into
v2from
rd/v2/ui-lazy-state

Conversation

@erka

@erka erka commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

avoid re-evaluating initializers like objectToMetadataArray on every render.

avoid re-evaluating initializers like objectToMetadataArray on every render.

Signed-off-by: Roman Dmytrenko <[email protected]>
@erka
erka requested a review from a team as a code owner July 11, 2026 13:21
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 11, 2026

@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, focused fix that correctly switches two useState calls to lazy initialization so their initializers run only on mount rather than every render. No issues.

🤖 Automated review by the Flipt PR review agent.

@erka erka added the v2 Flipt v2 label Jul 11, 2026
@erka erka added the automerge Used by Kodiak bot to automerge PRs label Jul 11, 2026
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.27%. Comparing base (8c1d341) to head (78df672).

Additional details and impacted files
@@           Coverage Diff           @@
##               v2    #6171   +/-   ##
=======================================
  Coverage   62.27%   62.27%           
=======================================
  Files         145      145           
  Lines       14750    14750           
=======================================
  Hits         9186     9186           
  Misses       4816     4816           
  Partials      748      748           
Flag Coverage Δ
integrationtests 33.62% <ø> (ø)
unittests 53.70% <ø> (ø)

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.

@kodiakhq
kodiakhq Bot merged commit 1fabb3a into v2 Jul 11, 2026
37 checks passed
@kodiakhq
kodiakhq Bot deleted the rd/v2/ui-lazy-state branch July 11, 2026 15:43
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Jul 11, 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:XS This PR changes 0-9 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants