Problem Statement
When users rename a git branch (e.g., from "master" to "main"), all existing features remain associated with the old branch name in their feature.json files. This causes features to disappear from the Kanban board UI because they are filtered by branchName field, which no longer matches the current branch.
Current Behavior
- User has features on "master" branch
- User renames branch to "main" (via
git branch -m master main)
- All features still have
"branchName": "master" in their .automaker/features/*/feature.json files
- Features disappear from Kanban board because branchName filter doesn't match
- User must manually update all feature.json files
Proposed Solution
When Automaker detects a branch rename operation (or when the user manually renames a branch), display a prompt:
🔄 Branch Rename Detected
Old branch: master
New branch: main
You have 26 features associated with the old branch.
Would you like to migrate these features to the new branch?
[Migrate All Features] [Keep on Old Branch] [Cancel]
Implementation Details:
- Detect branch renames through git hooks or UI workflow
- Scan
.automaker/features/*/feature.json for matching branchName
- Offer bulk migration with preview of affected features
- Update all matching features in a single transaction
- Log the migration for undo capability
User Stories
- As a developer, when I rename a git branch, I want my features to automatically move to the new branch name so I don't lose work
- As a developer, I want to be prompted before batch updates so I can review what will change
- As a developer, I want to see which features will be affected before confirming the migration
Acceptance Criteria
Alternative Approaches Considered
- Automatic migration without prompt: Too aggressive, user might not want all features migrated
- Manual per-feature migration: Too tedious when there are many features
- Background sync on startup: Could cause confusion if user has intentionally kept features on old branch
Implementation Notes
This could be implemented as:
- A git post-checkout hook that detects branch renames
- A UI flow in the branch management settings
- A CLI command:
automaker migrate-features --from=master --to=main
Related Issue: This enhancement pairs with issue #734, which prevents the root cause by defaulting new projects to "main" branch. However, this migration tool would still be valuable for users who:
Environment
- Automaker v0.14.0rc (also affects v0.13.0)
- Affects all platforms (Docker, Electron, Web)
Problem Statement
When users rename a git branch (e.g., from "master" to "main"), all existing features remain associated with the old branch name in their
feature.jsonfiles. This causes features to disappear from the Kanban board UI because they are filtered bybranchNamefield, which no longer matches the current branch.Current Behavior
git branch -m master main)"branchName": "master"in their.automaker/features/*/feature.jsonfilesProposed Solution
When Automaker detects a branch rename operation (or when the user manually renames a branch), display a prompt:
Implementation Details:
.automaker/features/*/feature.jsonfor matchingbranchNameUser Stories
Acceptance Criteria
Alternative Approaches Considered
Implementation Notes
This could be implemented as:
automaker migrate-features --from=master --to=mainRelated Issue: This enhancement pairs with issue #734, which prevents the root cause by defaulting new projects to "main" branch. However, this migration tool would still be valuable for users who:
Environment