Repository navigation
fix(naming): keep the built-in branch-name prompt general - #9088
Conversation
The shipped auto-rename prompt no longer hard-codes style rules (word count, kebab-case, no prefixes). Users can already override naming via Source Control AI instructions and the branch-name command template; a prescriptive default fought those overrides. Git-safe sanitization still runs after generation.
📝 WalkthroughWalkthroughUpdated branch-name prompt construction so custom prompts take precedence and default prompts use shorter general instructions. Added assertions for prompt ordering, template migration, and removal of legacy rule sections. Revised prefix-stripping documentation and tests, updated source-control AI branch-name template ordering across normalization and legacy migration paths, changed a persistence expectation, and advanced selected manifest versions to 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d6334c24-16b3-468b-9e32-b99de056a192
📒 Files selected for processing (7)
resources/skills/current-manifest.jsonsrc/main/persistence.test.tssrc/main/text-generation/commit-message-text-generation.test.tssrc/shared/branch-name-from-work.test.tssrc/shared/branch-name-from-work.tssrc/shared/source-control-ai.test.tssrc/shared/source-control-ai.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/main/text-generation/commit-message-text-generation.test.ts
- src/shared/branch-name-from-work.test.ts
- src/shared/branch-name-from-work.ts
Live Electron validationValidated the regular auto-rename flow in an isolated dev profile against this PR:
Before — generated creature branch After — sidebar and terminal show the renamed branch while the agent completes the task: |
* fix(naming): remove identifier-first name post-processing Workspace display names and tab titles were being rewritten after generation by prompt-scanning heuristics from #8238 — a stray "#1" in prose became a workspace named "#1 - Fix", and the rewrite ran downstream of generation so user naming instructions couldn't override it. Per the same principle as #9088, naming defaults stay minimal and user overrides own the style. - Delete work-item-reference.ts and display-name-from-work.ts (+tests). - Auto-rename display names return to the humanized branch slug; tab titles return to the cleaned first prompt clause. - Explicit create-from-work-item naming returns to action-first ("Review PR 1234"). - Keep #8238's URL-before-markdown strip-order bugfix in tab titles, with regression tests adjusted to the natural expectations. * test(naming): pin incidental marker regression
) * fix(naming): keep the built-in branch-name prompt general The shipped auto-rename prompt no longer hard-codes style rules (word count, kebab-case, no prefixes). Users can already override naming via Source Control AI instructions and the branch-name command template; a prescriptive default fought those overrides. Git-safe sanitization still runs after generation. * fix(naming): preserve branch prompt overrides * chore(skills): refresh rc.2 manifest version
) * fix(naming): remove identifier-first name post-processing Workspace display names and tab titles were being rewritten after generation by prompt-scanning heuristics from stablyai#8238 — a stray "stablyai#1" in prose became a workspace named "stablyai#1 - Fix", and the rewrite ran downstream of generation so user naming instructions couldn't override it. Per the same principle as stablyai#9088, naming defaults stay minimal and user overrides own the style. - Delete work-item-reference.ts and display-name-from-work.ts (+tests). - Auto-rename display names return to the humanized branch slug; tab titles return to the cleaned first prompt clause. - Explicit create-from-work-item naming returns to action-first ("Review PR 1234"). - Keep stablyai#8238's URL-before-markdown strip-order bugfix in tab titles, with regression tests adjusted to the natural expectations. * test(naming): pin incidental marker regression


Summary
sanitizeBranchSlug/ prefix stripping in place for git-safe leaves.Why
Users can already customize naming via instructions and the branch-name command template. A rigid built-in rule list fights those overrides. The default should stay general; mechanical sanitization still keeps branches usable.
Test plan
vitestforbranch-name-from-workand branch-name custom prompt coverage