Skip to content

Conversation

@built-by-as
Copy link
Owner

@built-by-as built-by-as commented Oct 24, 2025

Summary

  • Adds real-time validation when creating worktrees to prevent duplicate branch names
  • Shows red error text "Branch already exists" when user enters an existing branch name
  • Validates against both local and remote branches
  • Prevents worktree creation if branch name conflicts with existing branches

Changes

  • Added error message element in the branch name input field
  • Implemented validateBranchName() function to check against existing branches
  • Added input event listener for real-time validation
  • Added validation check before worktree creation
  • Reset validation state when modal is closed or session created

Test plan

  • Build passes
  • All tests pass
  • Manual testing: Try creating a worktree with an existing branch name and verify error appears
  • Manual testing: Verify error clears when valid branch name is entered
  • Manual testing: Verify creation is blocked when branch exists

Prevents creation of worktrees with branch names that already exist.
Shows real-time validation with red error text when a duplicate branch
name is entered. Validates against both local and remote branches.

Co-Authored-By: Claude <[email protected]>
@built-by-as built-by-as merged commit c5baeb1 into main Oct 24, 2025
1 check 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.

2 participants