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.
@nishantmonu51 nishantmonu51 added Type:Bug Something isn't working Size:M Medium change: 100-499 lines labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size:M Medium change: 100-499 lines Type:Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants