fix(desktop): use consistent branch sanitization in NewWorkspaceModal#1557
Conversation
…n NewWorkspaceModal Use the same branch sanitization logic for both auto-generated (from title) and manually-edited branch names. Previously, title used sanitizeSegment which strips slashes, while manual input used sanitizeBranchName which preserves slash-separated segments.
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR updates the slug generation logic in NewWorkspaceModal.tsx by replacing the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
sanitizeBranchNameinstead ofsanitizeSegmentfeature/my feature→feature/my-feature)Changes
NewWorkspaceModal.tsx: ChangedgenerateSlugFromTitleto usesanitizeBranchNameinstead ofsanitizeSegmentsanitizeSegmentimportTest Plan
/(e.g.feature/login fix) — branch preview should showfeature/login-fixfix login bug) — branch preview should showfix-login-bug(unchanged behavior)Summary by CodeRabbit