Skip to content

fix(threads): preserve server-provided names - #619

Open
mrnwebdesigns wants to merge 1 commit into
Dimillian:mainfrom
mrnwebdesigns:contrib/preserve-server-thread-titles
Open

mrnwebdesigns wants to merge 1 commit into
Dimillian:mainfrom
mrnwebdesigns:contrib/preserve-server-thread-titles

Conversation

@mrnwebdesigns

Copy link
Copy Markdown

Summary

  • Preserve names returned by the app server when building sidebar thread summaries.
  • Keep explicit local renames as the highest-priority display name.
  • Retain the existing message-preview and numbered-agent fallbacks for unnamed threads.
  • Accept title as a compatibility fallback when name is unavailable.

Why

Imported or externally named chats can already have a useful server-provided name. Replacing it with the first-message preview makes those chats harder to identify and can make the sidebar disagree with the source application.

Testing

  • npm run typecheck
  • vitest run src/features/threads/utils/threadSummary.test.ts — 4 tests passed
  • vitest run — 139 test files and 1,003 tests passed

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T12:22:05.371112Z 656142f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 656142fd74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const name = customName
? customName
: clampThreadName(preview) ?? fallbackName;
: clampThreadName(serverName || preview) ?? fallbackName;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ignore UUID placeholder names when building summaries

When the server-provided name is the thread's UUID and no local rename exists, this now chooses the UUID over a useful message preview. onThreadNameUpdated already rejects this exact placeholder in useThreadTurnEvents.ts:172–178, with a corresponding regression test, but list refreshes now bypass that safeguard and replace readable sidebar labels with IDs. Apply the same placeholder check before preferring the server name so these sessions retain the preview or numbered-agent fallback.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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