HOLD: Clarify payment Revert as removing an allocation#1857
Draft
maebeale wants to merge 1 commit into
Draft
Conversation
The revert action only offsets an allocation and returns its amount to the payment's unallocated balance, but the bare "revert" label and a silent greyed-out row left users guessing what it did. Reframe it as "Remove" with a consequence-stating confirm, explicit Removed/Reversal badges, and a one-line explainer, plus light polish on the payments index and detail views. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
maebeale
commented
Jun 22, 2026
| 'bg-red-50' | ||
| elsif allocation.reverted_id.present? | ||
| 'bg-gray-100 border border-gray-300 opacity-60' | ||
| <% is_reversal = allocation.amount.to_i < 0 %> |
Collaborator
Author
There was a problem hiding this comment.
🤖 From Claude: The two badges map to the revert mechanism: is_removed is the original allocation (reverted_id set), is_reversal is the auto-created negative offset row. Both hide the Remove action so a removal can't be removed again.
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.
What is the goal of this PR and why is this important?
How did you approach the change?
UI Testing Checklist
Anything else to add?
revertbehavior was modified. Rebased onto latest main (adopts thedollars_from_centshelper); Rubocop and Brakeman pass.