Skip to content

fix(naming): remove identifier-first name post-processing - #9821

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/remove-identifier-first-naming
Jul 22, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/remove-identifier-first-naming

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

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-#N fallback promotes any stray #1 in 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).

Kept from #8238: the genuine tab-title bugfix that strips URLs before markdown punctuation (a GitLab merge_requests URL was being split at its underscore, leaking "requests" into titles), with its regression tests adjusted to the natural expectations.

Test plan

  • vitest for src/shared + src/main/agent-hooks (3130 tests) and launch-work-item-direct
  • Full typecheck, oxlint, oxfmt clean
  • No remaining references to the deleted modules in src/ or mobile/
  • Manual QA in the real app (Electron dev build, this branch): first prompt containing a stray #1 no longer produces an identifier-first name — see below

Manual 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:

Fix the flaky redirect test described in note #1 of the QA doc. First reply with a one-paragraph plan only - do not run any commands or change any files yet.

Before the first agent message — workspace still has the auto-generated creature name auk, default tab title:

before first message

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 #1 visible in the prompt echo. On the old code the bare-#N fallback would have named this #1 - Fix …:

after first message

Backing state corroborated via the store: displayName: "Fix flaky redirect test", branch: refs/heads/brennanb2025/fix-flaky-redirect-test. (Screenshots hosted on orphan branch pr-9821-screenshots.)

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.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@brennanb2025, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 23a52795-acdc-4f55-8251-8a829fda09b9

📥 Commits

Reviewing files that changed from the base of the PR and between 44f77a3 and 951a0a5.

📒 Files selected for processing (12)
  • src/main/agent-hooks/first-work-branch-rename.test.ts
  • src/main/agent-hooks/first-work-branch-rename.ts
  • src/main/agent-hooks/first-work-workspace-title-rename.ts
  • src/renderer/src/lib/launch-work-item-direct.test.ts
  • src/shared/agent-tab-title.test.ts
  • src/shared/agent-tab-title.ts
  • src/shared/display-name-from-work.test.ts
  • src/shared/display-name-from-work.ts
  • src/shared/work-item-reference.test.ts
  • src/shared/work-item-reference.ts
  • src/shared/workspace-name.test.ts
  • src/shared/workspace-name.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 merged commit 9097ea0 into main Jul 22, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
)

* 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
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.

1 participant