Skip to content

fix: keep conversation titles valid UTF-8 in promptToTitle truncation - #9837

Open
eminemead wants to merge 1 commit into
rilldata:mainfrom
eminemead:xiaofei.yin/fix-conversation-title-utf8
Open

fix: keep conversation titles valid UTF-8 in promptToTitle truncation#9837
eminemead wants to merge 1 commit into
rilldata:mainfrom
eminemead:xiaofei.yin/fix-conversation-title-utf8

Conversation

@eminemead

@eminemead eminemead commented Aug 27, 2026

Copy link
Copy Markdown
  • ListConversations failed to marshal when a stored conversation title contained invalid UTF-8.
  • promptToTitle truncated with a byte slice (title[:47]), which split multi-byte runes.
  • Truncation is now rune-safe, and titles are sanitized with strings.ToValidUTF8 at the marshal boundary (invalid bytes become U+FFFD) so previously stored rows still list.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

Byte-wise title[:47] split multi-byte Chinese runes, so ListConversations could not marshal existing sessions.
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