Skip to content

fix(chat): make automatic naming actually name things - #1029

Merged
arul28 merged 3 commits into
mainfrom
ade/claude-auth-login-2
Aug 4, 2026
Merged

fix(chat): make automatic naming actually name things#1029
arul28 merged 3 commits into
mainfrom
ade/claude-auth-login-2

Conversation

@arul28

@arul28 arul28 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

ADE   Open in ADE  ·  ade/claude-auth-login-2 branch  ·  PR #1029

Summary by CodeRabbit

  • New Features

    • Automatic session titles and lane names now retry across available providers and use deterministic fallbacks when needed.
    • Manual renames are preserved even when automatic naming is in progress.
    • Longer status notes are preserved up to 72 characters, with guidance recommending six words or fewer.
    • Chat rows in the right pane now fit the available width with ellipsis truncation instead of wrapping.
  • Documentation

    • Updated CLI and desktop guidance for status-note length and formatting.

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

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Aug 4, 2026 11:18pm

@arul28 arul28 changed the title Claude Auth Login -> Primary fix(chat): make automatic naming actually name things Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

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 @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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9cdf9748-bbed-40ae-bbf3-4a09ccc8ccc2

📥 Commits

Reviewing files that changed from the base of the PR and between baef21f and 948bab2.

📒 Files selected for processing (4)
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/chat/sessionNaming.test.ts
  • apps/desktop/src/main/services/chat/sessionNaming.ts
  • apps/desktop/src/main/services/sessions/sessionService.test.ts
📝 Walkthrough

Walkthrough

Changes

Session experience

Layer / File(s) Summary
Status-note limits and guidance
apps/desktop/src/shared/sessionStatusNote.ts, apps/desktop/src/shared/adeCliGuidance.ts, apps/ade-cli/src/cli.ts, apps/desktop/resources/agent-skills/...
Status notes now use a 72-character limit with a recommended six-word guideline. CLI, desktop guidance, documentation, types, and tests use the shared limits.
TUI row width handling
apps/ade-cli/src/tuiClient/components/RightPane.tsx, apps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsx
Right-pane rows truncate to the available width with an ellipsis and remain on one line.
Shared naming retry engine
apps/desktop/src/main/services/chat/sessionNaming.ts, apps/desktop/src/main/services/chat/sessionNaming.test.ts
Shared naming utilities construct model candidates, classify provider failures, retry across providers, support cancellation, and enforce attempt limits.
Deterministic lane fallback
apps/desktop/src/shared/laneNameFallback.ts, apps/desktop/src/shared/laneNameFallback.test.ts
Lane fallback names derive directly from filtered prompt tokens without priority-word overrides or the former six-word title limit.
Agent chat naming integration
apps/desktop/src/main/services/chat/agentChatService.ts, apps/desktop/src/main/services/chat/agentChatService.test.ts
Automatic titles and lane names use shared retries, preserve manual renames, clamp model output, log attempts, and fall back deterministically.
Estimated code review effort: 4 (Complex) ~60 minutes

Possibly related PRs

  • arul28/ADE#291: Both modify RightPane.tsx and its list-row rendering tests.
  • arul28/ADE#696: The row truncation changes build on related display-width utilities.
  • arul28/ADE#977: Both update status-note normalization and its CLI and roster tests.

Suggested labels: desktop, docs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: improving automatic naming for chats, lanes, and related session names.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/claude-auth-login-2

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3e7e8f3 and baef21f.

⛔ Files ignored due to path filters (5)
  • docs/features/agents/README.md is excluded by !docs/**
  • docs/features/chat/README.md is excluded by !docs/**
  • docs/features/chat/agent-routing.md is excluded by !docs/**
  • docs/features/lanes/README.md is excluded by !docs/**
  • docs/features/terminals-and-sessions/README.md is excluded by !docs/**
📒 Files selected for processing (17)
  • apps/ade-cli/README.md
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/sync/rosterBuilder.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsx
  • apps/ade-cli/src/tuiClient/components/RightPane.tsx
  • apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/main/services/chat/sessionNaming.test.ts
  • apps/desktop/src/main/services/chat/sessionNaming.ts
  • apps/desktop/src/shared/adeCliGuidance.test.ts
  • apps/desktop/src/shared/adeCliGuidance.ts
  • apps/desktop/src/shared/laneNameFallback.test.ts
  • apps/desktop/src/shared/laneNameFallback.ts
  • apps/desktop/src/shared/sessionStatusNote.test.ts
  • apps/desktop/src/shared/sessionStatusNote.ts
  • apps/desktop/src/shared/types/sessions.ts
💤 Files with no reviewable changes (1)
  • apps/desktop/src/shared/laneNameFallback.ts

Comment thread apps/desktop/src/main/services/chat/agentChatService.test.ts Outdated
Comment thread apps/desktop/src/main/services/chat/sessionNaming.ts Outdated
Comment thread apps/desktop/src/main/services/chat/sessionNaming.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.
@arul28
arul28 force-pushed the ade/claude-auth-login-2 branch from 41a0a99 to 888598a Compare August 4, 2026 22:52
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.
@arul28

arul28 commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Addressed all three CodeRabbit findings in 948bab2:

  • Cross-provider candidate is now spliced ahead of the third preference so it always falls inside the 3-attempt budget (regression test: keeps the cross-provider candidate inside the attempt budget).
  • model not found / does not exist no longer condemn a provider, and the bare not found that was swallowing them is scoped to command not found (regression test: does not condemn the provider when one model is unavailable).
  • The two auto-title regression tests now wait on observable state instead of fixed 50ms delays.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@arul28

arul28 commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

This was already fixed in the commit it was posted against (948bab2). buildNamingModelCandidates splices crossProviderFallback at Math.min(preferred.length, MAX_NAMING_ATTEMPTS - 1), so at most two preferred candidates precede it, and sessionNaming.test.ts :: keeps the cross-provider candidate inside the attempt budget asserts three same-provider preferences failing with socket hang up still reach the other provider.

@arul28
arul28 merged commit c99e84e into main Aug 4, 2026
36 checks passed
@arul28
arul28 deleted the ade/claude-auth-login-2 branch August 4, 2026 23:30
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