Skip to content

feat(controller): use group name for group chat session titles#660

Merged
anthhub merged 3 commits intomainfrom
feat/group-name-session-titles
Mar 30, 2026
Merged

feat(controller): use group name for group chat session titles#660
anthhub merged 3 commits intomainfrom
feat/group-name-session-titles

Conversation

@anthhub
Copy link
Copy Markdown

@anthhub anthhub commented Mar 30, 2026

What

Use human-readable group names (instead of sender names) as session titles for group chats.

Why

Group chat sessions were previously titled with the first sender's name, which is confusing when multiple people participate. The group name is more descriptive and helps users identify conversations at a glance.

How

  • Extract groupName from conversation metadata with multi-source fallback (group_name > chat_name > group_subject > conversation_label)
  • Filter out platform-internal IDs (OpenClaw oc_/ou_ prefixes, Slack channel IDs like C05ABCD1234) so they don't appear as titles
  • Prefer groupName over senderName in the title inference logic
  • Added 4 unit tests covering: normal group names, ID-like filtering, C-prefixed normal names, Slack channel ID filtering

Affected areas

  • Controller (backend / API)

Checklist

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs
  • No any types introduced (use unknown with narrowing)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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: 0819832d9f

ℹ️ 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".

Comment thread apps/controller/src/runtime/sessions-runtime.ts
anthhub added 2 commits March 30, 2026 14:56
Slack uses G (group) and D (DM) prefixes in addition to C (channel).
Without filtering these, raw IDs like G01ABC2DEF3 could appear as
group chat titles instead of falling back to senderName.
@anthhub anthhub merged commit e88d95c into main Mar 30, 2026
8 checks passed
@lefarcen lefarcen mentioned this pull request Mar 30, 2026
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.

3 participants