Skip to content

fix: Coerce flags param to array in FlagMultiSelect - #4104

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/coerce-flags-param
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/coerce-flags-param

Conversation

@sentry

@sentry sentry Bot commented Aug 29, 2026

Copy link
Copy Markdown

Description

The FlagMultiSelect component was encountering a TypeError: M.forEach is not a function because params.flags was sometimes a string instead of an array. This occurred when a single flag was passed in the URL query string (e.g., ?flags=my-flag), as the query parser would return a string.

This change introduces a flagsParam variable that normalizes params.flags to always be an array. This normalized value is now used for initializing selectedFlags and in the forEach loop, preventing the TypeError.

Code Example

Notable Changes

Introduced flagsParam variable to normalize params.flags to always be an array, preventing TypeError: M.forEach is not a function.

Screenshots

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.

Fixes GAZEBO-16P9

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 62 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.82MB 41 bytes (0.0%) ⬆️
gazebo-production-esm 5.89MB 21 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 21 bytes 89.99kB 0.02%

Files in assets/index.*.js:

  • ./src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.jsx → Total Size: 2.93kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 41 bytes 84.76kB 0.05%

Files in assets/index-legacy.*.js:

  • ./src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.jsx → Total Size: 2.93kB

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.75%. Comparing base (b8fbfc0) to head (f9381c4).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4104      +/-   ##
==========================================
- Coverage   98.77%   98.75%   -0.02%     
==========================================
  Files         823      823              
  Lines       15147    15152       +5     
  Branches     4387     4392       +5     
==========================================
+ Hits        14961    14963       +2     
- Misses        179      182       +3     
  Partials        7        7              
Files with missing lines Coverage Δ
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 92.30% <57.14%> (-7.70%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.39% <57.14%> (-0.04%) ⬇️
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...f9381c4. Read the comment docs.

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 57.14% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main    #4104      +/-   ##
==========================================
- Coverage   98.77%   98.75%   -0.02%     
==========================================
  Files         823      823              
  Lines       15147    15152       +5     
  Branches     4387     4384       -3     
==========================================
+ Hits        14961    14963       +2     
- Misses        179      182       +3     
  Partials        7        7              
Files with missing lines Coverage Δ
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 92.30% <57.14%> (-7.70%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.39% <57.14%> (-0.04%) ⬇️
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...f9381c4. Read the comment docs.

@codecov-public-qa

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.75%. Comparing base (b8fbfc0) to head (f9381c4).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 57.14% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main    #4104      +/-   ##
==========================================
- Coverage   98.77%   98.75%   -0.02%     
==========================================
  Files         823      823              
  Lines       15147    15152       +5     
  Branches     4379     4392      +13     
==========================================
+ Hits        14961    14963       +2     
- Misses        179      182       +3     
  Partials        7        7              
Files with missing lines Coverage Δ
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 92.30% <57.14%> (-7.70%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.39% <57.14%> (-0.04%) ⬇️
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...f9381c4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov-releaser

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
f9381c4 Sat, 29 Aug 2026 10:54:28 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.75%. Comparing base (b8fbfc0) to head (f9381c4).

Files with missing lines Patch % Lines
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 57.14% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main    #4104      +/-   ##
==========================================
- Coverage   98.77%   98.75%   -0.02%     
==========================================
  Files         823      823              
  Lines       15147    15152       +5     
  Branches     4387     4392       +5     
==========================================
+ Hits        14961    14963       +2     
- Misses        179      182       +3     
  Partials        7        7              
Files with missing lines Coverage Δ
...rviewTab/subroute/FileExplorer/FlagMultiSelect.jsx 92.30% <57.14%> (-7.70%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <ø> (ø)
Pages 98.39% <57.14%> (-0.04%) ⬇️
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8fbfc0...f9381c4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant