You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switching branches with pending changes does not disable switch button #23030
bugConfirmed bugs or reports that are very likely to be bugshelp wantedIssues marked as ideal for external contributorspriority-3Bugs that affect small number of users and/or relatively cosmetic in nature
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.
Release version
3.6.7
Operating system
Windows 11
Steps to reproduce the behavior
Generate any change in the current branch (add/modify/delete any file)
Switch to a different branch
Click the "Switch branch" button in the popup
The radio buttons are disabled, but not the switch button
Log files
No response
Screenshots
Before clicking (radio buttons, and switch button enabled)
fter clicking (radio buttons disabled, but switch button is still enabled)
Triage summary: This is a confirmed UI/UX bug: after clicking "Switch branch" in the stash-changes dialog, the radio buttons visibly grey out but the "Switch branch" button itself keeps its enabled appearance (and remains focusable), even though it's functionally inert. Suggesting bug with priority-3 since it's cosmetic/confusing but has no data-loss or workflow-blocking impact, and a workaround (simply not clicking twice) exists.
Initial hypothesis: The dialog (StashAndSwitchBranch in app/src/ui/stash-changes/stash-and-switch-branch-dialog.tsx) sets disabled={isStashingChanges} on the surrounding Dialog, which wraps its children in a native <fieldset disabled> (see app/src/ui/dialog/dialog.tsx#L950-L952). A <fieldset disabled> correctly disables native form controls like the radio buttons, matching the reporter's screenshot, but OkCancelButtonGroup's "Switch branch" button (rendered at lines 73-75) is never passed an explicit okButtonDisabled prop tied to isStashingChanges, and Button's custom onClick/styling logic (app/src/ui/lib/button.tsx#L231-L248) depends on its own disabled prop rather than purely on fieldset inheritance for visual state, which is why it can still appear clickable. A related, already-open fix is tracked in #23028 ("Disable switch branch button while switching branch"), which this issue is linked to as the closing PR — once merged it should resolve this report.
Duplicate Check: No duplicate issue found. Searched "switch branch button disabled", "stash changes switch button", and related terms — found only tangentially related stash issues (#21904, #12699, #20919) that describe different problems (stash+rebase interaction, multiple-stash support, and a now-closed indicator request), none of which report this specific disabled-button inconsistency.
bugConfirmed bugs or reports that are very likely to be bugshelp wantedIssues marked as ideal for external contributorspriority-3Bugs that affect small number of users and/or relatively cosmetic in nature
Activity
desktop-triage commentedon Oct 16, 2026
Triage summary: This is a confirmed UI/UX bug: after clicking "Switch branch" in the stash-changes dialog, the radio buttons visibly grey out but the "Switch branch" button itself keeps its enabled appearance (and remains focusable), even though it's functionally inert. Suggesting
bugwithpriority-3since it's cosmetic/confusing but has no data-loss or workflow-blocking impact, and a workaround (simply not clicking twice) exists.Initial hypothesis: The dialog (
StashAndSwitchBranchinapp/src/ui/stash-changes/stash-and-switch-branch-dialog.tsx) setsdisabled={isStashingChanges}on the surroundingDialog, which wraps its children in a native<fieldset disabled>(seeapp/src/ui/dialog/dialog.tsx#L950-L952). A<fieldset disabled>correctly disables native form controls like the radio buttons, matching the reporter's screenshot, butOkCancelButtonGroup's "Switch branch" button (rendered at lines 73-75) is never passed an explicitokButtonDisabledprop tied toisStashingChanges, andButton's customonClick/styling logic (app/src/ui/lib/button.tsx#L231-L248) depends on its owndisabledprop rather than purely on fieldset inheritance for visual state, which is why it can still appear clickable. A related, already-open fix is tracked in #23028 ("Disable switch branch button while switching branch"), which this issue is linked to as the closing PR — once merged it should resolve this report.Duplicate Check: No duplicate issue found. Searched "switch branch button disabled", "stash changes switch button", and related terms — found only tangentially related stash issues (#21904, #12699, #20919) that describe different problems (stash+rebase interaction, multiple-stash support, and a now-closed indicator request), none of which report this specific disabled-button inconsistency.