Disable Remove button when gem has only one confirmed owner#6384
Open
tmchow wants to merge 2 commits intorubygems:masterfrom
Open
Disable Remove button when gem has only one confirmed owner#6384tmchow wants to merge 2 commits intorubygems:masterfrom
tmchow wants to merge 2 commits intorubygems:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6384 +/- ##
==========================================
- Coverage 97.08% 94.49% -2.59%
==========================================
Files 489 489
Lines 10392 10451 +59
==========================================
- Hits 10089 9876 -213
- Misses 303 575 +272 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jenshenny
reviewed
Apr 7, 2026
Member
jenshenny
left a comment
There was a problem hiding this comment.
Thanks! There looks to be some system tests that need to be adjusted, but other than that, this looks good to me.
The Remove button on the owners page was clickable even when the gem had only one owner. The server rejected the request silently. Now the button is disabled when there's only one confirmed ownership, preventing the confusing no-op. Fixes rubygems#5666
Replace the test that clicked Remove on the sole owner (which now fails because the button is disabled). The new tests verify: - Button is disabled when only one confirmed owner exists - Button is enabled when multiple confirmed owners exist
f960fb0 to
59d8b6e
Compare
Author
Done! |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Remove button on the owners page is clickable even when the gem has only one owner. Clicking it silently fails (server rejects but no error shown to user).
Disables the button via
disabled: @ownerships.select(&:confirmed?).count <= 1so it's visually inactive when removing the owner would leave the gem with zero owners.This contribution was developed with AI assistance (Claude Code).
Fixes #5666