Skip to content

Conversation

@ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Nov 6, 2025

Description

This PR aims to convert the erase repository components to TS and do a couple little copy modifications. Just some yak shaving before we update / modify how this erase behavior works in app.

Screenshot 2025-11-06 at 3 46 40 PM Screenshot 2025-11-06 at 3 46 49 PM

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.


Note

Migrate erase repository components/tests to TypeScript, replace PropTypes with interfaces, and update modal/description copy with expanded test coverage (incl. unauthorized).

  • UI:
    • Migrate EraseRepo.tsx and EraseRepoModal.tsx to TypeScript; replace PropTypes with typed interfaces.
    • Minor copy updates in component description and modal body.
  • Tests:
    • Update EraseRepo.test.tsx with TypeScript typings (e.g., ReactNode wrapper).
    • Expand MSW mocks/flows (loading, failure, unauthorized) and corresponding assertions.

Written by Cursor Bugbot for commit 0daf1ef. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Mutation Close Before Erase Completes

The eraseRepo function is being awaited but it's the mutate function from useMutation which returns void, not a Promise. This causes closeModal() to execute immediately instead of waiting for the mutation to complete. The modal closes before the erase operation finishes, preventing users from seeing the loading state and potentially causing confusion about whether the operation succeeded.

src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx#L41-L44

variant="danger"
onClick={async () => {
await eraseRepo()
closeModal()

Fix in Cursor Fix in Web


@sentry
Copy link

sentry bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.61%. Comparing base (b4ec34e) to head (0daf1ef).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3951      +/-   ##
==========================================
- Coverage   98.63%   98.61%   -0.02%     
==========================================
  Files         828      828              
  Lines       15127    15126       -1     
  Branches     4348     4340       -8     
==========================================
- Hits        14920    14917       -3     
- Misses        199      201       +2     
  Partials        8        8              
Files with missing lines Coverage Δ
...tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx 100.00% <100.00%> (ø)
...GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.14% <100.00%> (-0.01%) ⬇️
Services 99.32% <ø> (ø)
Shared 99.06% <ø> (ø)
UI 99.01% <ø> (-0.15%) ⬇️

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 b4ec34e...0daf1ef. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Nov 6, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.23MB -230 bytes (-0.0%) ⬇️
gazebo-staging-esm 6.32MB -230 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 -230 bytes 35.21kB -0.65%

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

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx → Total Size: 1.27kB

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx → Total Size: 1.52kB

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -230 bytes 36.76kB -0.62%

Files in assets/index.*.js:

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx → Total Size: 1.52kB

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx → Total Size: 1.27kB

@sentry
Copy link

sentry bot commented Nov 6, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 6.23MB -230 bytes (-0.0%) ⬇️
gazebo-production-esm 6.32MB -230 bytes (-0.0%) ⬇️

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 -230 bytes 35.21kB -0.65%

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

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx → Total Size: 1.27kB

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx → Total Size: 1.52kB

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -230 bytes 36.76kB -0.62%

Files in assets/index.*.js:

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx → Total Size: 1.52kB

  • ./src/pages/RepoPage/ConfigTab/tabs/GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx → Total Size: 1.27kB

@codecov-public-qa
Copy link

codecov-public-qa bot commented Nov 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.61%. Comparing base (b4ec34e) to head (0daf1ef).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3951      +/-   ##
==========================================
- Coverage   98.63%   98.61%   -0.02%     
==========================================
  Files         828      828              
  Lines       15127    15126       -1     
  Branches     4348     4340       -8     
==========================================
- Hits        14920    14917       -3     
- Misses        199      201       +2     
  Partials        8        8              
Files with missing lines Coverage Δ
...tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx 100.00% <100.00%> (ø)
...GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.14% <100.00%> (-0.01%) ⬇️
Services 99.32% <ø> (ø)
Shared 99.06% <ø> (ø)
UI 99.01% <ø> (-0.15%) ⬇️

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 b4ec34e...0daf1ef. 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
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
0daf1ef Thu, 06 Nov 2025 23:51:46 GMT Cloud Enterprise

@codecov-notifications
Copy link

codecov-notifications bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3951      +/-   ##
==========================================
- Coverage   98.63%   98.61%   -0.02%     
==========================================
  Files         828      828              
  Lines       15127    15126       -1     
  Branches     4348     4340       -8     
==========================================
- Hits        14920    14917       -3     
- Misses        199      201       +2     
  Partials        8        8              
Files with missing lines Coverage Δ
...tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx 100.00% <100.00%> (ø)
...GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.14% <100.00%> (-0.01%) ⬇️
Services 99.32% <ø> (ø)
Shared 99.06% <ø> (ø)
UI 99.01% <ø> (-0.15%) ⬇️

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 b4ec34e...0daf1ef. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.61%. Comparing base (b4ec34e) to head (0daf1ef).
⚠️ Report is 1 commits behind head on main.

@@            Coverage Diff             @@
##             main    #3951      +/-   ##
==========================================
+ Coverage   96.54%   98.61%   +2.06%     
==========================================
  Files         828      828              
  Lines       15127    15126       -1     
  Branches     4348     4348              
==========================================
+ Hits        14605    14917     +312     
+ Misses        467      201     -266     
+ Partials       55        8      -47     
Files with missing lines Coverage Δ
...tabs/GeneralTab/DangerZone/EraseRepo/EraseRepo.tsx 100.00% <100.00%> (ø)
...GeneralTab/DangerZone/EraseRepo/EraseRepoModal.tsx 100.00% <100.00%> (ø)

... and 43 files with indirect coverage changes

Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.14% <100.00%> (-0.01%) ⬇️
Services 99.32% <ø> (ø)
Shared 99.06% <ø> (+1.81%) ⬆️
UI 99.01% <ø> (+20.18%) ⬆️

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 b4ec34e...0daf1ef. 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.

Comment on lines +75 to +79
function setup({
failedMutation = false,
isLoading = false,
unauthorized = false,
} = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice fix. this was confusing

@ajay-sentry ajay-sentry added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit 2a0be18 Nov 7, 2025
61 of 64 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/small-copy-updates-and-ts-conv branch November 7, 2025 16:59
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.

4 participants