Skip to content

feat: create a branch for a work item from any branch - #38

Merged
JacobAtchley merged 1 commit into
mainfrom
feat/create-branch-screen
Sep 30, 2026
Merged

JacobAtchley merged 1 commit into
mainfrom
feat/create-branch-screen

Conversation

@JacobAtchley

Copy link
Copy Markdown
Owner

Why

Branching for a work item always started from the repository's default branch, so a branch for work on a feature or hotfix line had to be made somewhere else.

What

  • b opens a new branch screen in place of the status-line name prompt:
    • repository: preselected from the working directory, otherwise the first; j/k switches and reloads branches
    • name: prefilled from type, id and title, editable
    • from: fuzzy-filtered list of the repository's branches (refs/heads only), cursor on the default branch
    • tab/shift+tab between fields, enter creates, esc backs out
  • b works on a work item's own pane too, including one reached from a pull request.
  • The view that opened the screen reports the outcome and copies the checkout once; the work item list still syncs its row to Active either way.
  • New azdo.Branches; RefHead and the status-line repo picker are removed, since each listed branch carries its commit.
  • README updated.

Testing

  • go vet ./... and go test ./... green.
  • New tests cover the screen (defaults, filtering, repo switch and stale listings, validation, esc, prompting) and owner routing between the list and the item pane.
  • Tried by hand against Azure DevOps from both the list and the item pane.

🤖 Generated with Claude Code

Branching for a work item always started from the repository's default
branch, so a branch for work on a feature or hotfix line had to be made
somewhere else.

b now opens a full screen instead of a name prompt on the status line. It
asks for the repository (preselected from the working directory), the name
(prefilled as before) and the branch to create from: a fuzzy-filtered list
of the repository's branches with the cursor starting on the default
branch. The same screen opens from b on a work item's own pane, including
one reached from a pull request.

The view that opened the screen reports the outcome and copies the
checkout command, so it is copied once however many views the result
reaches; the work item list still syncs its row to Active either way. The
status-line repository picker and RefHead are gone: each listed branch
carries its commit, so no second lookup is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobAtchley
JacobAtchley merged commit 6d9580d into main Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant