Skip to content

feat(threads): auto-generate first-turn thread titles#1375

Open
maria-rcks wants to merge 8 commits intopingdotgg:mainfrom
maria-rcks:feat/title-summaries-2
Open

feat(threads): auto-generate first-turn thread titles#1375
maria-rcks wants to merge 8 commits intopingdotgg:mainfrom
maria-rcks:feat/title-summaries-2

Conversation

@maria-rcks
Copy link
Collaborator

@maria-rcks maria-rcks commented Mar 24, 2026

Closes #990

What Changed

  • use the existing text generation model setting for first-turn thread title generation
  • auto-generate a thread title from the first user prompt on the server
  • keep title generation off the critical path so the turn starts immediately
  • rename the settings copy from "Git writing model" to "Text generation model"
  • reuse the same text generation model for automatic worktree branch naming

Why

Thread titles were still just truncated prompt text.

This makes new threads easier to scan while keeping the model selection simpler and reusing the same text generation path we already have for commit, PR, and branch text.

UI Changes

Settings now says Text generation model

image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Moderate risk because it changes first-turn orchestration behavior and contracts by adding a new textGenerationModel field and triggering additional async side effects (title generation + branch rename) that could affect thread metadata updates.

Overview
Auto-generates a thread title from the first user turn. On the server, ProviderCommandReactor now forks a new first-turn side effect that calls TextGeneration.generateThreadTitle and dispatches thread.meta.update with the generated title.

Extends the text-generation pipeline and plumbing. TextGeneration adds generateThreadTitle, implemented in CodexTextGeneration with attachment-aware prompting plus sanitization (single-line, quote/whitespace normalization, 50-char truncation, and fallback to New thread). The client and contracts now pass an optional textGenerationModel through thread.turn.startthread.turn-start-requested, and that model is reused for automatic worktree branch naming.

UI copy update. The settings label/description for the model selector is renamed from "Git writing model" to "Text generation model" to reflect expanded usage.

Written by Cursor Bugbot for commit af6a180. This will update automatically on new commits. Configure here.

Note

Auto-generate thread titles on the first user turn using the configured text generation model

  • On the first user message in a thread, ProviderCommandReactor now forks a maybeGenerateThreadTitleForFirstTurn call alongside the existing worktree branch rename, dispatching a thread.meta.update with the generated title on success.
  • A new generateThreadTitle method is added to TextGenerationShape (implemented in CodexTextGeneration), which builds a prompt from the message text and any attachments, calls Codex, and returns a sanitized title.
  • Title sanitization trims whitespace, strips surrounding quotes/backticks, collapses internal whitespace, falls back to 'New thread' if empty, and truncates to 50 characters with an ellipsis.
  • The textGenerationModel field is threaded through the orchestration contract (ThreadTurnStartCommand, ThreadTurnStartRequestedPayload) and the ChatView UI dispatch so both title and branch generation use the user-configured model.
  • The settings label for this model is renamed from 'Git writing model' to 'Text generation model' to reflect its broader use.

Macroscope summarized af6a180.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

Important

Review skipped

Auto reviews are disabled on this repository. 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6896bdf0-5eb8-48c9-92b2-4aa32fb042de

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

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.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 24, 2026
@maria-rcks maria-rcks force-pushed the feat/title-summaries-2 branch from b256e14 to 5335f66 Compare March 24, 2026 20:32
@maria-rcks maria-rcks force-pushed the feat/title-summaries-2 branch from 5335f66 to 6e727cd Compare March 25, 2026 12:59
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support ai generated thread names

1 participant