fix(tui): show error message to user if not everything was committed#13011
Merged
davidpdrsn merged 1 commit intomasterfrom Mar 24, 2026
Merged
fix(tui): show error message to user if not everything was committed#13011davidpdrsn merged 1 commit intomasterfrom
davidpdrsn merged 1 commit intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the legacy status TUI commit flow by surfacing partial-commit failures to the user when but_api::commit::create::commit_create rejects one or more diff specs, instead of silently dropping them.
Changes:
- Map
RejectionReasonvalues to human-readable explanations and build a multi-line error message listing rejected paths. - Emit a
Message::ShowToasterror toast after commit creation whenrejected_specsis non-empty. - Simplify the
Message::ShowToastenum variant formatting (and remove the prior dead-code suppression).
8227dcb to
d039ca9
Compare
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.
If for some reason some hunks were rejected by
but_api::commit::create::commit_createwe now tell the user. Previously they just silently wouldn't be committed.I have mostly been experiencing this because I tried to commit something to one stack would have resulted in conflicts in another. That causes a rejection. The bare minimum is to tell the user that something went wrong, which is what this PR does. It still isn't a great UX but we don't really have the APIs to improve it yet.
My opinion is that we should tell the user that there will be conflicts, before committing, but still allow making the commit. We should then also provide good tools to fix the conflicts, either before making the commit or after. That requires things like dry-runs which we are working towards.
There are also other ways to commit such as rubbing. I'll deal with those separately.