Skip to content

Disable switch branch button while switching branch - #23028

Merged
sergiou87 merged 1 commit into
desktop:developmentfrom
SnakyBeaky:feat/stash-and-switch-branch-disable-button
Oct 26, 2026
Merged

sergiou87 merged 1 commit into
desktop:developmentfrom
SnakyBeaky:feat/stash-and-switch-branch-disable-button

Conversation

@SnakyBeaky

@SnakyBeaky SnakyBeaky commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #23030

Description

Switching branch when having pending changes in the current branch, pops up a dialog that prompts the user to either leave the changes or bring them. However, after clicking the Switch branch button, only the radio buttons are disabled, the switch branch button is still clickable (even though it does not do anything), which might be confusing to the user.

  • Pass isStashingChanges to okButtonDisabled so the first click disables the button.
  • Add a focused regression test verifying that state change.

Screenshots

Current behaviour:

Before clicking (radio buttons, and switch button enabled)

image

After clicking (loading spinner in the top right of the popup, radio buttons disabled, but switch button is still enabled)

image

@SnakyBeaky
SnakyBeaky requested a review from a team as a code owner October 16, 2026 10:51
@SnakyBeaky
SnakyBeaky requested review from sergiou87 and a balanced review from Copilot October 16, 2026 10:51
@github-actions github-actions Bot added external Pull request originating outside of the Desktop core team needs-triage unmet-requirements and removed needs-triage labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! Unfortunately, it doesn't meet the requirements for review:

  • No linked help wanted issue found in PR description

Please update your PR to address the above. This PR will be automatically closed in 7 days if these requirements are not met.

Full contribution requirements
  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@SnakyBeaky

Copy link
Copy Markdown
Contributor Author

Created issue #23030 and updated PR

@SnakyBeaky

Copy link
Copy Markdown
Contributor Author

Why was the PR closed? cc @sergiou87

@sergiou87

Copy link
Copy Markdown
Member

Because of #23028 (comment)

But let me take a look!! Thanks for your contribution, by the way 🙇‍♂️ 💖

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped fix reuses the existing progress state and includes focused regression coverage, with no unresolved findings.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for updating your pull request! It now meets the minimum requirements and has been queued for triage.

@sergiou87 sergiou87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, thank you!

@sergiou87
sergiou87 merged commit 9a47fa5 into desktop:development Oct 26, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Pull request originating outside of the Desktop core team needs-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching branches with pending changes does not disable switch button

3 participants