Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Check to see if user exists before setting default org #3744

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR fixes a small logic issue, where if the user doesn't exist it tries to update the default org for the user, causing an empty failure toast to pop up. This PR fixes this issue, by checking to see if the user data exists in the first place.

Notable Changes

  • Check to see if user exists

Screenshots

Before:

Screen.Recording.2025-02-14.at.13.31.58.mov

After:

Screen.Recording.2025-02-14.at.13.32.45.mov

@codecov-staging
Copy link

codecov-staging bot commented Feb 14, 2025

Bundle Report

Changes will decrease total bundle size by 148 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.26MB -41 bytes (-0.0%) ⬇️
gazebo-staging-esm 6.31MB -107 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-system

Assets Changed:

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

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

  • ./src/layouts/BaseLayout/hooks/useUserAccessGate.js → Total Size: 2.91kB
view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -107 bytes 491.43kB -0.02%

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/hooks/useUserAccessGate.js → Total Size: 2.91kB

Copy link

codecov bot commented Feb 14, 2025

Bundle Report

Changes will decrease total bundle size by 148 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.26MB -41 bytes (-0.0%) ⬇️
gazebo-production-esm 6.31MB -107 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 -107 bytes 491.43kB -0.02%

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/hooks/useUserAccessGate.js → Total Size: 2.91kB
view changes for bundle: gazebo-production-system

Assets Changed:

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

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

  • ./src/layouts/BaseLayout/hooks/useUserAccessGate.js → Total Size: 2.91kB

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3744   +/-   ##
=======================================
  Coverage   98.84%   98.84%           
=======================================
  Files         823      823           
  Lines       14851    14868   +17     
  Branches     4220     4222    +2     
=======================================
+ Hits        14680    14697   +17     
  Misses        165      165           
  Partials        6        6           
Files with missing lines Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <100.00%> (ø)
Pages 98.52% <ø> (ø)
Services 99.24% <ø> (+<0.01%) ⬆️
Shared 99.37% <ø> (ø)
UI 99.07% <ø> (ø)

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 d65e120...5a42c26. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.84%. Comparing base (d65e120) to head (5a42c26).
Report is 7 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3744   +/-   ##
=======================================
  Coverage   98.84%   98.84%           
=======================================
  Files         823      823           
  Lines       14851    14868   +17     
  Branches     4220     4230   +10     
=======================================
+ Hits        14680    14697   +17     
  Misses        165      165           
  Partials        6        6           
Files with missing lines Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <100.00%> (ø)
Pages 98.52% <ø> (ø)
Services 99.24% <ø> (+<0.01%) ⬆️
Shared 99.37% <ø> (ø)
UI 99.07% <ø> (ø)

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 d65e120...5a42c26. Read the comment docs.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.84%. Comparing base (d65e120) to head (5a42c26).
Report is 7 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3744   +/-   ##
=======================================
  Coverage   98.84%   98.84%           
=======================================
  Files         823      823           
  Lines       14851    14868   +17     
  Branches     4228     4230    +2     
=======================================
+ Hits        14680    14697   +17     
  Misses        165      165           
  Partials        6        6           
Files with missing lines Coverage Δ
src/layouts/BaseLayout/hooks/useUserAccessGate.js 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <100.00%> (ø)
Pages 98.52% <ø> (ø)
Services 99.24% <ø> (+<0.01%) ⬆️
Shared 99.37% <ø> (ø)
UI 99.07% <ø> (ø)

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 d65e120...5a42c26. Read the comment docs.

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
5a42c26 Fri, 14 Feb 2025 18:40:56 GMT Cloud Enterprise

Copy link
Contributor

@calvin-codecov calvin-codecov left a comment

Choose a reason for hiding this comment

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

Nice find and fix!

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Feb 14, 2025
Merged via the queue into main with commit dfe9ccb Feb 14, 2025
62 checks passed
@nicholas-codecov nicholas-codecov deleted the fix-check-to-see-if-user-exists-before-setting-default-org branch February 14, 2025 20:09
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.

3 participants