fix(chat): make automatic naming actually name things - #1029
Conversation
Lane titles, chat titles, and Work status notes all shared one failure shape: a rule that was supposed to keep names short instead threw the name away, and the fallbacks behind it were worse than the thing they replaced. - Delete priorityNamingWords. It renamed any prompt that mentioned a provider plus a login-ish phrase to "<provider>-auth-login", inventing the word "auth" the prompt never contained -- and re-triggered on its own branch name, so the wrong name kept coming back. - Six words is now a guideline given to the model, not a rejection rule. An over-long lane title or branch fragment is clamped instead of discarded, and status notes are no longer amputated at word six (only the 72-character display budget remains). - Extract the naming prompts, the provider-failure classification, and the model-candidate chain into sessionNaming.ts. All three callers -- lane identity, chat auto-title, and the legacy lane-name suggestion -- now share one chain instead of three hand-copied ones that had drifted. - Chat auto-titling gains that chain plus a deterministic fallback, so a chat with a real prompt never sits on "Claude Chat". - Classify the account-rejects-this-model 400 as provider-level so the chain jumps providers; keep "not supported for/on/by" per-model so a capability gap still retries a sibling. - Guard the title write against a manual rename that lands mid-flight. - Clip over-long titles on a word boundary, not mid-word. - Right-pane list rows now clamp to the pane width, which longer status notes had started to overflow.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
Next review available in: 10 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesSession experience
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/desktop/src/main/services/chat/agentChatService.test.ts`:
- Line 13491: Replace the fixed delay at
apps/desktop/src/main/services/chat/agentChatService.test.ts#L13491-L13491 with
an observable auto-naming completion check after manual rename, then assert no
model title update occurred. At
apps/desktop/src/main/services/chat/agentChatService.test.ts#L13519-L13519, wait
until the session title differs from "Claude Chat" before asserting the
deterministic fallback content; retain both existing named tests as regression
coverage.
In `@apps/desktop/src/main/services/chat/sessionNaming.ts`:
- Around line 76-77: Update PROVIDER_LEVEL_NAMING_FAILURE_PATTERN in
apps/desktop/src/main/services/chat/sessionNaming.ts: remove model-specific
availability and capacity matches such as “model not found,” “does not exist,”
and bare “insufficient,” while retaining process, account, authentication, and
quota failures. In apps/desktop/src/main/services/chat/sessionNaming.test.ts,
add a named regression test verifying that a model-specific availability error
does not mark the provider as exhausted.
- Around line 124-129: Update the candidate ordering in availableInOrder so,
when crossProviderFallback exists, no more than two preferred candidates precede
it, keeping the cross-provider option within the three-attempt retry budget;
preserve the existing fallback behavior when it is absent. In
apps/desktop/src/main/services/chat/sessionNaming.test.ts lines 45-55, add a
named regression test covering three same-provider preferences with non-provider
failures and assert that the cross-provider candidate executes before the
attempt cap.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a7d1de16-35e9-4b87-8e87-333a3334ed4a
⛔ Files ignored due to path filters (5)
docs/features/agents/README.mdis excluded by!docs/**docs/features/chat/README.mdis excluded by!docs/**docs/features/chat/agent-routing.mdis excluded by!docs/**docs/features/lanes/README.mdis excluded by!docs/**docs/features/terminals-and-sessions/README.mdis excluded by!docs/**
📒 Files selected for processing (17)
apps/ade-cli/README.mdapps/ade-cli/src/cli.tsapps/ade-cli/src/services/sync/rosterBuilder.test.tsapps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsxapps/ade-cli/src/tuiClient/components/RightPane.tsxapps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.mdapps/desktop/src/main/services/chat/agentChatService.test.tsapps/desktop/src/main/services/chat/agentChatService.tsapps/desktop/src/main/services/chat/sessionNaming.test.tsapps/desktop/src/main/services/chat/sessionNaming.tsapps/desktop/src/shared/adeCliGuidance.test.tsapps/desktop/src/shared/adeCliGuidance.tsapps/desktop/src/shared/laneNameFallback.test.tsapps/desktop/src/shared/laneNameFallback.tsapps/desktop/src/shared/sessionStatusNote.test.tsapps/desktop/src/shared/sessionStatusNote.tsapps/desktop/src/shared/types/sessions.ts
💤 Files with no reviewable changes (1)
- apps/desktop/src/shared/laneNameFallback.ts
…count sessionService's normalization test still expected notes to be cut at six words. Both fixtures fit the display budget, so they now survive whole -- which is the contract the note normalizer actually enforces.
41a0a99 to
888598a
Compare
Review follow-ups on the naming chain. - Splice the cross-provider candidate ahead of the third preference. Three same-provider preferences failing transiently (a hang-up, a timeout -- none of them provider-level) used to spend the whole three-attempt budget before naming ever tried another provider, which is the outage the chain exists to survive. - Stop condemning a provider for a model-specific error. "model not found" and "does not exist" describe one unavailable model, so a sibling on the same provider still deserves a turn; a bare "not found" was swallowing them, so it is now scoped to "command not found". - Replace the fixed 50ms waits in the two auto-title regression tests with waits on the observable state, so a slow CI worker cannot pass the rename race by luck or fail the fallback before it is stored.
|
@codex review Addressed all three CodeRabbit findings in 948bab2:
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This was already fixed in the commit it was posted against (948bab2). |
Summary by CodeRabbit
New Features
Documentation