Repository navigation
refactor(cli): changes share one --reason option per wording - #569
Merged
Merged
Conversation
Each command declared its own --reason with one of two help texts. Why and WhyOwnerSees, beside Confirm, hold them once; the help is unchanged.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
marked this pull request as draft
November 20, 2026 07:29
PiquelChips
marked this pull request as ready for review
November 20, 2026 08:31
PiquelChips
marked this pull request as draft
November 21, 2026 14:00
PiquelChips
marked this pull request as ready for review
November 21, 2026 14:26
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.
Part of #544
Every administrative change declared its own
--reason, with one of two help texts copied 30 times (this PR converts 28; the two incli/session.rswait for the session-revocation change): "Why, recorded with the change: 1 to 500 characters." and the account variant that adds "and shown to the owner in their history". Changing the limit or the wording meant touching every copy.Two flattened
#[derive(Args)]structs besideConfirmincli/console.rsnow hold them:WhyandWhyOwnerSees. Commands flatten one and passwhy.reasonon. Commands whose reason means something else keep theirs inline:user recover,user undo-recovery,handle reserve,alerts update --note, andaccount'sChange.The line count barely moves (178+/192−), because every field still needs a doc comment. The gain is one copy of each help text.
cli/session.rskeeps its two inline reasons, since a later PR (S4) reroutes it.auth-serviceonorigin/mainand on this branch, and dumpedhelp <path>and<path> -hfor all 104 command paths. The two dumps are byte-identical, option order included.just docs referenceleavesdocs/dev/operations/cli-commands.mdunchanged.every_operation_has_its_command.Checks run:
just fmt,cargo clippywith and without--all-features(-D warnings),cargo doc -D warningsandjust rust unused: all clean.just db test: 495 of 497 pass. Thekeys::testsfailures hit statement timeouts on the signing-key lock when run in parallel, and they fail the same way onmain(5 failures there).Note
Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code