Skip to content

feat(sessions): improve display name reliability and add creator to RECENTS tooltip#1588

Draft
quay-devel wants to merge 1 commit into
ambient-code:mainfrom
quay-devel:feature/session-display-name-improvements
Draft

feat(sessions): improve display name reliability and add creator to RECENTS tooltip#1588
quay-devel wants to merge 1 commit into
ambient-code:mainfrom
quay-devel:feature/session-display-name-improvements

Conversation

@quay-devel
Copy link
Copy Markdown
Contributor

Summary

  • Display name fallback: When AI-powered display name generation fails (API key misconfigured, timeout, network issues), the system now falls back to extracting the first sentence from the initial prompt instead of silently leaving sessions showing as session-UUID
  • RECENTS tooltip creator: The sidebar RECENTS panel tooltip now shows the session creator name (matching the existing /sessions page tooltip behavior)
  • MCP tool descriptions: Improved display_name/name parameter descriptions to encourage agents to always provide meaningful session titles

Changes

File Change
components/backend/handlers/display_name.go Add generateFallbackDisplayName(), use it when Claude API client init or API call fails
components/frontend/src/.../sessions-sidebar.tsx Add User icon + creator name to RECENTS sidebar tooltip
components/runners/ambient-runner/.../backend_tools.py Improve display_name MCP tool parameter description
components/ambient-mcp/server.go Improve name MCP tool parameter description

Test plan

  • Create a session with an initial prompt — verify display name appears
  • Simulate API key failure — verify fallback name from prompt appears instead of session-UUID
  • Hover over a session in the RECENTS sidebar — verify creator name shows
  • Compare RECENTS tooltip with /sessions page tooltip — both show creator
  • cd components/backend && go build ./handlers/... passes
  • cd components/frontend && tsc --noEmit passes
  • cd components/ambient-mcp && go build ./... passes

🤖 Generated with Claude Code

…ECENTS tooltip

Two improvements to session UX:

1. Display name generation now falls back to extracting the first sentence
   from the initial prompt when the Claude Haiku API call fails (API key
   misconfigured, timeout, network issues). Previously, failures were silent
   and left sessions showing as "session-UUID".

2. The RECENTS panel sidebar tooltip now shows the session creator name,
   matching the existing behavior on the /sessions page.

Also improves MCP tool descriptions for display_name/name parameters to
encourage agents to always provide meaningful session titles.

## Summary
- Add `generateFallbackDisplayName()` in backend display_name.go
- Fall back to prompt-based name when AI client init or API call fails
- Add creator name (User icon + userContext.displayName) to sidebar tooltip
- Update MCP tool descriptions in backend_tools.py and ambient-mcp/server.go

## Test plan
- [ ] Create a session with an initial prompt — verify display name appears
- [ ] Simulate API key failure — verify fallback name from prompt appears
- [ ] Hover over a session in the RECENTS sidebar — verify creator name shows
- [ ] Compare RECENTS tooltip with /sessions page tooltip — both show creator
- [ ] Verify backend builds: `cd components/backend && go build ./handlers/...`
- [ ] Verify frontend types: `cd components/frontend && tsc --noEmit`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for cheerful-kitten-f556a0 canceled.

Name Link
🔨 Latest commit b00ebf7
🔍 Latest deploy log https://app.netlify.com/projects/cheerful-kitten-f556a0/deploys/6a0609d7f536f300083f8613

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a777806c-b7d5-470a-b062-1d883adfb15f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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 and usage tips.

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