Repository navigation
fix: generate session and thread titles in sentence case - #123389
Conversation
Generated titles came back in Title Case because none of the title prompts stated a capitalization style; asked for a "title" with no case rule, models default to Title Case and nothing downstream corrects it. The tool-call purpose titles already ask for sentence case, so session titles, Discord auto-thread titles, and Telegram DM topic labels were the outliers. Sets sentence case in each title prompt rather than post-processing: the titles follow the user's language, and sentence-case rules are language-specific, so a mechanical normalizer would mangle German nouns and proper nouns like OpenClaw or GitHub.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 8:31 PM ET / August 14, 2026, 00:31 UTC. ClawSweeper reviewWhat this changesUpdates the default title-generation prompts for dashboard sessions, Discord threads, and Telegram topics to request sentence case, with matching prompt-string tests. Merge readinessKeep this maintainer-authored, maintainer-labeled PR open. The supplied patch is narrowly scoped, but the review environment could not inspect the checkout, scoped guidance, or current-main history because every read command failed before execution. Priority: P3 Review scores
Verification
How this fits togetherA utility model generates short labels from initial user messages. Those labels become dashboard session names or channel-specific thread/topic names. flowchart LR
A[Initial user message] --> B[Title prompt]
B --> C[Utility model]
C --> D[Generated label]
D --> E[Dashboard session]
D --> F[Discord thread]
D --> G[Telegram topic]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests 0. Total 0 across 6 files. View PR surface stats
Review metrics
Mantis proof suggestionA Telegram Desktop capture could directly show a newly generated default topic label using sentence case. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Re-run the source and history review in a functioning read-only checkout, then verify the three producer prompts and their consumers before merge. Do we have a high-confidence way to reproduce the issue? No: the review sandbox prevented source inspection and no executable current-main reproduction was established here. Is this the best way to solve the issue? Unclear: producer-level prompt wording is plausible, but the required owner, consumer, sibling, and current-main comparison could not be verified in this environment. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against f0076b0ca63b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper findings and Rank-up move are addressed: full source and scoped guidance, current The repository-native review sequence was completed for exact head |
|
Merged via squash.
|
…3389) Generated titles came back in Title Case because none of the title prompts stated a capitalization style; asked for a "title" with no case rule, models default to Title Case and nothing downstream corrects it. The tool-call purpose titles already ask for sentence case, so session titles, Discord auto-thread titles, and Telegram DM topic labels were the outliers. Sets sentence case in each title prompt rather than post-processing: the titles follow the user's language, and sentence-case rules are language-specific, so a mechanical normalizer would mangle German nouns and proper nouns like OpenClaw or GitHub.
Closes #123385
What Problem This Solves
Fixes an issue where operators reading the Control UI would see automatically generated session titles in Title Case ("Release Planning Sprint Review") while every other generated label around them uses sentence case. The generated title is the primary identity of a dashboard session, so the mismatch shows up in the sidebar rows, the chat pane title bar, and the sessions list — a few pixels away from the tool-call purpose titles, which already render in sentence case.
The same gap affected the two other generated-title surfaces that share the label generator: Discord auto-thread titles and Telegram DM topic labels.
Why This Change Was Made
None of the three title prompts stated a capitalization style. Asked to produce a "title" with no case rule, models default to Title Case, and nothing downstream corrects it —
normalizeDashboardSessionTitleonly picks the first line, unwraps quotes/fences, collapses whitespace, and truncates. The Control UI renders the persisteddisplayNameverbatim with notext-transform, so the capitalization is produced at generation time and persisted that way. This was a gap rather than a decision:git log -S "Title Case"shows no choice made in this path, and the tool-call title prompt has asked for sentence case since it shipped, making it the established style.The fix states sentence case in each of the three prompts, so all four generated-title surfaces now agree. Deliberately no post-hoc normalizer: these titles follow the user's own language, and sentence-case rules are language-specific — German capitalizes every noun, and proper nouns such as OpenClaw, GitHub, and API must survive. A mechanical case pass would mangle exactly the titles it is meant to tidy, and the tool titles have shipped on prompt-only sentence case. Operator-supplied custom Telegram topic prompts keep winning over the default and are untouched.
Titles already persisted in Title Case stay as they are, with no doctor migration. They are display-only labels, they age out as sessions roll over, sessions can be renamed inline by clicking the title, and a migration would have to apply the same unsafe language-specific heuristic to user-visible data.
User Impact
New generated session titles read as sentence case ("Release planning sprint review"), matching the tool-call titles rendered in the same view. Discord auto-thread titles and Telegram DM topic labels gain the same style. Existing titles are unchanged. No configuration changes, and no new operator action.
Evidence
Production LOC delta: 0. Six one-line changes, three in production prompt strings and three in the tests that pin them:
Focused tests, all green on the fix:
Pre-fix failure proof — reverting only the production prompt constant and rerunning the gateway suite fails on the pinned prompt, for the intended reason:
Formatting:
oxfmt --checkclean on all six files.git diff --checkclean.Surfaces checked while scoping the fix: the persisted title is consumed by the sidebar rows, the chat pane title bar/breadcrumb, the sessions list, and
slugifyWorktreeTitlefor managed worktree branch names — the slug lowercases its input, so sentence case is safe there. No prompt snapshot files reference these prompts; the three exact-string unit assertions are the only pins. The prompts are one-shot system prompts for isolated completions, so no agent prompt cache is affected.Proof gap: no live model run. The change is prompt text, and the model-side behavior it requests matches what the tool-call titles already do in production.
Landing review update — August 15, 2026
main, the shared label helper, all three producers and consumers, sibling tool-title policy, and feature history were inspected. The producer prompts remain the narrowest language-safe owner; a post-processing case transform would corrupt proper nouns and language rules.checks-node-compact-large-4failed the Vitest ownership audit because one run-attempt-state file belonged to two shards; currentmainrepairs that deterministic baseline defect inc28e9a478ea.checks-node-compact-small-2failed a device-pairing join test with an unexpected 404; currentmainrepairs that independent route race in941b5240c63.checks-node-changed-extensions-config-2had no failed assertion; the broad Telegram shard was terminated by its 300-second no-output watchdog after more than 33 minutes. The changed Telegram test passes 4/4 in the focused Testbox run above.