feat(desktop): branch switcher dropdown in changes panel (#3482)#3493
Merged
Conversation
Show current git branch name in the Changed-files view with a dropdown to switch branches and a refresh button to reload changes. Backend: - Add GitBranch field to WorkspaceChangesView - Add workspaceGitBranch() helper - Add GitBranches() and GitCheckout() bindings Frontend: - Add branch indicator bar with dropdown menu - Add refresh button with spinning animation - Add workspace-branch CSS styles - Add mock implementations for GitBranches/GitCheckout - Update WorkspaceChangesView type with gitBranch field Tests: - Add GitBranch assertion to existing git status test - Add TestWorkspaceChangesGitBranchDetachedHead - Add gitOutput test helper
# Conflicts: # desktop/frontend/src/styles.css
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.
Lands the branch switcher from #3482 (by @ttmouse) on top of the current
main-v2. The original PR went stale after today's desktop merges (#3480 command palette appended adjacent CSS); resolved thestyles.cssconflict by keeping both blocks,app.go/tests auto-merged.All author commits are preserved with original attribution.
What it does
GitBranchonWorkspaceChangesView, plusworkspaceGitBranch(),GitBranches(),GitCheckout()(named branch + detached HEAD).Follow-up worth a look later: reject branch args beginning with
-inGitCheckoutso they can't be read as git flags.Closes #3482