Skip to content

Preserve language in generated thread titles#2446

Open
alievk wants to merge 1 commit intopingdotgg:mainfrom
alievk:codex/preserve-thread-title-language
Open

Preserve language in generated thread titles#2446
alievk wants to merge 1 commit intopingdotgg:mainfrom
alievk:codex/preserve-thread-title-language

Conversation

@alievk
Copy link
Copy Markdown

@alievk alievk commented May 1, 2026

What Changed

Updated the thread title generation prompt to preserve the user's language.

Added prompt coverage to ensure the instruction stays present.

Why

Thread titles are generated from the user's first message, but the prompt did not specify which language to use. As a result, titles for non-English requests could be generated inconsistently in either the user's language or English.

Keeping the instruction in the prompt is the smallest fix because title generation already happens there, and this avoids adding language detection or UI-side special cases.

Checklist

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

Before

image

After

image

Note

Low Risk
Low risk: only adjusts the LLM prompt text for thread title generation and adds a unit test to prevent regressions; no auth, data handling, or control-flow changes.

Overview
Thread title generation now explicitly instructs the model to use the user’s language and not translate by adding a new rule to buildThreadTitlePrompt.

Adds a focused test in Prompts.test.ts to assert the language-preservation instruction remains present in the generated prompt.

Reviewed by Cursor Bugbot for commit 8eef0c4. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve user language in generated thread titles

Adds the rule "Use the user's language; do not translate." to the buildThreadTitlePrompt function in Prompts.ts, preventing the model from translating thread titles into another language.

Macroscope summarized 8eef0c4.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 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: d78a6a89-c378-4400-9267-c9fb23a32849

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:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 1, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 1, 2026

Approvability

Verdict: Approved

This PR adds a single prompt instruction to preserve the user's language in generated thread titles, along with a corresponding test. The change is purely additive text guidance with no logic or schema changes.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant