Repository navigation
fix(naming): remove identifier-first name post-processing - #9821
Conversation
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.
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
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 |
) * 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
Worktrees were showing up with names like
#1 - Fix. The culprit is the identifier-first naming from #8238: deterministic post-processing that regex-scans the raw first prompt for a work-item reference and rewrites the workspace display name and tab title around it. Its bare-#Nfallback promotes any stray#1in prompt prose to a workspace name — and because the rewrite runs after generation, user naming instructions can't override it.Per the same principle as #9088: naming defaults stay minimal, users own the style. This removes the post-processing layer entirely (net −501 lines).
src/shared/work-item-reference.tsandsrc/shared/display-name-from-work.ts(+tests).first-work-branch-rename.ts,first-work-workspace-title-rename.ts) return to the humanized branch slug (pre-fix(naming): lead workspace and tab names with the work-item identifier #8238 behavior).agent-tab-title.ts) return to the cleaned first prompt clause.workspace-name.ts) returns to action-first (Review PR 1234). The identifier still appears in that flow — the user explicitly picked the item; that predates fix(naming): lead workspace and tab names with the work-item identifier #8238.Kept from #8238: the genuine tab-title bugfix that strips URLs before markdown punctuation (a GitLab
merge_requestsURL was being split at its underscore, leaking "requests" into titles), with its regression tests adjusted to the natural expectations.Test plan
vitestforsrc/shared+src/main/agent-hooks(3130 tests) andlaunch-work-item-directtypecheck,oxlint,oxfmtcleansrc/ormobile/#1no longer produces an identifier-first name — see belowManual QA
Launched this branch's dev build, created a fresh workspace (auto-named
auk), and sent a first Claude prompt whose prose contains a stray#1— the exact regression trigger:Before the first agent message — workspace still has the auto-generated creature name
auk, default tab title:After the first agent message — the auto-rename produced the humanized branch slug "Fix flaky redirect test" (branch
brennanb2025/fix-flaky-redirect-test) for both the sidebar workspace name and the tab title. No#1 -prefix anywhere, despite the#1visible in the prompt echo. On the old code the bare-#Nfallback would have named this#1 - Fix …:Backing state corroborated via the store:
displayName: "Fix flaky redirect test",branch: refs/heads/brennanb2025/fix-flaky-redirect-test. (Screenshots hosted on orphan branchpr-9821-screenshots.)