Skip to content

itdove/devaiflow#331: Branch workflow UX issues: missing branch selection prompt and outdated base branch#333

Merged
itdove merged 2 commits intomainfrom
331
Mar 27, 2026
Merged

itdove/devaiflow#331: Branch workflow UX issues: missing branch selection prompt and outdated base branch#333
itdove merged 2 commits intomainfrom
331

Conversation

@itdove
Copy link
Copy Markdown
Owner

@itdove itdove commented Mar 27, 2026

GitHub Issue: #331

Description

This PR addresses two UX issues in the branch workflow:

  1. Branch selection when declining new branch creation: When users decline to create a new branch during daf new or daf open, they are now prompted to select an existing branch instead of leaving them stranded.

  2. Up-to-date base branches: New branches are now created from an up-to-date version of the default branch. The CLI now fetches the latest changes from the remote default branch before creating new branches, preventing branches from being based on stale local commits.

These changes improve the user experience by providing clearer workflow options and ensuring branches start from the correct base state.

Assisted-by: Claude

Testing

Steps to test

  1. Pull down the PR
  2. Test declining new branch creation:
    • Run daf new or daf open <issue>
    • When prompted to create a new branch, decline (answer 'n')
    • Verify you're prompted to select an existing branch
    • Verify the selected branch is checked out successfully
  3. Test branch creation from up-to-date base:
    • Ensure your local default branch is behind remote
    • Run daf new and accept creating a new branch
    • Verify the new branch is based on the latest remote default branch commits
  4. Run the test suite: pytest tests/test_branch_workflow_ux_fixes.py

Scenarios tested

  • Declining new branch creation and selecting an existing branch
  • Creating new branch when local default is out of sync with remote
  • Branch creation workflow with up-to-date local default branch
  • Error handling for branch checkout failures

Deployment considerations

  • This code change is ready for deployment on its own
  • This code change requires the following considerations before being deployed:

itdove and others added 2 commits March 27, 2026 17:48
- Display list of local branches when user declines to create new branch
- Support branch selection by number or name with current branch default
- Automatically checkout selected branch with error handling
- Show current branch indicator in branch list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Switch to default branch before creating new branch
- Pull latest changes before branch creation
- Prompt user for confirmation if pull operation fails
- Add informative status messages during creation process

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@itdove itdove marked this pull request as ready for review March 27, 2026 22:00
@itdove itdove merged commit f3b67e7 into main Mar 27, 2026
7 checks passed
@itdove itdove deleted the 331 branch March 27, 2026 22:00
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