Fix "Branches are all up to date" error toast on integrate upstream#13713
Merged
Conversation
be1a696 to
1affbb0
Compare
0ab01b8 to
dad42e7
Compare
This was referenced May 9, 2026
Telemetry showed this was the most frequent error toast in v0.19.10.
Users clicking "integrate upstream" when branches were already current
got an error toast instead of a silent no-op.
The `integrate_upstream` function in `upstream_integration.rs` matches on
`StackStatuses::UpdatesRequired` and the else arm (the `UpToDate` case)
called `bail!()`, which surfaced as an error toast in the frontend.
Being up-to-date is a valid state, not an error. Replaced the `bail!()`
with `Ok(IntegrationOutcome { deleted_branches: vec![] })` so the
frontend handles it silently.
dad42e7 to
d3c2541
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an incorrect error surfaced to users when triggering “integrate upstream” while the workspace/base branch is already current, treating “up-to-date” as a valid no-op outcome instead of an error.
Changes:
- Update
integrate_upstreamto return a successful no-opIntegrationOutcomewhen upstream integration statuses areUpToDate. - Prevent the “Branches are all up to date” condition from propagating as an error toast to the frontend.
Comment on lines
568
to
+573
| let statuses = upstream_integration_statuses(&context)?; | ||
|
|
||
| let StackStatuses::UpdatesRequired { statuses, .. } = statuses else { | ||
| bail!("Branches are all up to date") | ||
| return Ok(IntegrationOutcome { | ||
| deleted_branches: vec![], | ||
| }); |
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.
Users clicking "integrate upstream" when branches were already current got an error toast instead of a silent no-op.
The
integrate_upstreamfunction inupstream_integration.rsmatches onStackStatuses::UpdatesRequiredand the else arm (theUpToDatecase) calledbail!("Branches are all up to date"), which surfaced as an error toast in the frontend.Being up-to-date is a valid state, not an error. Replaced the
bail!()withOk(IntegrationOutcome { deleted_branches: vec![] })so the frontend handles it silently.