Skip to content

fix: generate session and thread titles in sentence case - #123389

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
fix/session-title-sentence-case
Aug 15, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
fix/session-title-sentence-case

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

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 — normalizeDashboardSessionTitle only picks the first line, unwraps quotes/fences, collapses whitespace, and truncates. The Control UI renders the persisted displayName verbatim with no text-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:

1  1  extensions/discord/src/monitor/thread-title.generate.test.ts
1  1  extensions/discord/src/monitor/thread-title.ts
1  1  extensions/telegram/src/auto-topic-label-config.ts
1  1  extensions/telegram/src/auto-topic-label.test.ts
1  1  src/gateway/dashboard-session-title.test.ts
1  1  src/gateway/dashboard-session-title.ts

Focused tests, all green on the fix:

node scripts/run-vitest.mjs src/gateway/dashboard-session-title.test.ts
  Test Files 1 passed | Tests 32 passed

node scripts/run-vitest.mjs extensions/telegram/src/auto-topic-label.test.ts
  Test Files 1 passed | Tests 4 passed

node scripts/run-vitest.mjs extensions/discord/src/monitor/thread-title.generate.test.ts
  Test Files 1 passed | Tests 9 passed

Pre-fix failure proof — reverting only the production prompt constant and rerunning the gateway suite fails on the pinned prompt, for the intended reason:

FAIL  |gateway-core| src/gateway/dashboard-session-title.test.ts >
      maybeGenerateDashboardSessionTitle > generates and persists a dashboard display name
-  "prompt": "Generate a concise session title (...) in sentence case: ..."
Test Files 1 failed | Tests 1 failed | 31 passed (32)

Formatting: oxfmt --check clean on all six files. git diff --check clean.

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 slugifyWorktreeTitle for 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

  • Maintainer product decision: adopt sentence case for the three default title prompts while preserving language-specific capitalization, custom Telegram prompts, and existing stored titles.
  • Full source, scoped guidance, current 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.
  • Focused Testbox proof is green on this head: Actions run 31864557837 passed dashboard 32/32, Discord 9/9, and Telegram 4/4 (45/45 total). Exact-head review found no actionable defect. Production and test deltas are both net zero.
  • The prior hosted reds are unrelated to these six prompt/test substitutions:
    • checks-node-compact-large-4 failed the Vitest ownership audit because one run-attempt-state file belonged to two shards; current main repairs that deterministic baseline defect in c28e9a478ea.
    • checks-node-compact-small-2 failed a device-pairing join test with an unexpected 404; current main repairs that independent route race in 941b5240c63.
    • checks-node-changed-extensions-config-2 had 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.
  • These baseline repairs landed after this branch base and do not overlap any touched file. The branch will be updated only because exact-head CI is failed, then hosted CI must be green before prepare.
  • All ClawSweeper review points and the Rank-up move are addressed. No security, owner-boundary, or crash-consistency concern remains.

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.
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 14, 2026 00:27
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: telegram Channel integration: telegram gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 14, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 8:31 PM ET / August 14, 2026, 00:31 UTC.

ClawSweeper review

What this changes

Updates the default title-generation prompts for dashboard sessions, Discord threads, and Telegram topics to request sentence case, with matching prompt-string tests.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep 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
Reviewed head: 4b257383bbc67cf0a60d74af1f1ce437176432b8

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The submitted patch is focused, but checkout inspection failure prevents a higher-confidence implementation assessment.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored maintainer-labeled PR is outside the external-contributor proof gate; the supplied focused test transcript remains supplemental evidence.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored maintainer-labeled PR is outside the external-contributor proof gate; the supplied focused test transcript remains supplemental evidence.
Evidence reviewed 3 items Submitted patch: The provided PR diff changes only the three default prompt strings and their corresponding exact-string tests.
Checkout inspection unavailable: The required read-only checkout inspection could not run: the execution sandbox failed before command execution with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted.
Maintainer handling signal: The provided GitHub context marks this PR with the protected maintainer label and identifies its author association as MEMBER, so it must remain open for maintainer handling.
Findings None None.
Security None None.

How this fits together

A 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]
Loading

Before merge

  • Resolve merge risk (P1) - Direct source, scoped-policy, current-main, and history inspection is blocked by the review sandbox, so this review cannot confirm the claimed sibling-path and upgrade behavior.
  • Complete next step (P2) - A functioning read-only source review is required before a maintainable merge verdict can be given.
Agent review details

Security

None.

PR surface

Source 0, Tests 0. Total 0 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 3 3 0
Tests 3 3 3 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 6 6 0

Review metrics

Metric Value Why it matters
Production vs test delta production net 0 (3 substitutions); tests net 0 (3 substitutions) The supplied diff is six paired one-line prompt/test replacements with no net code growth.

Mantis proof suggestion

A 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:

@openclaw-mantis telegram desktop proof: verify and capture a new default DM topic label generated in sentence case.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Re-run the source and history review in a functioning read-only checkout, then verify the three producer prompts and their consumers before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a cosmetic consistency change to generated display labels, with no reported functional outage or data impact.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored maintainer-labeled PR is outside the external-contributor proof gate; the supplied focused test transcript remains supplemental evidence.
  • add mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The Telegram default topic-label prompt changes a user-visible label that can be demonstrated in a short Telegram Desktop recording.

Label justifications:

  • P3: This is a cosmetic consistency change to generated display labels, with no reported functional outage or data impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored maintainer-labeled PR is outside the external-contributor proof gate; the supplied focused test transcript remains supplemental evidence.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The Telegram default topic-label prompt changes a user-visible label that can be demonstrated in a short Telegram Desktop recording.

Evidence

What I checked:

  • Submitted patch: The provided PR diff changes only the three default prompt strings and their corresponding exact-string tests. (src/gateway/dashboard-session-title.ts:32, 4b257383bbc6)
  • Checkout inspection unavailable: The required read-only checkout inspection could not run: the execution sandbox failed before command execution with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted.
  • Maintainer handling signal: The provided GitHub context marks this PR with the protected maintainer label and identifies its author association as MEMBER, so it must remain open for maintainer handling. (4b257383bbc6)

Likely related people:

  • vyctorbrzezowski: The supplied PR context identifies this member as the author and assignee; direct feature-history provenance could not be inspected. (role: current PR author and assigned reviewer; confidence: low; commits: 4b257383bbc6; files: src/gateway/dashboard-session-title.ts, extensions/discord/src/monitor/thread-title.ts, extensions/telegram/src/auto-topic-label-config.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Re-run the review where the checkout can be read, including scoped guidance, current-main consumers, and feature history.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

ClawSweeper findings and Rank-up move are addressed: full source and scoped guidance, current main, feature history, all three title producers and consumers, the shared label helper, sibling policy, production delta, and prior hosted failures were reviewed. The maintainer selected sentence case for the three default prompts while preserving language-specific capitalization, custom Telegram prompts, and stored titles.

The repository-native review sequence was completed for exact head 897a8fd8d1ac998847ea079dc5b3748284d767d1; focused Testbox proof passed 45/45 and hosted CI is fully green, including openclaw/ci-gate.

@vyctorbrzezowski
vyctorbrzezowski merged commit 82efd1f into main Aug 15, 2026
210 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the fix/session-title-sentence-case branch August 15, 2026 04:38
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 16, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: telegram Channel integration: telegram gateway Gateway runtime maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated session titles use Title Case instead of sentence case

1 participant