code icon indicating copy to clipboard operation
code copied to clipboard

BranchActions dialog

Open jeremypw opened this issue 6 months ago • 3 comments

Fixes #1577

An attempt to reduce the click requirement of common branch actions like checkout and to make it more keyboard friendly. Potentially could be more discoverable by linking to a button in the UI.

The existing hot-key <Ctrl>B now raises a dialog for all branch actions (some not yet implemented).

  • [x] Implement checkout branch (local)
  • [x] Implement checkout branch (remote)
  • [x] Implement Create New Branch
  • [x] Show recently used branches

Other branch functions can be added later such as Delete, Commit, Push etc

Screenshot from 2025-06-22 19 37 03

The list of branches includes categories "Recent", "Local" and "Remote" in alphabetical order and is filtered on names containing the entry text.

The "Checkout" action is the first page in a stack linked to a StackSidebar.

"Recent" branches only contains branches checked out in the current session of Code but may be persisted later.

jeremypw avatar Jun 22 '25 18:06 jeremypw

@danirabbit This is still under construction but before I do too much on it I would welcome your opinion on whether this is viable. It doesn't have to be a dialog of course - it could be a pane or a stack for example and accessed by a button rather than a context menu. The main idea is to have all the git branch actions in one place, accessed by one hot-key, sharing code where possible.

jeremypw avatar Jun 28 '25 14:06 jeremypw

I have dog-fooded this a while and found it very useful even with just a checkout functionality so lets get a review.

jeremypw avatar Oct 18 '25 17:10 jeremypw

Need to remove/hide unimplemented functions.

jeremypw avatar Oct 18 '25 17:10 jeremypw