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: Add fixes and new rules to tokenless banner show logic #3764

Merged
merged 4 commits into from
Feb 26, 2025

Conversation

calvin-codecov
Copy link
Contributor

@calvin-codecov calvin-codecov commented Feb 22, 2025

Description

Closes codecov/engineering-team#3074

Notable Changes

  • Using new owner model fields hasActiveRepos and hasPublicRepos to hide the tokenless banner if an organization does not have any active repos or does not have any public repos (which means only private)
  • makes some changes to re-show the banners even if the user hid them if they change the "required/not required" setting.

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry 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 Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@calvin-codecov calvin-codecov force-pushed the cy/tokenless_banner_show branch from 30298a8 to 8ccdef9 Compare February 22, 2025 00:29
Copy link

codecov bot commented Feb 22, 2025

Bundle Report

Changes will decrease total bundle size by 1.9kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.13MB -980 bytes (-0.02%) ⬇️
gazebo-production-esm 6.2MB -919 bytes (-0.01%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -53 bytes 5.64kB -0.93%
assets/index-legacy.*.js -53 bytes 52.12kB -0.1%
assets/index-legacy.*.js -102 bytes 31.46kB -0.32%
assets/index-legacy.*.js -58 bytes 98.35kB -0.06%
assets/index-legacy.*.js -1 bytes 12.0kB -0.01%
assets/index-legacy.*.js -29 bytes 7.81kB -0.37%
assets/index-legacy.*.js -1 bytes 11.47kB -0.01%
assets/index-legacy.*.js -2 bytes 4.04kB -0.05%
assets/index-legacy.*.js -98 bytes 7.43kB -1.3%
assets/index-legacy.*.js -100 bytes 40.61kB -0.25%
assets/index-legacy.*.js -3 bytes 113.76kB -0.0%
assets/index-legacy.*.js -1 bytes 12.67kB -0.01%
assets/index-legacy.*.js -52 bytes 114.33kB -0.05%
assets/index-legacy.*.js -1 bytes 12.78kB -0.01%
assets/index-legacy.*.js 7.51kB 717.24kB 1.06%
assets/index-legacy.*.js -101 bytes 44.81kB -0.22%
assets/index-legacy.*.js -56 bytes 49.68kB -0.11%
assets/index-legacy.*.js -1.68kB 7.79kB -17.7%
assets/index-legacy.*.js -2 bytes 16.8kB -0.01%
assets/index-legacy.*.js -1 bytes 41.43kB -0.0%
assets/index-legacy.*.js -2 bytes 18.86kB -0.01%
assets/index-legacy.*.js -55 bytes 9.46kB -0.58%
assets/index-legacy.*.js -1 bytes 12.28kB -0.01%
assets/index-legacy.*.js -4 bytes 3.58kB -0.11%
assets/index-legacy.*.js -100 bytes 32.99kB -0.3%
assets/RawFileViewer-legacy.*.js -1 bytes 127.2kB -0.0%
assets/CIStatus-legacy.*.js -1 bytes 17.86kB -0.01%
assets/ReposTable-legacy.*.js -1 bytes 10.49kB -0.01%
assets/ConfigureCachedBundleModal-legacy.*.js -54 bytes 7.93kB -0.68%
assets/Card-legacy.*.js (Deleted) -1.5kB 0 bytes -100.0% 🗑️
assets/RadioTileGroup-legacy.*.js (Deleted) -2.22kB 0 bytes -100.0% 🗑️
assets/useMutation-legacy.*.js (Deleted) -2.16kB 0 bytes -100.0% 🗑️

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

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenNotRequiredBanner/TokenNotRequiredBanner.tsx → Total Size: 2.38kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenlessBanner.tsx → Total Size: 1.0kB

  • ./src/ui/TopBanner/TopBanner.tsx → Total Size: 4.05kB

  • ./src/services/user/TokenlessQueryOpts.ts → Total Size: 1.04kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.74kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenRequiredBanner/TokenRequiredBanner.tsx → Total Size: 5.35kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/constants.ts → Total Size: 287 bytes

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -47 bytes 125.62kB -0.04%
assets/index.*.js -47 bytes 55.16kB -0.09%
assets/index.*.js -2 bytes 17.22kB -0.01%
assets/index.*.js -50 bytes 53.86kB -0.09%
assets/index.*.js -96 bytes 7.47kB -1.27%
assets/index.*.js -100 bytes 32.08kB -0.31%
assets/index.*.js -59 bytes 9.57kB -0.61%
assets/index.*.js -99 bytes 48.4kB -0.2%
assets/index.*.js -1 bytes 14.24kB -0.01%
assets/index.*.js -1 bytes 12.42kB -0.01%
assets/index.*.js -45 bytes 7.8kB -0.57%
assets/index.*.js -98 bytes 33.41kB -0.29%
assets/index.*.js -1 bytes 12.37kB -0.01%
assets/index.*.js -1.71kB 7.75kB -18.06%
assets/index.*.js -1 bytes 12.53kB -0.01%
assets/index.*.js -1 bytes 41.93kB -0.0%
assets/index.*.js -57 bytes 103.85kB -0.05%
assets/index.*.js -93 bytes 42.26kB -0.22%
assets/index.*.js -2 bytes 19.91kB -0.01%
assets/index.*.js 8.19kB 638.34kB 1.3%
assets/index.*.js -4 bytes 3.58kB -0.11%
assets/index.*.js -47 bytes 5.86kB -0.8%
assets/index.*.js -1 bytes 13.63kB -0.01%
assets/index.*.js -3 bytes 126.34kB -0.0%
assets/index.*.js -2 bytes 4.14kB -0.05%
assets/RawFileViewer.*.js -1 bytes 126.97kB -0.0%
assets/CIStatus.*.js -1 bytes 18.48kB -0.01%
assets/ReposTable.*.js -1 bytes 11.24kB -0.01%
assets/ConfigureCachedBundleModal.*.js -53 bytes 8.37kB -0.63%
assets/Card.*.js (Deleted) -1.4kB 0 bytes -100.0% 🗑️
assets/useMutation.*.js (Deleted) -2.96kB 0 bytes -100.0% 🗑️
assets/RadioTileGroup.*.js (Deleted) -2.13kB 0 bytes -100.0% 🗑️

Files in assets/index.*.js:

  • ./src/ui/TopBanner/TopBanner.tsx → Total Size: 4.05kB

  • ./src/services/user/TokenlessQueryOpts.ts → Total Size: 1.04kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.73kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenNotRequiredBanner/TokenNotRequiredBanner.tsx → Total Size: 2.38kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenlessBanner.tsx → Total Size: 1.0kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenRequiredBanner/TokenRequiredBanner.tsx → Total Size: 5.35kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/constants.ts → Total Size: 287 bytes

@codecov-staging
Copy link

codecov-staging bot commented Feb 22, 2025

Bundle Report

Changes will decrease total bundle size by 1.9kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.13MB -980 bytes (-0.02%) ⬇️
gazebo-staging-esm 6.2MB -919 bytes (-0.01%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 8.19kB 638.34kB 1.3%
assets/index.*.js -98 bytes 33.41kB -0.29%
assets/index.*.js -59 bytes 9.57kB -0.61%
assets/index.*.js -1 bytes 12.53kB -0.01%
assets/index.*.js -90 bytes 7.75kB -1.15%
assets/index.*.js -2 bytes 19.91kB -0.01%
assets/index.*.js -1 bytes 12.42kB -0.01%
assets/index.*.js -50 bytes 53.86kB -0.09%
assets/index.*.js -93 bytes 42.26kB -0.22%
assets/index.*.js -96 bytes 7.47kB -1.27%
assets/index.*.js -99 bytes 48.4kB -0.2%
assets/index.*.js -47 bytes 55.16kB -0.09%
assets/index.*.js -1 bytes 41.93kB -0.0%
assets/index.*.js -1 bytes 14.24kB -0.01%
assets/index.*.js -57 bytes 103.85kB -0.05%
assets/index.*.js -4 bytes 3.58kB -0.11%
assets/index.*.js -2 bytes 4.14kB -0.05%
assets/index.*.js -1 bytes 12.37kB -0.01%
assets/index.*.js -47 bytes 125.62kB -0.04%
assets/index.*.js -100 bytes 32.08kB -0.31%
assets/index.*.js -1.66kB 7.8kB -17.58%
assets/index.*.js -3 bytes 126.34kB -0.0%
assets/index.*.js -2 bytes 17.22kB -0.01%
assets/index.*.js -47 bytes 5.86kB -0.8%
assets/index.*.js -1 bytes 13.63kB -0.01%
assets/RawFileViewer.*.js -1 bytes 126.97kB -0.0%
assets/CIStatus.*.js -1 bytes 18.48kB -0.01%
assets/ReposTable.*.js -1 bytes 11.24kB -0.01%
assets/ConfigureCachedBundleModal.*.js -53 bytes 8.37kB -0.63%
assets/Card.*.js (Deleted) -1.4kB 0 bytes -100.0% 🗑️
assets/useMutation.*.js (Deleted) -2.96kB 0 bytes -100.0% 🗑️
assets/RadioTileGroup.*.js (Deleted) -2.13kB 0 bytes -100.0% 🗑️

Files in assets/index.*.js:

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.73kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenlessBanner.tsx → Total Size: 1.0kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenRequiredBanner/TokenRequiredBanner.tsx → Total Size: 5.35kB

  • ./src/ui/TopBanner/TopBanner.tsx → Total Size: 4.05kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/constants.ts → Total Size: 287 bytes

  • ./src/services/user/TokenlessQueryOpts.ts → Total Size: 1.04kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenNotRequiredBanner/TokenNotRequiredBanner.tsx → Total Size: 2.38kB

view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -53 bytes 5.64kB -0.93%
assets/index-legacy.*.js -2 bytes 18.86kB -0.01%
assets/index-legacy.*.js -3 bytes 113.76kB -0.0%
assets/index-legacy.*.js -100 bytes 40.61kB -0.25%
assets/index-legacy.*.js -1 bytes 11.47kB -0.01%
assets/index-legacy.*.js -4 bytes 3.58kB -0.11%
assets/index-legacy.*.js -53 bytes 52.12kB -0.1%
assets/index-legacy.*.js -1 bytes 12.78kB -0.01%
assets/index-legacy.*.js -100 bytes 32.99kB -0.3%
assets/index-legacy.*.js -58 bytes 98.35kB -0.06%
assets/index-legacy.*.js -2 bytes 4.04kB -0.05%
assets/index-legacy.*.js -1 bytes 12.0kB -0.01%
assets/index-legacy.*.js -101 bytes 44.81kB -0.22%
assets/index-legacy.*.js -1 bytes 41.43kB -0.0%
assets/index-legacy.*.js 7.51kB 717.24kB 1.06%
assets/index-legacy.*.js -46 bytes 7.79kB -0.59%
assets/index-legacy.*.js -2 bytes 16.8kB -0.01%
assets/index-legacy.*.js -102 bytes 31.46kB -0.32%
assets/index-legacy.*.js -1 bytes 12.28kB -0.01%
assets/index-legacy.*.js 284 bytes 7.81kB 3.77%
assets/index-legacy.*.js -52 bytes 114.33kB -0.05%
assets/index-legacy.*.js -56 bytes 49.68kB -0.11%
assets/index-legacy.*.js -55 bytes 9.46kB -0.58%
assets/index-legacy.*.js -1 bytes 12.67kB -0.01%
assets/index-legacy.*.js -2.04kB 7.43kB -21.56%
assets/RawFileViewer-legacy.*.js -1 bytes 127.2kB -0.0%
assets/CIStatus-legacy.*.js -1 bytes 17.86kB -0.01%
assets/ReposTable-legacy.*.js -1 bytes 10.49kB -0.01%
assets/ConfigureCachedBundleModal-legacy.*.js -54 bytes 7.93kB -0.68%
assets/Card-legacy.*.js (Deleted) -1.5kB 0 bytes -100.0% 🗑️
assets/RadioTileGroup-legacy.*.js (Deleted) -2.22kB 0 bytes -100.0% 🗑️
assets/useMutation-legacy.*.js (Deleted) -2.16kB 0 bytes -100.0% 🗑️

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

  • ./src/ui/TopBanner/TopBanner.tsx → Total Size: 4.05kB

  • ./src/services/user/TokenlessQueryOpts.ts → Total Size: 1.04kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/constants.ts → Total Size: 287 bytes

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenRequiredBanner/TokenRequiredBanner.tsx → Total Size: 5.35kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenlessBanner.tsx → Total Size: 1.0kB

  • ./src/shared/GlobalTopBanners/TokenlessBanner/TokenNotRequiredBanner/TokenNotRequiredBanner.tsx → Total Size: 2.38kB

  • ./src/pages/AccountSettings/tabs/OrgUploadToken/TokenlessSection/useSetUploadTokenRequired.tsx → Total Size: 2.74kB

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3764   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      826    +2     
  Lines       14798    14830   +32     
  Branches     4257     4263    +6     
=======================================
+ Hits        14609    14641   +32     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
.../tabs/OrgUploadToken/TokenlessSection/constants.ts 100.00% <100.00%> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <100.00%> (ø)
src/services/user/TokenlessQueryOpts.ts 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <ø> (ø)
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <ø> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.12% <100.00%> (+<0.01%) ⬆️
UI 99.07% <100.00%> (+<0.01%) ⬆️

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 80eaa5a...f2693f6. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (80eaa5a) to head (f2693f6).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3764   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      826    +2     
  Lines       14798    14830   +32     
  Branches     4257     4255    -2     
=======================================
+ Hits        14609    14641   +32     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
.../tabs/OrgUploadToken/TokenlessSection/constants.ts 100.00% <100.00%> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <100.00%> (ø)
src/services/user/TokenlessQueryOpts.ts 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <ø> (ø)
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <ø> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.12% <100.00%> (+<0.01%) ⬆️
UI 99.07% <100.00%> (+<0.01%) ⬆️

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 80eaa5a...f2693f6. Read the comment docs.

Copy link

codecov-public-qa bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (282dd38).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3764   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      826    +2     
  Lines       14786    14818   +32     
  Branches     4250     4256    +6     
=======================================
+ Hits        14597    14629   +32     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
.../tabs/OrgUploadToken/TokenlessSection/constants.ts 100.00% <100.00%> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <100.00%> (ø)
src/services/user/TokenlessQueryOpts.ts 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <ø> (ø)
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <ø> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <100.00%> (+<0.01%) ⬆️

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 9136ccd...282dd38. Read the comment docs.

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (80eaa5a) to head (f2693f6).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3764   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      826    +2     
  Lines       14798    14830   +32     
  Branches     4249     4263   +14     
=======================================
+ Hits        14609    14641   +32     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
.../tabs/OrgUploadToken/TokenlessSection/constants.ts 100.00% <100.00%> (ø)
...ken/TokenlessSection/useSetUploadTokenRequired.tsx 100.00% <100.00%> (ø)
src/services/user/TokenlessQueryOpts.ts 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <ø> (ø)
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <ø> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (+<0.01%) ⬆️
Services 99.36% <100.00%> (+<0.01%) ⬆️
Shared 99.12% <100.00%> (+<0.01%) ⬆️
UI 99.07% <100.00%> (+<0.01%) ⬆️

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 80eaa5a...f2693f6. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Feb 22, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
8ccdef9 Sat, 22 Feb 2025 00:34:59 GMT Expired Expired
ffd4853 Tue, 25 Feb 2025 09:45:16 GMT Expired Expired
f534722 Tue, 25 Feb 2025 17:04:45 GMT Expired Expired
f47a7c1 Tue, 25 Feb 2025 17:11:47 GMT Expired Expired
282dd38 Tue, 25 Feb 2025 22:56:52 GMT Expired Expired
f2693f6 Wed, 26 Feb 2025 17:20:07 GMT Cloud Enterprise

Comment on lines 29 to 48
const hasActiveRepos = ownerData?.hasActiveRepos
const hasPublicRepos = ownerData?.hasPublicRepos

if (
!tokenlessSection ||
!owner ||
!data ||
!currentUser?.user ||
cameFromOnboarding
)
cameFromOnboarding ||
!hasActiveRepos ||
!hasPublicRepos
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main change of bullet 1

Comment on lines +113 to +119
// we want to show the banners again when this setting is changed
// even if the user dismissed them in the past
removeFromLocalStorage(MEMBER_TOKEN_NOT_REQUIRED_BANNER)
removeFromLocalStorage(ADMIN_TOKEN_NOT_REQUIRED_BANNER)
removeFromLocalStorage(MEMBER_TOKEN_REQUIRED_BANNER)
removeFromLocalStorage(ADMIN_TOKEN_REQUIRED_BANNER)

Copy link
Contributor Author

@calvin-codecov calvin-codecov Feb 25, 2025

Choose a reason for hiding this comment

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

main change of bullet 2

const parsedData = RequestSchema.safeParse(res?.data)

if (!parsedData.success) {
return rejectNetworkError({
Copy link
Contributor

Choose a reason for hiding this comment

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

can we get a test added for this failure case?

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

lgtm! Just the one comment

Thanks for making the new hook

@calvin-codecov calvin-codecov force-pushed the cy/tokenless_banner_show branch from f47a7c1 to 282dd38 Compare February 25, 2025 22:51
@calvin-codecov calvin-codecov added this pull request to the merge queue Feb 26, 2025
Merged via the queue into main with commit 5a632e9 Feb 26, 2025
62 checks passed
@calvin-codecov calvin-codecov deleted the cy/tokenless_banner_show branch February 26, 2025 18:21
Copy link

sentry-io bot commented Mar 4, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Load failed /:provider View Issue

Did you find this useful? React with a 👍 or 👎

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.

Tokenless Banner is wrong
3 participants